.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PO4A-TRANSLATE.1P 1" .TH PO4A-TRANSLATE.1P 1 2024-06-26 "perl v5.38.2" "User Contributed Perl Documentation" .\" 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 po4a\-translate \- convert a PO file back to documentation format .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBpo4a\-translate\fR \fB\-f\fR \fIfmt\fR \fB\-m\fR \fImaster.doc\fR \fB\-p\fR \fIXX.po\fR \fB\-l\fR \fIXX.doc\fR .PP (\fIXX.doc\fR is the output, all others are inputs) .SH DESCRIPTION .IX Header "DESCRIPTION" The po4a (PO for anything) project goal is to ease translations (and more interestingly, the maintenance of translations) using gettext tools on areas where they were not expected like documentation. .PP The \fBpo4a\-translate\fR script is in charge of converting the translation (which was done in a PO file) back into the documentation format. The provided PO file should be the translation of the POT file which was produced by \fBpo4a\-gettextize\fR\|(1). .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-f\fR, \fB\-\-format\fR" 4 .IX Item "-f, --format" Format of the documentation you want to handle. Use the \fB\-\-help\-format\fR option to see the list of available formats. .IP "\fB\-a\fR, \fB\-\-addendum\fR" 4 .IX Item "-a, --addendum" Add a file to the resulting file (to put translator's name or a section "About this translation", for example). The first line of the file to insert should be a PO4A header indicating where it should be added (see section \&\fBHOWTO add extra text to translations\fR in \fBpo4a\fR\|(7)). .IP "\fB\-A\fR, \fB\-\-addendum\-charset\fR" 4 .IX Item "-A, --addendum-charset" Charset of the addenda. Note that all the addenda should be in the same charset. .IP "\fB\-m\fR, \fB\-\-master\fR" 4 .IX Item "-m, --master" File containing the master document to translate. .IP "\fB\-M\fR, \fB\-\-master\-charset\fR" 4 .IX Item "-M, --master-charset" Charset of the file containing the document to translate. .IP "\fB\-l\fR, \fB\-\-localized\fR" 4 .IX Item "-l, --localized" File where the localized (translated) document should be written. .IP "\fB\-L\fR, \fB\-\-localized\-charset\fR" 4 .IX Item "-L, --localized-charset" Charset of the file containing the localized document. .IP "\fB\-p\fR, \fB\-\-po\fR" 4 .IX Item "-p, --po" File from which the message catalog should be read. .IP "\fB\-o\fR, \fB\-\-option\fR" 4 .IX Item "-o, --option" Extra option(s) to pass to the format plugin. See the documentation of each plugin for more information about the valid options and their meanings. For example, you could pass '\-o tablecells' to the AsciiDoc parser, while the text parser would accept '\-o tabs=split'. .IP "\fB\-k\fR, \fB\-\-keep\fR" 4 .IX Item "-k, --keep" Minimal threshold for translation percentage to keep (i.e. write) the resulting file (default: 80). I.e. by default, files have to be translated at least at 80% to get written. .IP "\fB\-w\fR, \fB\-\-width\fR" 4 .IX Item "-w, --width" Column at which we should wrap the resulting file if the format supports it (default: 76). .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Show a short help message. .IP \fB\-\-help\-format\fR 4 .IX Item "--help-format" List the documentation formats understood by po4a. .IP "\fB\-V\fR, \fB\-\-version\fR" 4 .IX Item "-V, --version" Display the version of the script and exit. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 .IX Item "-v, --verbose" Increase the verbosity of the program. .IP "\fB\-d\fR, \fB\-\-debug\fR" 4 .IX Item "-d, --debug" Output some debugging information. .IP "\fB\-\-porefs\fR \fItype\fR[,\fBwrap\fR|\fBnowrap\fR]" 4 .IX Item "--porefs type[,wrap|nowrap]" Specify the reference format. Argument \fItype\fR can be one of \fBnever\fR to not produce any reference, \fBfile\fR to only specify the file without the line number, \fBcounter\fR to replace line number by an increasing counter, and \fBfull\fR to include complete references (default: full). .Sp Argument can be followed by a comma and either \fBwrap\fR or \fBnowrap\fR keyword. References are written by default on a single line. The \fBwrap\fR option wraps references on several lines, to mimic \fBgettext\fR tools (\fBxgettext\fR and \&\fBmsgmerge\fR). This option will become the default in a future release, because it is more sensible. The \fBnowrap\fR option is available so that users who want to keep the old behavior can do so. .SH "Adding content (beside translations) to generated files" .IX Header "Adding content (beside translations) to generated files" To add some extra content to the generated document beside what you translated (like the name of the translator, or an "About this translation" section), you should use the \fB\-\-addendum\fR option. .PP The first line of the addendum must be a header indicating where to put it in the document (it can be before or after a given part of the document). The rest of the file will be added verbatim to the resulting file without further processing. .PP Note that if po4a\-translate fails to add one of the given files, it discards the whole translation (because the missing file could be the one indicating the author, what would prevent the users to contact him to report bugs in the translation). .PP The header has a pretty rigid syntax. For more information on how to use this feature and how it works, please refer to the \fBpo4a\fR\|(7) man page. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBpo4a\-gettextize\fR\|(1), \&\fBpo4a\-normalize\fR\|(1), \&\fBpo4a\-updatepo\fR\|(1), \&\fBpo4a\fR\|(7) .SH AUTHORS .IX Header "AUTHORS" .Vb 3 \& Denis Barbier \& Nicolas François \& Martin Quinson (mquinson#debian.org) .Ve .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2002\-2023 by SPI, inc. .PP This program is free software; you may redistribute it and/or modify it under the terms of GPL v2.0 or later (see the COPYING file).