blob: a620bebad8ff0e26d436bf89a64f3dc0bc378ba8 (
plain)
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
|
http://www.gnu.org/software/gettext/manual/gettext.html#Creating
Initially:
1) xgettext --from-code=utf-8 --language=Python -kpgettext:1c,2 ../../../js/ui.kHeader.js ../../../js/ui.kFooter.js lesson.js
-> creates messages.po
2) mv messages.po messages.pot
3) (locale -a gives a list of possible locales)
msginit --locale=es_ES
-> es.po
4) edit es.po
first line: # add -*- code: UTF-8 -*-
email address
charset
5) msgfmt es.po
-> messages.mo
6) mo2js.py es messages.mo messages.es.js
-> messages.es.js
When later some messages have changed because the js code changed, replace
step 3 with msgmerge, e.g.:
3) msgmerge -o es.new.po ./es.po messages.pot
|