1PO4A-TRANSLATE(1p)                Po4a Tools                PO4A-TRANSLATE(1p)
2
3
4

NAME

6       po4a-translate - convert a PO file back to documentation format
7

SYNOPSIS

9       po4a-translate -f fmt -m master.doc -p XX.po -l XX.doc
10
11       (XX.doc is the output, all others are inputs)
12

DESCRIPTION

14       The po4a (PO for anything) project goal is to ease translations (and
15       more interestingly, the maintenance of translations) using gettext
16       tools on areas where they were not expected like documentation.
17
18       The po4a-translate script is in charge of converting the translation
19       (which was done in a PO file) back into the documentation format. The
20       provided PO file should be the translation of the POT file which was
21       produced by po4a-gettextize(1).
22

OPTIONS

24       -f, --format
25           Format of the documentation you want to handle. Use the
26           --help-format option to see the list of available formats.
27
28       -a, --addendum
29           Add a file to the resulting file (to put translator's name or a
30           section "About this translation", for example). The first line of
31           the file to insert should be a PO4A header indicating where it
32           should be added (see section HOWTO add extra text to translations
33           in po4a(7)).
34
35       -A, --addendum-charset
36           Charset of the addenda. Note that all the addenda should be in the
37           same charset.
38
39       -m, --master
40           File containing the master document to translate.
41
42       -M, --master-charset
43           Charset of the file containing the document to translate.
44
45       -l, --localized
46           File where the localized (translated) document should be written.
47
48       -L, --localized-charset
49           Charset of the file containing the localized document.
50
51       -p, --po
52           File from which the message catalog should be read.
53
54       -o, --option
55           Extra option(s) to pass to the format plugin. See the documentation
56           of each plugin for more information about the valid options and
57           their meanings. For example, you could pass '-o tablecells' to the
58           AsciiDoc parser, while the text parser would accept '-o
59           tabs=split'.
60
61       -k, --keep
62           Minimal threshold for translation percentage to keep (i.e. write)
63           the resulting file (default: 80). I.e. by default, files have to be
64           translated at least at 80% to get written.
65
66       -w, --width
67           Column at which we should wrap the resulting file.
68
69       -h, --help
70           Show a short help message.
71
72       --help-format
73           List the documentation formats understood by po4a.
74
75       -V, --version
76           Display the version of the script and exit.
77
78       -v, --verbose
79           Increase the verbosity of the program.
80
81       -d, --debug
82           Output some debugging information.
83
84       --porefs type[,wrap|nowrap]
85           Specify the reference format. Argument type can be one of never to
86           not produce any reference, file to only specify the file without
87           the line number, counter to replace line number by an increasing
88           counter, and full to include complete references (default: full).
89
90           Argument can be followed by a comma and either wrap or nowrap
91           keyword.  References are written by default on a single line.  The
92           wrap option wraps references on several lines, to mimic gettext
93           tools (xgettext and msgmerge).  This option will become the default
94           in a future release, because it is more sensible.  The nowrap
95           option is available so that users who want to keep the old behavior
96           can do so.
97
98       --wrap-po no|newlines|number (default: 76)
99           Specify how the po file should be wrapped. This gives the choice
100           between either files that are nicely wrapped but could lead to git
101           conflicts, or files that are easier to handle automatically, but
102           harder to read for humans.
103
104           Historically, the gettext suite has reformatted the po files at the
105           77th column for cosmetics. This option specifies the behavior of
106           po4a. If set to a numerical value, po4a will wrap the po file after
107           this column and after newlines in the content. If set to newlines,
108           po4a will only split the msgid and msgstr after newlines in the
109           content. If set to no, po4a will not wrap the po file at all.  The
110           wrapping of the reference comments is controlled by the --porefs
111           option.
112
113           Note that this option has no impact on how the msgid and msgstr are
114           wrapped, ie on how newlines are added to the content of these
115           strings.
116

Adding content (beside translations) to generated files

118       To add some extra content to the generated document beside what you
119       translated (like the name of the translator, or an "About this
120       translation" section), you should use the --addendum option.
121
122       The first line of the addendum must be a header indicating where to put
123       it in the document (it can be before or after a given part of the
124       document).  The rest of the file will be added verbatim to the
125       resulting file without further processing.
126
127       Note that if po4a-translate fails to add one of the given files, it
128       discards the whole translation (because the missing file could be the
129       one indicating the author, what would prevent the users to contact him
130       to report bugs in the translation).
131
132       The header has a pretty rigid syntax. For more information on how to
133       use this feature and how it works, please refer to the po4a(7) man
134       page.
135

SEE ALSO

137       po4a-gettextize(1), po4a-normalize(1), po4a-updatepo(1), po4a(7)
138

AUTHORS

140        Denis Barbier <barbier@linuxfr.org>
141        Nicolas François <nicolas.francois@centraliens.net>
142        Martin Quinson (mquinson#debian.org)
143
145       Copyright 2002-2020 by SPI, inc.
146
147       This program is free software; you may redistribute it and/or modify it
148       under the terms of GPL (see the COPYING file).
149
150
151
152Po4a Tools                        2023-01-23                PO4A-TRANSLATE(1p)
Impressum