Project

General

Profile

Actions

HowTo translate Redmine in your own language » History » Revision 22

« Previous | Revision 22/27 (diff) | Next »
Jean-Philippe Lang, 2013-12-15 16:02
cache needs to be clear after adding a new locale


HowTo translate Redmine in your own language

Redmine can easily be translated in any language.

There are a few things to translate:

Say you want to translate Redmine in Finnish (fi as defined in the IANA Language Subtag Registry):

  1. Copy /config/locales/en.yml to /config/locales/fi.yml.
  2. Copy /public/javascripts/jstoolbar/lang/jstoolbar-en.js to /public/javascripts/jstoolbar/lang/jstoolbar-fi.js.
  3. Change the general_lang_name key with the full name of the new language in fi.yml (eg. general_lang_name: Finnish).
  4. Clear the application cache to make the new language available in Redmine (eg. rake tmp:cache:clear).

Then:

  1. Translate every string in these files.
  2. Test your translation with following rake tasks. If you get errors related to locales, you must fix them.
  3. Submit your translation here (as plain file or patch, login required). Select "Translation" in Category listbox.
  4. Wait until your Issue will be fixed.
  5. Enjoy your work :)
  6. GOTO 4 if needed.

Test rake tasks

On Ruby 1.9.

rake locales:check_parsing_by_psych

On all Ruby version.

rake locales:check_interpolation

Whole test (Optional)

rake test

"rake test" takes 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 not have BOM (Byte-order mark). BOM can be removed with 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

File en.yml acts as the main language file. You can check if it has new strings by running:

rake locales:update

This copies the new strings to other translation files (with the English translation as default value).

Updated by Jean-Philippe Lang about 11 years ago · 22 revisions