aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/incoming_message.rb10
-rw-r--r--app/models/info_request.rb6
-rw-r--r--app/models/request_mailer.rb2
-rw-r--r--app/views/admin_request/edit.rhtml15
-rw-r--r--app/views/request/show.rhtml2
-rw-r--r--app/views/request_mailer/not_clarified_alert.rhtml6
-rw-r--r--app/views/user/rate_limited.rhtml2
7 files changed, 18 insertions, 25 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 3f74423d0..3419956d6 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -250,10 +250,10 @@ class IncomingMessage < ActiveRecord::Base
# if they are public anyway. For now just be precautionary and only
# put in descriptions of them in square brackets.
if self.info_request.public_body.is_followupable?
- text.gsub!(self.info_request.public_body.request_email, "[" + self.info_request.public_body.short_or_long_name + " request email]")
+ text.gsub!(self.info_request.public_body.request_email, _("[{{public_body}} request email]", :public_body => self.info_request.public_body.short_or_long_name))
end
- text.gsub!(self.info_request.incoming_email, "[FOI #" + self.info_request.id.to_s + " email]")
- text.gsub!(MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost'), "[#{MySociety::Config.get('SITE_NAME', 'Alaveteli')} contact email]")
+ text.gsub!(self.info_request.incoming_email, _('[FOI #{{request}} email]', :request => self.info_request.id.to_s) )
+ text.gsub!(MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost'), _("[{{site_name}} contact email]", :site_name => MySociety::Config.get('SITE_NAME', 'Alaveteli')) )
end
# Replaces all email addresses in (possibly binary data) with equal length alternative ones.
@@ -864,10 +864,10 @@ class IncomingMessage < ActiveRecord::Base
text = "[Subject only] " + CGI.escapeHTML(self.subject) + text
end
# and display link for quoted stuff
- text = text.gsub(/FOLDED_QUOTED_SECTION/, "\n\n" + '<span class="unfold_link"><a href="?unfold=1#incoming-'+self.id.to_s+'">show quoted sections</a></span>' + "\n\n")
+ text = text.gsub(/FOLDED_QUOTED_SECTION/, "\n\n" + '<span class="unfold_link"><a href="?unfold=1#incoming-'+self.id.to_s+'">'+_("show quoted sections")+'</a></span>' + "\n\n")
else
if folded_quoted_text.include?('FOLDED_QUOTED_SECTION')
- text = text + "\n\n" + '<span class="unfold_link"><a href="?#incoming-'+self.id.to_s+'">hide quoted sections</a></span>'
+ text = text + "\n\n" + '<span class="unfold_link"><a href="?#incoming-'+self.id.to_s+'">'+_("hide quoted sections")+'</a></span>'
end
end
text.strip!
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 47398dabb..726383ad7 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -672,7 +672,11 @@ public
return self.public_body.is_followupable?
end
def recipient_name_and_email
- return TMail::Address.address_from_name_and_email(self.law_used_short + " requests at " + self.public_body.short_or_long_name, self.recipient_email).to_s
+ return TMail::Address.address_from_name_and_email(
+ _("{{law_used}} requests at {{public_body}}",
+ :law_used => self.law_used_short,
+ :public_body => self.public_body.short_or_long_name),
+ self.recipient_email).to_s
end
# History of some things that have happened
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb
index ee6220a47..8e6e65a26 100644
--- a/app/models/request_mailer.rb
+++ b/app/models/request_mailer.rb
@@ -155,7 +155,7 @@ class RequestMailer < ApplicationMailer
'Auto-Submitted' => 'auto-generated', # http://tools.ietf.org/html/rfc3834
'X-Auto-Response-Suppress' => 'OOF'
@recipients = info_request.user.name_and_email
- @subject = "Clarify your FOI request - " + info_request.title
+ @subject = _("Clarify your FOI request - ") + info_request.title
@body = { :incoming_message => incoming_message, :info_request => info_request, :url => url }
end
diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.rhtml
index 56fc28dd0..4026ee712 100644
--- a/app/views/admin_request/edit.rhtml
+++ b/app/views/admin_request/edit.rhtml
@@ -22,20 +22,7 @@
</p>
<p><label for="info_request_described_state"><strong>Described state</strong></label>
- <%= select( 'info_request', "described_state",
- [
- 'waiting_response',
- 'waiting_clarification',
- 'gone_postal',
- 'not_held',
- 'rejected',
- 'successful',
- 'partially_successful',
- 'internal_review',
- 'error_message',
- 'requires_admin',
- 'user_withdrawn'
- ]) %>;
+ <%= select( 'info_request', "described_state", InfoRequest.enumerate_states ) %>;
<label for="info_request_awaiting_description"><strong>Awaiting description</strong></label>
<%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %>
<br/>(don't forget to change 'awaiting description' when you set described state)<br/>
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index 036ef06dd..120950343 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -74,7 +74,7 @@
<%= _('normally') %>
<% end %>
<%= _('no later than') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong>
- (<%= link_to "details", "/help/requesting#quickly_response" %>).
+ (<%= 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}} should normally have responded <strong>promptly</strong> and',:public_body_link=>public_body_link(@info_request.public_body)) %>
diff --git a/app/views/request_mailer/not_clarified_alert.rhtml b/app/views/request_mailer/not_clarified_alert.rhtml
index 82d15ba76..2408452b3 100644
--- a/app/views/request_mailer/not_clarified_alert.rhtml
+++ b/app/views/request_mailer/not_clarified_alert.rhtml
@@ -1,5 +1,7 @@
-<%=@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.')%>
+<%= _('{{public_body}} has asked you to explain part of your {{law_used}} request.',
+ :public_body => @info_request.public_body.name,
+ :law_used => @info_request.law_used_short ) %>
+<%= _('To do this, first click on the link below.') %>
<%=@url%>
diff --git a/app/views/user/rate_limited.rhtml b/app/views/user/rate_limited.rhtml
index 2a770d62e..d5accf114 100644
--- a/app/views/user/rate_limited.rhtml
+++ b/app/views/user/rate_limited.rhtml
@@ -1,4 +1,4 @@
-<% @title = "Too many requests" %>
+<% @title = _("Too many requests") %>
<h1><%=@title%></h1>