gettext.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-gettext" role="wrap">
  8. <?dbhtml filename="gettext.html"?>
  9. <sect1info condition="script">
  10. <productname>gettext</productname>
  11. <productnumber>&gettext-version;</productnumber>
  12. <address>&gettext-url;</address>
  13. </sect1info>
  14. <title>Gettext-&gettext-version;</title>
  15. <indexterm zone="ch-system-gettext">
  16. <primary sortas="a-Gettext">Gettext</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Gettext package contains utilities for internationalization and
  21. localization. These allow programs to be compiled with NLS (Native Language
  22. Support), enabling them to output messages in the user's native
  23. language.</para>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&gettext-ch6-sbu;</seg>
  29. <seg>&gettext-ch6-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Gettext</title>
  35. <!-- This has been fixed in upstream gnulib, when a new version of
  36. gettext is released, please check #4055 to see if the change has been
  37. picked up in this package
  38. As of April 11, 2018, 'TESTS = test-lock' is in gettext-runtime/tests/Makefile.am
  39. Perhaps the test is fixed.
  40. There is no reference to 'test' or TEST in gettext-tools/gnulib-tests/Makefile.am
  41. -->
  42. <!--
  43. <para>First, suppress two invocations of test-lock which on some machines
  44. can loop forever:</para>
  45. <screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in &amp;&amp;
  46. sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>-->
  47. <!-- As of April 11, 2018 appdata.* is NOT in git master, but appears
  48. to be in metainfo.{its,loc}, When updating, check BLFS gnome-screenshot. -->
  49. <!--
  50. <para>Now fix a configuration file:</para>
  51. <screen><userinput remap="pre">sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' \
  52. -i gettext-tools/its/appdata.loc</userinput></screen>
  53. -->
  54. <para>Prepare Gettext for compilation:</para>
  55. <screen><userinput remap="configure">./configure --prefix=/usr \
  56. --disable-static \
  57. --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
  58. <para>Compile the package:</para>
  59. <screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>
  60. <variablelist>
  61. <title>The meaning of the make parameter:</title>
  62. <varlistentry>
  63. <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term>
  64. <listitem>
  65. <para>Since bison is not yet installed in /usr, configure hardcodes
  66. the directory containing translations for the bison program (the
  67. "locale" directory) as /tools/share/locale. Passing this variable
  68. to make allows overriding the choice made by configure.</para>
  69. </listitem>
  70. </varlistentry>
  71. </variablelist>
  72. <para>To test the results (this takes a long time, around 3 SBUs),
  73. issue:</para>
  74. <screen><userinput remap="test">make check</userinput></screen>
  75. <para>Install the package:</para>
  76. <screen><userinput remap="install">make install
  77. chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
  78. </sect2>
  79. <sect2 id="contents-gettext" role="content">
  80. <title>Contents of Gettext</title>
  81. <segmentedlist>
  82. <segtitle>Installed programs</segtitle>
  83. <segtitle>Installed libraries</segtitle>
  84. <segtitle>Installed directories</segtitle>
  85. <seglistitem>
  86. <seg>autopoint, envsubst, gettext, gettext.sh,
  87. gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
  88. msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
  89. ngettext, recode-sr-latin, and xgettext</seg>
  90. <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
  91. libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg>
  92. <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;,
  93. /usr/share/gettext, and /usr/share/gettext-0.19.8</seg>
  94. </seglistitem>
  95. </segmentedlist>
  96. <variablelist>
  97. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  98. <?dbfo list-presentation="list"?>
  99. <?dbhtml list-presentation="table"?>
  100. <varlistentry id="autopoint">
  101. <term><command>autopoint</command></term>
  102. <listitem>
  103. <para>Copies standard Gettext infrastructure files into a source
  104. package</para>
  105. <indexterm zone="ch-system-gettext autopoint">
  106. <primary sortas="b-autopoint">autopoint</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="envsubst">
  111. <term><command>envsubst</command></term>
  112. <listitem>
  113. <para>Substitutes environment variables in shell format strings</para>
  114. <indexterm zone="ch-system-gettext envsubst">
  115. <primary sortas="b-envsubst">envsubst</primary>
  116. </indexterm>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="gettext">
  120. <term><command>gettext</command></term>
  121. <listitem>
  122. <para>Translates a natural language message into the user's language
  123. by looking up the translation in a message catalog</para>
  124. <indexterm zone="ch-system-gettext gettext">
  125. <primary sortas="b-gettext">gettext</primary>
  126. </indexterm>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry id="gettext.sh">
  130. <term><command>gettext.sh</command></term>
  131. <listitem>
  132. <para>Primarily serves as a shell function library for gettext</para>
  133. <indexterm zone="ch-system-gettext gettext.sh">
  134. <primary sortas="b-gettext.sh">gettext.sh</primary>
  135. </indexterm>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="gettextize">
  139. <term><command>gettextize</command></term>
  140. <listitem>
  141. <para>Copies all standard Gettext files into the given top-level
  142. directory of a package to begin internationalizing it</para>
  143. <indexterm zone="ch-system-gettext gettextize">
  144. <primary sortas="b-gettextize">gettextize</primary>
  145. </indexterm>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry id="msgattrib">
  149. <term><command>msgattrib</command></term>
  150. <listitem>
  151. <para>Filters the messages of a translation catalog according to their
  152. attributes and manipulates the attributes</para>
  153. <indexterm zone="ch-system-gettext msgattrib">
  154. <primary sortas="b-msgattrib">msgattrib</primary>
  155. </indexterm>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry id="msgcat">
  159. <term><command>msgcat</command></term>
  160. <listitem>
  161. <para>Concatenates and merges the given
  162. <filename class="extension">.po</filename> files</para>
  163. <indexterm zone="ch-system-gettext msgcat">
  164. <primary sortas="b-msgcat">msgcat</primary>
  165. </indexterm>
  166. </listitem>
  167. </varlistentry>
  168. <varlistentry id="msgcmp">
  169. <term><command>msgcmp</command></term>
  170. <listitem>
  171. <para>Compares two <filename class="extension">.po</filename>
  172. files to check that both contain the same set of msgid strings</para>
  173. <indexterm zone="ch-system-gettext msgcmp">
  174. <primary sortas="b-msgcmp">msgcmp</primary>
  175. </indexterm>
  176. </listitem>
  177. </varlistentry>
  178. <varlistentry id="msgcomm">
  179. <term><command>msgcomm</command></term>
  180. <listitem>
  181. <para>Finds the messages that are common to the given
  182. <filename class="extension">.po</filename> files</para>
  183. <indexterm zone="ch-system-gettext msgcomm">
  184. <primary sortas="b-msgcomm">msgcomm</primary>
  185. </indexterm>
  186. </listitem>
  187. </varlistentry>
  188. <varlistentry id="msgconv">
  189. <term><command>msgconv</command></term>
  190. <listitem>
  191. <para>Converts a translation catalog to a different character
  192. encoding</para>
  193. <indexterm zone="ch-system-gettext msgconv">
  194. <primary sortas="b-msgconv">msgconv</primary>
  195. </indexterm>
  196. </listitem>
  197. </varlistentry>
  198. <varlistentry id="msgen">
  199. <term><command>msgen</command></term>
  200. <listitem>
  201. <para>Creates an English translation catalog</para>
  202. <indexterm zone="ch-system-gettext msgen">
  203. <primary sortas="b-msgen">msgen</primary>
  204. </indexterm>
  205. </listitem>
  206. </varlistentry>
  207. <varlistentry id="msgexec">
  208. <term><command>msgexec</command></term>
  209. <listitem>
  210. <para>Applies a command to all translations of a translation
  211. catalog</para>
  212. <indexterm zone="ch-system-gettext msgexec">
  213. <primary sortas="b-msgexec">msgexec</primary>
  214. </indexterm>
  215. </listitem>
  216. </varlistentry>
  217. <varlistentry id="msgfilter">
  218. <term><command>msgfilter</command></term>
  219. <listitem>
  220. <para>Applies a filter to all translations of a translation
  221. catalog</para>
  222. <indexterm zone="ch-system-gettext msgfilter">
  223. <primary sortas="b-msgfilter">msgfilter</primary>
  224. </indexterm>
  225. </listitem>
  226. </varlistentry>
  227. <varlistentry id="msgfmt">
  228. <term><command>msgfmt</command></term>
  229. <listitem>
  230. <para>Generates a binary message catalog from a translation
  231. catalog</para>
  232. <indexterm zone="ch-system-gettext msgfmt">
  233. <primary sortas="b-msgfmt">msgfmt</primary>
  234. </indexterm>
  235. </listitem>
  236. </varlistentry>
  237. <varlistentry id="msggrep">
  238. <term><command>msggrep</command></term>
  239. <listitem>
  240. <para>Extracts all messages of a translation catalog that match a
  241. given pattern or belong to some given source files</para>
  242. <indexterm zone="ch-system-gettext msggrep">
  243. <primary sortas="b-msggrep">msggrep</primary>
  244. </indexterm>
  245. </listitem>
  246. </varlistentry>
  247. <varlistentry id="msginit">
  248. <term><command>msginit</command></term>
  249. <listitem>
  250. <para>Creates a new <filename class="extension">.po</filename> file,
  251. initializing the meta information with values from the user's
  252. environment</para>
  253. <indexterm zone="ch-system-gettext msginit">
  254. <primary sortas="b-msginit">msginit</primary>
  255. </indexterm>
  256. </listitem>
  257. </varlistentry>
  258. <varlistentry id="msgmerge">
  259. <term><command>msgmerge</command></term>
  260. <listitem>
  261. <para>Combines two raw translations into a single file</para>
  262. <indexterm zone="ch-system-gettext msgmerge">
  263. <primary sortas="b-msgmerge">msgmerge</primary>
  264. </indexterm>
  265. </listitem>
  266. </varlistentry>
  267. <varlistentry id="msgunfmt">
  268. <term><command>msgunfmt</command></term>
  269. <listitem>
  270. <para>Decompiles a binary message catalog into raw translation
  271. text</para>
  272. <indexterm zone="ch-system-gettext msgunfmt">
  273. <primary sortas="b-msgunfmt">msgunfmt</primary>
  274. </indexterm>
  275. </listitem>
  276. </varlistentry>
  277. <varlistentry id="msguniq">
  278. <term><command>msguniq</command></term>
  279. <listitem>
  280. <para>Unifies duplicate translations in a translation catalog</para>
  281. <indexterm zone="ch-system-gettext msguniq">
  282. <primary sortas="b-msguniq">msguniq</primary>
  283. </indexterm>
  284. </listitem>
  285. </varlistentry>
  286. <varlistentry id="ngettext">
  287. <term><command>ngettext</command></term>
  288. <listitem>
  289. <para>Displays native language translations of a textual message whose
  290. grammatical form depends on a number</para>
  291. <indexterm zone="ch-system-gettext ngettext">
  292. <primary sortas="b-ngettext">ngettext</primary>
  293. </indexterm>
  294. </listitem>
  295. </varlistentry>
  296. <varlistentry id="recode-sr-latin">
  297. <term><command>recode-sr-latin</command></term>
  298. <listitem>
  299. <para>Recodes Serbian text from Cyrillic to Latin script</para>
  300. <indexterm zone="ch-system-gettext recode-sr-latin">
  301. <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
  302. </indexterm>
  303. </listitem>
  304. </varlistentry>
  305. <varlistentry id="xgettext">
  306. <term><command>xgettext</command></term>
  307. <listitem>
  308. <para>Extracts the translatable message lines from the given source
  309. files to make the first translation template</para>
  310. <indexterm zone="ch-system-gettext xgettext">
  311. <primary sortas="b-xgettext">xgettext</primary>
  312. </indexterm>
  313. </listitem>
  314. </varlistentry>
  315. <varlistentry id="libasprintf">
  316. <term><filename class="libraryfile">libasprintf</filename></term>
  317. <listitem>
  318. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  319. C formatted output routines usable in C++ programs, for use with the
  320. <emphasis>&lt;string&gt;</emphasis> strings and the
  321. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  322. <indexterm zone="ch-system-gettext libasprintf">
  323. <primary sortas="c-libasprintf">libasprintf</primary>
  324. </indexterm>
  325. </listitem>
  326. </varlistentry>
  327. <varlistentry id="libgettextlib">
  328. <term><filename class="libraryfile">libgettextlib</filename></term>
  329. <listitem>
  330. <para>a private library containing common routines used by the
  331. various Gettext programs; these are not intended for general use</para>
  332. <indexterm zone="ch-system-gettext libgettextlib">
  333. <primary sortas="c-libgettextlib">libgettextlib</primary>
  334. </indexterm>
  335. </listitem>
  336. </varlistentry>
  337. <varlistentry id="libgettextpo">
  338. <term><filename class="libraryfile">libgettextpo</filename></term>
  339. <listitem>
  340. <para>Used to write specialized programs that process
  341. <filename class="extension">.po</filename> files; this library is
  342. used when the standard applications shipped with Gettext (such as
  343. <command>msgcomm</command>, <command>msgcmp</command>,
  344. <command>msgattrib</command>, and <command>msgen</command>) will
  345. not suffice</para>
  346. <indexterm zone="ch-system-gettext libgettextpo">
  347. <primary sortas="c-libgettextpo">libgettextpo</primary>
  348. </indexterm>
  349. </listitem>
  350. </varlistentry>
  351. <varlistentry id="libgettextsrc">
  352. <term><filename class="libraryfile">libgettextsrc</filename></term>
  353. <listitem>
  354. <para>A private library containing common routines used by the
  355. various Gettext programs; these are not intended for general use</para>
  356. <indexterm zone="ch-system-gettext libgettextsrc">
  357. <primary sortas="c-libgettextsrc">libgettextsrc</primary>
  358. </indexterm>
  359. </listitem>
  360. </varlistentry>
  361. <varlistentry id="libtextstyle">
  362. <term><filename class="libraryfile">libtextstyle</filename></term>
  363. <listitem>
  364. <para>Text styling library</para>
  365. <indexterm zone="ch-system-gettext libtextstyle">
  366. <primary sortas="c-libtextstyle">libtextstyle</primary>
  367. </indexterm>
  368. </listitem>
  369. </varlistentry>
  370. <varlistentry id="preloadable_libintl">
  371. <term><filename class="libraryfile">preloadable_libintl</filename></term>
  372. <listitem>
  373. <para>A library, intended to be used by LD_PRELOAD that assists
  374. <filename class="libraryfile">libintl</filename> in logging
  375. untranslated messages</para>
  376. <indexterm zone="ch-system-gettext preloadable_libintl">
  377. <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
  378. </indexterm>
  379. </listitem>
  380. </varlistentry>
  381. </variablelist>
  382. </sect2>
  383. </sect1>