貢獻

本頁使用法語 (fr) 做為範例。然而,其他語言替換其 語言代碼 即可。因此,請確認把字尾 /fr 換成你正在翻譯的語言!

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

Note

首先,我們假定你已經有建立好的手冊。如果你還沒有建立,請參考前面的 從這裡開始 章節。

安裝

語言檔

從您含有查驗文件代碼的目錄中,執行以下命令:

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

這個步驟將建立一個 locale/fr 子目錄。

您的目錄配置應該如下:

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

Note

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編輯器

編輯PO文件前,需安裝PO編輯器。我們推薦使用 Poedit 。不過,其他PO編輯器也可以。

Note

For Linux users, you will have to check with your distribution's software center for a version of Poedit. This editor is only a recommendation. There are others, such as Kate and Kwrite, that could offer syntax highlighting and basic tools for text editing, e.g. letter case transposes. Other platforms can use some text editors supporting the syntax highlighting for PO files, or allowing you to create a custom one (such as Notepad++ on Windows).

使用翻譯文件編譯

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

現在你已建立好已翻譯的使用手冊。

編輯翻譯檔

Now you can edit the PO translation files, e.g:

Original RST File

manual/getting_started/about_blender/introduction.rst

Generated PO File

locale/fr/LC_MESSAGES/getting_started/about_blender/introduction.po

The modified .po files can be edited and committed back to svn.

Commit Translation Files

See Submit Patches.

維護

追蹤模糊字符串

手冊更新後,那些過時的翻譯將被標記為模糊。要追蹤這種狀況,您可以使用我們為此建立的工具。

你可以執行下面的命令:

make report_po_progress

該命令只會給您一個快速的摘要,然而,您可以執行以下命令以獲取更多資訊:

python tools_report/report_translation_progress.py locale/fr/

你應該得到一個檔案列表,包含一些空或者模糊字串的資訊。更多選項,請參閱:

python tools_report/report_translation_progress.py --help

更新PO檔

隨著原始手冊的修改,這個模板也需要不斷更新。注意,這個步驟是非必須的,因為管理員會定期自動更新這些po文件。這個步驟用於同步所有語言手冊為同一版本。不過,如果您需要手動更新po文件,可以使用下面的命令:

make update_po

The updated templates can then be committed to svn.

See also

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