demarches-normaliennes/config/locales/models/dossier/fr.yml
Pierre de La Morinerie b8f71bd52c i18n: fix enum values for Dossier.state
According to Rails i18n guide, enum values should be localized
as `<model>/<enum>`, not as sub-values to the attribute.

This fixes an exception in administrate when displaying a Dossier
in the Manager.

Note: we need to change the way GraphQL attributes are generated, because
`AASM::Core::State#display_name` doesn’t honor the `model/attribute.value`
convention (and instead tries to localize as `model.attribute/value`).
So instead we lookup the localized name using ActiveRecord.
2021-05-06 14:38:25 +02:00

24 lines
696 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

fr:
activerecord:
models:
dossier:
one: "Dossier"
other: "Dossiers"
attributes:
dossier:
montant_projet: 'Le montant du projet'
montant_aide_demande: "Le montant daide demandée"
date_previsionnelle: "La date de début prévisionnelle"
state: "État"
autorisation_donnees: Acceptation des CGU
dossier/state: &state
brouillon: "Brouillon"
en_construction: "En construction"
en_instruction: "En instruction"
accepte: "Accepté"
refuse: "Refusé"
sans_suite: "Classé sans suite"
traitement:
state: "État"
traitement/state:
<<: *state