]> git.sesse.net Git - ttk-gettext/blob - README
Add a note about what to do when changing/adding strings.
[ttk-gettext] / README
1 Preliminary notes. (Note that all of this has already been done for you
2 in the archive, this is mainly so you can see what to do in your own
3 projects.)
4
5 Create the individiual .pot template files by using:
6
7   baby:~/ttk-gettext--mainline--1.0> perl make-pot.pl test.tmpl | msguniq > tpl-test.pot
8   (repeat for multiple templates)
9   xgettext --keyword=_ --from-code=utf-8 -o messages.pot -L perl *.pl
10   
11 Merge them all together using msgcat:
12
13   msgcat *.pot > templates.pot
14
15 Now you can actually start translating. Do a msginit as usual:
16
17   LANG=nb_NO.UTF-8 msginit --input templates.pot
18
19 And then translate using the editor of your choice. kbabel is a popular choice,
20 but you can use your favourite editor by using potool:
21
22   poedit nb.po
23
24 And then compile it using msgfmt as usual:
25
26   mkdir -p nb/LC_MESSAGES
27   msgfmt -o nb/LC_MESSAGES/myproject.mo nb.po
28
29 Now you can compare the output in different locales:
30
31    LANG=C perl process-template.pl 
32    LANG=nb_NO.UTF-8 perl process-template.pl 
33
34 Whenever you change your templates and/or in-code strings, simply recreate
35 the templates from scratch and run
36
37    msgmerge -U nb.po templates.pot
38
39 Then unfuzz, translate new strings and run msgfmt again.
40
41 Everything in here is © 2005 Steinar H. Gunderson <sgunderson@bigfoot.com>,
42 licensed under the GPLv2. Absolutely no warranty. Comments welcome :-)