Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/gettext/gettext_7.html @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> | |
2 <html> | |
3 <!-- Created on February, 21 2024 by texi2html 1.78a --> | |
4 <!-- | |
5 Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) | |
6 Karl Berry <karl@freefriends.org> | |
7 Olaf Bachmann <obachman@mathematik.uni-kl.de> | |
8 and many others. | |
9 Maintained by: Many creative people. | |
10 Send bugs and suggestions to <texi2html-bug@nongnu.org> | |
11 | |
12 --> | |
13 <head> | |
14 <title>GNU gettext utilities: 7. Updating Existing PO Files</title> | |
15 | |
16 <meta name="description" content="GNU gettext utilities: 7. Updating Existing PO Files"> | |
17 <meta name="keywords" content="GNU gettext utilities: 7. Updating Existing PO Files"> | |
18 <meta name="resource-type" content="document"> | |
19 <meta name="distribution" content="global"> | |
20 <meta name="Generator" content="texi2html 1.78a"> | |
21 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
22 <style type="text/css"> | |
23 <!-- | |
24 a.summary-letter {text-decoration: none} | |
25 pre.display {font-family: serif} | |
26 pre.format {font-family: serif} | |
27 pre.menu-comment {font-family: serif} | |
28 pre.menu-preformatted {font-family: serif} | |
29 pre.smalldisplay {font-family: serif; font-size: smaller} | |
30 pre.smallexample {font-size: smaller} | |
31 pre.smallformat {font-family: serif; font-size: smaller} | |
32 pre.smalllisp {font-size: smaller} | |
33 span.roman {font-family:serif; font-weight:normal;} | |
34 span.sansserif {font-family:sans-serif; font-weight:normal;} | |
35 ul.toc {list-style: none} | |
36 --> | |
37 </style> | |
38 | |
39 | |
40 </head> | |
41 | |
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> | |
43 | |
44 <table cellpadding="1" cellspacing="1" border="0"> | |
45 <tr><td valign="middle" align="left">[<a href="gettext_6.html#SEC45" title="Beginning of this chapter or previous chapter"> << </a>]</td> | |
46 <td valign="middle" align="left">[<a href="gettext_8.html#SEC63" title="Next chapter"> >> </a>]</td> | |
47 <td valign="middle" align="left"> </td> | |
48 <td valign="middle" align="left"> </td> | |
49 <td valign="middle" align="left"> </td> | |
50 <td valign="middle" align="left"> </td> | |
51 <td valign="middle" align="left"> </td> | |
52 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> | |
53 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> | |
54 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td> | |
55 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td> | |
56 </tr></table> | |
57 | |
58 <hr size="2"> | |
59 <a name="Updating"></a> | |
60 <a name="SEC53"></a> | |
61 <h1 class="chapter"> <a href="gettext_toc.html#TOC46">7. Updating Existing PO Files</a> </h1> | |
62 | |
63 | |
64 | |
65 <a name="msgmerge-Invocation"></a> | |
66 <a name="SEC54"></a> | |
67 <h2 class="section"> <a href="gettext_toc.html#TOC47">7.1 Invoking the <code>msgmerge</code> Program</a> </h2> | |
68 | |
69 | |
70 <table><tr><td> </td><td><pre class="example">msgmerge [<var>option</var>] <var>def</var>.po <var>ref</var>.pot | |
71 </pre></td></tr></table> | |
72 | |
73 <p>The <code>msgmerge</code> program merges two Uniforum style .po files together. | |
74 The <var>def</var>.po file is an existing PO file with translations which will | |
75 be taken over to the newly created file as long as they still match; | |
76 comments will be preserved, but extracted comments and file positions will | |
77 be discarded. The <var>ref</var>.pot file is the last created PO file with | |
78 up-to-date source references but old translations, or a PO Template file | |
79 (generally created by <code>xgettext</code>); any translations or comments | |
80 in the file will be discarded, however dot comments and file positions | |
81 will be preserved. Where an exact match cannot be found, fuzzy matching | |
82 is used to produce better results. | |
83 </p> | |
84 | |
85 <a name="SEC55"></a> | |
86 <h3 class="subsection"> <a href="gettext_toc.html#TOC48">7.1.1 Input file location</a> </h3> | |
87 | |
88 <dl compact="compact"> | |
89 <dt> ‘<samp><var>def</var>.po</samp>’</dt> | |
90 <dd><p>Translations referring to old sources. | |
91 </p> | |
92 </dd> | |
93 <dt> ‘<samp><var>ref</var>.pot</samp>’</dt> | |
94 <dd><p>References to the new sources. | |
95 </p> | |
96 </dd> | |
97 <dt> ‘<samp>-D <var>directory</var></samp>’</dt> | |
98 <dt> ‘<samp>--directory=<var>directory</var></samp>’</dt> | |
99 <dd><a name="IDX261"></a> | |
100 <a name="IDX262"></a> | |
101 <p>Add <var>directory</var> to the list of directories. Source files are | |
102 searched relative to this list of directories. The resulting ‘<tt>.po</tt>’ | |
103 file will be written relative to the current directory, though. | |
104 </p> | |
105 </dd> | |
106 <dt> ‘<samp>-C <var>file</var></samp>’</dt> | |
107 <dt> ‘<samp>--compendium=<var>file</var></samp>’</dt> | |
108 <dd><a name="IDX263"></a> | |
109 <a name="IDX264"></a> | |
110 <p>Specify an additional library of message translations. See section <a href="gettext_8.html#SEC80">Using Translation Compendia</a>. | |
111 This option may be specified more than once. | |
112 </p> | |
113 </dd> | |
114 </dl> | |
115 | |
116 | |
117 <a name="SEC56"></a> | |
118 <h3 class="subsection"> <a href="gettext_toc.html#TOC49">7.1.2 Operation mode</a> </h3> | |
119 | |
120 <dl compact="compact"> | |
121 <dt> ‘<samp>-U</samp>’</dt> | |
122 <dt> ‘<samp>--update</samp>’</dt> | |
123 <dd><a name="IDX265"></a> | |
124 <a name="IDX266"></a> | |
125 <p>Update <var>def</var>.po. Do nothing if <var>def</var>.po is already up to date. | |
126 </p> | |
127 </dd> | |
128 </dl> | |
129 | |
130 | |
131 <a name="SEC57"></a> | |
132 <h3 class="subsection"> <a href="gettext_toc.html#TOC50">7.1.3 Output file location</a> </h3> | |
133 | |
134 <dl compact="compact"> | |
135 <dt> ‘<samp>-o <var>file</var></samp>’</dt> | |
136 <dt> ‘<samp>--output-file=<var>file</var></samp>’</dt> | |
137 <dd><a name="IDX267"></a> | |
138 <a name="IDX268"></a> | |
139 <p>Write output to specified file. | |
140 </p> | |
141 </dd> | |
142 </dl> | |
143 | |
144 <a name="IDX269"></a> | |
145 <p>The results are written to standard output if no output file is specified | |
146 or if it is ‘<samp>-</samp>’. | |
147 </p> | |
148 | |
149 <a name="SEC58"></a> | |
150 <h3 class="subsection"> <a href="gettext_toc.html#TOC51">7.1.4 Output file location in update mode</a> </h3> | |
151 | |
152 <p>The result is written back to <var>def</var>.po. | |
153 </p> | |
154 <dl compact="compact"> | |
155 <dt> ‘<samp>--backup=<var>control</var></samp>’</dt> | |
156 <dd><a name="IDX270"></a> | |
157 <a name="IDX271"></a> | |
158 <p>Make a backup of <var>def</var>.po | |
159 </p> | |
160 </dd> | |
161 <dt> ‘<samp>--suffix=<var>suffix</var></samp>’</dt> | |
162 <dd><a name="IDX272"></a> | |
163 <p>Override the usual backup suffix. | |
164 </p> | |
165 </dd> | |
166 </dl> | |
167 | |
168 <a name="IDX273"></a> | |
169 <p>The version control method may be selected via the <code>--backup</code> option | |
170 or through the <code>VERSION_CONTROL</code> environment variable. Here are the | |
171 values: | |
172 </p> | |
173 <dl compact="compact"> | |
174 <dt> ‘<samp>none</samp>’</dt> | |
175 <dt> ‘<samp>off</samp>’</dt> | |
176 <dd><p>Never make backups (even if <code>--backup</code> is given). | |
177 </p> | |
178 </dd> | |
179 <dt> ‘<samp>numbered</samp>’</dt> | |
180 <dt> ‘<samp>t</samp>’</dt> | |
181 <dd><p>Make numbered backups. | |
182 </p> | |
183 </dd> | |
184 <dt> ‘<samp>existing</samp>’</dt> | |
185 <dt> ‘<samp>nil</samp>’</dt> | |
186 <dd><p>Make numbered backups if numbered backups for this file already exist, | |
187 otherwise make simple backups. | |
188 </p> | |
189 </dd> | |
190 <dt> ‘<samp>simple</samp>’</dt> | |
191 <dt> ‘<samp>never</samp>’</dt> | |
192 <dd><p>Always make simple backups. | |
193 </p> | |
194 </dd> | |
195 </dl> | |
196 | |
197 <p>The backup suffix is ‘<samp>~</samp>’, unless set with <code>--suffix</code> or the | |
198 <code>SIMPLE_BACKUP_SUFFIX</code> environment variable. | |
199 </p> | |
200 | |
201 <a name="SEC59"></a> | |
202 <h3 class="subsection"> <a href="gettext_toc.html#TOC52">7.1.5 Operation modifiers</a> </h3> | |
203 | |
204 <dl compact="compact"> | |
205 <dt> ‘<samp>-m</samp>’</dt> | |
206 <dt> ‘<samp>--multi-domain</samp>’</dt> | |
207 <dd><a name="IDX274"></a> | |
208 <a name="IDX275"></a> | |
209 <p>Apply <var>ref</var>.pot to each of the domains in <var>def</var>.po. | |
210 </p> | |
211 </dd> | |
212 <dt> ‘<samp>--for-msgfmt</samp>’</dt> | |
213 <dd><a name="IDX276"></a> | |
214 <p>Produce a PO file meant for <code>msgfmt</code> only, not for a translator. | |
215 This option omits untranslated messages, fuzzy messages (except the header | |
216 entry), and obsolete messages from the output. Also, it omits translator | |
217 comments and ‘<samp>#: <var>filename</var>:<var>line</var></samp>’ lines from the output. | |
218 In particular, this option implies ‘<samp>--no-fuzzy-matching</samp>’. | |
219 </p> | |
220 </dd> | |
221 <dt> ‘<samp>-N</samp>’</dt> | |
222 <dt> ‘<samp>--no-fuzzy-matching</samp>’</dt> | |
223 <dd><a name="IDX277"></a> | |
224 <a name="IDX278"></a> | |
225 <p>Do not use fuzzy matching when an exact match is not found. This may speed | |
226 up the operation considerably. | |
227 </p> | |
228 </dd> | |
229 <dt> ‘<samp>--previous</samp>’</dt> | |
230 <dd><a name="IDX279"></a> | |
231 <p>Keep the previous msgids of translated messages, marked with ‘<samp>#|</samp>’, when | |
232 adding the fuzzy marker to such messages. | |
233 </p></dd> | |
234 </dl> | |
235 | |
236 | |
237 <a name="SEC60"></a> | |
238 <h3 class="subsection"> <a href="gettext_toc.html#TOC53">7.1.6 Input file syntax</a> </h3> | |
239 | |
240 <dl compact="compact"> | |
241 <dt> ‘<samp>-P</samp>’</dt> | |
242 <dt> ‘<samp>--properties-input</samp>’</dt> | |
243 <dd><a name="IDX280"></a> | |
244 <a name="IDX281"></a> | |
245 <p>Assume the input files are Java ResourceBundles in Java <code>.properties</code> | |
246 syntax, not in PO file syntax. | |
247 </p> | |
248 </dd> | |
249 <dt> ‘<samp>--stringtable-input</samp>’</dt> | |
250 <dd><a name="IDX282"></a> | |
251 <p>Assume the input files are NeXTstep/GNUstep localized resource files in | |
252 <code>.strings</code> syntax, not in PO file syntax. | |
253 </p> | |
254 </dd> | |
255 </dl> | |
256 | |
257 | |
258 <a name="SEC61"></a> | |
259 <h3 class="subsection"> <a href="gettext_toc.html#TOC54">7.1.7 Output details</a> </h3> | |
260 | |
261 | |
262 <dl compact="compact"> | |
263 <dt> ‘<samp>--lang=<var>catalogname</var></samp>’</dt> | |
264 <dd><a name="IDX283"></a> | |
265 <p>Specify the ‘<samp>Language</samp>’ field to be used in the header entry. See | |
266 <a href="gettext_6.html#SEC52">Filling in the Header Entry</a> for the meaning of this field. Note: The | |
267 ‘<samp>Language-Team</samp>’ and ‘<samp>Plural-Forms</samp>’ fields are left unchanged. | |
268 If this option is not specified, the ‘<samp>Language</samp>’ field is inferred, as | |
269 best as possible, from the ‘<samp>Language-Team</samp>’ field. | |
270 </p> | |
271 </dd> | |
272 <dt> ‘<samp>--color</samp>’</dt> | |
273 <dt> ‘<samp>--color=<var>when</var></samp>’</dt> | |
274 <dd><a name="IDX284"></a> | |
275 <p>Specify whether or when to use colors and other text attributes. | |
276 See <a href="gettext_9.html#SEC158">The <code>--color</code> option</a> for details. | |
277 </p> | |
278 </dd> | |
279 <dt> ‘<samp>--style=<var>style_file</var></samp>’</dt> | |
280 <dd><a name="IDX285"></a> | |
281 <p>Specify the CSS style rule file to use for <code>--color</code>. | |
282 See <a href="gettext_9.html#SEC160">The <code>--style</code> option</a> for details. | |
283 </p> | |
284 </dd> | |
285 <dt> ‘<samp>--force-po</samp>’</dt> | |
286 <dd><a name="IDX286"></a> | |
287 <p>Always write an output file even if it contains no message. | |
288 </p> | |
289 </dd> | |
290 <dt> ‘<samp>-i</samp>’</dt> | |
291 <dt> ‘<samp>--indent</samp>’</dt> | |
292 <dd><a name="IDX287"></a> | |
293 <a name="IDX288"></a> | |
294 <p>Write the .po file using indented style. | |
295 </p> | |
296 </dd> | |
297 <dt> ‘<samp>--no-location</samp>’</dt> | |
298 <dd><a name="IDX289"></a> | |
299 <p>Do not write ‘<samp>#: <var>filename</var>:<var>line</var></samp>’ lines. | |
300 </p> | |
301 </dd> | |
302 <dt> ‘<samp>-n</samp>’</dt> | |
303 <dt> ‘<samp>--add-location=<var>type</var></samp>’</dt> | |
304 <dd><a name="IDX290"></a> | |
305 <p>Generate ‘<samp>#: <var>filename</var>:<var>line</var></samp>’ lines (default). | |
306 </p> | |
307 <p>The optional <var>type</var> can be either ‘<samp>full</samp>’, ‘<samp>file</samp>’, or | |
308 ‘<samp>never</samp>’. If it is not given or ‘<samp>full</samp>’, it generates the | |
309 lines with both file name and line number. If it is ‘<samp>file</samp>’, the | |
310 line number part is omitted. If it is ‘<samp>never</samp>’, it completely | |
311 suppresses the lines (same as <code>--no-location</code>). | |
312 </p> | |
313 </dd> | |
314 <dt> ‘<samp>--strict</samp>’</dt> | |
315 <dd><a name="IDX291"></a> | |
316 <p>Write out a strict Uniforum conforming PO file. Note that this | |
317 Uniforum format should be avoided because it doesn't support the | |
318 GNU extensions. | |
319 </p> | |
320 </dd> | |
321 <dt> ‘<samp>-p</samp>’</dt> | |
322 <dt> ‘<samp>--properties-output</samp>’</dt> | |
323 <dd><a name="IDX292"></a> | |
324 <a name="IDX293"></a> | |
325 <p>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note | |
326 that this file format doesn't support plural forms and silently drops | |
327 obsolete messages. | |
328 </p> | |
329 </dd> | |
330 <dt> ‘<samp>--stringtable-output</samp>’</dt> | |
331 <dd><a name="IDX294"></a> | |
332 <p>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax. | |
333 Note that this file format doesn't support plural forms. | |
334 </p> | |
335 </dd> | |
336 <dt> ‘<samp>-w <var>number</var></samp>’</dt> | |
337 <dt> ‘<samp>--width=<var>number</var></samp>’</dt> | |
338 <dd><a name="IDX295"></a> | |
339 <a name="IDX296"></a> | |
340 <p>Set the output page width. Long strings in the output files will be | |
341 split across multiple lines in order to ensure that each line's width | |
342 (= number of screen columns) is less or equal to the given <var>number</var>. | |
343 </p> | |
344 </dd> | |
345 <dt> ‘<samp>--no-wrap</samp>’</dt> | |
346 <dd><a name="IDX297"></a> | |
347 <p>Do not break long message lines. Message lines whose width exceeds the | |
348 output page width will not be split into several lines. Only file reference | |
349 lines which are wider than the output page width will be split. | |
350 </p> | |
351 </dd> | |
352 <dt> ‘<samp>-s</samp>’</dt> | |
353 <dt> ‘<samp>--sort-output</samp>’</dt> | |
354 <dd><a name="IDX298"></a> | |
355 <a name="IDX299"></a> | |
356 <a name="IDX300"></a> | |
357 <p>Generate sorted output. Note that using this option makes it much harder | |
358 for the translator to understand each message's context. | |
359 </p> | |
360 </dd> | |
361 <dt> ‘<samp>-F</samp>’</dt> | |
362 <dt> ‘<samp>--sort-by-file</samp>’</dt> | |
363 <dd><a name="IDX301"></a> | |
364 <a name="IDX302"></a> | |
365 <p>Sort output by file location. | |
366 </p> | |
367 </dd> | |
368 </dl> | |
369 | |
370 | |
371 <a name="SEC62"></a> | |
372 <h3 class="subsection"> <a href="gettext_toc.html#TOC55">7.1.8 Informative output</a> </h3> | |
373 | |
374 <dl compact="compact"> | |
375 <dt> ‘<samp>-h</samp>’</dt> | |
376 <dt> ‘<samp>--help</samp>’</dt> | |
377 <dd><a name="IDX303"></a> | |
378 <a name="IDX304"></a> | |
379 <p>Display this help and exit. | |
380 </p> | |
381 </dd> | |
382 <dt> ‘<samp>-V</samp>’</dt> | |
383 <dt> ‘<samp>--version</samp>’</dt> | |
384 <dd><a name="IDX305"></a> | |
385 <a name="IDX306"></a> | |
386 <p>Output version information and exit. | |
387 </p> | |
388 </dd> | |
389 <dt> ‘<samp>-v</samp>’</dt> | |
390 <dt> ‘<samp>--verbose</samp>’</dt> | |
391 <dd><a name="IDX307"></a> | |
392 <a name="IDX308"></a> | |
393 <p>Increase verbosity level. | |
394 </p> | |
395 </dd> | |
396 <dt> ‘<samp>-q</samp>’</dt> | |
397 <dt> ‘<samp>--quiet</samp>’</dt> | |
398 <dt> ‘<samp>--silent</samp>’</dt> | |
399 <dd><a name="IDX309"></a> | |
400 <a name="IDX310"></a> | |
401 <a name="IDX311"></a> | |
402 <p>Suppress progress indicators. | |
403 </p> | |
404 </dd> | |
405 </dl> | |
406 | |
407 | |
408 <table cellpadding="1" cellspacing="1" border="0"> | |
409 <tr><td valign="middle" align="left">[<a href="#SEC53" title="Beginning of this chapter or previous chapter"> << </a>]</td> | |
410 <td valign="middle" align="left">[<a href="gettext_8.html#SEC63" title="Next chapter"> >> </a>]</td> | |
411 <td valign="middle" align="left"> </td> | |
412 <td valign="middle" align="left"> </td> | |
413 <td valign="middle" align="left"> </td> | |
414 <td valign="middle" align="left"> </td> | |
415 <td valign="middle" align="left"> </td> | |
416 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> | |
417 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> | |
418 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td> | |
419 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td> | |
420 </tr></table> | |
421 <p> | |
422 <font size="-1"> | |
423 This document was generated by <em>Bruno Haible</em> on <em>February, 21 2024</em> using <a href="https://www.nongnu.org/texi2html/"><em>texi2html 1.78a</em></a>. | |
424 </font> | |
425 <br> | |
426 | |
427 </p> | |
428 </body> | |
429 </html> |