「利用者:Xiaoxiangquan/GoogleSummerOfCode/2011/Internationalization/notes for translators」の版間の差分
(→FAQ) |
細 (1版 をインポートしました) |
(相違点なし)
|
2018年6月29日 (金) 04:46時点における最新版
目次
Update PO File
Execute the /po/update_po.py to update the PO file.
If you are working under a translation branch, you can update the PO file according to the POT in trunk. The command is:
msgmerge --update --lang=[LANG_NAME] [PO_PATH]/[LANG_NAME].po [POT_PATH]/blender.pot
I think you know how to replace the NAMEs and PATHes. Try "msgmerge --help" to learn more.
Don't update the PO in branch according to the PO in trunk, because the latter is out of date when compared to the former. For the same reason, the "svn merge" command doesn't work well, too. So please just always msgmerge with the POT in trunk.
Translation
Open the PO file with your favorite editor and fill the empty msgstrs. As the file is in plain text, you can edit it with vim/emacs/notepad/editplus, etc. But we recommend that you try some professional tools below.
Poedit is a cross-platform gettext catalogs (.po files) editor. It is built with wxWidgets toolkit and can run on any platform supported by it.
PO auto translator is a HTML page with editors in it. Empty msgstrs will be filled with Google Translator's results.
Special Points
- If you don't know how to translate an item or you'd like to keep it as the English format, just leave the msgstr empty, like "".
- Some items have a mark of ". fuzzy", which means these msgstrs are gennerated by the msgmerge command. You should remove the mark if you have finish the items, or there will be no effect on the UI.
- Items like "Default (Default)", "English (English)", "Korean (한국 언어)", "Simplified Chinese (简体中文)", "Arabic (العربية)" are used for Language-Select. We prefer that the first word gets translated, while leave the second one unchanged, which is the language name in itself. It will help if you have changed to an unfamiliar language.
Current Translation Programs and Groups
blender-translation on Google Code
blender-translation on Google Group
Update MO File
If you are working with source code, run /po/update_mo.py to update all MO files from the /po/*.po, then run "make install" to move new MO files to the right place so that it can take effect.
If you are working with a installed application, locate the locale path first. Under most linuxes it seems at /usr/share/locale/[LANG_NAME]/LC_MESSAGES/blender.mo. For a compiled blender, it's at some /[VERSION]/datafiles/locale/[LANG_NAME]/LC_MESSAGES/blender.mo.
Compile your PO to a MO with the following command:
msgfmt [LANG_NAME].po -o blender.mo
Replace the target blender.mo with yours and restart blender, then you may see that it works.
Add a New Language
If you want to add a new language, just create an empty PO, and update it as above.
But it cannot take effect, because the application don't know there is new translation. So please goto a Blender programer for help in adding the option into the languages list. See also Notes for Developers's "Add a New Language" section.
FAQ
Q:How do I help with translating?
A:See the "Current Translation Programs and Groups" section, and join one of them to contribute.
Q:What's a pot?
A:POT means a PO Template. It contains no translations but those strings to be translated. So every PO can update itself to notice any new change.