feat(i18n): translate countries selector
This commit is contained in:
parent
3d9d881a45
commit
a3cc072bbd
11 changed files with 61 additions and 863 deletions
|
@ -18,4 +18,19 @@
|
|||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PaysChamp < Champs::TextChamp
|
||||
def localized_value
|
||||
if external_id
|
||||
I18nData.countries(I18n.locale)[external_id]
|
||||
else
|
||||
value.present? ? value.to_s : ''
|
||||
end
|
||||
end
|
||||
|
||||
def to_s
|
||||
localized_value
|
||||
end
|
||||
|
||||
def for_tag
|
||||
localized_value
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue