]> git.lyx.org Git - lyx.git/blob - README.localization
* README.po-files: rename file for the unexperienced translator
[lyx.git] / README.localization
1
2         Localization/Translation FAQ
3               
4     by Ran Rutenberg, Pavel Sanda, Michael Gerz
5
6     February 2007
7
8 This file is mainly intended for those who have no or little experience using 
9 .po files, but want to contribute by translating the LyX interface into their 
10 native language.
11
12
13 1) WHERE DO I START?
14
15 The file you need to edit it an xx.po file where xx stands for your language's 
16 two letter code. German would be for example de.po and Polish pl.po. For a list 
17 of country codes look at:
18
19   http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC222
20
21 If you want to start from scratch than you should obtain a copy of the lyx.pot 
22 file.
23
24
25 2) HOW DO I EDIT PO FILES?
26
27 PO files can be edited with every text editor available for your system (e.g. 
28 VIM, NotePad etc.). Yet another option is to use a specialized editor for .po 
29 files. You can e.g. use the editors "poEdit" or "jEdit", Linux users can 
30 additionally use e.g. "kbabel". Using these editors usually makes things easier 
31 as they have many tools to assist the translator.
32
33
34 3) WHAT DO I NEED TO TRANSLATE?
35
36 If your using a simple text editor you should translate the strings that appear 
37 in the msgid line and write the translation into the msgstr line. Note that a 
38 "#, fuzzy" line is just a hint for translation from compiler - in order to get 
39 the translation of the current item working you have to delete this line. It is 
40 recommended that you would take a look at another .po file - that way you can 
41 get an idea of what to do. If your using a specialized po editor then you will 
42 see in it the untranslated strings and a place to write your translation for 
43 them.
44
45
46 4) WHAT SHOULD I DO WITH THE '&', '|', '$, AND '%' CHARACTERS?
47
48 '&' stands for underlined characters (shortcut) in dialog boxes.
49 '|' stands for underlined characters in menus.
50
51 These chars should be somehow used in your translations, however you'll have to 
52 invent your own working shortcuts for dialog and menu entries and resolve 
53 possible conflicts of the same shortcut chars in one menu... 
54
55 '$' and '%' are usually used as handlers for formatting or variables to be 
56 inserted into the strings. Character sequences like %1$s or %1$d MUST also 
57 appear in your translations! Please take them exactly as they are or you may 
58 experience crashes when running LyX.
59
60
61 5) WHAT IS pocheck.pl AND HOW DO I USE IT?
62
63 This is a small script located in the "po" directory of the source that helps 
64 you find common errors in your translation. In order to use this script you have 
65 to have the script language Perl installed.
66
67
68 6) HOW CAN I TEST MY TRANSLATION?
69
70 In order to test your translation you need to obtain the LyX sources (from the 
71 SVN repository) and replace the existing .po with yours. Afterwards, you should 
72 compile and install LyX (check the INSTALL file for your OS). If you don't 
73 install LyX it won't work. For running LyX with your translation, use the 
74 appropriate LANG variable:
75
76   On Linux: LANG=xx_CC lyx
77   On Windows, you need to change the lyx.bat file and write: set LANG=xx_CC
78
79 xx stands for your language code. CC stands for your country code. So to get, 
80 e.g., Czech, the code is "cs_CZ".
81
82 7) REFERENCES
83
84 For some basic idea on how the translation works, you can look at 
85
86   http://en.wikipedia.org/wiki/Gettext
87
88 For detailed reference, have a look at 
89
90   http://www.gnu.org/software/gettext/manual/gettext.html