-
Notifications
You must be signed in to change notification settings - Fork 88
/
README.translations.txt
77 lines (49 loc) · 2.59 KB
/
README.translations.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Translations for KeepNote
-------------------------
KeepNote now supports translations through the gettext system. If you would
like to create a translation for KeepNote, please let me know,
rasmus[at]mit[dot]edu. Below are the basic steps for beginning or modifying
a translation for KeepNote.
1. File layout
--------------
Makefile.gettext Makefile with gettext commands
gettext/messages.pot all strings extracted from KeepNote source
gettext/$LANG.po language-specific translations
locale/$LANG/LC_MESSAGES/keepnote.mo compiled translations for KeepNote
2. Extract all strings from KeepNote source
-------------------------------------------
All common commands for manipulating translations are supported through the
KeepNote Makefile. If strings are changed in the source code, they need to
be extracted into the 'gettext/messages.pot' file by using the following
command:
make -f Makefile.gettext extract
3. Create a new translation
---------------------------
If your language is not already present (should be 'gettext/$LANG.po'), then
use this command to create a blank translation file:
make -f Makefile.gettext new LANG=de_DE.UTF8
In this example, a new translation for de_DE.UTF8 (German) is created. You
can now edit the file 'gettext/de_DE.UTF8.po'
4. Updating an existing translation with new extracted strings
--------------------------------------------------------------
If strings within the source code have been changed, they must be extracted
again (see step 2) and merged into the existing translations within
'gettext/$LANG.po'. If you were working on the German translation the
command is:
make -f Makefile.gettext update LANG=de_DE.UTF8
5. Compiling translations
-------------------------
Once translations are written in 'gettext/$LANG.po' they must be compiled into
a file named 'locale/$LANG/LC_MESSAGES/keepnote.mo'. Use this command,
make -f Makefile.gettext make LANG=de_DE.UTF8
6. Testing/Using a translation
------------------------------
To test or use a translation make sure that the LANG environment variable
is set to the translation you would like to use, prior to running KeepNote.
For example, to run KeepNote with German translations use:
LANG=de_DE.UTF8 bin/keepnote
7. Submitting your translation for inclusion in the KeepNote distribution
-------------------------------------------------------------------------
If you would like your translation to be a part of the official KeepNote
distribution please send your *.po file to rasmus[at]mit[edu]. If you wish
I can add your name to the translation credits.