Chiaramente c'è un problema di fondo che deve essere eliminato. C'è un ottimo strumento che analizza il tuo iAM YAML come app Rails, che ho trovato estremamente utile nel debug.
Installa ed esegui questa gemma i18n-tasks: https://github.com/glebm/i18n-tasks.
Per creare una relazione completa dei componenti i18n:
$ i18n-tasks health
Dal loro spec:
This gem analyses code statically for key usages, such as I18n.t('some.key'), in order to:
Report keys that are missing or unused.
Pre-fill missing keys, optionally from Google Translate.
Remove unused keys.
Thus addressing the two main problems of i18n gem design:
Missing keys only blow up at runtime.
Keys no longer in use may accumulate and introduce overhead, without you knowing it.
Non sono sicuro che la gemma era destinato a essere usato come strumento di debug in i18n, ma ho trovato che è utile per il debug di difficile trovare problemi in i18n.
Penso che usare i trattini in una chiave sia permesso e non dovrebbe dare problemi. Sei sicuro che siano i trattini? – zwippie
@zwippie Sono positivo. Ruby non lo permette. – Trip
Beh, l'ho provato e il mio Ruby (versione) lo consente. In quale versione di Ruby sei? – zwippie