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