Localization files reorganization & More
Localization files reorganization:
What & Why
- To allow non-tech people easily contribute with translations (without using github/code) we've got Crowdin project configured. We're planning to add to consul project as many as we can (already grabbed some of the files we found across the forks). Please register as translator and contribute! We'll be happy to give Proofreader permissions to those that contact us about it 🙂
Changes & Instructions:
-
For that to happen we've restructured the
/config/locales
directory to hold all language files in subdirectories for each language. We'll use ISO 639-1 codes when possible, but still we support 4 letter locales (pt-BR, es-PE, etc...). This means:
./config/locales/admin.en.yml
=>./config/locales/en/admin.yml
(with an special case:en.yml
is renamed on togeneral.yml
) -
If you have custom languages on your fork's /config/locales directory, you can to the same file structure migration with the help of rake task:
rake locales:migrate_structure['it']
(if you have italian translations). -
Custom localization files will keep working, but we recommend to migrate any existing file in that subdirectory to the same structure to be consistent.
-
We've removed Spanish from i18n-tasks config file, so no longer test will fail if spanish translation are not present. We recommend you to modify that file on your fork to add your languages and get the help of
spec/i18n_spec.rb
test andi18n-tasks missing
&i18n-tasks unused
tasks to findout missing translations on your languages. -
Related PR #1718