贡献¶
本页使用法语 (fr
) 举例。其他可用 语言代码 。所以要确保把这里的前缀 /fr
替换为你正在翻译的语言。
The currently available languages can be checked on the online translation interface or in the underlying git repository.
简单贡献¶
The preferred way to contribute to the translation effort is via the web-based interface, currently hosted on Weblate.
Suggestions for translations can be contributed without logging in. They will be reviewed by the translation team before being published.
Weblate also provides tools such as the glossary to improve translation consistency.
高级操作¶
If the web-based interface does not suit your needs, PO-files can be downloaded, edited locally, and uploaded back to the platform.
Warning
Conflicts may arise if updates occur while editing locally. Resolving conflicts manually will be required. Direct commits to the translation repository are no longer permitted.
Note
Uploading or integrating PO files can take several minutes. If a server timeout error appears after ten minutes, refresh the page to confirm whether the upload succeeded.
安装¶
Before proceeding with translation tasks, ensure the manual builds correctly by following the Getting Started section.
语言文件¶
Run the following command from the manual's root directory:
make checkout_locale
You will be prompted to specify the language folder to download.
For example, type fr
for French and press Return.
The command creates a locale/fr
subdirectory after downloading.
Example directory structure:
你的目录布局应该是下面这样的:
blender-manual
|- locale/
| |- fr/
| | |- LC_MESSAGES/
|- manual/
Note
When using Git from the command line, switch to the locale
directory for updates instead of the blender-manual
directory.
Alternatively, download the PO files directly from Weblate by navigating to the Files
menu on the language's page.
PO-File Editor¶
To edit the PO files, install a PO-file editor to modify the translation files. Poedit is recommended, but other editors are also suitable.
使用翻译文件编译文档¶
To build the manual with translations applied run the following commands in a terminal:
Linux/macOS:
make -e BF_LANG=fr
Windows:
set BF_LANG=fr make html
编辑翻译文件¶
The PO files in the LC_MESSAGES
folder include:
blender_manual.po
: The main file containing user manual translations.sphinx.po
: A smaller file for translating the website theme.
Use the PO editor to open these files. Each entry represents a section of the manual.
Translate any untranslated strings using the input field provided by the editor.
Save changes and upload the modified
.po
files back to Weblate.
Tip
Sort entries in the editor by source or translation status to make navigation easier.
Important
Build the manual after translating to check for syntax errors, which will appear as warnings will appear during the build process.
维护¶
追踪模糊字符串¶
When the manual is updated, outdated translations are marked as fuzzy. To track these run:
make report_po_progress
For a detailed report, run:
python tools/translations/report_translation_progress.py locale/fr/
This lists files with fuzzy or empty strings. For more options, see:
python tools/translations/report_translation_progress.py --help
更新 PO 文件¶
Administrators regularly update PO files to match the latest English manual (typically weekly). The last update can be checked on the Blender Manual Translations project page.
Translators can update files locally using:
make update_po
However, uploading these files to Weblate is not permitted.
See also