aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb10
-rw-r--r--app/models/info_request.rb6
-rw-r--r--app/models/request_mailer.rb2
3 files changed, 11 insertions, 7 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