1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
8 <sect1 id="ch-system-gettext" role="wrap">
9 <?dbhtml filename="gettext.html"?>
11 <sect1info condition="script">
12 <productname>gettext</productname>
13 <productnumber>&gettext-version;</productnumber>
14 <address>&gettext-url;</address>
17 <title>Gettext-&gettext-version;</title>
19 <indexterm zone="ch-system-gettext">
20 <primary sortas="a-Gettext">Gettext</primary>
23 <sect2 role="package">
26 <para>The Gettext package contains utilities for internationalization and
27 localization. These allow programs to be compiled with NLS (Native Language
28 Support), enabling them to output messages in the user's native
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
36 <seg>&gettext-ch6-sbu;</seg>
37 <seg>&gettext-ch6-du;</seg>
43 <sect2 role="installation">
44 <title>Installation of Gettext</title>
46 <!-- This has been fixed in upstream gnulib, when a new version of
47 gettext is released, please check #4055 to see if the change has been
48 picked up in this package
50 As of April 11, 2018, 'TESTS = test-lock' is in gettext-runtime/tests/Makefile.am
51 Perhaps the test is fixed.
53 There is no reference to 'test' or TEST in gettext-tools/gnulib-tests/Makefile.am
56 <para>First, suppress two invocations of test-lock which on some machines
57 can loop forever:</para>
59 <screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in &&
60 sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>-->
62 <!-- As of April 11, 2018 appdata.* is NOT in git master, but appears
63 to be in metainfo.{its,loc}, When updating, check BLFS gnome-screenshot. -->
66 <para>Now fix a configuration file:</para>
68 <screen><userinput remap="pre">sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' \
69 -i gettext-tools/its/appdata.loc</userinput></screen>
71 <para>Prepare Gettext for compilation:</para>
73 <screen><userinput remap="configure">./configure --prefix=/usr \
75 --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
77 <para>Compile the package:</para>
79 <screen><userinput remap="make">make</userinput></screen>
81 <para>To test the results (this takes a long time, around 3 SBUs),
84 <screen><userinput remap="test">make check</userinput></screen>
86 <para>Install the package:</para>
88 <screen><userinput remap="install">make install
89 chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
93 <sect2 id="contents-gettext" role="content">
94 <title>Contents of Gettext</title>
97 <segtitle>Installed programs</segtitle>
98 <segtitle>Installed libraries</segtitle>
99 <segtitle>Installed directories</segtitle>
102 <seg>autopoint, envsubst, gettext, gettext.sh,
103 gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
104 msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
105 ngettext, recode-sr-latin, and xgettext</seg>
106 <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
107 libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg>
108 <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;,
109 /usr/share/gettext, and /usr/share/gettext-0.19.8</seg>
114 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
115 <?dbfo list-presentation="list"?>
116 <?dbhtml list-presentation="table"?>
118 <varlistentry id="autopoint">
119 <term><command>autopoint</command></term>
121 <para>Copies standard Gettext infrastructure files into a source
123 <indexterm zone="ch-system-gettext autopoint">
124 <primary sortas="b-autopoint">autopoint</primary>
129 <varlistentry id="envsubst">
130 <term><command>envsubst</command></term>
132 <para>Substitutes environment variables in shell format strings</para>
133 <indexterm zone="ch-system-gettext envsubst">
134 <primary sortas="b-envsubst">envsubst</primary>
139 <varlistentry id="gettext">
140 <term><command>gettext</command></term>
142 <para>Translates a natural language message into the user's language
143 by looking up the translation in a message catalog</para>
144 <indexterm zone="ch-system-gettext gettext">
145 <primary sortas="b-gettext">gettext</primary>
150 <varlistentry id="gettext.sh">
151 <term><command>gettext.sh</command></term>
153 <para>Primarily serves as a shell function library for gettext</para>
154 <indexterm zone="ch-system-gettext gettext.sh">
155 <primary sortas="b-gettext.sh">gettext.sh</primary>
160 <varlistentry id="gettextize">
161 <term><command>gettextize</command></term>
163 <para>Copies all standard Gettext files into the given top-level
164 directory of a package to begin internationalizing it</para>
165 <indexterm zone="ch-system-gettext gettextize">
166 <primary sortas="b-gettextize">gettextize</primary>
171 <varlistentry id="msgattrib">
172 <term><command>msgattrib</command></term>
174 <para>Filters the messages of a translation catalog according to their
175 attributes and manipulates the attributes</para>
176 <indexterm zone="ch-system-gettext msgattrib">
177 <primary sortas="b-msgattrib">msgattrib</primary>
182 <varlistentry id="msgcat">
183 <term><command>msgcat</command></term>
185 <para>Concatenates and merges the given
186 <filename class="extension">.po</filename> files</para>
187 <indexterm zone="ch-system-gettext msgcat">
188 <primary sortas="b-msgcat">msgcat</primary>
193 <varlistentry id="msgcmp">
194 <term><command>msgcmp</command></term>
196 <para>Compares two <filename class="extension">.po</filename>
197 files to check that both contain the same set of msgid strings</para>
198 <indexterm zone="ch-system-gettext msgcmp">
199 <primary sortas="b-msgcmp">msgcmp</primary>
204 <varlistentry id="msgcomm">
205 <term><command>msgcomm</command></term>
207 <para>Finds the messages that are common to the given
208 <filename class="extension">.po</filename> files</para>
209 <indexterm zone="ch-system-gettext msgcomm">
210 <primary sortas="b-msgcomm">msgcomm</primary>
215 <varlistentry id="msgconv">
216 <term><command>msgconv</command></term>
218 <para>Converts a translation catalog to a different character
220 <indexterm zone="ch-system-gettext msgconv">
221 <primary sortas="b-msgconv">msgconv</primary>
226 <varlistentry id="msgen">
227 <term><command>msgen</command></term>
229 <para>Creates an English translation catalog</para>
230 <indexterm zone="ch-system-gettext msgen">
231 <primary sortas="b-msgen">msgen</primary>
236 <varlistentry id="msgexec">
237 <term><command>msgexec</command></term>
239 <para>Applies a command to all translations of a translation
241 <indexterm zone="ch-system-gettext msgexec">
242 <primary sortas="b-msgexec">msgexec</primary>
247 <varlistentry id="msgfilter">
248 <term><command>msgfilter</command></term>
250 <para>Applies a filter to all translations of a translation
252 <indexterm zone="ch-system-gettext msgfilter">
253 <primary sortas="b-msgfilter">msgfilter</primary>
258 <varlistentry id="msgfmt">
259 <term><command>msgfmt</command></term>
261 <para>Generates a binary message catalog from a translation
263 <indexterm zone="ch-system-gettext msgfmt">
264 <primary sortas="b-msgfmt">msgfmt</primary>
269 <varlistentry id="msggrep">
270 <term><command>msggrep</command></term>
272 <para>Extracts all messages of a translation catalog that match a
273 given pattern or belong to some given source files</para>
274 <indexterm zone="ch-system-gettext msggrep">
275 <primary sortas="b-msggrep">msggrep</primary>
280 <varlistentry id="msginit">
281 <term><command>msginit</command></term>
283 <para>Creates a new <filename class="extension">.po</filename> file,
284 initializing the meta information with values from the user's
286 <indexterm zone="ch-system-gettext msginit">
287 <primary sortas="b-msginit">msginit</primary>
292 <varlistentry id="msgmerge">
293 <term><command>msgmerge</command></term>
295 <para>Combines two raw translations into a single file</para>
296 <indexterm zone="ch-system-gettext msgmerge">
297 <primary sortas="b-msgmerge">msgmerge</primary>
302 <varlistentry id="msgunfmt">
303 <term><command>msgunfmt</command></term>
305 <para>Decompiles a binary message catalog into raw translation
307 <indexterm zone="ch-system-gettext msgunfmt">
308 <primary sortas="b-msgunfmt">msgunfmt</primary>
313 <varlistentry id="msguniq">
314 <term><command>msguniq</command></term>
316 <para>Unifies duplicate translations in a translation catalog</para>
317 <indexterm zone="ch-system-gettext msguniq">
318 <primary sortas="b-msguniq">msguniq</primary>
323 <varlistentry id="ngettext">
324 <term><command>ngettext</command></term>
326 <para>Displays native language translations of a textual message whose
327 grammatical form depends on a number</para>
328 <indexterm zone="ch-system-gettext ngettext">
329 <primary sortas="b-ngettext">ngettext</primary>
334 <varlistentry id="recode-sr-latin">
335 <term><command>recode-sr-latin</command></term>
337 <para>Recodes Serbian text from Cyrillic to Latin script</para>
338 <indexterm zone="ch-system-gettext recode-sr-latin">
339 <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
344 <varlistentry id="xgettext">
345 <term><command>xgettext</command></term>
347 <para>Extracts the translatable message lines from the given source
348 files to make the first translation template</para>
349 <indexterm zone="ch-system-gettext xgettext">
350 <primary sortas="b-xgettext">xgettext</primary>
355 <varlistentry id="libasprintf">
356 <term><filename class="libraryfile">libasprintf</filename></term>
358 <para>defines the <emphasis>autosprintf</emphasis> class, which makes
359 C formatted output routines usable in C++ programs, for use with the
360 <emphasis><string></emphasis> strings and the
361 <emphasis><iostream></emphasis> streams</para>
362 <indexterm zone="ch-system-gettext libasprintf">
363 <primary sortas="c-libasprintf">libasprintf</primary>
368 <varlistentry id="libgettextlib">
369 <term><filename class="libraryfile">libgettextlib</filename></term>
371 <para>a private library containing common routines used by the
372 various Gettext programs; these are not intended for general use</para>
373 <indexterm zone="ch-system-gettext libgettextlib">
374 <primary sortas="c-libgettextlib">libgettextlib</primary>
379 <varlistentry id="libgettextpo">
380 <term><filename class="libraryfile">libgettextpo</filename></term>
382 <para>Used to write specialized programs that process
383 <filename class="extension">.po</filename> files; this library is
384 used when the standard applications shipped with Gettext (such as
385 <command>msgcomm</command>, <command>msgcmp</command>,
386 <command>msgattrib</command>, and <command>msgen</command>) will
388 <indexterm zone="ch-system-gettext libgettextpo">
389 <primary sortas="c-libgettextpo">libgettextpo</primary>
394 <varlistentry id="libgettextsrc">
395 <term><filename class="libraryfile">libgettextsrc</filename></term>
397 <para>A private library containing common routines used by the
398 various Gettext programs; these are not intended for general use</para>
399 <indexterm zone="ch-system-gettext libgettextsrc">
400 <primary sortas="c-libgettextsrc">libgettextsrc</primary>
405 <varlistentry id="libtextstyle">
406 <term><filename class="libraryfile">libtextstyle</filename></term>
408 <para>Text styling library</para>
409 <indexterm zone="ch-system-gettext libtextstyle">
410 <primary sortas="c-libtextstyle">libtextstyle</primary>
415 <varlistentry id="preloadable_libintl">
416 <term><filename class="libraryfile">preloadable_libintl</filename></term>
418 <para>A library, intended to be used by LD_PRELOAD that assists
419 <filename class="libraryfile">libintl</filename> in logging
420 untranslated messages</para>
421 <indexterm zone="ch-system-gettext preloadable_libintl">
422 <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>