diff --git a/app/views/phases/_add_note.html.erb b/app/views/phases/_add_note.html.erb index 41d72f5..2b59859 100644 --- a/app/views/phases/_add_note.html.erb +++ b/app/views/phases/_add_note.html.erb @@ -22,7 +22,7 @@
- <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary new_comment_submit_button" %> + <%= f.submit _('Save'), :class => "btn btn-primary new_comment_submit_button" %>

<%end%> diff --git a/app/views/phases/_answer_form.html.erb b/app/views/phases/_answer_form.html.erb index 74ae43a..4040ad0 100644 --- a/app/views/phases/_answer_form.html.erb +++ b/app/views/phases/_answer_form.html.erb @@ -37,9 +37,9 @@
<% if suggested_answer["is_example"] then %> - <%= t("org_admin.questions.example_answer_label")%> + <%= _('Example of answer')%> <%else%> - <%= t("org_admin.questions.suggested_answer_label")%> + <%= _('Suggested answer')%> <%end%> @@ -79,7 +79,7 @@ <% if question.option_comment_display == true %> - <%= label_tag("answer-text-#{question.id}".to_sym, t("helpers.comment")) %> + <%= label_tag("answer-text-#{question.id}".to_sym, _('Comment')) %> <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> <%end%> <% end %> @@ -94,20 +94,20 @@ <%= f.actions do %> - <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"} %> -
  • " class="saving-message" style="display:none;"><%= t("helpers.saving")%>
  • + <%= f.action :submit, :label => _('Save'), :button_html => { :class => "btn btn-primary"} %> +
  • " class="saving-message" style="display:none;"><%= _('Saving...')%>
  • <% end %> <% end %>
    <% if answer.nil? || !answer.has_key?("created_at") || answer["created_at"].nil? %> - -status" class="label label-warning answer-status"><%= t("helpers.notanswered") %> + -status" class="label label-warning answer-status"><%= _('Not answered yet') %> <% else %> - -status" class="label label-info answer-status"><%= t("helpers.answered_by")%><%= answer_obj.created_at %><%= t("helpers.answered_by_part2")%><%= answer_obj.user.name %> + -status" class="label label-info answer-status"><%= _('Answered')%><%= answer_obj.created_at %><%= _('by')%><%= answer_obj.user.name %> <% end %> --unsaved" class="label label-inverse answer-unsaved" style="display:none;"><%= t("helpers.unsaved") %> +-unsaved" class="label label-inverse answer-unsaved" style="display:none;"><%= _('Unsaved changes') %>
    @@ -121,14 +121,14 @@ <% css_style_comment_div = "display: none;"%> <% css_style_guidance_div = ""%>
  • - <%= link_to t("helpers.guidance_accordion_label"), "#", :class => "guidance_accordion_button" %> + <%= link_to _('Guidance'), "#", :class => "guidance_accordion_button" %>
  • <% if comments.count > 0 then%> - <% comments_label_with_count = "#{t("helpers.comment_accordion_label")} (#{comments.count})"%> + <% comments_label_with_count = "#{_('Notes')} (#{comments.count})"%> <%= link_to comments_label_with_count , "#", :class => "comments_accordion_button" %> <%else%> - <%= link_to t("helpers.add_comment_accordion_label"), "#", :class => "comments_accordion_button" %> + <%= link_to _('Share note'), "#", :class => "comments_accordion_button" %> <%end%>
  • <%else%> @@ -137,10 +137,10 @@ <% css_style_guidance_div = "display: none;"%>
  • <% if comments.count > 0 then%> - <% comments_label_with_count = "#{t("helpers.comment_accordion_label")} (#{comments.count})"%> + <% comments_label_with_count = "#{_('Notes')} (#{comments.count})"%>

    <%= comments_label_with_count %>

    <%else%> -

    <%= t("helpers.add_comment_accordion_label") %>

    +

    <%= _('Share note') %>

    <%end%>
  • <%end%> @@ -160,7 +160,7 @@
    -guidance" href="#collapse-guidance-<%= question["id"]%>">
    - <%= plan.template.org.abbreviation %> <%= t("helpers.guidance") %> + <%= plan.template.org.abbreviation %> <%= _('Guidance') %>
    diff --git a/app/views/phases/_answer_form_ro.html.erb b/app/views/phases/_answer_form_ro.html.erb index 64a0fb0..d0f18ea 100644 --- a/app/views/phases/_answer_form_ro.html.erb +++ b/app/views/phases/_answer_form_ro.html.erb @@ -28,9 +28,9 @@
    <% if suggested_answer.is_example? then %> - <%= t("org_admin.questions.example_answer_label")%> + <%= _('Example of answer')%> <%else%> - <%= t("org_admin.questions.suggested_answer_label")%> + <%= _('Suggested answer')%> <%end%>
    @@ -42,24 +42,24 @@ <% end %> - <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") then%> + <% if q_format.title == _('Check box') || q_format.title == _('Multi select box') || q_format.title == _('Radio buttons') || q_format.title == _('helpers.dropdown') then%> <% options = question.options.order("number") %> - <% if q_format.title == t("helpers.checkbox") then %> + <% if q_format.title == _('Check box') then %> <% if readonly then %> <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, input_html => { :disabled => true, :id => "options-#{question.id}" } %> <% else %> <%= f.input :options, :as => :check_boxes, :collection => options, :label => false, :input_html => { :id => "options-#{question.id}" } %> <% end %> - <% elsif q_format.title == t("helpers.multi_select_box") then %> + <% elsif q_format.title == _('Multi select box') then %> <% if readonly then %> <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true, :disabled => true , :id => "options-#{question.id}" } %> <% else %> <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => true , :id => "options-#{question.id}" } %> <% end %> - <% elsif q_format.title == t("helpers.radio_buttons") then%> + <% elsif q_format.title == _('Radio buttons') then%>
      <% options.each do |op| %>
    1. @@ -80,7 +80,7 @@ <% end %>
    - <% elsif q_format.title == t("helpers.dropdown") then%> + <% elsif q_format.title == _('Dropdown') then%> <% if readonly then %> <%= f.input :options, :as => :select, :collection => options, :label => false, :input_html => { :multiple => false, :disabled => true, :id => "options-#{question.id}" } %> <% else %> @@ -89,15 +89,15 @@ <% end %> <% if question.option_comment_display == true then%> - <%= label_tag("answer-text-#{question.id}".to_sym, t("helpers.comment")) %> + <%= label_tag("answer-text-#{question.id}".to_sym, _('Comment')) %> <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> <%end%> - <% elsif q_format.title == t("helpers.text_field") then %> + <% elsif q_format.title == _('Text field') then %> <%= text_field_tag("answer-text-#{question.id}".to_sym, strip_tags(answer.text), class: "question_text_field") %> - <% elsif q_format.title == t("helpers.text_area") then%> + <% elsif q_format.title == _('Text area') then%> <%= text_area_tag("answer-text-#{question.id}".to_sym, answer.text, class: "tinymce") %> <% end %> @@ -106,11 +106,11 @@ <%= f.actions do %> <% if readonly then %> - <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"}, :input_html => { :disabled => true } %> + <%= f.action :submit, :label => _('Save'), :button_html => { :class => "btn btn-primary"}, :input_html => { :disabled => true } %> <% else %> - <%= f.action :submit, :label => t("helpers.save"), :button_html => { :class => "btn btn-primary"} %> + <%= f.action :submit, :label => _('Save'), :button_html => { :class => "btn btn-primary"} %> <% end %> - + <% end %> <% end %>
    @@ -119,7 +119,7 @@
    >

    <%= question.text %>

    - <% if q_format.title == t("helpers.checkbox") || q_format.title == t("helpers.multi_select_box") || q_format.title == t("helpers.radio_buttons") || q_format.title == t("helpers.dropdown") %> + <% if q_format.title == _('Check box') || q_format.title == _('Multi select box') || q_format.title == _('Radio buttons') || q_format.title == _('Dropdown') %>
      <% if answer.options.is_a? Option then %>
    • <%= answer.options.text %>
    • @@ -136,11 +136,11 @@
    <% if answer.created_at.nil? then %> - <%= t("helpers.notanswered") %> + <%= _('Not answered yet') %> <% else %> - <%= t("helpers.answered_by")%><%= answer.created_at %><%= t("helpers.answered_by_part2")%><%= answer.user.name %> + <%= _('Answered')%><%= answer.created_at %><%= _(' by')%><%= answer.user.name %> <% end %> - +
    @@ -156,14 +156,14 @@ <% css_style_comment_div = "display: none;"%> <% css_style_guidance_div = ""%>
  • - <%= link_to t("helpers.guidance_accordion_label"), "#", :class => "guidance_accordion_button" %> + <%= link_to _('Guidance'), "#", :class => "guidance_accordion_button" %>
  • <% if @comments.count > 0 then%> - <% comments_label_with_count = "#{t("helpers.comment_accordion_label")} (#{@comments.count})"%> + <% comments_label_with_count = "#{_('Notes')} (#{@comments.count})"%> <%= link_to comments_label_with_count , "#", :class => "comments_accordion_button" %> <%else%> - <%= link_to t("helpers.add_comment_accordion_label"), "#", :class => "comments_accordion_button" %> + <%= link_to _('Share note'), "#", :class => "comments_accordion_button" %> <%end%>
  • <%else%> @@ -172,10 +172,10 @@ <% css_style_guidance_div = "display: none;"%>
  • <% if @comments.count > 0 then%> - <% comments_label_with_count = "#{t("helpers.comment_accordion_label")} (#{@comments.count})"%> + <% comments_label_with_count = "#{_('Notes')} (#{@comments.count})"%>

    <%= comments_label_with_count %>

    <%else%> -

    <%= t("helpers.add_comment_accordion_label") %>

    +

    <%= _('Share note') %>

    <%end%>
  • <%end%> @@ -194,9 +194,9 @@
    <%= question.section.organisation.abbreviation %> <%if question.section.organisation.abbreviation == "EPSRC" then %> - <%= t("helpers.policy_expectations")%> + <%= _('Policy Expectations')%> <%else%> - <%= t("helpers.guidance")%> + <%= _('Guidance')%> <%end%>
    diff --git a/app/views/phases/_archive_note.html.erb b/app/views/phases/_archive_note.html.erb index daee904..26e87e3 100644 --- a/app/views/phases/_archive_note.html.erb +++ b/app/views/phases/_archive_note.html.erb @@ -6,18 +6,18 @@ <%= render :partial => "view_note", locals: {note: note} %> <% if current_user.id == note["user_id"] then %> - <%= t('helpers.notes.archive_own_note_question')%> - <% button_label = t("helpers.notes.archive_own_comment_button_label") %> + <%= _('helpers.notes.archive_own_note_question')%> + <% button_label = _('helpers.notes.archive_own_comment_button_label') %> <% else%> - <%= t("helpers.notes.archive_note_question")%> - <% button_label = t("helpers.notes.archive_comment_button_label") %> + <%= _('helpers.notes.archive_note_question')%> + <% button_label = _('helpers.notes.archive_comment_button_label') %> <%end%>
    <%= hidden_field_tag :note_id, note["id"], :class => "comment_id" %> <%= f.submit button_label, :class => "btn btn-primary archive_comment_submit_button" %> - <%= link_to t("helpers.submit.cancel"), "#", :class => "cancel_archive_comment btn cancel" %> + <%= link_to _('Cancel'), "#", :class => "cancel_archive_comment btn cancel" %>

    <%end%> diff --git a/app/views/phases/_edit_note.html.erb b/app/views/phases/_edit_note.html.erb index 366945f..cc482cc 100644 --- a/app/views/phases/_edit_note.html.erb +++ b/app/views/phases/_edit_note.html.erb @@ -10,7 +10,7 @@
    <%= hidden_field_tag :answer, note["answer_id"], :class => "answer_id" %> <%= hidden_field_tag :note_id, note["id"], :class => "note_id" %> - <%= f.submit t("helpers.submit.save"), :class => "btn btn-primary edit_note_submit_button" %> + <%= f.submit _('Save'), :class => "btn btn-primary edit_note_submit_button" %>

    <%end%> diff --git a/app/views/phases/_list_notes.html.erb b/app/views/phases/_list_notes.html.erb index 7d6315a..27593dc 100644 --- a/app/views/phases/_list_notes.html.erb +++ b/app/views/phases/_list_notes.html.erb @@ -27,26 +27,26 @@ <% if c["archived"] %> <% if c["archived_by"] == current_user.id %> - <%= t("helpers.comments.retracted")%> + <%= _('Note removed by you')%> <% else %> <% archived_by_user = User.find(c["archived_by"]) %> - <%= t("helpers.comments.clear_by")%> <%= archived_by_user.name %> + <%= _('Note removed by')%> <%= archived_by_user.name %> <%end%> <%else%> - <%= link_to t("helpers.comments.view_label"),"#", :class => "dmp_table_link view_comment_button" %> + <%= link_to _('View'),"#", :class => "dmp_table_link view_comment_button" %> <%= hidden_field_tag :note_id, c["id"], :class => "comment_id" %> <% if current_user.id == c["user_id"] %> - <%= link_to t("helpers.comments.edit_label"),"#", :class => "dmp_table_link edit_comment_button" %> + <%= link_to _('Edit'),"#", :class => "dmp_table_link edit_comment_button" %> <%= hidden_field_tag :note_id, c["id"], :class => "comment_id" %> - <%= link_to t("helpers.comments.retract_label"),"#", :class => "dmp_table_link archive_comment_button" %> + <%= link_to _('Remove'),"#", :class => "dmp_table_link archive_comment_button" %> <% end%> <% if plan.administerable_by?(current_user.id) && current_user.id != c["user_id"] %> <%= hidden_field_tag :note_id, c["id"], :class => "comment_id" %> - <%= link_to t("helpers.comments.clear_label"),"#", :class => "dmp_table_link archive_comment_button" %> + <%= link_to _('Remove'),"#", :class => "dmp_table_link archive_comment_button" %> <% end%> <%end%> diff --git a/app/views/phases/_note.html.erb b/app/views/phases/_note.html.erb index 659738a..8ad56e5 100644 --- a/app/views/phases/_note.html.erb +++ b/app/views/phases/_note.html.erb @@ -8,7 +8,7 @@
    - <%= link_to t("helpers.comments.add_comment_label"),'#', :class => "btn btn-primary add_comment_button" %> + <%= link_to _('Add note'),'#', :class => "btn btn-primary add_comment_button" %>
    @@ -20,7 +20,7 @@
    - <%= link_to t("helpers.comments.add_comment_label"),'#', :class => "btn btn-primary add_comment_button" %> + <%= link_to _('Add note'),'#', :class => "btn btn-primary add_comment_button" %>
    @@ -31,6 +31,6 @@
    <% else%> - <%= t("helpers.comments.add_comment_text")%> + <%= _('Share note with collaborators')%> <%= render :partial => "add_note", locals: {answer: answer, answer_obj: answer_obj, question: question, plan_data: plan_data}%> <% end%> diff --git a/app/views/phases/_view_note.html.erb b/app/views/phases/_view_note.html.erb index 2a1d14a..2e60684 100644 --- a/app/views/phases/_view_note.html.erb +++ b/app/views/phases/_view_note.html.erb @@ -4,7 +4,7 @@
    diff --git a/app/views/phases/edit.html.erb b/app/views/phases/edit.html.erb index 9b98568..aa5edcd 100644 --- a/app/views/phases/edit.html.erb +++ b/app/views/phases/edit.html.erb @@ -15,11 +15,11 @@ <% status = @plan.status %>
    <%space_used = status["space_used"].to_i - space_title = t("helpers.plan.export.space_used", space_used: space_used, num_pages: @plan.template.settings(:export).max_pages) + space_title = _('approx. %{space_used}% of available space used (max %{num_pages} pages)') % { space_used: => space_used, num_pages: => @plan.template.settings(:export).max_pages } answered = %(#{status["num_answers"]}/#{status["num_questions"]})%>
    - <%= answered -%> <%= t("helpers.project.questions_answered")%> - ;" title="<%= answered -%> <%= t("helpers.project.questions_answered")%>"> + <%= answered -%> <%= _('questions answered')%> + ;" title="<%= answered -%> <%= _('questions answered')%>">

    @@ -134,21 +134,21 @@
    @@ -160,7 +160,7 @@
    - <%= t("helpers.export") %> + <%= _('Export') %>
    <%= render :partial => "plans/export", locals: {plan: @plan, plan_data: @plan_data} %>