diff options
Diffstat (limited to 'app')
72 files changed, 579 insertions, 584 deletions
diff --git a/app/views/comment/_comment_form.rhtml b/app/views/comment/_comment_form.rhtml index f943cf8ad..011393256 100644 --- a/app/views/comment/_comment_form.rhtml +++ b/app/views/comment/_comment_form.rhtml @@ -13,8 +13,8 @@ <p> <%= hidden_field_tag 'submitted_comment', 1 %> <%= hidden_field_tag 'preview', 1 %> - <%= submit_tag "Preview your annotation" %> - (<strong>no ranty</strong> politics, read our <a href="/help/requesting#moderation">moderation policy</a>) + <%= submit_tag _('Preview your annotation') %> + <%= _(' (<strong>no ranty</strong> politics, read our <a href="%s">moderation policy</a>)' % [help_requesting '#moderation'] %> </p> <% end %> diff --git a/app/views/comment/_single_comment.rhtml b/app/views/comment/_single_comment.rhtml index d4282ced8..71ddd04cb 100644 --- a/app/views/comment/_single_comment.rhtml +++ b/app/views/comment/_single_comment.rhtml @@ -22,7 +22,7 @@ <% if !@user.nil? && @user.admin_page_links? %> | <%= link_to "Admin", admin_url("request/edit_comment/" + comment.id.to_s) %> <% end %> - <!-- | <%= link_to "Report abuse", comment_url(comment) %> --> + <!-- | <%= link_to _('Report abuse'), comment_url(comment) %> --> <% end %> </p> </div> diff --git a/app/views/comment/new.rhtml b/app/views/comment/new.rhtml index 7d7dfee6f..7e375d638 100644 --- a/app/views/comment/new.rhtml +++ b/app/views/comment/new.rhtml @@ -11,42 +11,42 @@ <%= foi_error_messages_for :comment %> -<h1>Add an annotation to '<%=request_link(@info_request)%>'</h1> +<h1><%= _('Add an annotation to ')%>'<%=request_link(@info_request)%>'</h1> <p> -Annotations are so anyone, including you, can help the requester with their request. For example: +<%= _('Annotations are so anyone, including you, can help the requester with their request. For example:')%> </p> <ul> <% if [ 'waiting_clarification' ].include?(@info_request.described_state) %> - <li> Advise on how to <strong>best clarify</strong> the request.</li> + <li><%= _(' Advise on how to <strong>best clarify</strong> the request.')%></li> <% end %> <% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> - <li> Link to the information requested, if it is <strong>already available</strong> on the Internet. </li> - <li> Suggest <strong>where else</strong> the requester might find the information. </li> - <li> Offer better ways of <strong>wording the request</strong> to get the information. </li> + <li><%= _(' Link to the information requested, if it is <strong>already available</strong> on the Internet. ')%></li> + <li><%= _(' Suggest <strong>where else</strong> the requester might find the information. ')%></li> + <li><%= _(' Offer better ways of <strong>wording the request</strong> to get the information. ')%></li> <% end %> <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> - <li> <strong>Summarise</strong> the content of any information returned. </li> - <li> Say how you've <strong>used the information</strong>, with links if possible. </li> - <li> <strong>Thank</strong> the public authority or <%=h @info_request.user.name %>. </li> + <li><%= _(' <strong>Summarise</strong> the content of any information returned. ')%></li> + <li><%= _(' Say how you\'ve <strong>used the information</strong>, with links if possible.')%> </li> + <li> <%= _('<strong>Thank</strong> the public authority or ')%><%=h @info_request.user.name %>. </li> <% end %> <% if [ 'partially_successful' ].include?(@info_request.described_state) %> - <li> Suggest how the requester can find the <strong>rest of the information</strong>. </li> + <li> <%= _('Suggest how the requester can find the <strong>rest of the information</strong>.')%></li> <% end %> <% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> - <li> Point to <strong>related information</strong>, campaigns or forums which may be useful. </li> + <li> <%= _('Point to <strong>related information</strong>, campaigns or forums which may be useful.')%></li> <% end %> <% if [ 'gone_postal' ].include?(@info_request.described_state) %> - <li> A <strong>summary</strong> of the response if you have received it by post. </li> + <li> <%= _('A <strong>summary</strong> of the response if you have received it by post. ')%></li> <% end %> <% if [ 'not_held' ].include?(@info_request.described_state) %> - <li> Ideas on what <strong>other documents to request</strong> which the authority may hold. </li> + <li><%= _(' Ideas on what <strong>other documents to request</strong> which the authority may hold. ')%></li> <% end %> <% if [ 'rejected' ].include?(@info_request.described_state) %> <li> Advise on whether the <strong>refusal is legal</strong>, and how to complain about it if not. </li> diff --git a/app/views/comment/preview.rhtml b/app/views/comment/preview.rhtml index 38c5fe1ff..54037cf0e 100644 --- a/app/views/comment/preview.rhtml +++ b/app/views/comment/preview.rhtml @@ -7,7 +7,7 @@ <%= render :partial => 'comment/single_comment', :locals => { :comment => @comment } %> <p> - Your name and annotation will appear in <strong>search engines</strong>. + <%= _('Your name and annotation will appear in <strong>search engines</strong>.')%> </p> <p> diff --git a/app/views/contact_mailer/message.rhtml b/app/views/contact_mailer/message.rhtml index ad868ec5b..a28d9603b 100644 --- a/app/views/contact_mailer/message.rhtml +++ b/app/views/contact_mailer/message.rhtml @@ -1,11 +1,11 @@ <%= @message.strip %> --------------------------------------------------------------------- -Message sent using WhatDoTheyKnow contact form, +<%= _('Message sent using WhatDoTheyKnow contact form, ')%> <%=(@logged_in_user ? ("logged in as user " + main_url(user_url(@logged_in_user))) : "not logged in")%><% if !@last_request.nil? %> -Last request viewed: <%= main_url(request_url(@last_request)) %> +<%= _('Last request viewed: ')%><%= main_url(request_url(@last_request)) %> <% end %> <% if !@last_body.nil? %> -Last authority viewed: <%= main_url(public_body_url(@last_body)) %> +<%= _('Last authority viewed: ')%><%= main_url(public_body_url(@last_body)) %> <% end %>--------------------------------------------------------------------- diff --git a/app/views/contact_mailer/user_message.rhtml b/app/views/contact_mailer/user_message.rhtml index 436b73d1e..7a685c452 100644 --- a/app/views/contact_mailer/user_message.rhtml +++ b/app/views/contact_mailer/user_message.rhtml @@ -1,12 +1,12 @@ --------------------------------------------------------------------- <%=@from_user.name%> has used WhatDoTheyKnow to send you the message below. -Your details have not been given to anyone, unless you choose to reply to this -message, which will then go directly to the person who wrote the message. +<%= _('Your details have not been given to anyone, unless you choose to reply to this +message, which will then go directly to the person who wrote the message.')%> --------------------------------------------------------------------- <%= @message.strip %> --------------------------------------------------------------------- -View Freedom of Information requests made by <%=@from_user.name %>: +<%= _('View Freedom of Information requests made by')%> <%=@from_user.name %>: <%= @from_user_url %> --------------------------------------------------------------------- diff --git a/app/views/public_body/_body_listing.rhtml b/app/views/public_body/_body_listing.rhtml index 48eb649c2..48b6e8245 100644 --- a/app/views/public_body/_body_listing.rhtml +++ b/app/views/public_body/_body_listing.rhtml @@ -1,5 +1,5 @@ <% if public_bodies.empty? %> - None found. + <%= _("None found.")%> <% else %> <% for public_body in public_bodies %> <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => public_body } %> diff --git a/app/views/public_body/_body_listing_single.rhtml b/app/views/public_body/_body_listing_single.rhtml index fdd0c6b75..97cfd2e71 100644 --- a/app/views/public_body/_body_listing_single.rhtml +++ b/app/views/public_body/_body_listing_single.rhtml @@ -20,7 +20,7 @@ <span class="bottomline"> <%= pluralize(public_body.info_requests.size, "request") %> made. <% if !@include_request_link_in_authority_listing.nil? %> - <%= link_to "Make your own request", public_body_url(public_body) %>. + <%= link_to _("Make your own request"), public_body_url(public_body) %>. <% end %> <br> Added on <%= simple_date(public_body.created_at) %>. diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml index dc6d0ca0e..5d88b1501 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.rhtml @@ -1,8 +1,8 @@ <div id="body_sidebar"> - <h1>Show only...</h1> + <h1><%=_('Show only...')%></h1> - <h2>Alphabet</h2> + <h2><%=_('Alphabet') %></h2> <ul><li> <%= render :partial => 'alphabet' %> </li></ul> @@ -26,21 +26,21 @@ </ul> <p> - <a href="/help/requesting#missing_body">Are we missing a public authority?</a> + <%= _('<a href="%s">Are we missing a public authority?</a>.') % [help_requesting_path + '#missing_body'] %> </p> <p> - <%= link_to "List of all authorities (CSV)", all_public_bodies_csv_url() %> + <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> </p> </div> -<% @title = "Public authorities - " + @description %> +<% @title = _("Public authorities - {{description}}", :description => @description) %> <h1><%=@title%></h1> <p class="subtitle"> - <%= @public_bodies.size %> in total - (<a href="/help/requesting#missing_body">can't find the one you want?</a>) + <%= @public_bodies.size %> <%= _('in total') %> + (<%= _('<a href="%s">can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %>) </p> <% if @tag.size == 1 %> diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index 8b56d68c0..e152498d7 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -1,5 +1,4 @@ <% @title = h(@public_body.name) + " - view and make Freedom of Information requests" %> - <div id="request_sidebar"> <h2><%= _('Track this authority')%></h2> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> diff --git a/app/views/public_body/view_email.rhtml b/app/views/public_body/view_email.rhtml index 2bd7c38c4..3a92e9703 100644 --- a/app/views/public_body/view_email.rhtml +++ b/app/views/public_body/view_email.rhtml @@ -4,18 +4,18 @@ <p> <% if @public_body.is_requestable? %> - WhatDoTheyKnow sends new requests to <strong><%=h @public_body.request_email%></strong> for this authority. + <% _('WhatDoTheyKnow sends new requests to')%> <strong><%=h @public_body.request_email%></strong><% _(' for this authority.')%> <% else %> <% if @public_body.not_requestable_reason == 'not_apply' %> - <p>Freedom of Information law no longer applies to this authority. - Follow up messages to existing requests are sent to <strong><%=h @public_body.request_email%></strong>. + <p><% _('Freedom of Information law no longer applies to this authority. + Follow up messages to existing requests are sent to ')%><strong><%=h @public_body.request_email%></strong>. </p> <% elsif @public_body.not_requestable_reason == 'defunct' %> <p><%=h @public_body.name %> no longer exists. - Follow up messages to existing requests are sent to <strong><%=h @public_body.request_email%></strong>. + <% _('Follow up messages to existing requests are sent to ')%><strong><%=h @public_body.request_email%></strong>. </p> <% elsif @public_body.not_requestable_reason == 'bad_contact' %> - <p>We do not have a working request email address for this authority. + <p><% _('We do not have a working request email address for this authority.')%> </p> <% else %> <% raise "unknown reason " + @reason %> @@ -26,10 +26,10 @@ <p> <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %> - If the address is wrong, or you know a better address, please <a href="/help/contact">contact us</a>. + <% _('If the address is wrong, or you know a better address, please <a href="%s">contact us</a>.')% [help_contact_path]%> <% else %> - If you know the address to use, then please <a href="/help/contact">send it to us</a>. - You may be able to find the address on their website, or by phoning them up and asking. + <% _(' If you know the address to use, then please <a href="%s">send it to us</a>. + You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %> <% end %> </p> diff --git a/app/views/public_body/view_email_captcha.rhtml b/app/views/public_body/view_email_captcha.rhtml index 13741c292..492933078 100644 --- a/app/views/public_body/view_email_captcha.rhtml +++ b/app/views/public_body/view_email_captcha.rhtml @@ -2,15 +2,15 @@ <h1>View FOI email address for '<%=public_body_link(@public_body)%>'</h1> -<p>To view the email address that we use to send FOI requests to <%=h @public_body.name%>, -please enter these words.<p> +<p><% _('To view the email address that we use to send FOI requests to ')%><%=h @public_body.name%>, +<% _('please enter these words.')%><p> <% form_for :contact do |f| %> <%= recaptcha_tags %> <%= hidden_field_tag(:submitted_view_email, { :value => 1 } ) %> - <p><%= submit_tag "View email" %></p> + <p><%= submit_tag _("View email") %></p> <% end %> diff --git a/app/views/request/_after_actions.rhtml b/app/views/request/_after_actions.rhtml index 9bef04ce4..aa0a95c67 100644 --- a/app/views/request/_after_actions.rhtml +++ b/app/views/request/_after_actions.rhtml @@ -1,50 +1,50 @@ <div id="after_actions"> - <h2>Things to do with this request</h2> + <h2><%= _('Things to do with this request') %></h2> <div id="anyone_actions"> - <strong>Anyone:</strong> + <strong><%= _('Anyone:') %></strong> <ul> <li> - <%= link_to "Add an annotation", new_comment_url(:url_title => @info_request.url_title) %> (to help - the requester or others) + <%= link_to _('Add an annotation'), new_comment_url(:url_title => @info_request.url_title) %> + (<%= _('to help the requester or others') %>) </li> <% if @old_unclassified %> <li> - <%= link_to "Update the status of this request", '#describe_state_form_1' %> + <%= link_to _('Update the status of this request'), '#describe_state_form_1' %> </li> <% end %> </ul> </div> <div id="owner_actions"> - <strong><%=h @info_request.user.name %> only:</strong> + <strong><%=h @info_request.user.name %> <%= _('only:') %></strong> <ul> <li> <% if @last_response.nil? %> - <%= link_to "Send follow up to " + OutgoingMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %> + <%= link_to _("Send follow up to ") + OutgoingMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %> <% else %> <% foi_cache(:controller => "request", :action => "show_response", :id => @info_request.id, :incoming_message_id => @last_response.id, :only_path => true, :template => "_after_actions", :section => "reply_to_link") do %> - <%= link_to "Reply to " + OutgoingMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %> + <%= link_to _("Reply to ") + OutgoingMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %> <% end %> <% end %> </li> <% if !@old_unclassified %> <li> - <%= link_to "Update the status of this request", request_url(@info_request, :update_status => 1) %> + <%= link_to _("Update the status of this request"), request_url(@info_request, :update_status => 1) %> </li> <% end %> <li> - <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %> + <%= link_to _("Request an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %> </li> </ul> </div> <div id="public_body_actions"> - <strong><%=h @info_request.public_body.name %> only:</strong> + <strong><%=h @info_request.public_body.name %> <%= _('only:') %></strong> <ul> <li> - <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %> + <%= link_to _("Respond to request"), upload_response_url(:url_title => @info_request.url_title) %> </li> </ul> </div> diff --git a/app/views/request/_describe_state.rhtml b/app/views/request/_describe_state.rhtml index a91231ae8..5c2e113b8 100644 --- a/app/views/request/_describe_state.rhtml +++ b/app/views/request/_describe_state.rhtml @@ -1,64 +1,64 @@ <% if @is_owning_user %> <% form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> - <h2>What best describes the status of this request now?</h2> + <h2><%= _('What best describes the status of this request now?') %></h2> <hr> <!------------------------------------------------> <% if @info_request.described_state != 'internal_review' %> <div> <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %> - <label for="waiting_response<%=id_suffix%>">I'm still <strong>waiting</strong> for my information - <small>(maybe you got an acknowledgement)</small></label> + <label for="waiting_response<%=id_suffix%>"><%= _('I\'m still <strong>waiting</strong> for my information + <small>(maybe you got an acknowledgement)</small>') %></label> </div> <% end %> <% if @info_request.described_state == 'internal_review' %> <div> <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> - <label for="internal_review<%=id_suffix%>">I'm still <strong>waiting</strong> for the internal review</label> + <label for="internal_review<%=id_suffix%>"><%= _('I\'m still <strong>waiting</strong> for the internal review') %></label> </div> <% end %> <% if @info_request.described_state != 'internal_review' %> <div> <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %> - <label for="waiting_clarification<%=id_suffix%>">I've been asked to <strong>clarify</strong> my request</label> + <label for="waiting_clarification<%=id_suffix%>"><%= _('I\'ve been asked to <strong>clarify</strong> my request') %></label> </div> <% end %> <% if @update_status && @info_request.described_state != 'internal_review' %> <div> <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> - <label for="internal_review<%=id_suffix%>">I'm waiting for an <strong>internal review</strong> response</label> + <label for="internal_review<%=id_suffix%>"><%= _('I\'m waiting for an <strong>internal review</strong> response') %></label> </div> <% end %> <div> <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %> - <label for="gone_postal<%=id_suffix%>">They are going to reply <strong>by post</strong></label> + <label for="gone_postal<%=id_suffix%>"><%= _('They are going to reply <strong>by post</strong>') %></label> </div> <hr> <!------------------------------------------------> <% if @info_request.described_state == 'internal_review' %> - <p>The <strong>review has finished</strong> and overall:</p> + <p><%= _('The <strong>review has finished</strong> and overall:') %></p> <% end %> <div> <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %> - <label for="not_held<%=id_suffix%>">They do <strong>not have</strong> the information <small>(maybe they say who does)</small></label> + <label for="not_held<%=id_suffix%>"><%= _('They do <strong>not have</strong> the information <small>(maybe they say who does)</small>') %></label> </div> <div> <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %> - <label for="partially_successful<%=id_suffix%>">I've received <strong>some of the information</strong> </label> + <label for="partially_successful<%=id_suffix%>"><%= _('I\'ve received <strong>some of the information</strong>') %> </label> </div> <div> <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %> - <label for="successful<%=id_suffix%>">I've received <strong>all the information</strong> </label> + <label for="successful<%=id_suffix%>"><%= _('I\'ve received <strong>all the information') %></strong> </label> </div> <div> <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %> - <label for="rejected<%=id_suffix%>">My request has been <strong>refused</strong></label> + <label for="rejected<%=id_suffix%>"><%= _('My request has been <strong>refused</strong>') %></label> </div> <hr> <!------------------------------------------------> @@ -66,7 +66,7 @@ <div> <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %> <label for="error_message<%=id_suffix%>"> - I've received an <strong>error message</strong> + <%= _('I\'ve received an <strong>error message</strong>') %> </label> </div> @@ -74,14 +74,14 @@ <div> <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %> <label for="error_message<%=id_suffix%>"> - This request <strong>requires administrator attention</strong> + <%= _('This request <strong>requires administrator attention</strong>') %> </label> </div> <div> <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %> <label for="user_withdrawn<%=id_suffix%>"> - I would like to <strong>withdraw this request</strong> + <%= _('I would like to <strong>withdraw this request</strong>') %> </label> </div> <% end %> @@ -91,19 +91,17 @@ <p> <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %> <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %> - <%= submit_tag "Submit status" %> (and we'll suggest <strong>what to do next</strong>) + <%= submit_tag _("Submit status") %> (<%= _('and we\'ll suggest <strong>what to do next</strong>') %>) </p> <% end %> <% elsif @old_unclassified %> <%= render :partial => 'other_describe_state', :locals => {:id_suffix => id_suffix } %> <% else %> - We don't know whether the most recent response to this request contains - information or not +<%= _('We don\'t know whether the most recent response to this request contains + information or not') %> – - if you are - <%= user_link(@info_request.user) %>, - please +<%= _('if you are {{user_link}} please',:user_link=>user_link(@info_request.user)) %> <%= link_to "sign in", signin_url(:r => request.request_uri) %> - and let everyone know. + <%= _('and let everyone know.') %> <% end %> diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml index f3dcbd785..47857108d 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.rhtml @@ -1,54 +1,54 @@ <div id="followup"> <% if @internal_review %> - <h1>Request an internal review - from <%=h OutgoingMailer.name_for_followup(@info_request, nil) %> + <h1><%= _('Request an internal review from') %> <%=h OutgoingMailer.name_for_followup(@info_request, nil) %> </h1> <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %> - <h2>Send a public follow up message - to <%=h OutgoingMailer.name_for_followup(@info_request, nil) %> + <h2><%= _('Send a public follow up message to') %> <%=h OutgoingMailer.name_for_followup(@info_request, nil) %> </h2> <% else %> - <h2>Send a public reply to + <h2><%= _('Send a public reply to') %> <%=h OutgoingMailer.name_for_followup(@info_request, incoming_message) %> </h2> <% end %> <% if @info_request.allow_new_responses_from == 'nobody' %> - <p>Follow ups and new responses to this request have been stopped to prevent spam. Please - <a href="/help/contact">contact us</a> if you are <%= user_link(@info_request.user) %> - and need to send a follow up.</p> + <p><%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please + <a href="%s">contact us</a> if you are') % [help_contact_path] %> <%= user_link(@info_request.user) %> + <%= _('and need to send a follow up.') %></p> <% else %> <% if @internal_review %> <p> - If you are dissatisfied by the response you got from + <%= _('If you are dissatisfied by the response you got from the public authority, you have the right to - complain (<a href="http://foiwiki.com/foiwiki/index.php/Internal_reviews">details</a>). + complain (<a href="%s">details</a>).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews" %> </p> <% end %> - <p>Please <strong>only</strong> write messages directly relating to your - request '<%= request_link(@info_request) %>'. If you would like to ask for information - that was not in your original request, then - <%= link_to "file a new request", new_request_to_body_url(:url_name => @info_request.public_body.url_name) %>. + <p> + <%= _('Please <strong>only</strong> write messages directly relating to your + request') %> '<%= request_link(@info_request) %>'. <%= _('If you would like to ask for information + that was not in your original request, then') %> + <%= link_to _("file a new request"), new_request_to_body_url(:url_name => @info_request.public_body.url_name) %>. </p> <% status = @info_request.calculate_status %> <% if status == 'waiting_response_overdue' %> - <p>The response to your request has been <strong>delayed</strong>. You can say that, + <p><%= _('The response to your request has been <strong>delayed</strong>. You can say that, by law, the authority should normally have responded - <strong>promptly</strong> and + <strong>promptly</strong> and') %> <% if @info_request.public_body.is_school? %> - in term time + <%= _('in term time') %> <% end %> - by <strong><%= simple_date(@info_request.date_response_required_by) %></strong> - (<%= link_to "details", "/help/requesting#quickly_response" %>). + <%= _('by') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong> + (<%= _('<a href="%s">details</a>') % ["#{help_requesting_path}#quickly_response"] %>). + </p> <% elsif status == 'waiting_response_very_overdue' %> <p> - The response to your request is <strong>long overdue</strong>. You can say that, by + <%= _('The response to your request is <strong>long overdue</strong>. You can say that, by law, under all circumstances, the authority should have responded - by now (<%= link_to "details", "/help/requesting#quickly_response" %>). + by now') %> (<%= _('<a href="%s">details</a>') % ["#{help_requesting_path}#quickly_response"] %>). </p> <% end %> @@ -61,7 +61,7 @@ <% if @internal_review %> <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %> <% else %> - <h3>What are you doing?</h3> + <h3><%= _('What are you doing?') %></h3> <% if !@outgoing_message.errors[:what_doing_dummy].nil? %> <div class="fieldWithErrors"> @@ -71,25 +71,25 @@ <!-- <div> <%= radio_button "outgoing_message", "what_doing", "new_information", :id => "new_information" %> - <label for="new_information">I am asking for <strong>new information</strong> </label> + <label for="new_information"><%= _('I am asking for <strong>new information</strong>') %> </label> </div> --> <div> <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %> - <label for="internal_review">I am requesting an <strong>internal review</strong> - (<a href="/help/unhappy">what's that?</a>) + <label for="internal_review"><%= _('I am requesting an <strong>internal review</strong>') %> + <%= _('<a href="%s">what\'s that?</a>') % ["/help/unhappy"] %> </label> </div> <div> <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %> - <label for="sort_normal"><strong>Anything else</strong>, such as clarifying, prompting, thanking</label> + <label for="sort_normal"><%= _('<strong>Anything else</strong>, such as clarifying, prompting, thanking') %></label> </div> </div> <% end %> <% if @internal_review %> - <p>Edit and add <strong>more details</strong> to the message above, - explaining why you are dissatisfied with their response. + <p><%= _('Edit and add <strong>more details</strong> to the message above, + explaining why you are dissatisfied with their response.') %> </p> <% end %> @@ -99,7 +99,7 @@ <% if @internal_review_pass_on %> <%= hidden_field_tag(:internal_review, 1 ) %> <% end %> - <%= submit_tag "Preview your message" %> + <%= submit_tag _("Preview your message") %> </p> <% end %> diff --git a/app/views/request/_hidden_correspondence.rhtml b/app/views/request/_hidden_correspondence.rhtml index 2c168c3fb..efed2975a 100644 --- a/app/views/request/_hidden_correspondence.rhtml +++ b/app/views/request/_hidden_correspondence.rhtml @@ -6,26 +6,28 @@ if not incoming_message.nil? %> <div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>"> - <p>This response has been hidden. See annotations to find out why. - If you are the requester, then you may + <p> + <%= _('This response has been hidden. See annotations to find out why. + If you are the requester, then you may') %> <%= link_to "sign in", signin_url(:r => request.request_uri) %> - to view the response. + <%= _('to view the response.') %> </p> </div> <% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> <div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>"> - <p>This outgoing message has been hidden. See annotations to - find out why. If you are the requester, then you may <%= link_to - "sign in", signin_url(:r => request.request_uri) %> to view the - response. + <p> + <%= _('This outgoing message has been hidden. See annotations to + find out why. If you are the requester, then you may') %> <%= link_to + "sign in", signin_url(:r => request.request_uri) %> <%= _('to view the + response.') %> </p> </div> <% elsif info_request_event.event_type == 'comment' %> <div class="comment_in_request" id="comment-<%=comment.id.to_s%>"> - <p>This comment has been hidden. See annotations to - find out why. If you are the requester, then you may <%= link_to - "sign in", signin_url(:r => request.request_uri) %> to view the - response. + <p><%= _('This comment has been hidden. See annotations to + find out why. If you are the requester, then you may') %> <%= link_to + "sign in", signin_url(:r => request.request_uri) %> <%= _('to view the + response.') %> </p> </div> <% end %> @@ -33,5 +35,5 @@ <% elsif info_request_event.prominence == 'hidden' %> <% # show nothing when hidden %> <% else %> - <% raise "unexpected prominence on request event" %> + <% raise _("unexpected prominence on request event") %> <% end %> diff --git a/app/views/request/_request_listing.rhtml b/app/views/request/_request_listing.rhtml index ebfbc60a4..492f874f3 100644 --- a/app/views/request/_request_listing.rhtml +++ b/app/views/request/_request_listing.rhtml @@ -1,5 +1,5 @@ <% if info_requests.empty? %> - None found. + <%= _('None found.') %> <% else %> <% for info_request in info_requests %> <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> diff --git a/app/views/request/_request_listing_short_via_event.rhtml b/app/views/request/_request_listing_short_via_event.rhtml index 7cc86a684..f47444bfe 100644 --- a/app/views/request/_request_listing_short_via_event.rhtml +++ b/app/views/request/_request_listing_short_via_event.rhtml @@ -5,8 +5,8 @@ end %> <div class="request_short_listing"> <h3><%= link_to highlight_words(info_request.title, @highlight_words), request_url(info_request) %></h3> <p> - To <%= public_body_link_absolute(info_request.public_body) %> - by <%= user_link_absolute(info_request.user) %>, + <%= _('To') %> <%= public_body_link_absolute(info_request.public_body) %> + <%= _('by') %> <%= user_link_absolute(info_request.user) %>, <%= simple_date(info_request.created_at) %> </p> </div> diff --git a/app/views/request/_request_listing_single.rhtml b/app/views/request/_request_listing_single.rhtml index 0f6bf33ec..bb83df9d3 100644 --- a/app/views/request/_request_listing_single.rhtml +++ b/app/views/request/_request_listing_single.rhtml @@ -9,9 +9,9 @@ <strong> <%= info_request.display_status %> </strong><br> - Requested from <%= public_body_link(info_request.public_body) %> - by <%= user_link(info_request.user) %> - on <%= simple_date(info_request.created_at) %>. + <%= _('Requested from') %> <%= public_body_link(info_request.public_body) %> + <%= _('by') %> <%= user_link(info_request.user) %> + <%= _('on') %> <%= simple_date(info_request.created_at) %>. </span> </div> diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml index 831ab5836..1b05b77f7 100644 --- a/app/views/request/_request_listing_via_event.rhtml +++ b/app/views/request/_request_listing_via_event.rhtml @@ -25,26 +25,26 @@ end %> </strong><br> <% if event.event_type == 'sent' %> - Request sent to <%= public_body_link_absolute(info_request.public_body) %> - by <%= user_link_absolute(info_request.user) %> - on <%= simple_date(event.created_at) %>. + <%= ('Request sent to') %> <%= public_body_link_absolute(info_request.public_body) %> + <%= ('by') %> <%= user_link_absolute(info_request.user) %> + <%= ('on') %> <%= simple_date(event.created_at) %>. <% elsif event.event_type == 'followup_sent' %> <%=event.display_status %> - sent to <%= public_body_link_absolute(info_request.public_body) %> - by <%= user_link_absolute(info_request.user) %> - on <%= simple_date(event.created_at) %>. + <%= ('sent to') %> <%= public_body_link_absolute(info_request.public_body) %> + <%= ('by') %> <%= user_link_absolute(info_request.user) %> + <%= ('on') %> <%= simple_date(event.created_at) %>. <% elsif event.event_type == 'response' %> <%=event.display_status %> - by <%= public_body_link_absolute(info_request.public_body) %> - to <%= user_link_absolute(info_request.user) %> - on <%= simple_date(event.created_at) %>. + <%= ('by') %> <%= public_body_link_absolute(info_request.public_body) %> + <%= ('to') %> <%= user_link_absolute(info_request.user) %> + <%= ('on') %> <%= simple_date(event.created_at) %>. <% elsif event.event_type == 'comment' %> - Request to <%= public_body_link_absolute(info_request.public_body) %> - by <%= user_link_absolute(info_request.user) %>. - Annotated by <%= user_link_absolute(event.comment.user) %> - on <%= simple_date(event.created_at) %>. + <%= ('Request to') %> <%= public_body_link_absolute(info_request.public_body) %> + <%= ('by') %> <%= user_link_absolute(info_request.user) %>. + <%= ('Annotated by') %> <%= user_link_absolute(event.comment.user) %> + <%= ('on') %> <%= simple_date(event.created_at) %>. <% else %> - <% raise "unknown event type indexed " + event.event_type %> + <% raise _("unknown event type indexed ") + event.event_type %> <% end %> </span> </div> diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml index 12d1e315b..10be34ab9 100644 --- a/app/views/request/_sidebar.rhtml +++ b/app/views/request/_sidebar.rhtml @@ -1,8 +1,8 @@ <div id="request_sidebar"> - <h2>Track this request</h2> + <h2><%= _('Track this request') %></h2> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %> - <h2>Act on what you've learnt</h2> + <h2><%= _("Act on what you've learnt") %></h2> <div class="act_link"> <%= link_to '<img src="/images/helpmeinvestigate.png" alt="" class="rss">', "http://helpmeinvestigate.com/"%> <%= link_to 'Get help investigating', "http://helpmeinvestigate.com/"%> @@ -27,7 +27,7 @@ <% view_cache :ttl => 1.day, :tag => ['similar', @info_request.id] do %> <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %> - <h2>Similar requests</h2> + <h2><% _('Similar requests')%></h2> <% for result in @xapian_similar.results %> <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> <% end %> @@ -38,11 +38,11 @@ <% end %> <% end %> - <p><%= link_to "Event history details", request_details_url(@info_request) %></p> + <p><%= link_to _('Event history details'), request_details_url(@info_request) %></p> <!-- this link with this wording is here for legal reasons, discuss with board and our lawyer before changing or removing it --> - <p><small><a href="/help/officers#copyright">Are you the owner of - any commercial copyright on this page?</a></small></p> + <p><small><%= _('<a href="%s">Are you the owner of + any commercial copyright on this page?</a>') % [help_officers_path+"#copyright"] %></small></p> </div> diff --git a/app/views/request/_sidebar_request_listing.rhtml b/app/views/request/_sidebar_request_listing.rhtml index e9aeb4f73..3b8a90a3c 100644 --- a/app/views/request/_sidebar_request_listing.rhtml +++ b/app/views/request/_sidebar_request_listing.rhtml @@ -10,7 +10,7 @@ <strong> <%= info_request.display_status %> </strong><br> - Requested on <%= simple_date(info_request.created_at) %>. + <% _('Requested on ')%><%= simple_date(info_request.created_at) %>. </span> </div> <% end %> diff --git a/app/views/request/_view_html_prefix.rhtml b/app/views/request/_view_html_prefix.rhtml index 486b62d5d..f425735cd 100644 --- a/app/views/request/_view_html_prefix.rhtml +++ b/app/views/request/_view_html_prefix.rhtml @@ -3,10 +3,10 @@ <a href="/"><img src="/images/navimg/logo-trans-small.png" alt="WhatDotheyKnow?"></a> </div> <div class="view_html_download_link"> - <%=link_to "Download original attachment", @attachment_url %> + <%=link_to _("Download original attachment"), @attachment_url %> <br>(<%=h @attachment.name_of_content_type %>) </div> - This is an HTML version of an attachment to the Freedom of Information request + <%= _('This is an HTML version of an attachment to the Freedom of Information request')%> '<%=link_to h(@info_request.title), incoming_message_url(@incoming_message)%>'. </div> diff --git a/app/views/request/details.rhtml b/app/views/request/details.rhtml index 03e5148ef..94d87306d 100644 --- a/app/views/request/details.rhtml +++ b/app/views/request/details.rhtml @@ -1,20 +1,20 @@ -<% @title = "Details of request '" + h(@info_request.title) + "'" %> -<h1><%="Details of request '" + request_link(@info_request) + "'" %></h1> +<% @title = _("Details of request '") + h(@info_request.title) + "'" %> +<h1><%= _("Details of request '") + request_link(@info_request) + "'" %></h1> -<h2>Event history</h2> +<h2><%= _('Event history') %></h2> -<p>This table shows the technical details of the internal events that happened +<p><%= _('This table shows the technical details of the internal events that happened to this request on WhatDoTheyKnow. This could be used to generate information about the speed with which authorities respond to requests, the number of requests -which require a postal response and much more. +which require a postal response and much more.') %> </p> -<p><strong>Caveat emptor!</strong> To use this data in an honourable way, you will need +<p><%= _('<strong>Caveat emptor!</strong> To use this data in an honourable way, you will need a good internal knowledge of user behaviour on WhatDoTheyKnow. How, why and by whom requests are categorised is not straightforward, and there will be user error and ambiguity. You will also need to understand FOI law, and the -way authorities use it. Plus you'll need to be an elite statistician. Please -<a href="/help/contact">contact us</a> with questions. +way authorities use it. Plus you\'ll need to be an elite statistician. Please +<a href="%s">contact us</a> with questions.') % [help_contact_path] %> </p> <% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %> @@ -46,10 +46,14 @@ way authorities use it. Plus you'll need to be an elite statistician. Please <% end %> </table> -<p>Here <strong>described</strong> means when a user selected a status for the request, and +<p> +<%= _('Here <strong>described</strong> means when a user selected a status for the request, and the most recent event had its status updated to that value. <strong>calculated</strong> is then inferred by -WhatDoTheyKnow for intermediate events, which weren't given an explicit -description by a user. See the <a href="/search">search tips</a> for description of the states.</p> +WhatDoTheyKnow for intermediate events, which weren\'t given an explicit +description by a user. See the <a href="%s">search tips</a> for description of the states.') % [search_redirect_path] %> +</p> -<p>You can get this page in computer-readable format as part of the main JSON -page for the request. See the <a href="/help/api">API documentation</a>.</p> +<p> +<%= _('You can get this page in computer-readable format as part of the main JSON +page for the request. See the <a href="%s">API documentation</a>.') % [help_api_path] %> +</p> diff --git a/app/views/request/followup_bad.rhtml b/app/views/request/followup_bad.rhtml index f3e9f07d7..3faabace0 100644 --- a/app/views/request/followup_bad.rhtml +++ b/app/views/request/followup_bad.rhtml @@ -1,32 +1,32 @@ <% if @incoming_message.nil? || !@incoming_message.valid_to_reply_to? %> - <% @title = "Unable to send follow up message to " + OutgoingMailer.name_for_followup(@info_request, nil) %> + <% @title = _("Unable to send follow up message to ") + OutgoingMailer.name_for_followup(@info_request, nil) %> <% else %> - <% @title = "Unable to send a reply to " + OutgoingMailer.name_for_followup(@info_request, @incoming_message) %> + <% @title = _("Unable to send a reply to ") + OutgoingMailer.name_for_followup(@info_request, @incoming_message) %> <% end %> <h1><%=@title%></h1> <% if @reason == 'not_apply' %> <!-- we should never get here, but just in case give a sensible message --> - <p>Freedom of Information law no longer applies to <%=h @info_request.public_body.name %>. - From the request page, try replying to a particular message, rather than sending + <p><%= _('Freedom of Information law no longer applies to') %> <%=h @info_request.public_body.name %>. + <%= _('From the request page, try replying to a particular message, rather than sending a general followup. If you need to make a general followup, and know - an email which will go to the right place, please <a href="/help/contact">send it to us</a>. + an email which will go to the right place, please <a href="%s">send it to us</a>.') % [help_contact_path] %> </p> <% elsif @reason == 'defunct' %> <!-- we should never get here, but just in case give a sensible message --> - <p><%=h @info_request.public_body.name %> no longer exists. If you are trying to make + <p><%=h @info_request.public_body.name %> <%= _('no longer exists. If you are trying to make From the request page, try replying to a particular message, rather than sending a general followup. If you need to make a general followup, and know - an email which will go to the right place, please <a href="/help/contact">send it to us</a>. + an email which will go to the right place, please <a href="%s">send it to us</a>.') % [help_contact_path] %> </p> <% elsif @reason == 'bad_contact' %> - <p>We do not have a working <%=h @info_request.law_used_full %> - address for <%=h @info_request.public_body.name %>. You may be able to find + <p><%= _('We do not have a working') %> <%=h @info_request.law_used_full %> + <%= _('address for') %> <%=h @info_request.public_body.name %>. <%= _('You may be able to find one on their website, or by phoning them up and asking. If you manage - to find one, then please <a href="/help/contact">send it to us</a>. + to find one, then please <a href="%s">send it to us</a>.') % [help_contact_path] %> </p> <% else %> - <% raise "unknown reason " + @reason %> + <% raise _("unknown reason ") + @reason %> <% end %> diff --git a/app/views/request/followup_preview.rhtml b/app/views/request/followup_preview.rhtml index f711575a8..50c64138f 100644 --- a/app/views/request/followup_preview.rhtml +++ b/app/views/request/followup_preview.rhtml @@ -1,26 +1,26 @@ -<% @title = "Preview follow up to '" + h(@info_request.public_body.name) + "'" %> +<% @title = _("Preview follow up to '") + h(@info_request.public_body.name) + "'" %> <div id="followup"> <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'preview_form' }, :url => (@incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => @incoming_message.id)) + "#followup" ) do |o| %> <% if @internal_review %> - <h1>Now preview your message asking for an internal review</h1> + <h1><%= _('Now preview your message asking for an internal review') %></h1> <% else %> - <h1>Now preview your follow up</h1> + <h1><%= _('Now preview your follow up') %></h1> <% end %> <ul> - <li>Check you haven't included any <strong>personal information</strong>.</li> - <li>Your message will appear in <strong>search engines</strong></li> + <li><%= _('Check you haven\'t included any <strong>personal information</strong>.') %></li> + <li><%= _('Your message will appear in <strong>search engines</strong>') %></li> </ul> <% fields_for :outgoing_message do |o| %> <div class="correspondence" id="outgoing-0"> <p class="preview_subject"> - <strong>To:</strong> <%=h OutgoingMailer.name_for_followup(@info_request, @incoming_message) %> - <br><strong>Subject:</strong> <%=h OutgoingMailer.subject_for_followup(@info_request, @outgoing_message) %> + <strong><%= _('To:') %></strong> <%=h OutgoingMailer.name_for_followup(@info_request, @incoming_message) %> + <br><strong><%= _('Subject:') %></strong> <%=h OutgoingMailer.subject_for_followup(@info_request, @outgoing_message) %> </p> <div class="correspondence_text"> @@ -34,8 +34,8 @@ <% end %> <p> - <strong>Privacy warning:</strong> Your message, and any response - to it, will be displayed publicly on this website. + <%= _('<strong>Privacy warning:</strong> Your message, and any response + to it, will be displayed publicly on this website.') %> <%= o.hidden_field(:what_doing) %> </p> @@ -46,8 +46,8 @@ <% if @internal_review_pass_on %> <%= hidden_field_tag(:internal_review, 1 ) %> <% end %> - <%= submit_tag "Re-edit this message", :name => 'reedit' %> - <%= submit_tag "Send message", :name => 'submit' %> + <%= submit_tag _("Re-edit this message"), :name => 'reedit' %> + <%= submit_tag _("Send message"), :name => 'submit' %> </p> <% end %> diff --git a/app/views/request/hidden.rhtml b/app/views/request/hidden.rhtml index 0dcd66cb4..7ad6ad14d 100644 --- a/app/views/request/hidden.rhtml +++ b/app/views/request/hidden.rhtml @@ -1,4 +1,4 @@ -<% @title = "Request has been removed" %> +<% @title = _("Request has been removed") %> <h1><%=@title%></h1> @@ -6,16 +6,15 @@ <%=@details%> </p> -<p>The request you have tried to view has been removed. There are -various reasons why we might have done this, sorry we can't -be more specific here. Please <a - href="/help/contact">contact us</a> if you have any questions. +<p><%= _('The request you have tried to view has been removed. There are +various reasons why we might have done this, sorry we can\'t be more specific here. Please <a + href="%s">contact us</a> if you have any questions.') % [help_contact_path] %> </p> <% if @info_request.prominence == 'requester_only' %> <p> - If you are the requester, then you may + <%= _('If you are the requester, then you may') %> <%= link_to "sign in", signin_url(:r => request.request_uri) %> - to view the request. + <%= _('to view the request.') %> </p> <% end %> diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml index 90e5f4605..a9f5481be 100644 --- a/app/views/request/list.rhtml +++ b/app/views/request/list.rhtml @@ -1,9 +1,9 @@ <div id="list_sidebar"> -<h1>Show only...</h1> +<h1><%= _('Show only...')%></h1> <ul> <% for view, description, target in [ - ['successful', "Successful responses", request_list_successful_url(:view => 'successful')], - ['recent', "Recently sent requests", request_list_recent_url(:view => 'recent')] + ['successful', _('Successful responses'), request_list_successful_url(:view => 'successful')], + ['recent', _('Recently sent requests'), request_list_recent_url(:view => 'recent')] ] %> <li> <%= link_to_unless (@view == view), description, target %> @@ -20,13 +20,13 @@ <% view_cache :ttl => 5.minutes, :tag => [@view, @page] do %> <% if @list_results.empty? %> - <p>No requests of this sort yet.</p> + <p> <%= _('No requests of this sort yet.')%></p> <% else %> <% for result in @list_results%> <% if result.class.to_s == 'InfoRequestEvent' %> <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %> <% else %> - <p><strong>Unexpected search result type <%=result.class.to_s%></strong></p> + <p><strong><%= ('Unexpected search result type') %> <%=result.class.to_s%></strong></p> <% end %> <% end %> <% end %> diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index b2fa9176e..b4e4866f7 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -1,12 +1,12 @@ -<% @title = "Make an " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %> +<% @title = _("Make an ") + h(@info_request.law_used_short) + _(" request to '") + h(@info_request.public_body.name) + "'" %> <% if @existing_request %> <div class="errorExplanation" id="errorExplanation"><ul> <li> - <%= user_or_you_capital_link(@existing_request.user) %> already - created the same request on <%=simple_date(@existing_request.created_at)%>. - You can either view the <a href="<%=request_url(@existing_request)%>">existing request</a>, - or edit the details below to make a new but similar request. + <%= user_or_you_capital_link(@existing_request.user) %> <%= _('already + created the same request on') %> <%=simple_date(@existing_request.created_at)%>. + <%= _('You can either view the <a href="{{existing_request}}">existing request</a>, + or edit the details below to make a new but similar request.',:existing_request=>request_url(@existing_request)) %> </li> </ul></div> <% end %> @@ -14,75 +14,75 @@ <%= foi_error_messages_for :info_request, :outgoing_message %> <div id="request_advice"> - <h1>Read this before writing your <%=h(@info_request.law_used_full)%> request</h1> + <h1><%= _('Read this before writing your {{info_request_law_used_full}} request', :info_request_law_used_full=>h(@info_request.law_used_full)) %></h1> <ul> <li> <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %> <p> First, <% if !@info_request.public_body.publication_scheme.empty? %> - <strong>browse</strong> the authority's + <strong>browse</strong> <%= _('the authority\'s') %> <%= link_to "publication scheme", @info_request.public_body.publication_scheme %> - or <strong>search</strong> their web site ... + <%= _('or <strong>search</strong> their web site ...') %> <% else %> - <strong>search</strong> the authority's web site ... + <%= _('<strong>search</strong> the authority\'s web site ...') %> <% end %> <% if !@info_request.public_body.calculated_home_page.nil? %> <br> <%= text_field_tag 'q', params[:q], { :size => 20 } %> <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %> - <%= submit_tag "Search" %> + <%= submit_tag _("Search") %> <% end %> <br> - ... to check that the info isn't already published. + ... <%= _('to check that the info isn\'t already published.') %> </p> <% end %> </li> <li> <% if @info_request.public_body.info_requests.size > 0 %> - Browse <%= link_to "other requests", public_body_url(@info_request.public_body) %> - to '<%= h(@info_request.public_body.name) %>' - for examples of how to word your request. + <%= _('Browse') %> <%= link_to "other requests", public_body_url(@info_request.public_body) %> + <%= _('to') %> '<%= h(@info_request.public_body.name) %>' + <%= _('for examples of how to word your request.') %> <% else %> - Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request. + <%= _('Browse <a href="%s">other requests</a> for examples of how to word your request.') % [request_list_url] %> <% end %> </li> - <li>Write your request in <strong>simple, precise language</strong>.</li> - <li>Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.</li> - <li>Keep it <strong>focused</strong>, you'll be more likely to get what you want (<a href="/help/requesting#focused">why?</a>).</li> - <li>This site is <strong>public</strong>. Everything you type and any response will be published.</li> + <li><%= _('Write your request in <strong>simple, precise language</strong>.') %></li> + <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> + <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused'] %></li> + <li><%= _('This site is <strong>public</strong>. Everything you type and any response will be published.') %></li> </ul> <% if @info_request.public_body.has_notes? %> - <h1>Special note for this authority!</h1> + <h1><%= _('Special note for this authority!') %></h1> <ul> <li><p><%= @info_request.public_body.notes_as_html %></p></li> </ul> <% end %> <% if @info_request.public_body.eir_only? %> - <h1>Please ask for environmental information only</h1> + <h1><%= _('Please ask for environmental information only') %></h1> - <p>The Freedom of Information Act <strong>does not apply</strong> to <%=h(@info_request.public_body.name)%>. - However, you have the right to request environmental - information under a different law (<a href="/help/requesting#eir">explanation</a>). - This covers a very wide spectrum of information about the state of - the <strong>natural and built environment</strong>, such as: + <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>. + <%= _('However, you have the right to request environmental + information under a different law') %> (<a href="/help/requesting#eir">explanation</a>). + <%= _('This covers a very wide spectrum of information about the state of + the <strong>natural and built environment</strong>, such as:') %> <ul> - <li>Air, water, soil, land, flora and fauna (including how these effect - human beings)</li> - <li>Information on emissions and discharges (e.g. noise, energy, - radiation, waste materials)</li> - <li>Human health and safety</li> - <li>Cultural sites and built structures (as they may be affected by the - environmental factors listed above)</li> - <li>Plans and administrative measures that affect these matters</li> + <li><%= _('Air, water, soil, land, flora and fauna (including how these effect + human beings)') %></li> + <li><%= _('Information on emissions and discharges (e.g. noise, energy, + radiation, waste materials)') %></li> + <li><%= _('Human health and safety') %></li> + <li><%= _('Cultural sites and built structures (as they may be affected by the + environmental factors listed above)') %></li> + <li><%= _('Plans and administrative measures that affect these matters') %></li> </ul> - <p>Please only request information that comes under those categories, <strong>do not waste your - time</strong> or the time of the public authority by requesting unrelated information.</p> + <p><%= _('Please only request information that comes under those categories, <strong>do not waste your + time</strong> or the time of the public authority by requesting unrelated information.') %></p> <% end %> </div> @@ -90,28 +90,28 @@ <div id="request_form"> <h1> - <label class="form_label" for="info_request_public_body_id">To:</label> + <label class="form_label" for="info_request_public_body_id"><%= _('To:') %></label> <span id="to_public_body"><%=h(@info_request.public_body.name)%></span> </h1> <p> - <label class="form_label" for="info_request_title">Summary:</label> + <label class="form_label" for="info_request_title"><%= _('Summary:') %></label> <%= f.text_field :title, :size => 50 %> </p> <div class="form_item_note"> - (a one line summary of the information you are requesting, - e.g. + (<%= _('a one line summary of the information you are requesting, + e.g.') %> <% if @info_request.law_used == 'eir' %> - 'Pollution levels over time for the River Tyne' + <%= _("'Pollution levels over time for the River Tyne'") %> <% else %> - 'Crime statistics by ward level for Wales' + <%= _("'Crime statistics by ward level for Wales'") %> <% end %> ) </div> <% fields_for :outgoing_message do |o| %> <p> - <label class="form_label" for="outgoing_message_body">Your request:</label> + <label class="form_label" for="outgoing_message_body"><%= _('Your request:') %></label> <%= o.text_area :body, :rows => 20, :cols => 60 %> </p> <% end %> @@ -122,30 +122,30 @@ <% if !@user %> <p class="form_note"> - Everything that you enter on this page, including <strong>your name</strong>, + <%= _('Everything that you enter on this page, including <strong>your name</strong>, will be <strong>displayed publicly</strong> on - this website forever (<a href="/help/privacy#public_request">why?</a>). - If you are thinking of using a pseudonym, - please <a href="/help/privacy#real_name">read this first</a>. + this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"] %> + <%= _('If you are thinking of using a pseudonym, + please <a href="%s">read this first</a>.') % [help_privacy_path+"#public_request"] %> </p> <% else %> <p class="form_note"> - Everything that you enter on this page + <%= _('Everything that you enter on this page will be <strong>displayed publicly</strong> on - this website forever (<a href="/help/privacy#public_request">why?</a>). + this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"] %> </p> <% end %> <p class="form_note"> - <strong>Can I request information about myself?</strong> - <a href="/help/requesting#data_protection">No! (Click here for details)</a> + <%= _('<strong> Can I request information about myself?</strong> + <a href="%s">No! (Click here for details)</a>') % [help_requesting_path+"#data_protection"] %> </p> <div class="form_button"> <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> <%= hidden_field_tag(:submitted_new_request, 1 ) %> <%= hidden_field_tag(:preview, 1 ) %> - <%= submit_tag "Preview your public request" %> + <%= submit_tag _("Preview your public request") %> </div> <% if !@info_request.tag_string.empty? %> diff --git a/app/views/request/new_bad_contact.rhtml b/app/views/request/new_bad_contact.rhtml index 86dac9899..41a2cef4d 100644 --- a/app/views/request/new_bad_contact.rhtml +++ b/app/views/request/new_bad_contact.rhtml @@ -1,10 +1,10 @@ -<% @title = "Missing contact details for '" + h(@info_request.public_body.name) + "'" %> +<% @title = _("Missing contact details for '") + h(@info_request.public_body.name) + "'" %> <h1><%=@title%></h1> -<p>Unfortunately, we do not have a working <%=h @info_request.law_used_full %> -address for <%=h @info_request.public_body.name %>. You may be able to find +<p><%= _('Unfortunately, we do not have a working {{info_request_law_used_full}} +address for'),:info_request_law_used_full => @info_request.law_used_full %> <%=h @info_request.public_body.name %>. <%= _('You may be able to find one on their website, or by phoning them up and asking. If you manage -to find one, then please <a href="/help/contact">send it to us</a>. +to find one, then please <a href="%s">send it to us</a>.') % [help_contact_path] %> </p> diff --git a/app/views/request/new_please_describe.rhtml b/app/views/request/new_please_describe.rhtml index 932731e37..a82321ec5 100644 --- a/app/views/request/new_please_describe.rhtml +++ b/app/views/request/new_please_describe.rhtml @@ -2,8 +2,8 @@ <h1><%=@title%></h1> -<p>Please select each of these requests in turn, and <strong>let everyone know</strong> -if they are successful yet or not. +<p><%= _('Please select each of these requests in turn, and <strong>let everyone know</strong> +if they are successful yet or not.') %> </p> <ul> @@ -13,13 +13,13 @@ if they are successful yet or not. </ul> <p> - When you're done, <strong>come back here</strong>, + <%= _('When you\'re done, <strong>come back here</strong>') %>, <%= link_to "reload this page", request.request_uri %> - and file your new request. + <%= _('and file your new request.') %> </p> <p> - Thanks very much for helping keep everything <strong>neat and organised</strong>. - We'll also, if you need it, give you advice on what to do next about each of your - requests. + <%= _('Thanks very much for helping keep everything <strong>neat and organised</strong>. + We\'ll also, if you need it, give you advice on what to do next about each of your + requests.') %> </p> diff --git a/app/views/request/preview.rhtml b/app/views/request/preview.rhtml index 8c651bb36..6f6ecb2f9 100644 --- a/app/views/request/preview.rhtml +++ b/app/views/request/preview.rhtml @@ -2,11 +2,11 @@ <% form_for(:info_request, @info_request, :html => { :id => 'preview_form' } ) do |f| %> - <h1>Now preview your request</h1> + <h1><%= _('Now preview your request') %></h1> <ul> - <li>Check you haven't included any <strong>personal information</strong>.</li> - <li>Your name, request and any responses will appear in <strong>search engines</strong> - (<a href="/help/privacy#public_request">details</a>). + <li><%= _('Check you haven\'t included any <strong>personal information</strong>.') %></li> + <li><%= _('Your name, request and any responses will appear in <strong>search engines</strong> + (<a href="%s">details</a>).') % [help_privacy_path+"#public_request"] %> </li> </ul> @@ -14,8 +14,8 @@ <div class="correspondence" id="outgoing-0"> <p class="preview_subject"> - <strong>To:</strong> <%=h @info_request.public_body.name %> - <br><strong>Subject:</strong> <%=h @info_request.email_subject_request %> + <strong><%= _('To:') %></strong> <%=h @info_request.public_body.name %> + <br><strong><%= _('Subject:') %></strong> <%=h @info_request.email_subject_request %> </p> <div class="correspondence_text"> @@ -28,8 +28,8 @@ </div> <% end %> - <p><strong>Privacy note:</strong> If you want to request private information about - yourself then <a href="/help/requesting#data_protection">click here</a>. + <p><%= _('<strong>Privacy note:</strong> If you want to request private information about + yourself then <a href="%s">click here</a>.') % [help_requesting_path+"#data_protection"] %> <p> <%= f.hidden_field(:title) %> @@ -37,12 +37,12 @@ <%= f.hidden_field(:tag_string) %> <%= hidden_field_tag(:submitted_new_request, 1) %> <%= hidden_field_tag(:preview, 0 ) %> - <%= submit_tag "Re-edit this request", :name => 'reedit' %> - <%= submit_tag "Send public " + h(@info_request.law_used_full) + " request", :name => 'submit' %> + <%= submit_tag _("Re-edit this request"), :name => 'reedit' %> + <%= submit_tag _("Send public ") + h(@info_request.law_used_full) + " request", :name => 'submit' %> </p> <% if !@info_request.tag_string.empty? %> - <p><strong>Tags:</strong> <%=h @info_request.tag_string %></p> + <p><strong><%= _('Tags:') %></strong> <%=h @info_request.tag_string %></p> <% end %> <% end %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index 006edab76..9b6758312 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -2,14 +2,14 @@ <% if @info_request.prominence == 'hidden' %> <p id="hidden_request"> - This request has prominence 'hidden'. You can only see it because you are logged - in as a super user. + <%= _('This request has prominence \'hidden\'. You can only see it because you are logged + in as a super user.') %> </p> <% end %> <% if @info_request.prominence == 'requester_only' %> <p id="hidden_request"> - This request is hidden, so that only you the requester can see it. Please - <a href="/help/contact">contact us</a> if you are not sure why. + <%= _('This request is hidden, so that only you the requester can see it. Please + <a href="%s">contact us</a> if you are not sure why.') % [help_requesting_path] %> </p> <% end %> @@ -32,89 +32,85 @@ <% end %> <p class="subtitle"> - <%= user_link(@info_request.user) %> made this + <%= user_link(@info_request.user) %> <%= _('made this') %> <%=h @info_request.law_used_full%> - request + <%= _('request') %> <% if !@user.nil? && @user.admin_page_links? %> (<%= link_to "admin", request_admin_url(@info_request) %>) <% end %> - to <%= public_body_link(@info_request.public_body) %> + <%= _('to') %> <%= public_body_link(@info_request.public_body) %> </p> <p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>"> <% if @info_request.awaiting_description %> <% if @is_owning_user %> - Please <strong>answer the question above</strong> so we know whether the - <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> useful information. + <%= _('Please <strong>answer the question above</strong> so we know whether the ')%> + <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %> <% else %> - This request has an <strong>unknown status</strong>. + <%= _('This request has an <strong>unknown status</strong>.') %> <% if @old_unclassified %> - We're waiting for someone to read + <%= _('We\'re waiting for someone to read') %> <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %> - and update the status accordingly. Perhaps <strong>you</strong> might like to help out by doing that? + <%= _('and update the status accordingly. Perhaps <strong>you</strong> might like to help out by doing that?') %> <% else %> - We're waiting for - <%= user_link(@info_request.user) %> to read + <%= _('We\'re waiting for') %> + <%= user_link(@info_request.user) %> <%= _('to read') %> <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %> - and update the status. + <%= _('and update the status.') %> <% end %> <% end %> <% elsif @status == 'waiting_response' %> - Currently <strong>waiting for a response</strong> from <%= public_body_link(@info_request.public_body) %>, - they must respond promptly and + <%= _('Currently <strong>waiting for a response</strong> from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %> <% if @info_request.public_body.is_school? %> - in term time + <%= _('in term time') %> <% else %> - normally + <%= _('normally') %> <% end %> - no later than <strong><%= simple_date(@info_request.date_response_required_by) %></strong> + <%= _('no later than') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong> (<%= link_to "details", "/help/requesting#quickly_response" %>). <% elsif @status == 'waiting_response_overdue' %> - Response to this request is <strong>delayed</strong>. - By law, <%= public_body_link(@info_request.public_body) %> should - normally have responded <strong>promptly</strong> and + <%= _('Response to this request is <strong>delayed</strong>.') %> + <%= _('By law, {{public_body_link}} should normally have responded <strong>promptly</strong> and',:public_body_link=>public_body_link(@info_request.public_body)) %> <% if @info_request.public_body.is_school? %> - in term time + <%= _('in term time') %> <% end %> - by <strong><%= simple_date(@info_request.date_response_required_by) %></strong> - (<%= link_to "details", "/help/requesting#quickly_response" %>). + <%= _('by') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong> + (<%= _('<a href="%s">details</a>') % [help_requesting_path + '#quickly_response'] %>) <% elsif @status == 'waiting_response_very_overdue' %> - Response to this request is <strong>long overdue</strong>. - By law, under all circumstances, <%= public_body_link(@info_request.public_body) %> - should have responded by now - (<%= link_to "details", "/help/requesting#quickly_response" %>). - You can <strong>complain</strong> by - <%= link_to "requesting an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. + <%= _('Response to this request is <strong>long overdue</strong>.') %> + <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %> + (<%= _('<a href="%s">details</a>') % [help_requesting_path + '#quickly_response'] %>). + <%= _('You can <strong>complain</strong> by') %> + <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. <% elsif @status == 'not_held' %> - <%= public_body_link(@info_request.public_body) %> <strong>did not have</strong> the information requested. + <%= public_body_link(@info_request.public_body) %> <%= _('<strong>did not have</strong> the information requested.') %> <% elsif @status == 'rejected' %> - The request was <strong>refused</strong> by <%= public_body_link(@info_request.public_body) %>. + <%= _('The request was <strong>refused</strong> by') %> <%= public_body_link(@info_request.public_body) %>. <% elsif @status == 'successful' %> - The request was <strong>successful</strong>. + <%= _('The request was <strong>successful</strong>.') %> <% elsif @status == 'partially_successful' %> - The request was <strong>partially successful</strong>. + <%= _('The request was <strong>partially successful</strong>.') %> <% elsif @status == 'waiting_clarification' %> <% if @is_owning_user %> - <%=h @info_request.public_body.name %> is <strong>waiting for your clarification</strong>. - Please - <%= link_to "send a follow up message", respond_to_last_url(@info_request) + '#followup' %>. + <%=h @info_request.public_body.name %> <%= _('is <strong>waiting for your clarification</strong>.') %> + <%= _('Please') %> + <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>. <% else %> - The request is <strong>waiting for clarification</strong>. - If you are - <%= user_link(@info_request.user) %>, please - <%= link_to "sign in", signin_url(:r => request.request_uri) %> to send a follow up message. + <%= _('The request is <strong>waiting for clarification</strong>.') %> + <%= _('If you are {{user_link}}, please',:user_link=>user_link(@info_request.user)) %> + <%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %> <% end %> <% elsif @status == 'gone_postal' %> - The authority would like to / has <strong>responded by post</strong> to this request. + <%= _('The authority would like to / has <strong>responded by post</strong> to this request.') %> <% elsif @status == 'internal_review' %> - Waiting for an <strong>internal review</strong> by <%= public_body_link(@info_request.public_body) %> of their handling of this request. + <%= _('Waiting for an <strong>internal review</strong> by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %> <% elsif @status == 'error_message' %> - There was a <strong>delivery error</strong> or similar, which needs fixing by the WhatDoTheyKnow team. + <%= _('There was a <strong>delivery error</strong> or similar, which needs fixing by the WhatDoTheyKnow team.') %> <% elsif @status == 'requires_admin' %> - This request has had an unusual response, and <strong>requires attention</strong> from the WhatDoTheyKnow team. + <%= _('This request has had an unusual response, and <strong>requires attention</strong> from the WhatDoTheyKnow team.') %> <% elsif @status == 'user_withdrawn' %> - This request has been <strong>withdrawn</strong> by the person who made it. - There may be an explanation in the correspondence below. + <%= _('This request has been <strong>withdrawn</strong> by the person who made it. + There may be an explanation in the correspondence below.') %> <% else %> <% raise "unknown status " + @status %> <% end %> diff --git a/app/views/request/show_response.rhtml b/app/views/request/show_response.rhtml index 771081694..68c5fdf85 100644 --- a/app/views/request/show_response.rhtml +++ b/app/views/request/show_response.rhtml @@ -10,44 +10,44 @@ <% if @gone_postal %> <div class="gone_postal_help"> - <h1>Which of these is happening?</h1> + <h1><%= _('Which of these is happening?') %></h1> <dl> <dt> - The authority say that they <strong>need a postal - address</strong>, not just an email, for it to be a valid FOI request + <%= _('The authority say that they <strong>need a postal + address</strong>, not just an email, for it to be a valid FOI request') %> </dt> <dd> - The law, the Ministry of Justice and the Information Commissioner - all say that an email is sufficient (<a href="/help/privacy#full_address">more details</a>). - At the bottom of this page, write a reply to the authority explaining this to them. + <%= _('The law, the Ministry of Justice and the Information Commissioner + all say that an email is sufficient (<a href="%s">more details</a>). + At the bottom of this page, write a reply to the authority explaining this to them.') % [help_privacy_path + '#full_address'] %> </dd> <dt> - The authority only has a <strong>paper copy</strong> of the information. + <%= _('The authority only has a <strong>paper copy</strong> of the information.') %> </dt> <dd> - At the bottom of this page, write a reply to them trying to persuade them to scan it in - (<a href="/help/privacy#postal_answer">more details</a>). + <%= _('At the bottom of this page, write a reply to them trying to persuade them to scan it in + (<a href="%s">more details</a>).') % [help_privacy_path + '#postal_answer'] %> </dd> <dt> - You want to <strong>give your postal address</strong> to the authority in private. + <%= _('You want to <strong>give your postal address</strong> to the authority in private.') %> </dt> <dd> - To do that please send a private email to <%=h(@postal_email_name)%> + <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%> <<%=link_to h(@postal_email), "mailto:" + @postal_email%>> - containing your postal address, and asking them to reply to this request. - Or you could phone them. + <%= _('containing your postal address, and asking them to reply to this request. + Or you could phone them.') %> - When you receive the paper response, please help - others find out what it says: + <%= _('When you receive the paper response, please help + others find out what it says:') %> <ul> - <li>Add an annotation to your request with choice quotes, or - a <strong>summary of the response</strong>.</li> - <li>If you can, scan in or photograph the response, and <strong>send us - a copy to upload</strong>.</li> + <li><%= _('Add an annotation to your request with choice quotes, or + a <strong>summary of the response</strong>.') %></li> + <li><%= _('If you can, scan in or photograph the response, and <strong>send us + a copy to upload</strong>.') %></li> </ul> </dd> @@ -59,9 +59,9 @@ <% if !@incoming_message.nil? %> <% if @is_owning_user %> <% if @incoming_message.recently_arrived %> - <h2>New response to your request '<%= request_link @info_request %>'</h2> + <h2><%= _('New response to your request') %> '<%= request_link @info_request %>'</h2> <% else %> - <h2>Response to your request '<%= request_link @info_request %>'</h2> + <h2><%= _('Response to your request') %> '<%= request_link @info_request %>'</h2> <% end %> <% else %> <% if @incoming_message.recently_arrived %> diff --git a/app/views/request/similar.rhtml b/app/views/request/similar.rhtml index 33034d43b..cec650bfe 100644 --- a/app/views/request/similar.rhtml +++ b/app/views/request/similar.rhtml @@ -4,7 +4,7 @@ <!-- Important terms: <%= @xapian_object.important_terms.join(" ") %> --> <% if @xapian_object.results.empty? %> - <p>No similar requests found.</p> + <p><%= _('No similar requests found.')%></p> <% else %> <!-- <p class="subtitle"> @@ -15,7 +15,7 @@ <% if result[:model].class.to_s == 'InfoRequestEvent' %> <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> <% else %> - <p><strong>Unexpected search result type <%=result[:model].class.to_s%></strong></p> + <p><strong><% _('Unexpected search result type ')%><%=result[:model].class.to_s%></strong></p> <% end %> <% end %> <% end %> diff --git a/app/views/request/upload_response.rhtml b/app/views/request/upload_response.rhtml index 0f8329f8a..d18e03e97 100644 --- a/app/views/request/upload_response.rhtml +++ b/app/views/request/upload_response.rhtml @@ -2,42 +2,42 @@ <%= foi_error_messages_for :comment %> -<h1>Respond to the FOI request '<%=request_link(@info_request)%>' made by <%=user_link(@info_request.user) %></h1> +<h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1> <p> - Your response will <strong>appear on the Internet</strong>, <a href="/help/officers">read why</a> and answers to other questions. + <%= _('Your response will <strong>appear on the Internet</strong>, <a href="%s">read why</a> and answers to other questions.')% [help_officers_path] %> </p> -<h2>Respond by email</h2> +<h2><%= _('Respond by email')%></h2> -<p>You should have received a copy of the request by email, and you can respond -by <strong>simply replying</strong> to that email. For your convenience, here is the address: +<p><%= _('You should have received a copy of the request by email, and you can respond +by <strong>simply replying</strong> to that email. For your convenience, here is the address:')%> <a href="mailto:<%=h @info_request.incoming_email%>"><%=h @info_request.incoming_email%></a>. -You may <strong>include attachments</strong>. If you would like to attach a -file too large for email, use the form below. +<%= _('You may <strong>include attachments</strong>. If you would like to attach a +file too large for email, use the form below.')%> </p> -<h2>Respond using the web</h2> +<h2><%= _('Respond using the web')%></h2> -<p>Enter your response below. You may attach one file (use email, or -<a href="/help/contact">contact us</a> if you need more).</p> +<p><%= _('Enter your response below. You may attach one file (use email, or +<a href="%s">contact us</a> if you need more).')% [help_contact_path] %></p> <% form_tag '', :html => { :id => 'upload_response_form' }, :multipart => true do %> <p> - <label class="form_label" for="body">Response:</label> + <label class="form_label" for="body"><% _('Response:')%></label> <%= text_area_tag :body, "", :rows => 10, :cols => 55 %> </p> <p> - <label class="form_label" for="file_1">Attachment (optional):</label> + <label class="form_label" for="file_1"><% _('Attachment (optional):')%></label> <%= file_field_tag :file_1, :size => 35 %> </p> <p> <%= hidden_field_tag 'submitted_upload_response', 1 %> <%= submit_tag "Upload FOI response" %> - (<strong>patience</strong>, especially for large files, it may take a while!) + <% _(' (<strong>patience</strong>, especially for large files, it may take a while!)')%> </p> <% end %> diff --git a/app/views/request_game/play.rhtml b/app/views/request_game/play.rhtml index 36e9adac7..ac0f0bb56 100644 --- a/app/views/request_game/play.rhtml +++ b/app/views/request_game/play.rhtml @@ -1,11 +1,10 @@ -<% @title = 'Play the request categorisation game!' %> +<% @title = _("Play the request categorisation game!") %> <div id="game_sidebar"> <p style="text-align: center"> <img width=250 height=125 src="http://chart.apis.google.com/chart?chs=250x125&cht=gom&chd=t:<%=@percentage%>" alt="<%=@percentage%>% of requests have been categorised"> <br><%=pluralize(@missing, 'request')%> left to categorise / <%=@total %> total </p> - <h2>Top recent players</h2> <table> <% c = 0; for user, count in @league_table_28_days %> @@ -28,25 +27,20 @@ <% end %> </table> </div> - -<h2>Play the request categorisation game!</h2> - -<p>Some people who've made requests haven't let us know whether they were +<h2><% =_("Play the request categorisation game!")%></h2> +<p><% =_("Some people who've made requests haven't let us know whether they were successful or not. We need <strong>your</strong> help – choose one of these requests, read it, and let everyone know whether or not the -information has been provided. Everyone'll be exceedingly grateful.</p> - +information has been provided. Everyone'll be exceedingly grateful.")%></p> <% for info_request in @requests %> <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> <% end %> - <p id="game_buttons"> -<%= button_to "I don't like these ones — give me some more!", play_url %> -<%= button_to "I don't want to do any more tidying now!", stop_url %> +<%= button_to _('I don\'t like these ones — give me some more!'), play_url %> +<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %> </p> - -<p>Thanks for helping - your work will make it easier for everyone to find successful -responses, and maybe even let us make league tables...</p> +<p><%= _('Thanks for helping - your work will make it easier for everyone to find successful +responses, and maybe even let us make league tables...')%></p> diff --git a/app/views/request_mailer/comment_on_alert_plural.rhtml b/app/views/request_mailer/comment_on_alert_plural.rhtml index ee12ba975..fd202cc2f 100644 --- a/app/views/request_mailer/comment_on_alert_plural.rhtml +++ b/app/views/request_mailer/comment_on_alert_plural.rhtml @@ -1,6 +1,7 @@ -There are <%=@count%> new annotations on your <%=@info_request.law_used_short%> -request. Follow this link to see what they wrote. +<%= _('There are {{count}} new annotations on your {{info_request}} request. Follow this link to see what they wrote.',:count=>@count,:info_request=>@info_request.law_used_short)%> <%=@url%> -- the WhatDoTheyKnow team + + diff --git a/app/views/request_mailer/new_response.rhtml b/app/views/request_mailer/new_response.rhtml index c9d7e64fb..6d2892f19 100644 --- a/app/views/request_mailer/new_response.rhtml +++ b/app/views/request_mailer/new_response.rhtml @@ -1,16 +1,16 @@ -You have a new response to the <%= @info_request.law_used_full %> request -'<%= @info_request.title %>' that you made to +<%= _('You have a new response to the {{law_used_full}} request ',:law_used_full=>@info_request.law_used_full)%> +'<%= @info_request.title %>' <%=_('that you made to')%> <%= @info_request.public_body.name %>. -To view the response, click on the link below. +<%= _('To view the response, click on the link below.')%> <%=@url%> -When you get there, please update the status to say if the response -contains any useful information. +<%= _('When you get there, please update the status to say if the response +contains any useful information.' )% -Although all responses are automatically published, we depend on -you, the original requester, to evaluate them. +<%= _('Although all responses are automatically published, we depend on +you, the original requester, to evaluate them.')%> -- the WhatDoTheyKnow team diff --git a/app/views/request_mailer/new_response_reminder_alert.rhtml b/app/views/request_mailer/new_response_reminder_alert.rhtml index aa65c5196..5d0e08a98 100644 --- a/app/views/request_mailer/new_response_reminder_alert.rhtml +++ b/app/views/request_mailer/new_response_reminder_alert.rhtml @@ -1,11 +1,9 @@ -To let us know, follow this link and then select the appropriate box. +<%=_('To let us know, follow this link and then select the appropriate box.')%> <%=@url%> -Your request was called '<%= @info_request.title %>'. Letting everyone know -whether you got the information will help us keep tabs on +<%= _('Your request was called {{info_request}}. Letting everyone know whether you got the information will help us keep tabs on',:info_request=>@info_request.title)%> <%= @info_request.public_body.name %>. - -- the WhatDoTheyKnow team diff --git a/app/views/request_mailer/not_clarified_alert.rhtml b/app/views/request_mailer/not_clarified_alert.rhtml index 40124d190..f6d625555 100644 --- a/app/views/request_mailer/not_clarified_alert.rhtml +++ b/app/views/request_mailer/not_clarified_alert.rhtml @@ -1,10 +1,9 @@ -<%=@info_request.public_body.name%> has asked you to explain -part of your <%=@info_request.law_used_short%> request. -To do this, first click on the link below. +<%=@info_request.public_body.name%> <%=('has asked you to explain part of your')%> <%=@info_request.law_used_short%> <%= _('request.')%> +<%= _('To do this, first click on the link below.')%> <%=@url%> -You will only get an answer to your request if you follow up -with the clarification. +<%= _('You will only get an answer to your request if you follow up +with the clarification.')%> -- the WhatDoTheyKnow team diff --git a/app/views/request_mailer/old_unclassified_updated.rhtml b/app/views/request_mailer/old_unclassified_updated.rhtml index 715fcde3e..19963e192 100644 --- a/app/views/request_mailer/old_unclassified_updated.rhtml +++ b/app/views/request_mailer/old_unclassified_updated.rhtml @@ -1,12 +1,13 @@ -To help us keep the site tidy, someone else has updated the status of the -<%= @info_request.law_used_full %> request '<%= @info_request.title %>' -that you made to <%= @info_request.public_body.name %>, to -"<%= @info_request.display_status.downcase %>" If you disagree with +<% _('To help us keep the site tidy, someone else has updated the status of the +{{law_used_full}} request {{title}} +that you made to {{public_body}}, to +{{display_status}} If you disagree with their categorisation, please update the status again yourself to what -you believe to be more accurate. +you believe to be more accurate.',:law_used_full=>@info_request.law_used_full,:title=>@info_request.title, :public_body=>@info_request.public_body.name,:display_status=>@info_request.display_status.downcase)%> -Follow this link to see the request: +<%= _('Follow this link to see the request:')%> <%= @url %> -- the WhatDoTheyKnow team + diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml index 29a1a1d68..b7bd728e7 100644 --- a/app/views/request_mailer/overdue_alert.rhtml +++ b/app/views/request_mailer/overdue_alert.rhtml @@ -1,10 +1,8 @@ -<%= @info_request.public_body.name %> have delayed. +<%= @info_request.public_body.name %> <% _('have delayed.')%> -They have not replied to your <%=@info_request.law_used_short%> request '<%= @info_request.title %>' -promptly, as normally required by law<% if @info_request.public_body.is_school? %> during term time<% end %>. +<%= _('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law':law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_('during term time')%> <% end %>. -Click on the link below to send a message to <%= @info_request.public_body.name -%> reminding them to reply to your request. +<%= _('Click on the link below to send a message to {{public_body}} reminding them to reply to your request.':public_body=>@info_request.public_body.name)%> <%=@url%> diff --git a/app/views/request_mailer/requires_admin.rhtml b/app/views/request_mailer/requires_admin.rhtml index b0b2e926a..51d874b85 100644 --- a/app/views/request_mailer/requires_admin.rhtml +++ b/app/views/request_mailer/requires_admin.rhtml @@ -1,7 +1,7 @@ --------------------------------------------------------------------- -<%=@info_request.user.name%> has reported an <%=@info_request.law_used_short%> -response as needing administrator attention. Take a look, and reply to this -email to let them know what you are going to do about it. +<%=@info_request.user.name%> <%= _('has reported an')%> <%=@info_request.law_used_short%> +<%= _('response as needing administrator attention. Take a look, and reply to this +email to let them know what you are going to do about it.')%> Request '<%=@info_request.title%>': <%= @url %> diff --git a/app/views/request_mailer/stopped_responses.rhtml b/app/views/request_mailer/stopped_responses.rhtml index 5c4fe704d..bd8e54929 100644 --- a/app/views/request_mailer/stopped_responses.rhtml +++ b/app/views/request_mailer/stopped_responses.rhtml @@ -1,14 +1,20 @@ -The email that you, on behalf of <%= @info_request.public_body.name%>, sent to -<%= @info_request.user.name %> to reply to an <%= @info_request.law_used_short %> -request has not been delivered. +<%= _('The email that you, on behalf of {{public_body}}, sent to +{{user}} to reply to an {{law_used_short}} +request has not been delivered.': public_body=>@info_request.public_body.name,:user=>@info_request.user.name:law_used_short@info_request.law_used_short)%> -This is because '<%= @info_request.title %>' is an old request that has been -marked to no longer receive responses. +<%= _('This is because {{title}} is an old request that has been +marked to no longer receive responses.',:title=>@info_request.title)%> -If this is incorrect, or you would like to send a late response to the request -or an email on another subject to <%= @info_request.user.name %>, then please -email <%=@contact_email%> for help. -Your original message is attached. + +<%= _('If this is incorrect, or you would like to send a late response to the request +or an email on another subject to {{user}}, then please +email {{contact_email}} for help.',:user=>@info_request.user.name,:contact_email=>@contact_email)%> + +<%= _('Your original message is attached.')%> -- the WhatDoTheyKnow team + + + + diff --git a/app/views/request_mailer/very_overdue_alert.rhtml b/app/views/request_mailer/very_overdue_alert.rhtml index 2393d29e5..f9f51ee56 100644 --- a/app/views/request_mailer/very_overdue_alert.rhtml +++ b/app/views/request_mailer/very_overdue_alert.rhtml @@ -1,14 +1,11 @@ -<%= @info_request.public_body.name %> are long overdue. +<%= @info_request.public_body.name %> <%= _('are long overdue.')%> -They have not replied to your <%=@info_request.law_used_short%> request '<%= @info_request.title %>', -as required by law<% if @info_request.public_body.is_school? %> even during holidays<% end %>. +<%= _('They have not replied to your {{law_used_short}} request {{title}}, +as required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%= _('even during holidays')%><% end %>. -Click on the link below to send a message to <%= @info_request.public_body.name -%> telling them to reply to your request. You might like to ask for an internal -review, asking them to find out why response to the request has been so slow. +<%= _('Click on the link below to send a message to {{public_body.name}} telling them to reply to your request. You might like to ask for an internal +review, asking them to find out why response to the request has been so slow.',:public_body=>@info_request.public_body.name)%> <%=@url%> -- the WhatDoTheyKnow team - - diff --git a/app/views/track/_tracking_links.rhtml b/app/views/track/_tracking_links.rhtml index c078d6db7..a08f97c08 100644 --- a/app/views/track/_tracking_links.rhtml +++ b/app/views/track/_tracking_links.rhtml @@ -6,7 +6,7 @@ <% if own_request %> - <p>This is your own request, so you will be automatically emailed when new responses arrive.</p> + <p><%= _('This is your own request, so you will be automatically emailed when new responses arrive.')%></p> <% elsif existing_track %> <% form_tag({:controller => 'track', :action => 'update', :track_id => existing_track.id}, :class => "feed_form_" + location) do %> <p> diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.rhtml index e6914c853..f2da454a6 100644 --- a/app/views/track_mailer/event_digest.rhtml +++ b/app/views/track_mailer/event_digest.rhtml @@ -18,17 +18,17 @@ # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008) if event.event_type == 'response' url = main_url(incoming_message_url(event.incoming_message)) - main_text += event.info_request.public_body.name + " sent a response to " + event.info_request.user.name + main_text += event.info_request.public_body.name + <%= _('sent a response to')%>+ event.info_request.user.name elsif event.event_type == 'followup_sent' url = main_url(outgoing_message_url(event.outgoing_message)) - main_text += event.info_request.user.name + " sent a follow up message to " + event.info_request.public_body.name + main_text += event.info_request.user.name + <%= _('sent a follow up message to')%> + event.info_request.public_body.name elsif event.event_type == 'sent' # this is unlikely to happen in real life, but happens in the test code url = main_url(outgoing_message_url(event.outgoing_message)) - main_text += event.info_request.user.name + " sent a request to " + event.info_request.public_body.name + main_text += event.info_request.user.name + <%= _(' sent a request to')%> + event.info_request.public_body.name elsif event.event_type == 'comment' url = main_url(comment_url(event.comment)) - main_text += event.comment.user.name + " added an annotation" + main_text += event.comment.user.name + <%= _('added an annotation')%> else raise "unknown type in event_digest " + event.event_type end @@ -51,7 +51,7 @@ main_text += url + "\n" main_text += "\n" else - raise "need to add other types to TrackMailer.event_digest" + raise <%= _('need to add other types to TrackMailer.event_digest')%> end end main_text += "\n" @@ -59,10 +59,11 @@ #STDERR.puts main_text #STDERR.puts @unsubscribe_url -%><%=main_text%>Alter your subscription +%> +<%=main_text%><%= _('Alter your subscription')%> ======================= -Please click on the link below to cancel or alter these emails. +<%= _('Please click on the link below to cancel or alter these emails.')%> <%=@unsubscribe_url%> -- the WhatDoTheyKnow team diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml index 52c2a9e71..879d107bd 100644 --- a/app/views/user/_signin.rhtml +++ b/app/views/user/_signin.rhtml @@ -4,31 +4,31 @@ <%= foi_error_messages_for :user_signin %> <% if not sign_in_as_existing_user %> - <h2>If you've used WhatDoTheyKnow before</h2> + <h2><%= ('If you\'ve used WhatDoTheyKnow before')%></h2> <% end %> <p> - <label class="form_label" for="user_signin_email">Your e-mail:</label> + <label class="form_label" for="user_signin_email"><%= ('Your e-mail:')%></label> <%= text_field 'user_signin', 'email', { :size => 20 } %> </p> <p> - <label class="form_label" for="user_signin_password">Password:</label> + <label class="form_label" for="user_signin_password"><%= ('Password:')%></label> <%= password_field 'user_signin', 'password', { :size => 15 } %> </p> <p class="form_note"> - <%= link_to "Forgotten your password?", signchangepassword_url + "?pretoken=" + h(params[:token]) %> + <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]) %> </p> <p class="form_checkbox"> <%= check_box_tag 'remember_me', "1" %> - <label for="remember_me">Remember me</label> (keeps you signed in longer; - do not use on a public computer) </p> + <label for="remember_me"><%= ('Remember me</label> (keeps you signed in longer; + do not use on a public computer) ')%></p> <div class="form_button"> <%= hidden_field_tag 'token', params[:token], { :id => 'signin_token' } %> - <%= submit_tag "Sign in" %> + <%= submit_tag _('Sign in') %> </div> <% end %> diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml index 65b5ce6f2..70120bc5f 100644 --- a/app/views/user/_signup.rhtml +++ b/app/views/user/_signup.rhtml @@ -3,43 +3,42 @@ <% form_tag({:action => "signup"}, {:id => "signup_form"}) do %> <%= foi_error_messages_for :user_signup %> - <h2>If you're new to WhatDoTheyKnow</h2> + <h2><%= _('If you\'re new to WhatDoTheyKnow')%></h2> <p> - <label class="form_label" for="user_signup_email">Your e-mail:</label> + <label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label> <%= text_field 'user_signup', 'email', { :size => 20 } %> </p> <div class="form_item_note"> - We will not reveal your email address to anybody unless you or - the law tell us to - (<a href="/help/privacy">details</a>). + <%= ('We will not reveal your email address to anybody unless you or + the law tell us to (<a href="%s">_details</a>). ') %[help_privacy_path] %> </div> <p> - <label class="form_label" for="user_signup_name">Your name:</label> + <label class="form_label" for="user_signup_name"> <%= _('Your name:')%></label> <%= text_field 'user_signup', 'name', { :size => 20 } %> </p> <div class="form_item_note"> - Your <strong>name will appear publicly</strong> - (<a href="/help/privacy#public_request">why?</a>) + <%= _('Your <strong>name will appear publicly</strong> + (<a href="%s">why?</a>) on this website and in search engines. If you are thinking of using a pseudonym, please - <a href="/help/privacy#real_name">read this first</a>. + <a href="%s">read this first</a>.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"] %> </div> <p> - <label class="form_label" for="user_signup_password">Password:</label> + <label class="form_label" for="user_signup_password"> <%= _('Password:')%></label> <%= password_field 'user_signup', 'password', { :size => 15 } %> </p> <p> - <label class="form_label" for="user_signup_password_confirmation">Password: (again)</label> + <label class="form_label" for="user_signup_password_confirmation"> <%= _('Password: (again)')%></label> <%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %> </p> <div class="form_button"> <%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %> - <%= submit_tag "Sign up" %> + <%= submit_tag _('Sign up') %> </div> <% end %> diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml index 9fa70c779..53df3a7e8 100644 --- a/app/views/user/_user_listing_single.rhtml +++ b/app/views/user/_user_listing_single.rhtml @@ -16,9 +16,9 @@ end %> </span> <span class="bottomline"> - <%= pluralize(display_user.info_requests.size, "request") %> made. - <%= pluralize(display_user.visible_comments.size, "annotation") %> made. - Joined in <%= year_from_date(display_user.created_at) %>. + <%= pluralize(display_user.info_requests.size, "request") %> <%= _('made.')%> + <%= pluralize(display_user.visible_comments.size, "annotation") %> <%= _('made.')%> + <%= _('Joined in')%> <%= year_from_date(display_user.created_at) %>. </span> </div> diff --git a/app/views/user/bad_token.rhtml b/app/views/user/bad_token.rhtml index 9855fb546..443835382 100644 --- a/app/views/user/bad_token.rhtml +++ b/app/views/user/bad_token.rhtml @@ -1,17 +1,17 @@ <h1> -Please check the URL (i.e. the long code of letters and numbers) is copied -correctly from your email. +<%= _('Please check the URL (i.e. the long code of letters and numbers) is copied +correctly from your email.'%> </h1> <p> -If you can't click on it in the email, you'll have to <strong>select and copy +<%= _('If you can\'t click on it in the email, you\'ll have to <strong>select and copy it</strong> from the email. Then <strong>paste it into your browser</strong>, into the place -you would type the address of any other webpage. +you would type the address of any other webpage.')%> </p> <p> -If you got the email <strong>more than six months ago</strong>, then this login link won't work any -more. Please try doing what you were doing from the beginning. +<%= _('If you got the email <strong>more than six months ago</strong>, then this login link won\'t work any +more. Please try doing what you were doing from the beginning.')%> </p> diff --git a/app/views/user/banned.rhtml b/app/views/user/banned.rhtml index 6bbdf4774..475c10977 100644 --- a/app/views/user/banned.rhtml +++ b/app/views/user/banned.rhtml @@ -6,14 +6,14 @@ <%=@details%> </p> -<p>You will be unable to make new requests, send follow ups, add annotations or +<p><%= _('You will be unable to make new requests, send follow ups, add annotations or send messages to other users. You may continue to view other requests, and set up -email alerts.</p> +email alerts.')%></p> <p> -If you would like us to lift this ban, then you may politely +<%= _('If you would like us to lift this ban, then you may politely <a href="/help/contact">contact us</a> giving reasons. -</p> +')%></p> diff --git a/app/views/user/confirm.rhtml b/app/views/user/confirm.rhtml index bc9b259cc..bdaf5c8e9 100644 --- a/app/views/user/confirm.rhtml +++ b/app/views/user/confirm.rhtml @@ -3,12 +3,12 @@ <h1 class="confirmation_heading">Now check your email!</h1> <p class="confirmation_message"> -We've sent you an email, and you'll need to click the link in it before you can -continue. +<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can +continue.') %> </p> <p class="confirmation_message"> -<small>If you use web-based email or have "junk mail" filters, also check your +<%= _('<small>If you use web-based email or have "junk mail" filters, also check your bulk/spam mail folders. Sometimes, our messages are marked that way.</small> -</p> +</p>') %> diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.rhtml index 7069b671a..4bbb15789 100644 --- a/app/views/user/contact.rhtml +++ b/app/views/user/contact.rhtml @@ -29,11 +29,11 @@ <p class="form_note"> <% if @user == @recipient_user %> - <strong>Note:</strong> You're sending a message to yourself, presumably - to try out how it works. + <%= _('<strong>Note:</strong> You\'re sending a message to yourself, presumably + to try out how it works.')%> <% else %> - <strong>Privacy note:</strong> Your email address will be given to - <%= user_link(@recipient_user) %> when you send this message. + <%= _(' <strong>Privacy note:</strong> Your email address will be given to')%> + <%= user_link(@recipient_user) %><%= _(' when you send this message.')%> <% end %> </p> diff --git a/app/views/user/no_cookies.rhtml b/app/views/user/no_cookies.rhtml index 4681547d3..cf362617a 100644 --- a/app/views/user/no_cookies.rhtml +++ b/app/views/user/no_cookies.rhtml @@ -1,19 +1,22 @@ <% @title = "Cookies not enabled" %> -<h1>Please enable "cookies" to carry on</h1> +<h1><%= _('Please enable "cookies" to carry on')%></h1> -<p>To carry on, you need to sign in or make an account. Unfortunately, there -was a technical problem trying to do this.</p> +<p><%= _('To carry on, you need to sign in or make an account. Unfortunately, there +was a technical problem trying to do this.')%></p> -<p>It may be that your browser is not set to accept a thing called "cookies", +<p><%= _('It may be that your browser is not set to accept a thing called "cookies", or cannot do so. If you can, please enable cookies, or try using a different -browser. Then press refresh to have another go.</p> +browser. Then press refresh to have another go.')%></p> -<p>If your browser is set to accept cookies and you are seeing this message, -then there is probably a fault with our server. Please <a href="/help/contact">get in touch</a> -with us so we can fix it. Let us know what you were doing when this message -appeared and your browser and operating system type and version.</p> +<p><%= _('If your browser is set to accept cookies and you are seeing this message, +then there is probably a fault with our server.')%> -<p>If you are still having trouble, please <a href="/help/contact">contact us</a>. +<% _('Please <a href="%s">get in touch</a> with us so we can fix it.') % [help_contact_path] %> + + <%= _('Let us know what you were doing when this message +appeared and your browser and operating system type and version.')%></p> + +<p><% _('If you are still having trouble, please <a href="%s">contact us</a>.') % [help_contact_path] %> </p> diff --git a/app/views/user/set_crop_profile_photo.rhtml b/app/views/user/set_crop_profile_photo.rhtml index 12ba4eba2..9ca162144 100644 --- a/app/views/user/set_crop_profile_photo.rhtml +++ b/app/views/user/set_crop_profile_photo.rhtml @@ -32,8 +32,8 @@ <%= hidden_field_tag 'draft_profile_photo_id', @draft_profile_photo.id %> - <p><strong>Privacy note:</strong> Your photo will be shown in public on the Internet, - wherever you do something on WhatDoTheyKnow. + <p><%= _('<strong>Privacy note:</strong> Your photo will be shown in public on the Internet, + wherever you do something on WhatDoTheyKnow.')%> <p> <%= hidden_field_tag 'submitted_crop_profile_photo', 1 %> diff --git a/app/views/user/set_draft_profile_photo.rhtml b/app/views/user/set_draft_profile_photo.rhtml index a3d28cf92..b6a39df5e 100644 --- a/app/views/user/set_draft_profile_photo.rhtml +++ b/app/views/user/set_draft_profile_photo.rhtml @@ -10,17 +10,17 @@ <% form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %> <p> - <label class="form_label" for="file_1">Photo of you:</label> + <label class="form_label" for="file_1"><%= _('Photo of you:')%></label> <%= file_field_tag :file, :size => 35, :id => 'file_1' %> </p> <ul> - <li>Your photo will be shown in public <strong>on the Internet</strong>, - wherever you do something on WhatDoTheyKnow. + <li><%= _('Your photo will be shown in public <strong>on the Internet</strong>, + wherever you do something on WhatDoTheyKnow.')%> </li> - <li>Please don't upload offensive pictures. We will take down images - that we consider inappropriate. + <li><%= _('Please don\'t upload offensive pictures. We will take down images + that we consider inappropriate.')%> </li> </ul> @@ -29,7 +29,7 @@ <%= hidden_field_tag 'submitted_draft_profile_photo', 1 %> <script type="text/javascript" charset="utf-8"> - document.write('<%= submit_tag "Next, crop your photo >>" %>'); + document.write('<%= submit_tag _("Next, crop your photo >>") %>'); </script> </p> @@ -43,7 +43,7 @@ <% if @user.profile_photo %> - <h2>OR remove the existing photo</h2> + <h2><%= _('OR remove the existing photo')%></h2> <% form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %> <%= submit_tag "Clear photo" %> diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml index 8e83dc870..aa53d6720 100644 --- a/app/views/user/set_profile_about_me.rhtml +++ b/app/views/user/set_profile_about_me.rhtml @@ -1,37 +1,37 @@ -<% @title = "Change the text about you on your profile at WhatDoTheyKnow.com" %> +<% @title = _('Change the text about you on your profile at WhatDoTheyKnow.com') %> -<% raise "internal error" if not @user %> +<% raise _('internal error') if not @user %> <%= foi_error_messages_for :about_me %> <% form_for :about_me do |f| %> <div class="form_note"> - <h1>Edit text about you</h1> + <h1><%= _('Edit text about you')%></h1> <p> - What are you investigating using Freedom of Information? + <%= _(' What are you investigating using Freedom of Information? ')%> </p> <p> - This will appear on your WhatDoTheyKnow profile, to make it - easier for others to get involved with what you're doing. + <%= _(' This will appear on your WhatDoTheyKnow profile, to make it + easier for others to get involved with what you\'re doing.')%> </p> </div> <p> - <label class="form_label" for="set_profile_about_me">About you:</label> + <label class="form_label" for="set_profile_about_me"><%= _('About you:')%></label> <%= f.text_area :about_me, :rows => 5, :cols => 55 %> </p> <div class="form_note"> <p> - Include relevant links, such as to a campaign page, your blog or a + <%= _(' Include relevant links, such as to a campaign page, your blog or a twitter account. They will be made clickable. - e.g. + e.g.')%> <a href="http://www.twitter.com/whatdotheyknow">http://www.twitter.com/whatdotheyknow</a> </p> </div> <div class="form_button"> <%= hidden_field_tag 'submitted_about_me', 1 %> - <%= submit_tag "Save" %> + <%= submit_tag _('Save') %> </div> <% end %> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 8bd758f78..17c3a77c6 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -1,39 +1,39 @@ <% @title = h(@display_user.name) + " - Freedom of Information requests" %> <% if (@same_name_users.size >= 1) %> - <p>There is <strong>more than one person</strong> who uses this site and has this name. - One of them is shown below, you may mean a different one: <% for @same_name_user in @same_name_users %> + <p><%= _('There is <strong>more than one person</strong> who uses this site and has this name. + One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %> <%= user_link(@same_name_user) %> <% end %> <% end%> <% if @is_you && @undescribed_requests.size > 0 %> <div class="undescribed_requests"> - <p>Please <strong>go to the following requests</strong>, and let us - know if there was information in the recent responses to them.</p> + <p><%= _('Please <strong>go to the following requests</strong>, and let us + know if there was information in the recent responses to them.')%></p> <ul> <% for undescribed_request in @undescribed_requests %> <li><%=request_link(undescribed_request)%></li> <% end %> </ul> <p> - Thanks very much - this will help others find useful stuff. We'll + <%= _('Thanks very much - this will help others find useful stuff. We\'ll also, if you need it, give advice on what to do next about your - requests. + requests.')%> </p> </div> <% end %> <div id="request_sidebar"> - <h2>Track this person</h2> + <h2><%= _('Track this person')%></h2> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> - <h2>On this page</h2> - <a href="#foi_requests">FOI requests</a> - <br><a href="#annotations">Annotations</a> + <h2><%= _('On this page')%></h2> + <a href="#foi_requests"><%= _('FOI requests')%></a> + <br><a href="#annotations"><%= _('Annotations')%></a> <% if @is_you %> - <br><a href="#email_subscriptions">Email subscriptions</a> + <br><a href="#email_subscriptions"><%= _('Email subscriptions')%></a> <% end %> </div> @@ -50,25 +50,25 @@ <% else %> <% if @is_you %> <span id="set_photo"> - <%= link_to "Set your profile photo", set_profile_photo_url() %> + <%= link_to _('Set your profile photo'), set_profile_photo_url() %> </span> <% end %> <% end %> </p> - <h1> <%= h(@display_user.name) + (@is_you ? " (you)" : "") %> </h1> + <h1> <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %></h1> <p class="subtitle"> - Joined WhatDoTheyKnow in <%= year_from_date(@display_user.created_at) %> + <%= _('Joined WhatDoTheyKnow')%>in <%= year_from_date(@display_user.created_at) %> <% if !@user.nil? && @user.admin_page_links? %> (<%= link_to "admin", user_admin_url(@display_user) %>) <% end %> </p> <p> - <%= link_to "Send message to " + h(@display_user.name), contact_user_url(:id => @display_user.id) %> + <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %> <% if @is_you %> - (just to see how it works) + (<%= _('just to see how it works')%>) <% end %> </p> @@ -76,11 +76,11 @@ <div id="user_public_banned"> <p> <strong> - This user has been banned from WhatDoTheyKnow.com + <%= _('This user has been banned from WhatDoTheyKnow.com ')%> </strong> </p> <p> - They have been given the following explanation: + <%= _('They have been given the following explanation:')%> </p> <p class="details"> <%= @display_user.can_fail_html %> @@ -93,7 +93,7 @@ <img class="comment_quote" src="/images/quote.png" alt=""> <%= @display_user.get_about_me_for_html_display %> <% if @is_you %> - (<%= link_to "edit text about you", set_profile_about_me_url() %>) + (<%= link_to _("edit text about you"), set_profile_about_me_url() %>) <% end %> </div> <% end %> @@ -101,31 +101,31 @@ <% if @is_you %> <p id="user_change_password_email"> <% if @display_user.profile_photo %> - <%= link_to "Change profile photo", set_profile_photo_url() %> | + <%= link_to _('Change profile photo')%>, set_profile_photo_url() %> | <% end %> - <%= link_to "Change your password", signchangepassword_url() %> | - <%= link_to "Change your email", signchangeemail_url() %> + <%= link_to _('Change your password'), signchangepassword_url() %> | + <%= link_to _('Change your email'), signchangeemail_url() %> </p> <% end %> <% if not @is_you %> <p id="user_not_logged_in"> - <%= link_to "Sign in", signin_url(:r => request.request_uri) %> to change password, - subscriptions and more (<%=h @display_user.name %> only) + <%= link_to _('Sign in'), signin_url(:r => request.request_uri) %><%= _('to change password, + subscriptions and more')%> (<%=h @display_user.name %> <%= _('only')%>) </p> <% end %> <% if !@xapian_requests.nil? %> <% if @xapian_requests.results.empty? %> <% if @page == 1 %> - <h2 id="foi_requests">Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %> </h2> - <p><%= @is_you ? 'You have' : 'This person has' %> - made no Freedom of Information requests using this site.</p> + <h2 id="foi_requests"><%= _('Freedom of Information requests made by')%> <%= @is_you ? 'you' : 'this person' %> </h2> + <p><%= @is_you ? _('You have') : _('This person has') %> + <%= _(' made no Freedom of Information requests using this site.')%></p> <% end %> <% else %> <h2 id="foi_requests"> <%= @is_you ? 'Your ' : "This person's " %> - <%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %> + <%=pluralize(@display_user.info_requests.size, _('Freedom of Information request')) %> <!-- matches_estimated <%=@xapian_requests.matches_estimated%> --> <%= @page_desc %> </h2> @@ -137,20 +137,20 @@ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %> <% end %> <% else %> - <h2 id="foi_requests">Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %> </h2> - <p>The search index is currently offline, so we can't show the Freedom of Information requests this person has made.</p> + <h2 id="foi_requests"><%= _('Freedom of Information requests made by')%> <%= @is_you ? _('you') : _('this person') %> </h2> + <p><%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%></p> <% end %> <% if !@xapian_comments.nil? %> <% if @xapian_comments.results.empty? %> <% if @page == 1 %> - <h2><%= @is_you ? 'Your' : 'This person\'s' %> annotations </h2> + <h2><%= @is_you ? 'Your' : 'This person\'s' %> <%= _('annotations')%> </h2> <p>None made.</p> <% end %> <% else %> <h2 id="annotations"> - <%= @is_you ? 'Your ' : "This person's " %> - <%=pluralize(@display_user.visible_comments.size, "annotation") %> + <%= @is_you ? _('Your ') : _('This person\'s') %> + <%=pluralize(@display_user.visible_comments.size, _('annotation')) %> <!-- matches_estimated <%=@xapian_comments.matches_estimated%> --> <%= @page_desc %> </h2> @@ -165,10 +165,10 @@ <% if @is_you %> <% if @track_things.empty? %> - <h2 id="email_subscriptions"> Your email subscriptions</h2> + <h2 id="email_subscriptions"> <%= _('Your email subscriptions')%></h2> <p>None made.</p> <% else %> - <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, "email subscription") %> </h2> + <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, _('email subscription')) %> </h2> <% if @track_things_grouped.size == 1 %> <% form_tag :controller => 'track', :action => 'delete_all_type' do %> <h3> @@ -177,7 +177,7 @@ <%= hidden_field_tag 'user', @display_user.id %> <%= hidden_field_tag 'r', request.request_uri %> <% if @track_things.size > 1 %> - <%= submit_tag "unsubscribe all" %> + <%= submit_tag _('unsubscribe all') %> <% end %> </h3> <% end %> @@ -191,7 +191,7 @@ <%= hidden_field_tag 'user', @display_user.id %> <%= hidden_field_tag 'r', request.request_uri %> <% if track_things.size > 1 %> - <%= submit_tag "unsubscribe all" %> + <%= submit_tag _('unsubscribe all')%> <% end %> </h3> <% end %> @@ -205,7 +205,7 @@ <%= track_thing.params[:list_description] %> <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %> <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %> - <%= submit_tag "unsubscribe" %> + <%= submit_tag <%= _('unsubscribe') %> </div> <% end %> </li> diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.rhtml index 81dc64cd2..b76edbc64 100644 --- a/app/views/user/sign.rhtml +++ b/app/views/user/sign.rhtml @@ -5,10 +5,10 @@ <p id="sign_in_reason"> <% if @post_redirect.reason_params[:web].empty? %> - Please sign in as <%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. + <%= _('Please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. <% else %> <%= @post_redirect.reason_params[:web] %>, - please sign in as <%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. + <%= _('please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. <% end %> </p> @@ -17,15 +17,15 @@ </div> <% else %> - <% @title = "Sign in or make a new account" %> + <% @title = _('Sign in or make a new account') %> <div id="sign_together"> <p id="sign_in_reason"> <% if @post_redirect.reason_params[:web].empty? %> - Please sign in or make a new account. + <%= _(' Please sign in or make a new account.') %> <% else %> - <%= @post_redirect.reason_params[:web] %>, please sign in or make a new account. + <%= @post_redirect.reason_params[:web] %>, <%= _('please sign in or make a new account.') %> <% end %> </p> diff --git a/app/views/user/signchangeemail.rhtml b/app/views/user/signchangeemail.rhtml index b98dc383c..3c567b3dd 100644 --- a/app/views/user/signchangeemail.rhtml +++ b/app/views/user/signchangeemail.rhtml @@ -1,6 +1,6 @@ -<% @title = "Change your email address used on WhatDoTheyKnow.com" %> +<% @title = _('Change your email address used on WhatDoTheyKnow.com') %> -<% raise "internal error" if not @user %> +<% raise _('internal error') if not @user %> <div id="change_email"> @@ -8,28 +8,28 @@ <%= foi_error_messages_for :signchangeemail %> <div class="form_note"> - <h1>Change your email address used on WhatDoTheyKnow.com</h1> + <h1> <%= _('Change your email address used on WhatDoTheyKnow.com')%></h1> </div> <p> - <label class="form_label" for="signchangeemail_old_email">Old e-mail:</label> + <label class="form_label" for="signchangeemail_old_email"> <%= _('Old e-mail:')%></label> <%= text_field 'signchangeemail', 'old_email', { :size => 20 } %> </p> <p> - <label class="form_label" for="signchangeemail_new_email">New e-mail:</label> + <label class="form_label" for="signchangeemail_new_email"> <%= _('New e-mail:')%></label> <%= text_field 'signchangeemail', 'new_email', { :size => 20 } %> </p> <p> - <label class="form_label" for="signchangeemail_password">Your password:</label> + <label class="form_label" for="signchangeemail_password"> <%= _('Your password:')%></label> <%= password_field 'signchangeemail', 'password', { :size => 15 } %> </p> <p class="form_note"> - <strong>Note:</strong> + <%= _('<strong>Note:</strong> We will send an email to your new email address. Follow the - instructions in it to confirm changing your email. + instructions in it to confirm changing your email.')%> </p> <div class="form_button"> diff --git a/app/views/user/signchangeemail_confirm.rhtml b/app/views/user/signchangeemail_confirm.rhtml index 96acbf424..bfedbac2d 100644 --- a/app/views/user/signchangeemail_confirm.rhtml +++ b/app/views/user/signchangeemail_confirm.rhtml @@ -1,14 +1,14 @@ <% @title = h("Now check your email!") %> -<h1 class="confirmation_heading">Now check your email!</h1> +<h1 class="confirmation_heading"> <%= _('Now check your email!')%></h1> <p class="confirmation_message"> -We've sent an email to your new email address. You'll need to click the link in -it before your email address will be changed. + <%= _('We\'ve sent an email to your new email address. You\'ll need to click the link in +it before your email address will be changed.')%> </p> <p class="confirmation_message"> -<small>If you use web-based email or have "junk mail" filters, also check your -bulk/spam mail folders. Sometimes, our messages are marked that way.</small> +<small> <%= _('If you use web-based email or have "junk mail" filters, also check your +bulk/spam mail folders. Sometimes, our messages are marked that way.')%></small> </p> diff --git a/app/views/user/signchangepassword.rhtml b/app/views/user/signchangepassword.rhtml index 4191344cb..90ca6e62a 100644 --- a/app/views/user/signchangepassword.rhtml +++ b/app/views/user/signchangepassword.rhtml @@ -8,23 +8,23 @@ <%= foi_error_messages_for :user %> <div class="form_note"> - <h1>Change your password on WhatDoTheyKnow.com</h1> + <h1><%= ('Change your password on WhatDoTheyKnow.com')%></h1> </div> <p> - <label class="form_label" for="user_password">New password:</label> + <label class="form_label" for="user_password"><%= ('New password:')%></label> <%= password_field 'user', 'password', { :size => 15 } %> </p> <p> - <label class="form_label" for="user_password_confirmation">New password: (again)</label> + <label class="form_label" for="user_password_confirmation"><%= ('New password: (again)')%></label> <%= password_field 'user', 'password_confirmation', { :size => 15 } %> </p> <div class="form_button"> <%= hidden_field_tag 'submitted_signchangepassword_do', 1 %> <%= hidden_field_tag 'pretoken', params[:pretoken] %> - <%= submit_tag "Change password on WhatDoTheyKnow.com" %> + <%= submit_tag _('Change password on WhatDoTheyKnow.com') %> </div> <% end %> diff --git a/app/views/user/signchangepassword_confirm.rhtml b/app/views/user/signchangepassword_confirm.rhtml index baad6729b..145b56672 100644 --- a/app/views/user/signchangepassword_confirm.rhtml +++ b/app/views/user/signchangepassword_confirm.rhtml @@ -1,13 +1,13 @@ -<% @title = h("Now check your email!") %> +<% @title = h( _('Now check your email!')) %> -<h1 class="confirmation_heading">Now check your email!</h1> +<h1 class="confirmation_heading"><%= ('Now check your email!')%></h1> <p class="confirmation_message"> -We've sent you an email, click the link in it, then you can change your password. +<%= ('We\'ve sent you an email, click the link in it, then you can change your password.')%> </p> <p class="confirmation_message"> -<small>If you use web-based email or have "junk mail" filters, also check your -bulk/spam mail folders. Sometimes, our messages are marked that way.</small> +<small><%= ('If you use web-based email or have "junk mail" filters, also check your +bulk/spam mail folders. Sometimes, our messages are marked that way.')%></small> </p> diff --git a/app/views/user/signchangepassword_send_confirm.rhtml b/app/views/user/signchangepassword_send_confirm.rhtml index 8b2e4fa91..f6341b7e8 100644 --- a/app/views/user/signchangepassword_send_confirm.rhtml +++ b/app/views/user/signchangepassword_send_confirm.rhtml @@ -1,4 +1,4 @@ -<% @title = "Change your password on WhatDoTheyKnow.com" %> +<% @title = _('Change your password on WhatDoTheyKnow.com') %> <div id="change_password"> @@ -6,24 +6,24 @@ <%= foi_error_messages_for :signchangepassword %> <div class="form_note"> - <h1>Change your password on WhatDoTheyKnow.com</h1> + <h1><%= ('Change your password on WhatDoTheyKnow.com') %></h1> </div> <p> - <label class="form_label" for="signchangepassword_email">Your e-mail:</label> + <label class="form_label" for="signchangepassword_email"><%= ('Your e-mail:')%></label> <%= text_field 'signchangepassword', 'email', { :size => 20 } %> </p> <p class="form_note"> - <strong>Note:</strong> + <%= (' <strong>Note:</strong> We will send you an email. Follow the instructions in it to change - your password. + your password.')%> </p> <div class="form_button"> <%= hidden_field_tag 'submitted_signchangepassword_send_confirm', 1 %> <%= hidden_field_tag 'pretoken', params[:pretoken] %> - <%= submit_tag "Submit" %> + <%= submit_tag _('Submit') %> </div> <% end %> diff --git a/app/views/user/wrong_user.rhtml b/app/views/user/wrong_user.rhtml index cb8eb8eac..9878d08ae 100644 --- a/app/views/user/wrong_user.rhtml +++ b/app/views/user/wrong_user.rhtml @@ -1,8 +1,8 @@ <p id="sign_in_reason"> <%= @reason_params[:web] %>, please -<%= link_to "sign out", signout_url(:r => request.request_uri) %>, -and sign in as <%= h(@reason_params[:user_name]) %>. +<%= link_to _('sign out'), signout_url(:r => request.request_uri) %>, +<%= _('and sign in as ')%><%= h(@reason_params[:user_name]) %>. </p> diff --git a/app/views/user/wrong_user_unknown_email.rhtml b/app/views/user/wrong_user_unknown_email.rhtml index 77a6837f5..77a2ca001 100644 --- a/app/views/user/wrong_user_unknown_email.rhtml +++ b/app/views/user/wrong_user_unknown_email.rhtml @@ -1,8 +1,8 @@ <p id="sign_in_reason"> -<%= @reason_params[:web] %>. Unfortunately we don't know the FOI -email address for that authority, so we can't validate this. -Please <a href="/help/contact">contact us</a> to sort it out. +<%= @reason_params[:web] %>. <%= _('Unfortunately we don\'t know the FOI +email address for that authority, so we can\'t validate this. +Please <a href="%s">contact us</a> to sort it out.') % [help_contact_path] %> </p> diff --git a/app/views/user_mailer/already_registered.rhtml b/app/views/user_mailer/already_registered.rhtml index 165df469c..f71610d6f 100644 --- a/app/views/user_mailer/already_registered.rhtml +++ b/app/views/user_mailer/already_registered.rhtml @@ -1,10 +1,10 @@ <%= @name %>, -You just tried to sign up to WhatDoTheyKnow.com, when you +<%= _('You just tried to sign up to WhatDoTheyKnow.com, when you already have an account. Your name and password have been left as they previously were. -Please click on the link below. <%=@reasons[:email]%> +Please click on the link below.')%> <%=@reasons[:email]%> <%=@url%> diff --git a/app/views/user_mailer/changeemail_already_used.rhtml b/app/views/user_mailer/changeemail_already_used.rhtml index 0f60ad798..581e8af06 100644 --- a/app/views/user_mailer/changeemail_already_used.rhtml +++ b/app/views/user_mailer/changeemail_already_used.rhtml @@ -1,9 +1,9 @@ -Someone, perhaps you, just tried to change their email address on -WhatDoTheyKnow.com from <%=@old_email%> to <%=@new_email%>. +<%= _('Someone, perhaps you, just tried to change their email address on +WhatDoTheyKnow.com from ')%><%=@old_email%> <%= _('to')%> <%=@new_email%>. -This was not possible because there is already an account using -the email address <%=@new_email%>. +<%= _('This was not possible because there is already an account using +the email address ')%><%=@new_email%>. -The accounts have been left as they previously were. +<%= _('The accounts have been left as they previously were.')%> -- the WhatDoTheyKnow team diff --git a/app/views/user_mailer/changeemail_confirm.rhtml b/app/views/user_mailer/changeemail_confirm.rhtml index 9aa288fb0..7af096aa1 100644 --- a/app/views/user_mailer/changeemail_confirm.rhtml +++ b/app/views/user_mailer/changeemail_confirm.rhtml @@ -1,12 +1,12 @@ <%= @name %>, -Please click on the link below to confirm that you want to +<%= _('Please click on the link below to confirm that you want to change the email address that you use for WhatDoTheyKnow -from <%=@old_email%> to <%=@new_email%> +from ')%><%=@old_email%> <%= _('to ')%><%=@new_email%> <%=@url%> -We will not reveal your email addresses to anybody unless you -or the law tell us to. +<%= _('We will not reveal your email addresses to anybody unless you +or the law tell us to.')%> -- the WhatDoTheyKnow team diff --git a/app/views/user_mailer/confirm_login.rhtml b/app/views/user_mailer/confirm_login.rhtml index 07d182676..fdc038d67 100644 --- a/app/views/user_mailer/confirm_login.rhtml +++ b/app/views/user_mailer/confirm_login.rhtml @@ -1,11 +1,11 @@ <%= @name %>, -Please click on the link below to confirm your email address. +<%= _('Please click on the link below to confirm your email address.')%> <%=@reasons[:email]%> <%=@url%> -We will not reveal your email address to anybody unless you -or the law tell us to. +<%= _('We will not reveal your email address to anybody unless you +or the law tell us to.')%> -- the WhatDoTheyKnow team |