Show More
@@ -2,33 +2,66 b'' | |||
|
2 | 2 | # to create new language # |
|
3 | 3 | ########################## |
|
4 | 4 | |
|
5 |
Translations are a |
|
|
5 | Translations are available on transifex under:: | |
|
6 | 6 | |
|
7 | 7 | https://www.transifex.com/projects/p/RhodeCode/ |
|
8 | 8 | |
|
9 | #this needs to be done on source codes, preferable on default/stable branches | |
|
10 | ||
|
11 | python setup.py extract_messages <- get messages from project | |
|
12 | python setup.py init_catalog -l pl <- create a language directory for <pl> lang | |
|
13 | #edit the new po file with poedit or any other editor | |
|
14 | msgfmt -f -c <updated_file.po> <- check format and errors | |
|
15 | python setup.py compile_catalog -l pl <- create translation files | |
|
9 | Preferred method is to register on transifex and request new language translation. | |
|
16 | 10 | |
|
17 | ############# | |
|
18 | # to update # | |
|
19 | ############# | |
|
11 | manual creation of new language | |
|
12 | +++++++++++++++++++++++++++++++ | |
|
13 | ||
|
14 | Dowload sources of RhodeCode. Run:: | |
|
20 | 15 | |
|
21 | python setup.py extract_messages <- get messages from project | |
|
22 | python setup.py update_catalog -l pl<- to update the translations | |
|
23 | #edit the new updated po file with poedit | |
|
24 | msgfmt -f -c <updated_file.po> <- check format and errors | |
|
25 | python setup.py compile_catalog -l pl <- create translation files | |
|
16 | python setup.py develop | |
|
17 | ||
|
18 | To prepare the enviroment | |
|
26 | 19 | |
|
27 | 20 | |
|
28 | ################### | |
|
29 | # change language # | |
|
30 | ################### | |
|
21 | Make sure all translation strings are extracted by running:: | |
|
22 | ||
|
23 | python setup.py extract_messages | |
|
24 | ||
|
25 | Create new language by executing following command:: | |
|
26 | python setup.py init_catalog -l <new_language_code> | |
|
27 | ||
|
28 | This creates a new language under directory rhodecode/i18n/<new_language_code> | |
|
29 | Be sure to update transifex mapping under .tx/config for new language | |
|
30 | ||
|
31 | Edit the new PO file located in LC_MESSAGES directory with poedit or your | |
|
32 | favorite PO files editor. Do translations and at the end verify the translation | |
|
33 | file for any errors. This can be done by executing:: | |
|
34 | ||
|
35 | msgfmt -f -c rhodecode/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po> | |
|
36 | ||
|
37 | finally compile the translations:: | |
|
38 | ||
|
39 | python setup.py compile_catalog -l <new_language_code> | |
|
40 | ||
|
41 | ########################## | |
|
42 | # to update translations # | |
|
43 | ########################## | |
|
31 | 44 | |
|
32 | `lang=pl` | |
|
45 | Fetch latest version of strings for translation by running:: | |
|
46 | ||
|
47 | python setup.py extract_messages | |
|
48 | ||
|
49 | Update PO file by doing:: | |
|
50 | ||
|
51 | python setup.py update_catalog -l pl<- to update the translations | |
|
52 | ||
|
53 | Edit the new updated po file. Repeat all steps after `init_catalog` step from | |
|
54 | new translation instructions | |
|
55 | ||
|
33 | 56 | |
|
34 | in the .ini file | |
|
57 | ######################## | |
|
58 | # testing translations # | |
|
59 | ######################## | |
|
60 | ||
|
61 | Edit test.ini file and set lang attribute to:: | |
|
62 | ||
|
63 | lang=<new_language_code> | |
|
64 | ||
|
65 | Run RhodeCode tests by executing:: | |
|
66 | ||
|
67 | nosetests |
General Comments 0
You need to be logged in to leave comments.
Login now