gettext.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  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</userinput></screen>
  60. <para>To test the results (this takes a long time, around 3 SBUs),
  61. issue:</para>
  62. <screen><userinput remap="test">make check</userinput></screen>
  63. <para>Install the package:</para>
  64. <screen><userinput remap="install">make install
  65. chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
  66. </sect2>
  67. <sect2 id="contents-gettext" role="content">
  68. <title>Contents of Gettext</title>
  69. <segmentedlist>
  70. <segtitle>Installed programs</segtitle>
  71. <segtitle>Installed libraries</segtitle>
  72. <segtitle>Installed directories</segtitle>
  73. <seglistitem>
  74. <seg>autopoint, envsubst, gettext, gettext.sh,
  75. gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
  76. msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
  77. ngettext, recode-sr-latin, and xgettext</seg>
  78. <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
  79. libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg>
  80. <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;,
  81. /usr/share/gettext, and /usr/share/gettext-0.19.8</seg>
  82. </seglistitem>
  83. </segmentedlist>
  84. <variablelist>
  85. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  86. <?dbfo list-presentation="list"?>
  87. <?dbhtml list-presentation="table"?>
  88. <varlistentry id="autopoint">
  89. <term><command>autopoint</command></term>
  90. <listitem>
  91. <para>Copies standard Gettext infrastructure files into a source
  92. package</para>
  93. <indexterm zone="ch-system-gettext autopoint">
  94. <primary sortas="b-autopoint">autopoint</primary>
  95. </indexterm>
  96. </listitem>
  97. </varlistentry>
  98. <varlistentry id="envsubst">
  99. <term><command>envsubst</command></term>
  100. <listitem>
  101. <para>Substitutes environment variables in shell format strings</para>
  102. <indexterm zone="ch-system-gettext envsubst">
  103. <primary sortas="b-envsubst">envsubst</primary>
  104. </indexterm>
  105. </listitem>
  106. </varlistentry>
  107. <varlistentry id="gettext">
  108. <term><command>gettext</command></term>
  109. <listitem>
  110. <para>Translates a natural language message into the user's language
  111. by looking up the translation in a message catalog</para>
  112. <indexterm zone="ch-system-gettext gettext">
  113. <primary sortas="b-gettext">gettext</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="gettext.sh">
  118. <term><command>gettext.sh</command></term>
  119. <listitem>
  120. <para>Primarily serves as a shell function library for gettext</para>
  121. <indexterm zone="ch-system-gettext gettext.sh">
  122. <primary sortas="b-gettext.sh">gettext.sh</primary>
  123. </indexterm>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry id="gettextize">
  127. <term><command>gettextize</command></term>
  128. <listitem>
  129. <para>Copies all standard Gettext files into the given top-level
  130. directory of a package to begin internationalizing it</para>
  131. <indexterm zone="ch-system-gettext gettextize">
  132. <primary sortas="b-gettextize">gettextize</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="msgattrib">
  137. <term><command>msgattrib</command></term>
  138. <listitem>
  139. <para>Filters the messages of a translation catalog according to their
  140. attributes and manipulates the attributes</para>
  141. <indexterm zone="ch-system-gettext msgattrib">
  142. <primary sortas="b-msgattrib">msgattrib</primary>
  143. </indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="msgcat">
  147. <term><command>msgcat</command></term>
  148. <listitem>
  149. <para>Concatenates and merges the given
  150. <filename class="extension">.po</filename> files</para>
  151. <indexterm zone="ch-system-gettext msgcat">
  152. <primary sortas="b-msgcat">msgcat</primary>
  153. </indexterm>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry id="msgcmp">
  157. <term><command>msgcmp</command></term>
  158. <listitem>
  159. <para>Compares two <filename class="extension">.po</filename>
  160. files to check that both contain the same set of msgid strings</para>
  161. <indexterm zone="ch-system-gettext msgcmp">
  162. <primary sortas="b-msgcmp">msgcmp</primary>
  163. </indexterm>
  164. </listitem>
  165. </varlistentry>
  166. <varlistentry id="msgcomm">
  167. <term><command>msgcomm</command></term>
  168. <listitem>
  169. <para>Finds the messages that are common to the given
  170. <filename class="extension">.po</filename> files</para>
  171. <indexterm zone="ch-system-gettext msgcomm">
  172. <primary sortas="b-msgcomm">msgcomm</primary>
  173. </indexterm>
  174. </listitem>
  175. </varlistentry>
  176. <varlistentry id="msgconv">
  177. <term><command>msgconv</command></term>
  178. <listitem>
  179. <para>Converts a translation catalog to a different character
  180. encoding</para>
  181. <indexterm zone="ch-system-gettext msgconv">
  182. <primary sortas="b-msgconv">msgconv</primary>
  183. </indexterm>
  184. </listitem>
  185. </varlistentry>
  186. <varlistentry id="msgen">
  187. <term><command>msgen</command></term>
  188. <listitem>
  189. <para>Creates an English translation catalog</para>
  190. <indexterm zone="ch-system-gettext msgen">
  191. <primary sortas="b-msgen">msgen</primary>
  192. </indexterm>
  193. </listitem>
  194. </varlistentry>
  195. <varlistentry id="msgexec">
  196. <term><command>msgexec</command></term>
  197. <listitem>
  198. <para>Applies a command to all translations of a translation
  199. catalog</para>
  200. <indexterm zone="ch-system-gettext msgexec">
  201. <primary sortas="b-msgexec">msgexec</primary>
  202. </indexterm>
  203. </listitem>
  204. </varlistentry>
  205. <varlistentry id="msgfilter">
  206. <term><command>msgfilter</command></term>
  207. <listitem>
  208. <para>Applies a filter to all translations of a translation
  209. catalog</para>
  210. <indexterm zone="ch-system-gettext msgfilter">
  211. <primary sortas="b-msgfilter">msgfilter</primary>
  212. </indexterm>
  213. </listitem>
  214. </varlistentry>
  215. <varlistentry id="msgfmt">
  216. <term><command>msgfmt</command></term>
  217. <listitem>
  218. <para>Generates a binary message catalog from a translation
  219. catalog</para>
  220. <indexterm zone="ch-system-gettext msgfmt">
  221. <primary sortas="b-msgfmt">msgfmt</primary>
  222. </indexterm>
  223. </listitem>
  224. </varlistentry>
  225. <varlistentry id="msggrep">
  226. <term><command>msggrep</command></term>
  227. <listitem>
  228. <para>Extracts all messages of a translation catalog that match a
  229. given pattern or belong to some given source files</para>
  230. <indexterm zone="ch-system-gettext msggrep">
  231. <primary sortas="b-msggrep">msggrep</primary>
  232. </indexterm>
  233. </listitem>
  234. </varlistentry>
  235. <varlistentry id="msginit">
  236. <term><command>msginit</command></term>
  237. <listitem>
  238. <para>Creates a new <filename class="extension">.po</filename> file,
  239. initializing the meta information with values from the user's
  240. environment</para>
  241. <indexterm zone="ch-system-gettext msginit">
  242. <primary sortas="b-msginit">msginit</primary>
  243. </indexterm>
  244. </listitem>
  245. </varlistentry>
  246. <varlistentry id="msgmerge">
  247. <term><command>msgmerge</command></term>
  248. <listitem>
  249. <para>Combines two raw translations into a single file</para>
  250. <indexterm zone="ch-system-gettext msgmerge">
  251. <primary sortas="b-msgmerge">msgmerge</primary>
  252. </indexterm>
  253. </listitem>
  254. </varlistentry>
  255. <varlistentry id="msgunfmt">
  256. <term><command>msgunfmt</command></term>
  257. <listitem>
  258. <para>Decompiles a binary message catalog into raw translation
  259. text</para>
  260. <indexterm zone="ch-system-gettext msgunfmt">
  261. <primary sortas="b-msgunfmt">msgunfmt</primary>
  262. </indexterm>
  263. </listitem>
  264. </varlistentry>
  265. <varlistentry id="msguniq">
  266. <term><command>msguniq</command></term>
  267. <listitem>
  268. <para>Unifies duplicate translations in a translation catalog</para>
  269. <indexterm zone="ch-system-gettext msguniq">
  270. <primary sortas="b-msguniq">msguniq</primary>
  271. </indexterm>
  272. </listitem>
  273. </varlistentry>
  274. <varlistentry id="ngettext">
  275. <term><command>ngettext</command></term>
  276. <listitem>
  277. <para>Displays native language translations of a textual message whose
  278. grammatical form depends on a number</para>
  279. <indexterm zone="ch-system-gettext ngettext">
  280. <primary sortas="b-ngettext">ngettext</primary>
  281. </indexterm>
  282. </listitem>
  283. </varlistentry>
  284. <varlistentry id="recode-sr-latin">
  285. <term><command>recode-sr-latin</command></term>
  286. <listitem>
  287. <para>Recodes Serbian text from Cyrillic to Latin script</para>
  288. <indexterm zone="ch-system-gettext recode-sr-latin">
  289. <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
  290. </indexterm>
  291. </listitem>
  292. </varlistentry>
  293. <varlistentry id="xgettext">
  294. <term><command>xgettext</command></term>
  295. <listitem>
  296. <para>Extracts the translatable message lines from the given source
  297. files to make the first translation template</para>
  298. <indexterm zone="ch-system-gettext xgettext">
  299. <primary sortas="b-xgettext">xgettext</primary>
  300. </indexterm>
  301. </listitem>
  302. </varlistentry>
  303. <varlistentry id="libasprintf">
  304. <term><filename class="libraryfile">libasprintf</filename></term>
  305. <listitem>
  306. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  307. C formatted output routines usable in C++ programs, for use with the
  308. <emphasis>&lt;string&gt;</emphasis> strings and the
  309. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  310. <indexterm zone="ch-system-gettext libasprintf">
  311. <primary sortas="c-libasprintf">libasprintf</primary>
  312. </indexterm>
  313. </listitem>
  314. </varlistentry>
  315. <varlistentry id="libgettextlib">
  316. <term><filename class="libraryfile">libgettextlib</filename></term>
  317. <listitem>
  318. <para>a private library containing common routines used by the
  319. various Gettext programs; these are not intended for general use</para>
  320. <indexterm zone="ch-system-gettext libgettextlib">
  321. <primary sortas="c-libgettextlib">libgettextlib</primary>
  322. </indexterm>
  323. </listitem>
  324. </varlistentry>
  325. <varlistentry id="libgettextpo">
  326. <term><filename class="libraryfile">libgettextpo</filename></term>
  327. <listitem>
  328. <para>Used to write specialized programs that process
  329. <filename class="extension">.po</filename> files; this library is
  330. used when the standard applications shipped with Gettext (such as
  331. <command>msgcomm</command>, <command>msgcmp</command>,
  332. <command>msgattrib</command>, and <command>msgen</command>) will
  333. not suffice</para>
  334. <indexterm zone="ch-system-gettext libgettextpo">
  335. <primary sortas="c-libgettextpo">libgettextpo</primary>
  336. </indexterm>
  337. </listitem>
  338. </varlistentry>
  339. <varlistentry id="libgettextsrc">
  340. <term><filename class="libraryfile">libgettextsrc</filename></term>
  341. <listitem>
  342. <para>A private library containing common routines used by the
  343. various Gettext programs; these are not intended for general use</para>
  344. <indexterm zone="ch-system-gettext libgettextsrc">
  345. <primary sortas="c-libgettextsrc">libgettextsrc</primary>
  346. </indexterm>
  347. </listitem>
  348. </varlistentry>
  349. <varlistentry id="libtextstyle">
  350. <term><filename class="libraryfile">libtextstyle</filename></term>
  351. <listitem>
  352. <para>Text styling library</para>
  353. <indexterm zone="ch-system-gettext libtextstyle">
  354. <primary sortas="c-libtextstyle">libtextstyle</primary>
  355. </indexterm>
  356. </listitem>
  357. </varlistentry>
  358. <varlistentry id="preloadable_libintl">
  359. <term><filename class="libraryfile">preloadable_libintl</filename></term>
  360. <listitem>
  361. <para>A library, intended to be used by LD_PRELOAD that assists
  362. <filename class="libraryfile">libintl</filename> in logging
  363. untranslated messages</para>
  364. <indexterm zone="ch-system-gettext preloadable_libintl">
  365. <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
  366. </indexterm>
  367. </listitem>
  368. </varlistentry>
  369. </variablelist>
  370. </sect2>
  371. </sect1>