HowTo translate Redmine to your own language¶
Redmine can easily be translated to any language.
There are a few things to translate:
- The main lang file, located at source:/trunk/config/locales in current trunk
- The wiki toolbar lang file, located in source:trunk/app/assets/javascripts/jstoolbar/lang/
- The datepicker lang file, located in source:trunk/app/assets/javascripts/i18n/
- The two bundled help files, located in source:app/views/help/wiki_syntax/common_mark under subdir named after the language subtag
- The two bundled help files, located in source:app/views/help/wiki_syntax/textile under subdir named after the language subtag
Say you want to translate Redmine to Finnish (fi
as defined in the IANA Language Subtag Registry):
- Copy
/config/locales/en.yml
to/config/locales/fi.yml
. - Copy
/app/assets/javascripts/jstoolbar/lang/jstoolbar-en.js
to/app/assets/javascripts/jstoolbar/lang/jstoolbar-fi.js
. - Copy
/app/assets/javascripts/i18n/datepicker-en.js
to/app/assets/javascripts/i18n/datepicker-fi.js
- Copy
/app/views/help/wiki_syntax/common_mark/en/*
to/app/views/help/wiki_syntax/common_mark/fi/*
. - Copy
/app/views/help/wiki_syntax/textile/en/*
to/app/views/help/wiki_syntax/textile/fi/*
. - Change the
general_lang_name
key with the full name of the new language infi.yml
(eg.general_lang_name: Finnish
). - Clear the application cache to make the new language available in Redmine (eg.
rake tmp:cache:clear
).
Then:
- Translate every string in the copied files.
- Test your translation with the rake tasks listed below. If you get errors related to locales, you must fix them.
- Submit your translation here (as plain file or patch, login required). Select "Translation" in Category listbox.
- Wait until your Issue will be fixed.
- Enjoy your work :)
- GOTO 4 if needed.
Test rake tasks¶
Test if translation files can be parsed without errors and there are no missing keys
rake locales:check_interpolation
Whole test (Optional)
rake test
"rake test" takes a very long time and it runs automatically on CI server.
See Continuous integration.
Restrictions¶
All these files must be UTF-8 encoded. Do not use HTML entities in translated strings.
Check that your files do not have a BOM (Byte-order mark). A BOM can be removed with the following command:
awk '{if(NR==1)sub(/^\xef\xbb\xbf/, "");print}' < oldfile > newfile
As of 2009-02-21, only updates based on the new translation files (found in /config/locales
) should be submitted.
Updates to the language files¶
The file: "en.yml
" acts as the main language file. You can check if it has new strings by running:
rake locales:update
This copies any new strings to other translation files (with the English translation as default value).
Updated by Johannes Gangsö 26 days ago · 29 revisions