diff options
Diffstat (limited to 'app/models/outgoing_message.rb')
-rw-r--r-- | app/models/outgoing_message.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index aa782df5a..220f4f0a7 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -142,24 +142,24 @@ class OutgoingMessage < ActiveRecord::Base if self.body.empty? || self.body =~ /\A#{get_salutation}\s+#{get_signoff}/ || self.body =~ /#{get_internal_review_insert_here_note}/ if self.message_type == 'followup' if self.what_doing == 'internal_review' - errors.add(:body, "^Please give details explaining why you want a review") + errors.add(:body, _("Please give details explaining why you want a review")) else - errors.add(:body, "^Please enter your follow up message") + errors.add(:body, _("Please enter your follow up message")) end elsif - errors.add(:body, "^Please enter your letter requesting information") + errors.add(:body, _("Please enter your letter requesting information")) else raise "Message id #{self.id} has type '#{self.message_type}' which validate can't handle" end end if self.body =~ /#{get_signoff}\s*\Z/ms - errors.add(:body, '^Please sign at the bottom with your name, or alter the "' + get_signoff + '" signature') + errors.add(:body, _("Please sign at the bottom with your name, or alter the \"%{signoff}\" signature" % { :signoff => get_signoff })) end if !MySociety::Validate.uses_mixed_capitals(self.body) - errors.add(:body, '^Please write your message using a mixture of capital and lower case letters. This makes it easier for others to read.') + errors.add(:body, _('Please write your message using a mixture of capital and lower case letters. This makes it easier for others to read.')) end if self.what_doing.nil? || !['new_information', 'internal_review', 'normal_sort'].include?(self.what_doing) - errors.add(:what_doing_dummy, '^Please choose what sort of reply you are making.') + errors.add(:what_doing_dummy, _('Please choose what sort of reply you are making.')) end end |