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.
11 <!ENTITY % scons SYSTEM '../../doc/scons.mod'>
13 <!ENTITY % builders-mod SYSTEM '../../doc/generated/builders.mod'>
15 <!ENTITY % functions-mod SYSTEM '../../doc/generated/functions.mod'>
17 <!ENTITY % tools-mod SYSTEM '../../doc/generated/tools.mod'>
19 <!ENTITY % variables-mod SYSTEM '../../doc/generated/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">
30 This scons tool is a part of scons &t-link-gettext; toolset. It provides scons
31 interface to <command>msgfmt(1)</command> command, which generates binary
32 message catalog (<literal>MO</literal>) from a textual translation description
33 (<literal>PO</literal>).
39 <item>MSGFMTCOM</item>
40 <item>MSGFMTCOMSTR</item>
41 <item>MSGFMTFLAGS</item>
45 <item>LINGUAS_FILE</item>
49 <builder name="MOFiles">
52 This builder belongs to &t-link-msgfmt; tool. The builder compiles
53 <literal>PO</literal> files to <literal>MO</literal> files.
57 <emphasis>Example 1</emphasis>.
58 Create <filename>pl.mo</filename> and <filename>en.mo</filename> by compiling
59 <filename>pl.po</filename> and <filename>en.po</filename>:
63 env.MOFiles(['pl', 'en'])
67 <emphasis>Example 2</emphasis>.
68 Compile files for languages defined in <filename>LINGUAS</filename> file:
72 env.MOFiles(LINGUAS_FILE = 1)
76 <emphasis>Example 3</emphasis>.
77 Create <filename>pl.mo</filename> and <filename>en.mo</filename> by compiling
78 <filename>pl.po</filename> and <filename>en.po</filename> plus files for
79 languages defined in <filename>LINGUAS</filename> file:
83 env.MOFiles(['pl', 'en'], LINGUAS_FILE = 1)
87 <emphasis>Example 4</emphasis>.
88 Compile files for languages defined in <filename>LINGUAS</filename> file
93 env['LINGUAS_FILE'] = 1
98 <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
99 <cvar name="MOSUFFIX">
102 Suffix used for <literal>MO</literal> files (default: <literal>'.mo'</literal>).
103 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
107 <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
111 Absolute path to <command>msgfmt(1)</command> binary, found by
112 <function>Detect()</function>.
113 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
117 <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
118 <cvar name="MSGFMTCOM">
121 Complete command line to run <command>msgfmt(1)</command> program.
122 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
126 <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
127 <cvar name="MSGFMTCOMSTR">
130 String to display when <command>msgfmt(1)</command> is invoked
131 (default: <literal>''</literal>, which means ``print &cv-link-MSGFMTCOM;'').
132 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.
136 <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
137 <cvar name="MSGFMTFLAGS">
140 Additional flags to <command>msgfmt(1)</command>.
141 See &t-link-msgfmt; tool and &b-link-MOFiles; builder.