renamed SCons.Tool.ninja -> SCons.Tool.ninja_tool and added alias in tool loading...
[scons.git] / SCons / Tool / msgfmt.xml
blobf92830ff3b95764a8f4e9f7c543558289a497093
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
4 SPDX-License-Identifier: MIT
5 SPDX-FileType: DOCUMENTATION
7 This file is processed by the bin/SConsDoc.py module.
8 -->
10 <!DOCTYPE sconsdoc [
11 <!ENTITY % scons SYSTEM '../../doc/scons.mod'>
12 %scons;
13 <!ENTITY % builders-mod SYSTEM '../../doc/generated/builders.mod'>
14 %builders-mod;
15 <!ENTITY % functions-mod SYSTEM '../../doc/generated/functions.mod'>
16 %functions-mod;
17 <!ENTITY % tools-mod SYSTEM '../../doc/generated/tools.mod'>
18 %tools-mod;
19 <!ENTITY % variables-mod SYSTEM '../../doc/generated/variables.mod'>
20 %variables-mod;
23 <sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
24           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25           xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">
27 <tool name="msgfmt">
28 <summary>
29 <para>
30 This tool is a part of the &t-link-gettext; toolset.
31 It provides &SCons;
32 an interface to the <command>msgfmt(1)</command> command
33 by setting up the &b-link-MOFiles; builder,
34 which generates binary message catalog (<literal>MO</literal>) files
35 from a textual translation description
36 (<literal>PO</literal> files).
37 </para>
38 </summary>
39 <sets>
40 <item>MOSUFFIX</item>
41 <item>MSGFMT</item>
42 <item>MSGFMTCOM</item>
43 <item>MSGFMTCOMSTR</item>
44 <item>MSGFMTFLAGS</item>
45 <item>POSUFFIX</item>
46 </sets>
47 <uses>
48 <item>LINGUAS_FILE</item>
49 </uses>
50 </tool>
52 <builder name="MOFiles">
53 <summary>
54 <para>
55 This builder is set up by the &t-link-msgfmt; tool.
56 The builder compiles
57 <literal>PO</literal> files to <literal>MO</literal> files.
58 &b-MOFiles; is a single-source builder.
59 The <parameter>source</parameter> parameter
60 can also be omitted if &cv-link-LINGUAS_FILE; is set.
61 </para>
63 <para>
64 <emphasis>Example 1</emphasis>.
65 Create <filename>pl.mo</filename> and <filename>en.mo</filename> by compiling
66 <filename>pl.po</filename> and <filename>en.po</filename>:
67 </para>
68 <programlisting language="python">
69 env.MOFiles(['pl', 'en'])
70 </programlisting>
72 <para>
73 <emphasis>Example 2</emphasis>.
74 Compile files for languages defined in <filename>LINGUAS</filename> file:
75 </para>
76 <programlisting language="python">
77 env.MOFiles(LINGUAS_FILE=True)
78 </programlisting>
80 <para>
81 <emphasis>Example 3</emphasis>.
82 Create <filename>pl.mo</filename> and <filename>en.mo</filename> by compiling
83 <filename>pl.po</filename> and <filename>en.po</filename> plus files for
84 languages defined in <filename>LINGUAS</filename> file:
85 </para>
86 <programlisting language="python">
87 env.MOFiles(['pl', 'en'], LINGUAS_FILE=True)
88 </programlisting>
90 <para>
91 <emphasis>Example 4</emphasis>.
92 Compile files for languages defined in <filename>LINGUAS</filename> file
93 (another version):
94 </para>
95 <programlisting language="python">
96 env['LINGUAS_FILE'] = True
97 env.MOFiles()
98 </programlisting>
99 </summary>
100 </builder>
102 <cvar name="MOSUFFIX">
103 <summary>
104 <para>
105 Suffix used for <literal>MO</literal> files (default: <literal>'.mo'</literal>).
106 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
107 </para>
108 </summary>
109 </cvar>
111 <cvar name="MSGFMT">
112 <summary>
113 <para>
114 Absolute path to <command>msgfmt(1)</command> binary, found by
115 <function>Detect()</function>.
116 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
117 </para>
118 </summary>
119 </cvar>
121 <cvar name="MSGFMTCOM">
122 <summary>
123 <para>
124 Complete command line to run <command>msgfmt(1)</command> program.
125 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
126 </para>
127 </summary>
128 </cvar>
130 <cvar name="MSGFMTCOMSTR">
131 <summary>
132 <para>
133 String to display when <command>msgfmt(1)</command> is invoked
134 (default: <literal>''</literal>, which means ``print &cv-link-MSGFMTCOM;'').
135 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
136 </para>
137 </summary>
138 </cvar>
140 <cvar name="MSGFMTFLAGS">
141 <summary>
142 <para>
143 Additional flags to <command>msgfmt(1)</command>.
144 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
145 </para>
146 </summary>
147 </cvar>
149 </sconsdoc>