.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "DEBCONF-GETTEXTIZE 1" .TH DEBCONF-GETTEXTIZE 1 "2016-10-01" "" "po-debconf" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" debconf\-gettextize \- extract translations of debconf templates into PO files .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdebconf-gettextize\fR [\fB\-v\fR] [\fB\-h\fR] [\fB\-\-podir=\f(BI\s-1DIR\s0\fB\fR] [\fB\-\-choices\fR] [\fB\-\-merge\fR] \&\fImaster\fR [\fImaster\fR ...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fI/var/lib/dpkg/info/*.templates\fR files read by debconf contain English text and translations in the same file. But in source packages, translations are managed in separate files to help translators. In the initial implementation, a master \fItemplates\fR file contained only English text, and \&\fItemplates.\fIxx\fI\fR files contained both original and translated strings for the language \fIxx\fR. The \fBdebconf-mergetemplate\fR program was merging master and translated templates files. .PP The new implementation with \f(CW\*(C`po\-debconf\*(C'\fR is based on \f(CW\*(C`gettext\*(C'\fR. Maintainers mark translatable fields by prepending them with an underscore, English strings are automatically extracted into a \s-1POT\s0 file, translators work on normal \s-1PO\s0 files, and \fBpo2debconf\fR generates a merged templates file with the same structure. .PP The \fBdebconf-gettextize\fR program was initially designed to help migrating to the new implementation. .IP "\(bu" 2 It reads a list of master files and their associated translations, and generates \fIpo/*.po\fR files for each language containing translated strings. .IP "\(bu" 2 Each input file receives an \f(CW\*(C`.old\*(C'\fR suffix, and a new master file overwrites the old one; it is identical to the previous master file except that an underscore is prepended to translatable fields. Developers can then choose which fields translators have to work on and which ones are skipped because their values are not locale-dependent. .IP "\(bu" 2 A \fIpo/POTFILES.in\fR file is also created, it contains the list of \fItemplates\fR files \fBdebconf-updatepo\fR has to process. .PP Typically the \fBdebconf-gettextize\fR program must be run only once when transforming from the first implementation to the \f(CW\*(C`po\-debconf\*(C'\fR format, but it can also be used afterwards to transform a \f(CW\*(C`_Choices\*(C'\fR field into \f(CW\*(C`_\|_Choices\*(C'\fR (or vice-versa) without losing translations, when using the \f(CW\*(C`\-\-merge\*(C'\fR flag (alongside with \f(CW\*(C`\-\-choices\*(C'\fR or not). The desired template containing the \f(CW\*(C`_Choices\*(C'\fR or \f(CW\*(C`_\|_Choices\*(C'\fR fields to modify has to be copied into a temporary template file, which is passed to \fBdebconf-gettextize\fR as an argument. Then the following steps are performed: .IP "1." 3 \&\fBpo2debconf\fR is run on this template file to generate a translated templates file. .IP "2." 3 This translated templates file is processed as described above and \s-1PO\s0 files are generated. .IP "3." 3 Newly created \s-1PO\s0 files are merged with existing ones. .PP When \s-1PO\s0 files are merged, \f(CW\*(C`_Choices\*(C'\fR fields have to be replaced by \f(CW\*(C`_\|_Choices\*(C'\fR (or vice-versa) in the original templates file before running \fBdebconf-updatepo\fR, otherwise new translations will be fuzzy. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Display a usage summary for the program and exit. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 .IX Item "-v, --verbose" Process in verbose mode. .IP "\fB\-\-podir=\f(BI\s-1DIR\s0\fB\fR" 4 .IX Item "--podir=DIR" Set directory for \s-1PO\s0 files. Default is to search for \s-1PO\s0 files in the \fIpo\fR subdirectory below the location of the first master file. .IP "\fB\-\-choices\fR" 4 .IX Item "--choices" By default, \fBdebconf-gettextize\fR replaces \f(CW\*(C`Choices\*(C'\fR fields by \&\f(CW\*(C`_Choices\*(C'\fR. With this flag, \f(CW\*(C`_\|_Choices\*(C'\fR fields are written instead. .IP "\fB\-\-merge\fR" 4 .IX Item "--merge" When this flag is set, the strings are merged with existing \s-1PO\s0 files. The templates files and \fIpo/POTFILES.in\fR are not modified. .SH "CAVEATS" .IX Header "CAVEATS" The \f(CW\*(C`Default\*(C'\fR field is special when template type is \f(CW\*(C`Select\*(C'\fR or \&\f(CW\*(C`Multiselect\*(C'\fR, because a value has to be chosen amongst the \fBEnglish\fR list of choices, even for localized values. Normally this field must not be changed, but in rare circumstances localized values are meaningful (e.g. to choose the default language of an application). In order to let translators know that this localized \f(CW\*(C`Default\*(C'\fR field is special, you must by convention call it \f(CW\*(C`_DefaultChoice\*(C'\fR instead of \&\f(CW\*(C`_Default\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIdebconf\-updatepo\fR\|(1), \&\fIpo2debconf\fR\|(1), \&\fIdebconf\-devel\fR\|(7), \&\fIpo\-debconf\fR\|(7). .SH "AUTHORS" .IX Header "AUTHORS" .Vb 2 \& Denis Barbier \& Martin Quinson .Ve