1ITSTOOL(1) General Commands Manual ITSTOOL(1)
2
3
4
6 itstool - convert between XML and PO using ITS
7
8
9
11 itstool [OPTIONS] XMLFILES...
12 itstool -m <MOFILE> [OPTIONS] XMLFILES...
13 itstool -j <XMLFILE> [OPTIONS] MOFILES...
14
15
16
18 itstool extracts messages from XML files and outputs PO template
19 files, then merges translations from MO files to create translated XML
20 files. It determines what to translate and how to chunk it into mes‐
21 sages using the W3C Internationalization Tag Set (ITS).
22
23 To extract messages from XML files XMLFILES and output them to OUT.pot:
24
25 itstool -o OUT.pot XMLFILES
26
27 After merging with existing translations or translating strings, gener‐
28 ate an MO file with msgfmt(1), then output translated files to the
29 directory DIR:
30
31 itstool -m OUT.mo -o DIR XMLFILES
32
33 You can also create a single multilingual XML output file using an
34 input XML file and a set of MO files:
35
36 itstool -j FILE.xml -o OUT.xml MOFILES
37
38 ITS definitions are loaded from the built-in rules, rules embedded in
39 the source XML files, files passed with the -i option, and ITS
40 attributes in the source XML files. Later definitions take precedence.
41 You can disable built-in rules by passing the -n option.
42
43
44
46 Extracting
47 -o OUT.pot
48 --out OUT.pot
49 output PO template to the file OUT.pot
50
51 Merging
52 -m MOFILE XMLFILES
53 --merge MOFILE XMLFILES
54 merge from an MO file MOFILE and output translated XML files for
55 source XMLFILES
56
57 -l LANG
58 --lang LANG
59 explicitly set the language code output to XML
60
61 -o OUT
62 --out OUT
63 output XML files in the directory OUT
64
65 Joining
66 -j MLIFILE MOFILES
67 --join XMLFILE MOFILES
68 join translations from MOFILES into a multilingual file based on
69 source XMLFILE
70
71 -o OUT.xml
72 --out OUT.xml
73 output to the XML file OUT.xml
74
75 Common
76 -i ITS
77 --its ITS
78 load the ITS rules in the file ITS (can specify multiple times)
79
80 -n
81 --no-builtins
82 do not apply the built-in ITS rules that ship with itstool
83
84 -s
85 --strict
86 exit with error when PO files contain broken XML
87
88 -d
89 --load-dtd
90 load external DTDs used by input XML files
91
92 -k
93 --keep-entities
94 keep entity references unexpanded in PO files
95
96 -p NAME VALUE
97 --param NAME VALUE
98 define ITS parameter NAME to the value VALUE (can specify multiple
99 times)
100
101
103 Shaun McCance <shaunm@gnome.org>
104
105
107 More documentation for itstool is maintained online. For more informa‐
108 tion, see:
109
110 http://itstool.org/documentation/
111
112
113
114itstool 2.0.2 December 2013 ITSTOOL(1)