貢献する

このページではフランス語 (fr) を例として使用していますが、ほかの 言語コード へ置き換えられます。その場合は必ずこのガイドの /fr を翻訳の言語に置き換えてください!(訳注: 以下の各説明で "fr" と書かれたところを "ja" に読み換えてください。)

To see which languages are currently available, you can browse the repository: https://developer.blender.org/diffusion/BMT/browse/trunk/blender_docs/locale

注釈

まず、マニュアルをビルドできることが前提です。まだビルドをしたことがない場合、Getting Started のセクションに戻ってください。

インストール

言語ファイル

チェックアウトフォルダーから次のコマンドを実行してください:

svn checkout https://svn.blender.org/svnroot/bf-manual-translations/trunk/blender_docs/locale/fr locale/fr

This will create a locale/fr subdirectory.

このようなディレクトリのレイアウトになるはずです:

blender_docs
   |- locale/
   |  |- fr/
   |  |  |- LC_MESSAGES/
   |- manual/

注釈

When running subversion from the command line (such as updating or committing), you will need to change directory to locale/fr first.

Otherwise you will get a warning: 'locale' is not under version control

POファイルエディタ

To make edit the PO files you will need to install a PO editor. We recommended that you use Poedit however, any PO editor will do.

注釈

Linuxユーザーの場合は、ディストリビューションのソフトウェアセンターでPoeditのバージョンを確認する必要があります。このエディタは単に推奨というだけです。他にKateやKwriteのように、構文の強調表示や大文字と小文字の入れ替えなど、テキスト編集のための基本的なツールを提供できるものがあります。他のプラットフォームでは、POファイルの構文強調表示をサポートしたり、(WindowsのNotepad ++などのように)カスタマイズできるエディタがあります。

翻訳のビルド

Now you can build the manual with the translation applied:

On Linux and macOS run:

make -e BF_LANG=fr

On Windows run:

set BF_LANG=fr
make html

これで翻訳されたマニュアルのビルドができました。(訳注: ちなみに上のコマンドを.batファイルにしておけば簡単に実行できます) 。

翻訳ファイルの編集

Now you can edit the PO translation files, in the LC_MESSAGES folder you have two files:

  • blender_manual.po -- This is the main translation file that you will be editing.

  • sphinx.po -- This translation file is much smaller and contains translations for the website theme.

Poeditなどの翻訳エディタでこれらのファイルを開くことで編集ができます。エディタを開くと文章のリストが表示されますが、各文章はユーザマニュアルの文章のどこか一部を表しています。わかりやすくするために by source などでリストを並べ替える必要があるでしょう。

You can now select an untranslated string and your editor will have an input box to add the translation. The modified .po files can now submitted as a patch or committed back to SVN.

Tip

Make sure that you Building with Translations to catch any syntax errors you may make while translating. These errors will be displayed as warnings while building the manual.

Commit Translation Files

See Submit Patches.

メンテナンス

ファジーストリングの管理方法

マニュアルがバージョンアップすると古い翻訳が fuzzy としてマークされます。管理するためのツールを使用してください。

次のコマンドを実行してください:

make report_po_progress

ただし、簡単な要約しか作られません。もっと情報が必要な場合には次を実行してください:

python tools_report/report_translation_progress.py locale/fr/

これで空のストリングとファジーストリングがあるすべてのファイルのリストが出ます。他のオプションを見るには:

python tools_report/report_translation_progress.py --help

POファイルのアップデート

元のファイルが更新されると、テンプレートを更新する必要があります。通常は管理者がすべての言語ファイルを一度に更新するため、これを行う必要がないことに注意してください。それによってマニュアルのすべての言語が同じバージョンになります。しかしながら、もしあなた自身で更新する必要がある場合には、以下を実行しても構いません:

make update_po

The updated templates can then be committed to svn.

参考

A guide how to add a new language can be found in the Adding a Language.