Scroll to navigation

PO4A-UPDATEPO.1P(1) User Contributed Perl Documentation PO4A-UPDATEPO.1P(1)

名称

po4a-updatepo - 更新文档的翻译(PO 格式)

简介

po4a-updatepo -f fmt (-m master.doc)+ (-p XX.po)+

XX.po 是输出,所有其他都是输入)

描述

Po4a (PO For Anything) 项目的目标是在文档等不需要翻译的领域使用 gettext 工具简化翻译(更有趣的是,简化翻译的维护)。

po4a-updatepo负责更新 PO 文件,使其反映对原始文档文件所做的更改。为此,它将文档文件转换为 POT 文件,并在此新 POT 和提供的 PO 文件中调用 msgmerge(1)

可以提供多个 PO 文件(如果要同时更新多种语言)和多个文档文件(如果要将多个文档的翻译存储在同一个 PO 文件中)。

如果主文档包含非 ASCII 字符,该脚本将把 PO 文件转换为 UTF-8 (如果它们还没有),以便透明地处理非标准字符。

选项

要处理的文档的格式。使用 --help-format 帮助格式选项查看可用格式的列表。
包含要翻译的主文档的文件。
包含要翻译的文档的文件的字符集。请注意,所有文件必须具有相同的字符集。
要更新的 PO 文件。如果这些文件不存在,则由 B <po4a-updatepo>。
要传递给格式插件的额外选项。有关有效选项及其含义的更多信息,请参阅每个插件的文档。例如,您可以将 '-o tablecells' 传递给 AsciiDoc 解析器,而文本解析器将接受 '-o tabs=split'。
This option removes --previous from the options passed to msgmerge(1). This helps supporting old versions of gettext(3) (before v0.16).
This option adds --previous to the options passed to msgmerge(1). It requires gettext(3) 0.16 or later, and is activated by default.
Extra options for msgmerge(1).
显示简短的帮助消息。
列出 po4a 理解的文档格式。
显示脚本的版本并退出。
增加程序的冗长程度。
输出一些调试信息。
指定引用格式。参数 type 可以是以下值之一:never 不生成任何引用;file 只指定不带行号的文件;counter 用递增的计数器替换行号;full 包含完整引用(默认值:full)。

Argument can be followed by a comma and either wrap or nowrap keyword. References are written by default on a single line. The wrap option wraps references on several lines, to mimic gettext(3) tools (xgettext(1) and msgmerge(1)). This option will become the default in a future release, because it is more sensible. The nowrap option is available so that users who want to keep the old behavior can do so.

指定应如何封装 po 文件。这使我们可以选择封装良好但可能导致 git 冲突的文件,或者更容易自动处理但对人类来说更难读取的文件。

从历史上看, gettext 套件重新格式化了化妆品第 77 列的 po 文件。此选项指定 po4a 的行为。如果设置为数值,po4a 将在此列之后和内容中的换行符之后换行 po 文件。如果设置为 B <newlines>,po4a 将仅在内容中的符线后拆分 msgid 和 msgstr。如果设置为 no,po4a 将不会封装 po 文件。 引用注释的封装由 --porefs 选项控制。

Based on the value of this option, appropriate flags (--no-wrap or --width=number) will be passed to underlying gettext utilities. Unfortunately gettext doesn't provide any counterpart for --wrap-po no, so in that case --no-wrap will be passed (the same as for --wrap-po newlines).

请注意,此选项对 msgid 和 msgstr 的封装方式(即,将换行符添加到这些字符串的内容中)没有影响。

设置 msgid 错误的报告地址。 默认情况下,创建的 POT 文件没有 Report-Msgid-Bugs-To 字段。
在 POT 标头中设置版权所有者。 默认值为“自由软件基金会有限公司。”
设置 POT 标头的程序包名称。 默认值为“封装”。
设置 POT 标头的软件包版本。 默认值为“版本”。

参见

po4a-gettextize(1), po4a-normalize(1), po4a-translate(1), po4a(7)

作者

 Denis Barbier <barbier@linuxfr.org>
 Nicolas François <nicolas.francois@centraliens.net>
 Martin Quinson (mquinson#debian.org)

翻译

taotieren <admin@taotieren.com>

版权和许可

Copyright 2002-2023 by SPI, inc.

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).

2026-03-23 perl v5.42.0