HowTo translate Redmine in your own language » History » Version 17
Azamat Hackimov, 2010-09-06 14:05
1 | 1 | Jean-Philippe Lang | h1. HowTo translate Redmine in your own language |
---|---|---|---|
2 | |||
3 | Redmine can easily be translated in any language. |
||
4 | |||
5 | 4 | Jean-Philippe Lang | There are a few things to translate: |
6 | 1 | Jean-Philippe Lang | |
7 | 16 | Azamat Hackimov | # The main lang file, located at source:/trunk/config/locales in current trunk |
8 | # The calendar lang file, located in source:trunk/public/javascripts/calendar/lang |
||
9 | # The wiki toolbar lang file, located in source:trunk/public/javascripts/jstoolbar/lang |
||
10 | 1 | Jean-Philippe Lang | |
11 | Say you want to translate Redmine in Finnish (@fi@ as defined in the "IANA Language Subtag Registry":http://www.iana.org/assignments/language-subtag-registry): |
||
12 | |||
13 | 17 | Azamat Hackimov | # Copy @/config/locales/en.yml@ to @/config/locales/fi.yml@. |
14 | # Copy @/public/javascripts/calendar/lang/calendar-en.js@ to @/public/javascripts/calendar/lang/calendar-fi.js@. |
||
15 | # Copy @/public/javascripts/jstoolbar/lang/jstoolbar-en.js@ to @/public/javascripts/jstoolbar/lang/jstoolbar-fi.js@. |
||
16 | # Translate every string in these files. |
||
17 | 1 | Jean-Philippe Lang | # Test your translation with command <pre>rake test</pre> If you get errors related to locales, you must fix them. |
18 | 17 | Azamat Hackimov | # Submit your translation "here":http://www.redmine.org/projects/redmine/issues/new?tracker_id=3 (as plain file or patch, login required). |
19 | # Wait until your Issue will be fixed. |
||
20 | # GOTO 4 if needed. |
||
21 | 16 | Azamat Hackimov | |
22 | h2. Restrictions |
||
23 | 1 | Jean-Philippe Lang | |
24 | 14 | Azamat Hackimov | *All these files must be UTF-8 encoded.* Do not use HTML entities in translated strings. |
25 | |||
26 | Check that your files not have BOM (Byte-order mark). BOM can be removed with command: |
||
27 | |||
28 | <pre> |
||
29 | awk '{if(NR==1)sub(/^\xef\xbb\xbf/, "");print}' < oldfile > newfile |
||
30 | 1 | Jean-Philippe Lang | </pre> |
31 | 11 | Harri H | |
32 | 1 | Jean-Philippe Lang | As of 2009-02-21, *only updates based on the new translation files* (found in @/config/locales@) *should be submitted.* |
33 | 11 | Harri H | |
34 | 1 | Jean-Philippe Lang | h2. Updates to the language files |
35 | |||
36 | 12 | Jean-Philippe Lang | File @en.yml@ acts as the main language file. You can check if it has new strings by running: |
37 | <pre>rake locales:update</pre> |
||
38 | |||
39 | This copies the new strings to other translation files (with the English translation as default value). |