.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 turned on, 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::Sgml 3pm" .TH Locale::Po4a::Sgml 3pm "2016-01-05" "Po4a Tools" "Po4a Tools" .\" 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::Sgml \- \s-1PO\s0 ファイルと \s-1SGML\s0 ドキュメントの変換 .SH "説明" .IX Header "説明" po4a (\s-1PO\s0 for anything) プロジェクトは、gettext ツールが想定していないドキュメントのような領域で翻訳をしやすくすること (またより興味深いのは、翻訳文の保守がしやすくなること) を目標にしています。 .PP Locale::Po4a::Sgml は、SGML フォーマットのドキュメントを他の [自然] 言語へ翻訳するのを助けるモジュールです。 .PP This module uses \fBonsgmls\fR(1) to parse the \s-1SGML\s0 files. Make sure it is installed. Also make sure that the \s-1DTD\s0 of the \s-1SGML\s0 files are installed in the system. .SH "このモジュールで使用できるオプション" .IX Header "このモジュールで使用できるオプション" .IP "\fBdebug\fR" 4 .IX Item "debug" デバッグしたい場所を示す、空白区切りのキーワードリストを表示します。取り得る値は、tag, generic, entities, refs です。 .IP "\fBverbose\fR" 4 .IX Item "verbose" どのように実行しているかの、より詳細な情報を出力します。 .IP "\fBtranslate\fR" 4 .IX Item "translate" 内容が追加 msgid の形になる、追加タグ (\s-1DTD\s0 の範囲外) の空白区切りリストです。 .IP "\fBsection\fR" 4 .IX Item "section" \&\fBtranslate\fR カテゴリ内の他のタグを中に含む、追加タグ (\s-1DTD\s0 の範囲外) の空白区切りリストです。 .IP "\fBindent\fR" 4 .IX Item "indent" インデントレベルを増やすタグの、空白区切りリストです。 .IP "\fBverbatim\fR" 4 .IX Item "verbatim" そのタグのレイアウトを変更されません。段落は折り返されず、インデントのための空白は追加されず、見栄えのための空行追加もされません。 .IP "\fBempty\fR" 4 .IX Item "empty" 閉じる必要のないタグです。 .IP "\fBignore\fR" 4 .IX Item "ignore" 無視され、po4a がただの文字列として扱うタグです。つまり、msgid の一部として扱えます。例えば、 はこのカテゴリの良い例です。 が翻訳セクションに入ってしまうと、文全体が入った msgid が作られなくなってしまいます。これはまずいです。 .IP "\fBattributes\fR" 4 .IX Item "attributes" 翻訳する必要のある属性の、空白区切りリストです。属性を名前 (例: \*(L"lang\*(R") で指定できますが、特定のタグの中にあるときだけこの属性を訳すように、タグ階層を前につけることもできます。例えば、lang は、 タグの中にある、 タグの中にある場合に、lang 属性を訳すということを示しています。タグ名は、実際には正規表現ですから、lang のように書いた場合は、 タグか タグの中にある lang 属性のみを訳せます。 .IP "\fBqualify\fR" 4 .IX Item "qualify" 翻訳が属性名で修飾しなければならない属性の、空白区切りのリストです。この設定に与えた属性は、自動的に 'attributes' リストにも追加されることに注意してください。 .IP "\fBforce\fR" 4 .IX Item "force" Proceed even if the \s-1DTD\s0 is unknown or if onsgmls finds errors in the input file. .IP "\fBinclude-all\fR" 4 .IX Item "include-all" デフォルトでは、('&version;' のような) エンティティを一つだけ含む msgid は、翻訳者の便宜のためスキップします。このオプションを有効にすると、この最適化を行わなくなります。これは、\*(L"Á\*(R" のような構造を含むドキュメントには便利です。とはいえ、そのようなことがそんなにあるかは疑わしいです…… .IP "\fBignore-inclusion\fR" 4 .IX Item "ignore-inclusion" Space separated list of entities that won't be inlined. Use this option with caution: it may cause onsgmls (used internally) to add tags and render the output document invalid. .SH "このモジュールの状態" .IX Header "このモジュールの状態" 結果は完璧です。言い換えると生成したドキュメントは完全に一致しています。しかし、まだ以下のような問題があります。 .IP "\(bu" 2 The error output of onsgmls is redirected to /dev/null, which is clearly bad. I don't know how to avoid that. .Sp The problem is that I have to \*(L"protect\*(R" the conditional inclusions (i.e. the \&\f(CW\*(C`\*(C'\fR stuff) from onsgmls. Otherwise onsgmls eats them, and I don't know how to restore them in the final document. To prevent that, I rewrite them to \f(CW\*(C`{PO4A\-beg\-foo}\*(C'\fR and \f(CW\*(C`{PO4A\-end}\*(C'\fR. .Sp The problem with this is that the \f(CW\*(C`{PO4A\-end}\*(C'\fR and such I add are invalid in the document (not in a

tag or so). .Sp Everything works well with onsgmls's output redirected that way, but it will prevent us from detecting that the document is badly formatted. .IP "\(bu" 2 DebianDoc \s-1DTD\s0 と DocBook \s-1DTD\s0 でのみ動作します。新しい \s-1DTD\s0 のサポートを追加するのは非常に簡単でしょう。仕組みはすべての \&\s-1DTD\s0 で同じで、既存のタグのリストとその特徴を与えるだけです。 .Sp 確かに、もっとドキュメントの記述が必要です。しかし、これはまだベータ版ですし、変わることが予想されるものの記述を行うのがイヤなのです。 .IP "\(bu" 2 警告: \s-1DTD\s0 のサポートは非常に実験的です。すべてのタグの定義を見つけるのに、リファレンスマニュアルを読んだわけではありません。ネットで見つかるドキュメントで動作するように、このモジュールにタグの定義を追加しました。あなたのドキュメントが私のよりも多くの種類のタグを使用している場合、動作しないでしょう。しかし前述の通り、修正は非常に簡単です。 .Sp DocBook のテストは \s-1SAG \s0(System Administrator Guide) でのみ行いましたが、このドキュメントは非常に大きく、DocBook の仕様のほとんどを使用していると考えています。 .Sp DebianDoc に対しては、DDP にあるマニュアルでテストをしています。しかしまだ、すべてではありません。 .IP "\(bu" 2 ファイルの取り込みを行う場合、PO ファイルにあるメッセージの参照文字列 (例: \f(CW\*(C`#: en/titletoc.sgml:9460\*(C'\fR のような行) は誤りが発生するでしょう。 .Sp This is because I preprocess the file to protect the conditional inclusion (i.e. the \f(CW\*(C`\*(C'\fR stuff) and some entities (like &version;) from onsgmls because I want them verbatim to the generated document. For that, I make a temp copy of the input file and do all the changes I want to this before passing it to onsgmls for parsing. .Sp こうするためには、与えられたファイルの内容により、ファイルの取り込みを確認しながらエンティティを置換します (サブファイルでも必要とあらば保護できるように)。ですが今のところ、後で参照 (例えばファイル名や行番号) を修正するということは行いません。どのようにするのが正しいのか、私にはよくわかりません。 .SH "著者" .IX Header "著者" This module is an adapted version of sgmlspl (\s-1SGML\s0 postprocessor for the \&\s-1ONSGMLS\s0 parser) which was: .PP .Vb 1 \& Copyright (c) 1995 by David Megginson .Ve .PP po4a への適合は以下のメンバーが行いました。 .PP .Vb 2 \& Denis Barbier \& Martin Quinson (mquinson#debian.org) .Ve .SH "訳者" .IX Header "訳者" .Vb 2 \& 倉澤 望 \& Debian JP Documentation ML .Ve .SH "著作権・ライセンス" .IX Header "著作権・ライセンス" .Vb 2 \& Copyright (c) 1995 by David Megginson \& Copyright 2002, 2003, 2004, 2005 by SPI, inc. .Ve .PP 本プログラムはフリーソフトウェアです。GPL の条項に基づき再頒布と変更を行うことができます (\s-1COPYING\s0 ファイルをご覧ください)。