gettext.xml 15 KB

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