diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-15 12:12:43 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-15 14:21:20 +0100 |
commit | f6516d55f75752bf1eb7773f0a09cc6200bc9fad (patch) | |
tree | 751ebcc28d051a83019a6607eb32d5ecb09f5423 /app/models | |
parent | 7c5d08c75536d49b6131c16367d99009d167a4b1 (diff) |
Internationalise the salution, making sure it's OK to miss out the public body name as they might in French. Fixes #134.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/outgoing_message.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index c7ba362e0..b7e310b1e 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -54,14 +54,15 @@ class OutgoingMessage < ActiveRecord::Base # How the default letter starts and ends def get_salutation - ret = _("Dear ") + ret = "" if self.message_type == 'followup' && !self.incoming_message_followup.nil? && !self.incoming_message_followup.safe_mail_from.nil? && self.incoming_message_followup.valid_to_reply_to? ret = ret + OutgoingMailer.name_for_followup(self.info_request, self.incoming_message_followup) else ret = ret + self.info_request.public_body.name end - return ret + "," + salutation = _("Dear {{public_body_name}},", :public_body_name => ret) end + def get_signoff if self.message_type == 'followup' && !self.incoming_message_followup.nil? && !self.incoming_message_followup.safe_mail_from.nil? && self.incoming_message_followup.valid_to_reply_to? return _("Yours sincerely,") |