contains one file name per
line.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>GETTEXT_TRIGGERS</varname></term>
<listitem>
<para>
The tools that generate message catalogs for the translators
to work on need to know what function calls contain
translatable strings. By default, only
<function>gettext()</function> calls are known. If you used
<function>_</function> or other identifiers you need to list
them here. If the translatable string is not the first
argument, the item needs to be of the form
<literal>func:2</literal> (for the second argument).
If you have a function that supports pluralized messages,
the item should look like <literal>func:1,2</literal>
(identifying the singular and plural message arguments).
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</step>
<step>
<para>
Add a file <filename>po/LINGUAS</filename>, which will contain the list
of provided translations — initially empty.
</para>
</step>
</procedure>
<para>
The build system will automatically take care of building and
installing the message catalogs.
</para>
</sect2>
<sect2 id="nls-guidelines">
<title>Message-Writing Guidelines</title>
<para>
Here are some guidelines for writing messages that are easily
translatable.
<itemizedlist>
<listitem>
<para>
Do not construct sentences at run-time, like:
<programlisting>
printf("Files were %s.\n", flag ? "copied" : "removed");
</programlisting>
The word order within the sentence might be different in other
languages. Also, even if you remember to call <function>gettext()</function> on
each fragment, the fragments might not translate well separately. It's
better to duplicate a little code so that each message to be
translated is a coherent whole. Only numbers, file names, and
such-like run-time variables should be inserted at run time into
a message text.
</para>
</listitem>
<listitem>
<para>
For similar reasons, this won't work:
<programlisting>
printf("copied %d file%s", n, n!=1 ? "s" : "");
</programlisting>
because it assumes how the plural is formed. If you figured you
could solve it like this:
<programlisting>
if (n==1)
printf("copied 1 file");
else