Mercurial > repos > rliterman > csp2
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/gettext/gettext_7.html Tue Mar 18 16:23:26 2025 -0400 @@ -0,0 +1,429 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> +<html> +<!-- Created on February, 21 2024 by texi2html 1.78a --> +<!-- +Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) + Karl Berry <karl@freefriends.org> + Olaf Bachmann <obachman@mathematik.uni-kl.de> + and many others. +Maintained by: Many creative people. +Send bugs and suggestions to <texi2html-bug@nongnu.org> + +--> +<head> +<title>GNU gettext utilities: 7. Updating Existing PO Files</title> + +<meta name="description" content="GNU gettext utilities: 7. Updating Existing PO Files"> +<meta name="keywords" content="GNU gettext utilities: 7. Updating Existing PO Files"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="texi2html 1.78a"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +pre.display {font-family: serif} +pre.format {font-family: serif} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: serif; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: serif; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.roman {font-family:serif; font-weight:normal;} +span.sansserif {font-family:sans-serif; font-weight:normal;} +ul.toc {list-style: none} +--> +</style> + + +</head> + +<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> + +<table cellpadding="1" cellspacing="1" border="0"> +<tr><td valign="middle" align="left">[<a href="gettext_6.html#SEC45" title="Beginning of this chapter or previous chapter"> << </a>]</td> +<td valign="middle" align="left">[<a href="gettext_8.html#SEC63" title="Next chapter"> >> </a>]</td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> +<td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> +<td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td> +<td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td> +</tr></table> + +<hr size="2"> +<a name="Updating"></a> +<a name="SEC53"></a> +<h1 class="chapter"> <a href="gettext_toc.html#TOC46">7. Updating Existing PO Files</a> </h1> + + + +<a name="msgmerge-Invocation"></a> +<a name="SEC54"></a> +<h2 class="section"> <a href="gettext_toc.html#TOC47">7.1 Invoking the <code>msgmerge</code> Program</a> </h2> + + +<table><tr><td> </td><td><pre class="example">msgmerge [<var>option</var>] <var>def</var>.po <var>ref</var>.pot +</pre></td></tr></table> + +<p>The <code>msgmerge</code> program merges two Uniforum style .po files together. +The <var>def</var>.po file is an existing PO file with translations which will +be taken over to the newly created file as long as they still match; +comments will be preserved, but extracted comments and file positions will +be discarded. The <var>ref</var>.pot file is the last created PO file with +up-to-date source references but old translations, or a PO Template file +(generally created by <code>xgettext</code>); any translations or comments +in the file will be discarded, however dot comments and file positions +will be preserved. Where an exact match cannot be found, fuzzy matching +is used to produce better results. +</p> + +<a name="SEC55"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC48">7.1.1 Input file location</a> </h3> + +<dl compact="compact"> +<dt> ‘<samp><var>def</var>.po</samp>’</dt> +<dd><p>Translations referring to old sources. +</p> +</dd> +<dt> ‘<samp><var>ref</var>.pot</samp>’</dt> +<dd><p>References to the new sources. +</p> +</dd> +<dt> ‘<samp>-D <var>directory</var></samp>’</dt> +<dt> ‘<samp>--directory=<var>directory</var></samp>’</dt> +<dd><a name="IDX261"></a> +<a name="IDX262"></a> +<p>Add <var>directory</var> to the list of directories. Source files are +searched relative to this list of directories. The resulting ‘<tt>.po</tt>’ +file will be written relative to the current directory, though. +</p> +</dd> +<dt> ‘<samp>-C <var>file</var></samp>’</dt> +<dt> ‘<samp>--compendium=<var>file</var></samp>’</dt> +<dd><a name="IDX263"></a> +<a name="IDX264"></a> +<p>Specify an additional library of message translations. See section <a href="gettext_8.html#SEC80">Using Translation Compendia</a>. +This option may be specified more than once. +</p> +</dd> +</dl> + + +<a name="SEC56"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC49">7.1.2 Operation mode</a> </h3> + +<dl compact="compact"> +<dt> ‘<samp>-U</samp>’</dt> +<dt> ‘<samp>--update</samp>’</dt> +<dd><a name="IDX265"></a> +<a name="IDX266"></a> +<p>Update <var>def</var>.po. Do nothing if <var>def</var>.po is already up to date. +</p> +</dd> +</dl> + + +<a name="SEC57"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC50">7.1.3 Output file location</a> </h3> + +<dl compact="compact"> +<dt> ‘<samp>-o <var>file</var></samp>’</dt> +<dt> ‘<samp>--output-file=<var>file</var></samp>’</dt> +<dd><a name="IDX267"></a> +<a name="IDX268"></a> +<p>Write output to specified file. +</p> +</dd> +</dl> + +<a name="IDX269"></a> +<p>The results are written to standard output if no output file is specified +or if it is ‘<samp>-</samp>’. +</p> + +<a name="SEC58"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC51">7.1.4 Output file location in update mode</a> </h3> + +<p>The result is written back to <var>def</var>.po. +</p> +<dl compact="compact"> +<dt> ‘<samp>--backup=<var>control</var></samp>’</dt> +<dd><a name="IDX270"></a> +<a name="IDX271"></a> +<p>Make a backup of <var>def</var>.po +</p> +</dd> +<dt> ‘<samp>--suffix=<var>suffix</var></samp>’</dt> +<dd><a name="IDX272"></a> +<p>Override the usual backup suffix. +</p> +</dd> +</dl> + +<a name="IDX273"></a> +<p>The version control method may be selected via the <code>--backup</code> option +or through the <code>VERSION_CONTROL</code> environment variable. Here are the +values: +</p> +<dl compact="compact"> +<dt> ‘<samp>none</samp>’</dt> +<dt> ‘<samp>off</samp>’</dt> +<dd><p>Never make backups (even if <code>--backup</code> is given). +</p> +</dd> +<dt> ‘<samp>numbered</samp>’</dt> +<dt> ‘<samp>t</samp>’</dt> +<dd><p>Make numbered backups. +</p> +</dd> +<dt> ‘<samp>existing</samp>’</dt> +<dt> ‘<samp>nil</samp>’</dt> +<dd><p>Make numbered backups if numbered backups for this file already exist, +otherwise make simple backups. +</p> +</dd> +<dt> ‘<samp>simple</samp>’</dt> +<dt> ‘<samp>never</samp>’</dt> +<dd><p>Always make simple backups. +</p> +</dd> +</dl> + +<p>The backup suffix is ‘<samp>~</samp>’, unless set with <code>--suffix</code> or the +<code>SIMPLE_BACKUP_SUFFIX</code> environment variable. +</p> + +<a name="SEC59"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC52">7.1.5 Operation modifiers</a> </h3> + +<dl compact="compact"> +<dt> ‘<samp>-m</samp>’</dt> +<dt> ‘<samp>--multi-domain</samp>’</dt> +<dd><a name="IDX274"></a> +<a name="IDX275"></a> +<p>Apply <var>ref</var>.pot to each of the domains in <var>def</var>.po. +</p> +</dd> +<dt> ‘<samp>--for-msgfmt</samp>’</dt> +<dd><a name="IDX276"></a> +<p>Produce a PO file meant for <code>msgfmt</code> only, not for a translator. +This option omits untranslated messages, fuzzy messages (except the header +entry), and obsolete messages from the output. Also, it omits translator +comments and ‘<samp>#: <var>filename</var>:<var>line</var></samp>’ lines from the output. +In particular, this option implies ‘<samp>--no-fuzzy-matching</samp>’. +</p> +</dd> +<dt> ‘<samp>-N</samp>’</dt> +<dt> ‘<samp>--no-fuzzy-matching</samp>’</dt> +<dd><a name="IDX277"></a> +<a name="IDX278"></a> +<p>Do not use fuzzy matching when an exact match is not found. This may speed +up the operation considerably. +</p> +</dd> +<dt> ‘<samp>--previous</samp>’</dt> +<dd><a name="IDX279"></a> +<p>Keep the previous msgids of translated messages, marked with ‘<samp>#|</samp>’, when +adding the fuzzy marker to such messages. +</p></dd> +</dl> + + +<a name="SEC60"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC53">7.1.6 Input file syntax</a> </h3> + +<dl compact="compact"> +<dt> ‘<samp>-P</samp>’</dt> +<dt> ‘<samp>--properties-input</samp>’</dt> +<dd><a name="IDX280"></a> +<a name="IDX281"></a> +<p>Assume the input files are Java ResourceBundles in Java <code>.properties</code> +syntax, not in PO file syntax. +</p> +</dd> +<dt> ‘<samp>--stringtable-input</samp>’</dt> +<dd><a name="IDX282"></a> +<p>Assume the input files are NeXTstep/GNUstep localized resource files in +<code>.strings</code> syntax, not in PO file syntax. +</p> +</dd> +</dl> + + +<a name="SEC61"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC54">7.1.7 Output details</a> </h3> + + +<dl compact="compact"> +<dt> ‘<samp>--lang=<var>catalogname</var></samp>’</dt> +<dd><a name="IDX283"></a> +<p>Specify the ‘<samp>Language</samp>’ field to be used in the header entry. See +<a href="gettext_6.html#SEC52">Filling in the Header Entry</a> for the meaning of this field. Note: The +‘<samp>Language-Team</samp>’ and ‘<samp>Plural-Forms</samp>’ fields are left unchanged. +If this option is not specified, the ‘<samp>Language</samp>’ field is inferred, as +best as possible, from the ‘<samp>Language-Team</samp>’ field. +</p> +</dd> +<dt> ‘<samp>--color</samp>’</dt> +<dt> ‘<samp>--color=<var>when</var></samp>’</dt> +<dd><a name="IDX284"></a> +<p>Specify whether or when to use colors and other text attributes. +See <a href="gettext_9.html#SEC158">The <code>--color</code> option</a> for details. +</p> +</dd> +<dt> ‘<samp>--style=<var>style_file</var></samp>’</dt> +<dd><a name="IDX285"></a> +<p>Specify the CSS style rule file to use for <code>--color</code>. +See <a href="gettext_9.html#SEC160">The <code>--style</code> option</a> for details. +</p> +</dd> +<dt> ‘<samp>--force-po</samp>’</dt> +<dd><a name="IDX286"></a> +<p>Always write an output file even if it contains no message. +</p> +</dd> +<dt> ‘<samp>-i</samp>’</dt> +<dt> ‘<samp>--indent</samp>’</dt> +<dd><a name="IDX287"></a> +<a name="IDX288"></a> +<p>Write the .po file using indented style. +</p> +</dd> +<dt> ‘<samp>--no-location</samp>’</dt> +<dd><a name="IDX289"></a> +<p>Do not write ‘<samp>#: <var>filename</var>:<var>line</var></samp>’ lines. +</p> +</dd> +<dt> ‘<samp>-n</samp>’</dt> +<dt> ‘<samp>--add-location=<var>type</var></samp>’</dt> +<dd><a name="IDX290"></a> +<p>Generate ‘<samp>#: <var>filename</var>:<var>line</var></samp>’ lines (default). +</p> +<p>The optional <var>type</var> can be either ‘<samp>full</samp>’, ‘<samp>file</samp>’, or +‘<samp>never</samp>’. If it is not given or ‘<samp>full</samp>’, it generates the +lines with both file name and line number. If it is ‘<samp>file</samp>’, the +line number part is omitted. If it is ‘<samp>never</samp>’, it completely +suppresses the lines (same as <code>--no-location</code>). +</p> +</dd> +<dt> ‘<samp>--strict</samp>’</dt> +<dd><a name="IDX291"></a> +<p>Write out a strict Uniforum conforming PO file. Note that this +Uniforum format should be avoided because it doesn't support the +GNU extensions. +</p> +</dd> +<dt> ‘<samp>-p</samp>’</dt> +<dt> ‘<samp>--properties-output</samp>’</dt> +<dd><a name="IDX292"></a> +<a name="IDX293"></a> +<p>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note +that this file format doesn't support plural forms and silently drops +obsolete messages. +</p> +</dd> +<dt> ‘<samp>--stringtable-output</samp>’</dt> +<dd><a name="IDX294"></a> +<p>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax. +Note that this file format doesn't support plural forms. +</p> +</dd> +<dt> ‘<samp>-w <var>number</var></samp>’</dt> +<dt> ‘<samp>--width=<var>number</var></samp>’</dt> +<dd><a name="IDX295"></a> +<a name="IDX296"></a> +<p>Set the output page width. Long strings in the output files will be +split across multiple lines in order to ensure that each line's width +(= number of screen columns) is less or equal to the given <var>number</var>. +</p> +</dd> +<dt> ‘<samp>--no-wrap</samp>’</dt> +<dd><a name="IDX297"></a> +<p>Do not break long message lines. Message lines whose width exceeds the +output page width will not be split into several lines. Only file reference +lines which are wider than the output page width will be split. +</p> +</dd> +<dt> ‘<samp>-s</samp>’</dt> +<dt> ‘<samp>--sort-output</samp>’</dt> +<dd><a name="IDX298"></a> +<a name="IDX299"></a> +<a name="IDX300"></a> +<p>Generate sorted output. Note that using this option makes it much harder +for the translator to understand each message's context. +</p> +</dd> +<dt> ‘<samp>-F</samp>’</dt> +<dt> ‘<samp>--sort-by-file</samp>’</dt> +<dd><a name="IDX301"></a> +<a name="IDX302"></a> +<p>Sort output by file location. +</p> +</dd> +</dl> + + +<a name="SEC62"></a> +<h3 class="subsection"> <a href="gettext_toc.html#TOC55">7.1.8 Informative output</a> </h3> + +<dl compact="compact"> +<dt> ‘<samp>-h</samp>’</dt> +<dt> ‘<samp>--help</samp>’</dt> +<dd><a name="IDX303"></a> +<a name="IDX304"></a> +<p>Display this help and exit. +</p> +</dd> +<dt> ‘<samp>-V</samp>’</dt> +<dt> ‘<samp>--version</samp>’</dt> +<dd><a name="IDX305"></a> +<a name="IDX306"></a> +<p>Output version information and exit. +</p> +</dd> +<dt> ‘<samp>-v</samp>’</dt> +<dt> ‘<samp>--verbose</samp>’</dt> +<dd><a name="IDX307"></a> +<a name="IDX308"></a> +<p>Increase verbosity level. +</p> +</dd> +<dt> ‘<samp>-q</samp>’</dt> +<dt> ‘<samp>--quiet</samp>’</dt> +<dt> ‘<samp>--silent</samp>’</dt> +<dd><a name="IDX309"></a> +<a name="IDX310"></a> +<a name="IDX311"></a> +<p>Suppress progress indicators. +</p> +</dd> +</dl> + + +<table cellpadding="1" cellspacing="1" border="0"> +<tr><td valign="middle" align="left">[<a href="#SEC53" title="Beginning of this chapter or previous chapter"> << </a>]</td> +<td valign="middle" align="left">[<a href="gettext_8.html#SEC63" title="Next chapter"> >> </a>]</td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left"> </td> +<td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> +<td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> +<td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td> +<td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td> +</tr></table> +<p> + <font size="-1"> + 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>. + </font> + <br> + +</p> +</body> +</html>