locales: fix translation of champ value
Due to the extra 's', the names of Champs attributes were never translated.
This commit is contained in:
parent
12166e29bb
commit
a716713ed6
3 changed files with 5 additions and 5 deletions
|
@ -2,8 +2,8 @@ class Champs::DecimalNumberChamp < Champ
|
|||
validates :value, numericality: {
|
||||
allow_nil: true,
|
||||
allow_blank: true,
|
||||
message: -> (object, data) {
|
||||
"« #{object.libelle} » " + object.errors.generate_message(data[:attribute].downcase, :not_a_number)
|
||||
message: -> (object, _data) {
|
||||
"« #{object.libelle} » " + object.errors.generate_message(:value, :not_a_number)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ class Champs::IntegerNumberChamp < Champ
|
|||
only_integer: true,
|
||||
allow_nil: true,
|
||||
allow_blank: true,
|
||||
message: -> (object, data) {
|
||||
"« #{object.libelle} » " + object.errors.generate_message(data[:attribute].downcase, :not_an_integer)
|
||||
message: -> (object, _data) {
|
||||
"« #{object.libelle} » " + object.errors.generate_message(:value, :not_an_integer)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
fr:
|
||||
activerecord:
|
||||
attributes:
|
||||
champs:
|
||||
champ:
|
||||
value: La valeur du champ
|
||||
|
|
Loading…
Reference in a new issue