.\" -*- 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-UPDATEPO.1P 1" .TH PO4A-UPDATEPO.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 名称 .IX Header "名称" po4a\-updatepo \- 更新文档的翻译(PO 格式) .SH 简介 .IX Header "简介" \&\fBpo4a\-updatepo\fR \fB\-f\fR \fIfmt\fR (\fB\-m\fR \fImaster.doc\fR)+ (\fB\-p\fR \fIXX.po\fR)+ .PP (\fIXX.po\fR 是输出,所有其他都是输入) .SH 描述 .IX Header "描述" Po4a (PO For Anything) 项目的目标是在文档等不需要翻译的领域使用 gettext 工具简化翻译(更有趣的是,简化翻译的维护)。 .PP \&\fBpo4a\-updatepo\fR负责更新 PO 文件,使其反映对原始文档文件所做的更改。为此,它将文档文件转换为 POT 文件,并在此新 POT 和提供的 PO 文件中调用 \fBmsgmerge\fR\|(1) 。 .PP 可以提供多个 PO 文件(如果要同时更新多种语言)和多个文档文件(如果要将多个文档的翻译存储在同一个 PO 文件中)。 .PP 如果主文档包含非 ASCII 字符,该脚本将把 PO 文件转换为 UTF\-8 (如果它们还没有),以便透明地处理非标准字符。 .SH 选项 .IX Header "选项" .IP "\fB\-f\fR, \fB\-\-format\fR" 4 .IX Item "-f, --format" 要处理的文档的格式。使用 \fB\-\-help\-format\fR 帮助格式选项查看可用格式的列表。 .IP "\fB\-m\fR, \fB\-\-master\fR" 4 .IX Item "-m, --master" 包含要翻译的主文档的文件。 .IP "\fB\-M\fR, \fB\-\-master\-charset\fR" 4 .IX Item "-M, --master-charset" 包含要翻译的文档的文件的字符集。请注意,所有文件必须具有相同的字符集。 .IP "\fB\-p\fR, \fB\-\-po\fR" 4 .IX Item "-p, --po" 要更新的 PO 文件。如果这些文件不存在,则由 B 。 .IP "\fB\-o\fR, \fB\-\-option\fR" 4 .IX Item "-o, --option" 要传递给格式插件的额外选项。有关有效选项及其含义的更多信息,请参阅每个插件的文档。例如,您可以将 '\-o tablecells' 传递给 AsciiDoc 解析器,而文本解析器将接受 '\-o tabs=split'。 .IP \fB\-\-no\-previous\fR 4 .IX Item "--no-previous" This option removes \fB\-\-previous\fR from the options passed to \fBmsgmerge\fR. This helps supporting old versions of \fBgettext\fR (before v0.16). .IP \fB\-\-previous\fR 4 .IX Item "--previous" 此选项 \fB\-\-previous\fR 添加到传递给 \fBmsgmerge\fR 的选项中。它需要 \fBgettext\fR 0.16 或更高版本,并在默认情况下激活。 .IP "\fB\-\-msgmerge\-opt\fR \fIoptions\fR" 4 .IX Item "--msgmerge-opt options" \&\fBmsgmerge\fR(1) 的其他选项。 .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" 显示简短的帮助消息。 .IP \fB\-\-help\-format\fR 4 .IX Item "--help-format" 列出 po4a 理解的文档格式。 .IP "\fB\-V\fR, \fB\-\-version\fR" 4 .IX Item "-V, --version" 显示脚本的版本并退出。 .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 .IX Item "-v, --verbose" 增加程序的冗长程度。 .IP "\fB\-d\fR, \fB\-\-debug\fR" 4 .IX Item "-d, --debug" 输出一些调试信息。 .IP "\fB\-\-porefs\fR \fItype\fR[,\fBwrap\fR|\fBnowrap\fR]" 4 .IX Item "--porefs type[,wrap|nowrap]" 指定引用格式。参数 \fItype\fR 可以是以下值之一:\fBnever\fR 不生成任何引用;\fBfile\fR 只指定不带行号的文件;\fBcounter\fR 用递增的计数器替换行号;\fBfull\fR 包含完整引用(默认值:full)。 .Sp 参数后跟逗号和 \fBwrap\fR \fBnowrap\fR 关键字。 默认情况下,引用在一行上写入。 \fBwrap\fR 将引用封装在多行上,以模拟 \fBgettext\fR工具(\fBxgettext\fR \fBmsgmerge\fR)。 此选项将成为将来版本中的默认值,因为它更明智。 \fBnowrap\fR 选项可用,以便想要保留旧行为的用户可以这样做。 .IP "\fB\-\-wrap\-po\fR \fBno\fR|\fBnewlines\fR|\fInumber\fR (default: 76)" 4 .IX Item "--wrap-po no|newlines|number (default: 76)" 指定应如何封装 po 文件。这使我们可以选择封装良好但可能导致 git 冲突的文件,或者更容易自动处理但对人类来说更难读取的文件。 .Sp 从历史上看, gettext 套件重新格式化了化妆品第 77 列的 po 文件。此选项指定 po4a 的行为。如果设置为数值,po4a 将在此列之后和内容中的换行符之后换行 po 文件。如果设置为 B ,po4a 将仅在内容中的符线后拆分 msgid 和 msgstr。如果设置为 \fBno\fR,po4a 将不会封装 po 文件。 引用注释的封装由 \fB\-\-porefs\fR 选项控制。 .Sp 请注意,此选项对 msgid 和 msgstr 的封装方式(即,将换行符添加到这些字符串的内容中)没有影响。 .IP "\fB\-\-msgid\-bugs\-address\fR \fIemail@address\fR" 4 .IX Item "--msgid-bugs-address email@address" 设置 msgid 错误的报告地址。 默认情况下,创建的 POT 文件没有 Report-Msgid-Bugs-To 字段。 .IP "\fB\-\-copyright\-holder\fR \fIstring\fR" 4 .IX Item "--copyright-holder string" 在 POT 标头中设置版权所有者。 默认值为“自由软件基金会有限公司。” .IP "\fB\-\-package\-name\fR \fIstring\fR" 4 .IX Item "--package-name string" 设置 POT 标头的程序包名称。 默认值为“封装”。 .IP "\fB\-\-package\-version\fR \fIstring\fR" 4 .IX Item "--package-version string" 设置 POT 标头的软件包版本。 默认值为“版本”。 .SH 参见 .IX Header "参见" \&\fBpo4a\-gettextize\fR\|(1), \fBpo4a\-normalize\fR\|(1), \fBpo4a\-translate\fR\|(1), \fBpo4a\fR\|(7) .SH 作者 .IX Header "作者" .Vb 3 \& Denis Barbier \& Nicolas François \& Martin Quinson (mquinson#debian.org) .Ve .SH 翻译 .IX Header "翻译" taotieren .SH 版权和许可 .IX Header "版权和许可" 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).