localize invite model
This commit is contained in:
parent
2d1ae0ad97
commit
d9949681a2
3 changed files with 8 additions and 1 deletions
|
@ -27,7 +27,7 @@ class Invite < ActiveRecord::Base
|
|||
# Custom validation: check that email does not already belong to a registered user.
|
||||
def email_not_already_registered
|
||||
unless User.find_by_email(self.email).nil?
|
||||
errors.add(:email, 'ist bereits in Verwendung. Person ist schon Mitglied der Foodcoop.')
|
||||
errors.add(:email, I18n.t('invites.errors.already_member'))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,3 +12,7 @@ de:
|
|||
|
||||
# used by controller
|
||||
success: 'Benutzerin wurde erfolgreich eingeladen.'
|
||||
|
||||
# used by model
|
||||
errors:
|
||||
already_member: 'ist bereits in Verwendung. Person ist schon Mitglied der Foodcoop.'
|
||||
|
|
|
@ -13,3 +13,6 @@ en:
|
|||
# used by controller
|
||||
success: 'User was invited successfully.'
|
||||
|
||||
# used by model
|
||||
errors:
|
||||
already_member: 'is already in use. Person is a member of this Foodcoop already.'
|
||||
|
|
Loading…
Reference in a new issue