.\" -*- 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 "版權和許可" .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).