man-pages/man1/po2debconf.1.html
2021-03-31 01:06:50 +01:00

199 lines
5.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PO2DEBCONF</TITLE>
</HEAD><BODY>
<H1>PO2DEBCONF</H1>
Section: po-debconf (1)<BR>Updated: 2018-11-20<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
po2debconf - merge master templates file and PO files
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>po2debconf</B>
[<B>-v</B>] [<B>-h</B>]
[<B>--podir=</B><FONT SIZE="-1">DIR</FONT><B></B>]
[<B>-o </B><FONT SIZE="-1">FILE</FONT><B></B>]
[<B>-e </B><FONT SIZE="-1">STRING</FONT><B></B>]
<I>master</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This program reads all <FONT SIZE="-1">PO</FONT> files and a single <I>templates</I> file, and
produces a Debconf templates file containing all translations, similar
to the one produced by <B><A HREF="/cgi-bin/man/man2html?1+debconf-mergetemplate">debconf-mergetemplate</A></B>(1) (from the
<TT>&quot;debconf-utils&quot;</TT> package). <FONT SIZE="-1">PO</FONT> files are by default searched in the
<I>po</I> subdirectory below the location of the master file.
<P>
To help the language code transition for Norwegian Bokmål, the
<B>no</B> and <B>nb</B> language codes are handled specially. If <I>no.po</I> exists,
it should be renamed to <I>nb.po</I>. Using <I>nb.po</I> will make both <TT>&quot;-no&quot;</TT>
and <TT>&quot;-nb&quot;</TT> translations available in the templates file.
<P>
Lines beginning with a number sign (<TT>&quot;#&quot;</TT>) are comments in templates files.
They are useful to give hints to translators, and are discarded by <B>po2debconf</B>.
Special comments have been introduced in <TT>&quot;po-debconf&quot;</TT> 1.0. They are in the
form <TT>&quot;#flag:</TT>directive<TT>&quot;</TT>. The <TT>&quot;#flag:partial&quot;</TT> is the only directive
interpreted by <B>po2debconf</B>. Normally when a field is composed of several
paragraphs (like <TT>&quot;__Choices&quot;</TT> and <TT>&quot;_Description&quot;</TT>), it is translated if all
paragraphs are translated. When a field contains <TT>&quot;#flag:partial&quot;</TT>, translated
strings may be mixed with untranslated strings.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-h</B>, <B>--help</B><DD>
Display a usage summary and exit.
<DT id="2"><B>-v</B>, <B>--verbose</B><DD>
Process in verbose mode.
<DT id="3"><B>--podir=</B><FONT SIZE="-1">DIR</FONT><B></B><DD>
Set directory for <FONT SIZE="-1">PO</FONT> files. Default is to search <FONT SIZE="-1">PO</FONT> files in the <I>po</I>
subdirectory below the location of the master file.
<DT id="4"><B>-o</B>, <B>--output=</B><FONT SIZE="-1">FILE</FONT><B></B><DD>
Set output filename (default is standard output).
<DT id="5"><B>-e</B>, <B>--encoding=</B><FONT SIZE="-1">STRING</FONT><B></B><DD>
Convert encoding. Argument can take 3 values: <TT>&quot;utf8&quot;</TT> (convert to
<FONT SIZE="-1">UTF-8</FONT>), <TT>&quot;po&quot;</TT> (do not change encoding) and <TT>&quot;popular&quot;</TT> (convert
encoding of input files depending on their language; the
<TT>&quot;PODEBCONF_ENCODINGS&quot;</TT> environment variable must point to a name of a file
containing the encoding map).
<P>
Such a filename looks like:
<P>
<PRE>
#
# Number is comment sign
#
cs ISO-8859-2
da ISO-8859-1
de ISO-8859-1
el ISO-8859-7
</PRE>
<P>
etc.
<P>
Default encoding used to be <TT>&quot;popular&quot;</TT>, and has been switched to <TT>&quot;utf8&quot;</TT>
since po-debconf 0.9.0.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OUTPUT FORMAT</H2>
Since debconf 1.2.0, templates format has changed, encoding is part of
field names, i.e. they are <TT>&quot;foo-</TT>lang<TT>.</TT>encoding<TT>&quot;</TT>. When older
debconf encounter such fields, they are silently ignored, which means
that original text is displayed.
<P>
If present, a <I>po/output</I> file can override defaults for encoding and
output format. It contains a single line with two fields. The first field is the output format
(currently valid values are 1 for fields in the form <TT>&quot;foo-</TT>lang<TT>&quot;</TT>,
and 2 for <TT>&quot;foo-</TT>lang<TT>.</TT>encoding<TT>&quot;</TT>) and the second field is the encoding, e.g.
<P>
<PRE>
echo '2 utf8' &gt; po/output
</PRE>
<P>
let <B>po2debconf</B> convert text to <FONT SIZE="-1">UTF-8.</FONT>
<P>
When encoding is set to <TT>&quot;po&quot;</TT> or <TT>&quot;utf8&quot;</TT>, output format is always set to
2, so that older debconf do not try to display text with wrong
encodings.
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+debconf-gettextize">debconf-gettextize</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+debconf-updatepo">debconf-updatepo</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?7+po-debconf">po-debconf</A></B>(7).
<A NAME="lbAH">&nbsp;</A>
<H2>AUTHOR</H2>
<PRE>
Denis Barbier &lt;<A HREF="mailto:barbier@linuxfr.org">barbier@linuxfr.org</A>&gt;
</PRE>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="9"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="10"><A HREF="#lbAF">OUTPUT FORMAT</A><DD>
<DT id="11"><A HREF="#lbAG">SEE ALSO</A><DD>
<DT id="12"><A HREF="#lbAH">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:24 GMT, March 31, 2021
</BODY>
</HTML>