1 For more information, see https://gitlab.com/xonotic/xonotic/-/wikis/Translating
4 How to make the .po template:
6 find . -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f- --from-code utf-8
9 How to compare the .po template against a language file:
11 msgcmp ../../menu.dat.de.po messages.po
14 How to merge the .po template into a language file:
16 msgmerge -U ../../menu.dat.de.po messages.po
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:
29 :map ' i_(<esc>2f"a)<esc>/"<return>
30 :map " F"isprintf(_(<esc>%i), )<esc>i
34 - translated campaigns