← 返回命令列表

Linux command

po4a-translate 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert a translated PO file back to a document

po4a-translate -f [text] -m [path/to/master.doc] -p [path/to/result.po] -l [path/to/translated.txt]

Require at least 90% translation before generating output

po4a-translate -f [man] -m [path/to/master.1] -p [path/to/result.po] -l [path/to/translated.1] -k 90

Add a translator credits addendum to the output

po4a-translate -f [text] -m [path/to/master.doc] -p [path/to/result.po] -l [path/to/translated.txt] -a [path/to/addendum]

List all available formats

po4a-translate --help-format

说明

po4a-translate converts a translated PO file back into the original documentation format. It takes the master document and a PO file containing translations (typically created by po4a-gettextize), then produces a localized version of the document. The tool is part of the po4a (PO for anything) suite, which helps maintain translations of documentation using the gettext methodology. This allows translators to work with PO files while the final output retains the original document format.

参数

-f, --format _format_
Format of the master document (text, pod, man, sgml, xml, etc.)
-m, --master _file_
Path to the original (master) document.
-p, --po _file_
Path to the translated PO file.
-l, --localized _file_
Output path for the translated document.
-k, --keep _percent_
Minimum translation percentage required to produce output (default: 80).
-a, --addendum _file_
Add supplementary content to the translated document (e.g., translator credits). Can be specified multiple times.
-o, --option _key=value_
Pass extra parameters to the format plugin.
-w, --width _columns_
Line wrapping column (default: 76). Use 0 or negative to disable wrapping.
-M, --master-charset _charset_
Character set of the master document.
-L, --localized-charset _charset_
Character set of the output document.
-A, --addendum-charset _charset_
Character set of the addendum files.
--help-format
List available document formats.
-v, --verbose
Increase verbosity of output.
-d, --debug
Output debugging information.
-h, --help
Display help message.
-V, --version
Show version information.

FAQ

What is the po4a-translate command used for?

po4a-translate converts a translated PO file back into the original documentation format. It takes the master document and a PO file containing translations (typically created by po4a-gettextize), then produces a localized version of the document. The tool is part of the po4a (PO for anything) suite, which helps maintain translations of documentation using the gettext methodology. This allows translators to work with PO files while the final output retains the original document format.

How do I run a basic po4a-translate example?

Run `po4a-translate -f [text] -m [path/to/master.doc] -p [path/to/result.po] -l [path/to/translated.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f, --format _format_ do in po4a-translate?

Format of the master document (text, pod, man, sgml, xml, etc.)