-
Notifications
You must be signed in to change notification settings - Fork 745
Translations
Doing translations require collaboration between translators and developers! Sometimes the translator is also a developer which is cool, but not required. If you're interested in proposing a new language for our app to be in, please file an issue (example) and tag it under the label "translations". You don't have to be the person working on the translations either, but it would be helpful to suggest translators and developers who could help.
We interview our translators in our blog if you want to learn more about them and their experience doing the translations.
Our translations are gender neutral and have a similar tone as talking to a loved one. We do not tolerate inappropriate or stigmatizing language.
All of our translation files can be found in /config/locales. Assuming that you'll be translating from English to a new language, you'll want to duplicate all of the files containing en.yml
. We recommend copying and pasting the contents the English files into your new language files and then doing translations line by line.
For example:
language: Language
copied and pasted from en.yml would become language: Idioma
in Spanish in es.yml
It is highly recommended that you work on translations with another fluent individual. They don't have to be a developer. Having a second pair of eyes will help catch translation errors!
In every existing main translation file, add an entry for the new language. Please use the correct HTML ISO language code!
languages:
en: English
es: Español
nl: Nederlands
pt-BR: Português
sv: Svenska
various: Varios
vi: 'Tiếng Việt'
it: Italiano
nb: Norsk
de: Deutsch
Add locale initials to the array that is returned from Locale.available_locales
in config/locale.rb.
Please run the new .yml files through this Prettify YAML with two space indentation.
Please do manual testing. View the app on your local development environment and ensure everything is a-ok.
We have automated tests for i18n to make sure things don't go wrong. These tests are dynamically generated based on the available locales and the files that are present. To see what files and keys you may have missing, run the following:
rspec spec/compare_locales_support_spec.rb
Your branch will be out of sync over time, and keys may be changed or added to the main branch. After syncing your branch to main you can run some tools to check against these changes to help identify them. The repository ifmeorg/ifme-languagetools contains scripts for comparing locales and offers writing style suggestions using a LanguageTool.org instance.
Huge thanks to @sexybiggetje, who translated our site to Dutch, for working on this tool!
Please translate our README as well and include a link to the newly translated README to the original and other translated files.