]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/i18n-guide.txt
Merge branch 'matthiaskrgr/nadecountdown_nopicmip' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / i18n-guide.txt
1 How to make the .po template:
2
3 find . -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f- --from-code utf-8
4
5
6 How to compare the .po template against a language file:
7
8 msgcmp ../../menu.dat.de.po messages.po
9
10
11 How to merge the .po template into a language file:
12
13 msgmerge -U ../../menu.dat.de.po messages.po
14
15
16 Guideline:
17 - do NOT translate strings in error() messages, or in dprint()!
18 - delete obviously useless developer prints while at it
19 - change obvious developer prints from print to dprint (even in comments),
20   unless in developer-only functions (e.g. *dumptree*)
21 - mark translatable strings with _()
22 - if a translatable string is a strcat monster, change it to sprintf
23 - if code loads files with text, use language_filename()
24 - interesting vim macros:
25   :map # /"<return>
26   :map ' i_(<esc>2f"a)<esc>/"<return>
27   :map " F"isprintf(_(<esc>%i), )<esc>i
28
29 Unresolved TODO:
30
31 - translated campaigns