Scroll to navigation

PO4A-BUILD(1) PO4A PO4A-BUILD(1)

名前

po4a-build - 翻訳済みドキュメントのビルド

概要

po4a-build [-f | --file FILE] [--pot-only]

po4a-build [-? | -h | --help | --version]

説明

po4a-build は、未訳を提供するのと同じ簡単さで、翻訳済みドキュメントを提供できるようにすることを意図しています。

po4a が POD や DocBook XML として翻訳済み内容を用意すると、po4a-build を使用して最終ドキュメントをビルドできます。未訳と翻訳済みの両方の内容は一度の処理でビルドされ、併せて同時に POT ファイルの更新も行われます。

既存のビルド手順は po4a-build の一回の呼び出しに置き換えられます。po4a-build が参照するシンプルな設定ファイルが使用され、その中には各要素をビルドする方法や、翻訳済みと未訳の内容をインクルードするバイナリパッケージの指定が記述されます。

ビルドされた内容は、設定ファイルで指定された BASEDIR の下のパッケージ固有のディレクトリに置かれます。バイナリパッケージ foo にドイツ語とフランス語の翻訳がある場合、以下のような結果になります:

BASEDIR/foo/man/man1/foo.1
BASEDIR/foo/man/de/man1/foo.1
BASEDIR/foo/man/fr/man1/foo.1

これにより、同じ位置にインストールするバイナリパッケージに生成した内容をすべて収録するのが簡単になります:

doc/foo/man/* ./usr/share/man/
doc/foo/html/* ./usr/share/doc/foo/

新しい翻訳を追加する際にこの規則を更新する必要はなく、別個のバイナリパッケージ (bar) を追加することによってそのパッケージの内容を分けておくことが可能となります。

サポートするフォーマット

現在、po4a-build は以下の組み合わせをサポートしています:

1.セクション 1 用 DocBook XML。

2.セクション 3 用 DocBook XML。

3.HTML 用 DocBook XML。

4.セクション 1 用 POD。

5.セクション 3 用 POD。

6.セクション 5 用 POD。

7.セクション 7 用 POD。

対応しているあらゆるフォーマットにおいて、サポートするあらゆる組み合わせを単一の設定ファイル po4a-build.conf で指示し、ただ po4a-build を呼び出すだけで処理させられます。po4a-build.conf(5) を参照してください。

設定

po4a-build は、パッケージの VCS 最上位ディレクトリに置かれるべき po4a-build.conf をデフォルト設定ファイルとして使用します (ほかのファイルを使用するには -f オプションを使用してください)。po4a-build.conf(5) を参照してください。

例1 設定例のファイル

設定例が書かれたファイルは以下の場所にインストールされています:

/usr/share/doc/po4a/examples/po4a-build.conf.example

設定ファイルのレイアウト

設定ファイルは、全般、XML/XSL サポート、POD サポート、HTML サポートの節で構成されます。

General includes the name and location of the po4a config file (probably best to leave this as po4a.config), the po directory containing the documentation PO files (often doc/po), the full name of the POT file used to create the translations, the BASEDIR for the generated output, whether the package contains manpages in section 3 rather than just section 1 and the names of the binary packages which are to contain the generated output.

XML/XSL support includes specifying which of the binary packages use XSL support in the XMLPACKAGES variable, the top level DocBook file to pass to xsltproc and the location of the XML or DocBook files. The XSLFILE can be overridden, if necessary.

POD サポートには、PODPACKAGES 変数により POD サポートを使うバイナリパッケージの指定や、POD ファイルのフルネームが含まれます。

HTML サポートでは、BASEDIR 以下に作成する未訳と翻訳済みの HTML 内容のサブディレクトリや、HTML を生成する DocBook ファイルを指定します。必要なら HTMLXSL を上書きできます。

コマンド

--pot-only

Only updates the POT file(s). --pot-only is intended to support packages including all POT files in the package source. Packages using Autotools can easily add the POT file via EXTRA_DIST but packages just using a Makefile or certain VCS build helpers can find it awkward to add the POT file (which is a generated file) without putting the POT file into the VCS. To avoid this ugly and unnecessary work, po4a-build can update the POT file(s) at the start of the build, so that dpkg-source includes them into the source tarball.

例2 svn-buildpackage の例

svn-buildpackage は、SVN 属性の useNativeDist や Make ターゲットの native-dist を使用して、この種の追加を明示的にサポートしています。

# POT ファイルをソース tarball に追加
native-dist: Makefile
	po4a-build --pot-only

$ svn propset useNativeDist 1 debian

-h|--help

使用方法のメッセージを表示して終了します。

--version

print the script version and exit.

オプション

-f|--file FILE

po4a-build は、デフォルトの設定ファイル (po4a-build.conf) の代わりにオプションで指定したファイルを使用します。

著者

po4a-build は Neil Williams <codehelp@debian.org> によって書かれました。

このマニュアルページは Neil Williams <codehelp@debian.org> によって書かれました

07/06/2018 PO4A