<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52b
- from gettext.texi on 7 January 2014 -->
+ from gettext.texi on 28 December 2015 -->
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<TITLE>GNU gettext utilities - 4 Preparing Program Sources</TITLE>
<P>
Presuming that your set of programs, or package, has been adjusted
so all needed GNU <CODE>gettext</CODE> files are available, and your
-<TT>‘Makefile’</TT> files are adjusted (see section <A HREF="gettext_13.html#SEC211">13 The Maintainer's View</A>), each C module
+<TT>‘Makefile’</TT> files are adjusted (see section <A HREF="gettext_13.html#SEC213">13 The Maintainer's View</A>), each C module
having translated C strings should contain the line:
</P>
the function call; this is useful in C++. All this is achieved using
<CODE>xgettext</CODE>'s <SAMP>‘--keyword’</SAMP> option. How to pass such an option
to <CODE>xgettext</CODE>, assuming that <CODE>gettextize</CODE> is used, is described
-in section <A HREF="gettext_13.html#SEC218">13.4.3 <TT>‘Makevars’</TT> in <TT>‘po/’</TT></A> and section <A HREF="gettext_13.html#SEC235">13.5.6 AM_XGETTEXT_OPTION in <TT>‘po.m4’</TT></A>.
+in section <A HREF="gettext_13.html#SEC220">13.4.3 <TT>‘Makevars’</TT> in <TT>‘po/’</TT></A> and section <A HREF="gettext_13.html#SEC237">13.5.6 AM_XGETTEXT_OPTION in <TT>‘po.m4’</TT></A>.
</P>
<P>
</P>
<P>
-To prevent errors at runtime caused by translations the <CODE>msgfmt</CODE>
+To prevent errors at runtime caused by translations, the <CODE>msgfmt</CODE>
tool can check statically whether the arguments in the original and the
translation string match in type and number. If this is not the case
and the <SAMP>‘-c’</SAMP> option has been passed to <CODE>msgfmt</CODE>, <CODE>msgfmt</CODE>
-will give an error and refuse to produce a MO file. Thus consequent
+will give an error and refuse to produce a MO file. Thus consistent
use of <SAMP>‘msgfmt -c’</SAMP> will catch the error, so that it cannot cause
-cause problems at runtime.
+problems at runtime.
</P>
<P>
</P>
<P>
-Because not all strings in a program must be format strings it is not
+Because not all strings in a program will be format strings, it is not
useful for <CODE>msgfmt</CODE> to test all the strings in the <TT>‘.po’</TT> file.
This might cause problems because the string might contain what looks
like a format specifier, but the string is not used in <CODE>printf</CODE>.
</P>
<P>
-Therefore the <CODE>xgettext</CODE> adds a special tag to those messages it
+Therefore <CODE>xgettext</CODE> adds a special tag to those messages it
thinks might be a format string. There is no absolute rule for this,
only a heuristic. In the <TT>‘.po’</TT> file the entry is marked using the
<CODE>c-format</CODE> flag in the <CODE>#,</CODE> comment line (see section <A HREF="gettext_3.html#SEC15">3 The Format of PO Files</A>).
{
static const char *messages[] = {
- gettext_noop ("some very meaningful message",
+ gettext_noop ("some very meaningful message"),
gettext_noop ("and another one")
};
const char *string;