diff options
Diffstat (limited to 'app/views/request')
24 files changed, 309 insertions, 310 deletions
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 %> |