aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-01-27 12:09:23 +0000
committerLouise Crow <louise.crow@gmail.com>2014-01-27 12:09:23 +0000
commitc17f99038cd24632933f3713213dc50830b29cec (patch)
tree87f7edd9b26b68a7318c2d386bcd4ada6c58af61 /app
parent931e3246299eec2ef35ad1fc7e7dbfe24965f01a (diff)
parent4ce72d27785ba39fb8571376a84569f508b6feaf (diff)
Merge branch 'feature/fix-profile-photo-errors' into rails-3-develop
Diffstat (limited to 'app')
-rw-r--r--app/models/profile_photo.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb
index 322ebe53c..6c3b2cfa0 100644
--- a/app/models/profile_photo.rb
+++ b/app/models/profile_photo.rb
@@ -70,21 +70,25 @@ class ProfilePhoto < ActiveRecord::Base
def data_and_draft_checks
if self.data.nil?
- errors.add(:data, N_("Please choose a file containing your photo."))
+ errors.add(:data, _("Please choose a file containing your photo."))
return
end
if self.image.nil?
- errors.add(:data, N_("Couldn't understand the image file that you uploaded. PNG, JPEG, GIF and many other common image file formats are supported."))
+ errors.add(:data, _("Couldn't understand the image file that you uploaded. PNG, JPEG, GIF and many other common image file formats are supported."))
return
end
if self.image.format != 'PNG'
- errors.add(:data, N_("Failed to convert image to a PNG"))
+ errors.add(:data, _("Failed to convert image to a PNG"))
end
if !self.draft && (self.image.columns != WIDTH || self.image.rows != HEIGHT)
- errors.add(:data, N_("Failed to convert image to the correct size: at {{cols}}x{{rows}}, need {{width}}x{{height}}", :cols => self.image.columns, :rows => self.image.rows, :width => WIDTH, :height => HEIGHT))
+ errors.add(:data, _("Failed to convert image to the correct size: at {{cols}}x{{rows}}, need {{width}}x{{height}}",
+ :cols => self.image.columns,
+ :rows => self.image.rows,
+ :width => WIDTH,
+ :height => HEIGHT))
end
if self.draft && self.user_id