feat(commune): translate messages in component
This commit is contained in:
parent
00fc2f519f
commit
f1658dedc5
3 changed files with 10 additions and 2 deletions
app/components/editable_champ/communes_component
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
en:
|
||||||
|
postal_code: Postal code of the municipality
|
||||||
|
not_found: No municipality found for postal code %{postal_code}
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
fr:
|
||||||
|
postal_code: Code postal de la commune
|
||||||
|
not_found: Aucune commune trouvée pour le code postal %{postal_code}
|
|
@ -1,8 +1,8 @@
|
||||||
%label.notice{ for: code_postal_input_id } Code postal de la commune
|
%label.notice{ for: code_postal_input_id }= t('.postal_code')
|
||||||
= @form.text_field :code_postal, required: @champ.required?, id: code_postal_input_id, class: "width-33-desktop width-100-mobile small-margin"
|
= @form.text_field :code_postal, required: @champ.required?, id: code_postal_input_id, class: "width-33-desktop width-100-mobile small-margin"
|
||||||
- if @champ.code_postal_with_fallback?
|
- if @champ.code_postal_with_fallback?
|
||||||
- if commune_options.empty?
|
- if commune_options.empty?
|
||||||
.fr-error-text.mb-4= "Aucune commune trouvée pour le code postal #{@champ.code_postal_with_fallback}"
|
.fr-error-text.mb-4= t('.not_found', postal_code: @champ.code_postal_with_fallback)
|
||||||
- elsif commune_options.size <= 3
|
- elsif commune_options.size <= 3
|
||||||
%fieldset.radios
|
%fieldset.radios
|
||||||
- commune_options.each.with_index do |(option, value), index|
|
- commune_options.each.with_index do |(option, value), index|
|
||||||
|
|
Loading…
Add table
Reference in a new issue