Linux command
po4a 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Update PO files and translated documents from config file
po4a [path/to/config_file]
Force regeneration of all files
po4a -f [path/to/config_file]
Only update PO files, skip translated document generation
po4a --no-translations [path/to/config_file]
Set minimum translation percentage threshold
po4a -k [80] [path/to/config_file]
说明
po4a (PO for anything) maintains translations of documentation using gettext PO files. It extracts translatable strings from documents, manages PO files, and generates translated versions of documents. The tool supports many documentation formats including man pages, POD, XML, and others. It automates the workflow of keeping translations synchronized with source documents.
参数
- -f, --force
- Force processing even if files are up-to-date.
- -v, --verbose
- Increase verbosity.
- -q, --quiet
- Decrease verbosity.
- -d, --debug
- Output debugging information.
- --no-translations
- Don't generate translated documents, only update POT and PO files.
- --no-update
- Don't update POT and PO files, only generate translations.
- -k, --keep _threshold_
- Minimum translation percentage to produce output (default: 80).
- --keep-translations
- Keep existing translations even if below threshold.
- --rm-translations
- Remove translated files that fall below threshold.
- -o, --option _opt_
- Extra options for format plugins.
- -M, --master-charset _charset_
- Character encoding for source documents.
- -L, --localized-charset _charset_
- Character encoding for translated documents.
- --srcdir _dir_
- Base directory for input documents.
- --destdir _dir_
- Base directory for output documents.
- --msgmerge-opt _options_
- Additional options passed to msgmerge.
- -V, --version
- Display version and exit.
FAQ
What is the po4a command used for?
po4a (PO for anything) maintains translations of documentation using gettext PO files. It extracts translatable strings from documents, manages PO files, and generates translated versions of documents. The tool supports many documentation formats including man pages, POD, XML, and others. It automates the workflow of keeping translations synchronized with source documents.
How do I run a basic po4a example?
Run `po4a [path/to/config_file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --force do in po4a?
Force processing even if files are up-to-date.