.\" -*- 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 "LOCALE::PO4A::ASCIIDOC.3PM 1" .TH LOCALE::PO4A::ASCIIDOC.3PM 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 "名称" Locale::Po4a::AsciiDoc \- 从/到 PO 文件转换 AsciiDoc 文档 .SH 描述 .IX Header "描述" Po4a (PO For Anything) 项目的目标是在文档等不需要翻译的领域使用 gettext 工具简化翻译(更有趣的是,简化翻译的维护)。 .PP Locale::Po4a::AsciiDoc 是一个帮助翻译 AsciiDoc 格式文档的模块。 .SH 此模块接受的选项 .IX Header "此模块接受的选项" 以下是此模块的特定选项: .IP \fBdefinitions\fR 4 .IX Item "definitions" 包含 po4a 定义的文件的名称,如 \fBINLINE CUSTOMIZATION\fR 部分中定义。 如果无法将定义放在要翻译的文档中,可以使用此选项。 .Sp 在定义文件中,行不能以两个斜杠开始,而直接由 \fBpo4a:\fR 开始。 .IP \fBentry\fR 4 .IX Item "entry" 要转换的属性条目的空格分隔列表。默认情况下,没有属性条目是可翻译的。 .IP \fBmacro\fR 4 .IX Item "macro" 空格分隔的宏定义列表。 .IP \fBstyle\fR 4 .IX Item "style" 以空格分隔的样式定义列表。 .IP \fBforcewrap\fR 4 .IX Item "forcewrap" 启用非逐字块中的自动行换行,即使结果可能被 AsciiDoc 格式器误解。 .Sp 默认情况下,po4a 不会对生成的 AsciiDoc 文件进行封装,因为强制执行手动检查以确保封装不会更改格式。例如,请考虑以下列表项: .Sp .Vb 1 \& * 以数字结尾的长句。1. 第二句。 .Ve .Sp 如果换行指向以下演示文稿,则该项目将被拆分到一个带编号的子列表中。更糟糕的是,只有使用翻译语言的人才能检查情况。 .Sp .Vb 2 \& * 以数字结尾的长句 \& 1. 第二句话。 .Ve .Sp 请注意,不封装 po4a 生成的文件应该不是问题,因为这些文件是自动处理的。它们无论如何都不应该被视为源文件。 .Sp With this option, po4a will produce better-looking AsciiDoc files, but it may lead to possibly erroneous formatted outputs. .IP \fBnoimagetargets\fR 4 .IX Item "noimagetargets" 默认情况下,块图像的目标是可翻译的,以提供使内容指向已翻译图像的机会。可以通过设置此选项来停止此操作。 .IP \fBtablecells\fR 4 .IX Item "tablecells" 此选项是启用子表分割为单元格内容的标志。分割仅限于单元格内容,其中没有任何解析。 .IP \fBcompat\fR 4 .IX Item "compat" 将解析规则切换为与不同工具兼容。可用选项为 "asciidoc" 或 "asciidoctor"。Asciidoctor 有更严格的解析规则,例如打开和关闭块围栏的长度相等。 .IP \fBnolinting\fR 4 .IX Item "nolinting" 禁用发送邮件。当无法修复源代码以使文档结构更清晰时,这些消息将毫无用处。 .IP \fBcleanspaces\fR 4 .IX Item "cleanspaces" Remove extra spaces from the source segments in no-wrap mode. This is useful when the translation tools are sensitive to the number of spaces. .IP \fByfm_keys\fR 4 .IX Item "yfm_keys" Comma-separated list of keys to process for translation in the YAML Front Matter section. All other keys are skipped. Keys are matched with a case-sensitive match. If \fByfm_paths\fR and \fByfm_keys\fR are used together, values are included if they are matched by at least one of the options. Array values are always translated, unless the \fByfm_skip_array\fR option is provided. .IP \fByfm_skip_array\fR 4 .IX Item "yfm_skip_array" 不要转换 YAML Front Matter 部分中的数组值。 .IP \fByfm_paths\fR 4 .IX Item "yfm_paths" Comma-separated list of hash paths to process for extraction in the YAML Front Matter section, all other paths are skipped. Paths are matched with a case-sensitive match. If \fByfm_paths\fR and \fByfm_keys\fR are used together, values are included if they are matched by at least one of the options. Arrays values are always returned unless the \fByfm_skip_array\fR option is provided. .SH 在线定制 .IX Header "在线定制" AsciiDoc 模块可自定义由 \fB//po4a:\fR。 这些行被解释为解析器的命令。 识别以下命令: .IP "\fB//po4a: macro \fR\fIname\fR\fB[\fR\fIattribute list\fR\fB]\fR" 4 .IX Item "//po4a: macro name[attribute list]" 这详细描述 \fBmacro\fR 的参数;\fIname\fR 必须是有效的宏名称,如果必须翻译目标,则以下划线结束。 .Sp \&\fIattribute list\fR 参数是一个逗号分隔的列表,其中包含有关可翻译参数的信息。此列表包含用于定义位置参数的数字或命名属性。 .Sp 如果 \fIname\fR 前面加了一个加号 (\fB+\fR),则宏及其参数将作为一个整体进行转换。这种情况下不需要定义属性列表,但必须有方括号。 .IP "\fB//po4a: style \fR\fB[\fR\fIattribute list\fR\fB]\fR" 4 .IX Item "//po4a: style [attribute list]" 这详细描述了必须翻译样式的哪些属性。 .Sp \&\fIattribute list\fR 参数是一个逗号分隔的列表,其中包含有关可翻译参数的信息。此列表包含用于定义位置参数的数字或命名属性。第一个属性是样式名称,它不会被翻译。 .Sp 如果样式名称前面有加号 (\fB+\fR),则属性列表将作为整体进行转换。不需要定义可翻译属性。 .Sp 如果样式名称前面有减号 (\fB\-\fR),则不会转换此属性。 .IP "\fB//po4a: entry \fR\fIname\fR" 4 .IX Item "//po4a: entry name" 这将属性条目声明为可翻译。默认情况下,它们不会被翻译。 .SH 此模块的状态 .IX Header "此模块的状态" 在简单的 AsciiDoc 文件上测试成功。 .SH 作者 .IX Header "作者" .Vb 2 \& Nicolas François \& Denis Barbier .Ve .SH 翻译 .IX Header "翻译" taotieren .SH 版权和许可 .IX Header "版权和许可" .Vb 3 \& 版权所有 © 2005\-2008 Nicolas FRANÇOIS . \& 版权所有 © 2012 Denis BARBIER . \& 版权所有 © 2017 Martin Quinson . .Ve .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).