Contribute
On this page French (fr
) is used for examples. However, it can be replaced with other
languages codes.
So, be sure to change the /fr
suffixes in this guide to the language you are translating!
To see which languages are currently available, you can browse the repository:
https://projects.blender.org/blender/blender-manual-translations
Catatan
First of all, it is assumed that you have the manual already building. If you have not done this already go back too the Getting Started section.
Menginstal
File Bahasa
From the directory containing your checkout of the manual run:
git clone https://projects.blender.org/blender/blender-manual-translations.git locale
This will create a locale/fr
subdirectory.
You should have a directory layout like this:
blender-manual
|- locale/
| |- fr/
| | |- LC_MESSAGES/
|- manual/
Catatan
When running Git from the command line (such as updating or committing),
you will need to change directory to locale
first rather then the blender-manual
directory.
Sebuah Editor 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.
Catatan
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).
Building with Translations
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 will have a build of the manual with translations applied.
Editing Translation Files
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.
To edit these files open them up in your translation editor, i.e. Poedit. Once in your editor you will see a list of texts, each of these items represent some part of the user manual. You may need to adjust your editor to sort the list in a way that makes sense for example "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 the repository.
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.
Submitting Translations
Translators who have been given commit access can commit to the main repository without needing to fork the repository.
See Commit Guidelines if this applies to you.
Fork Translation Repository
Go to Blender repository and click the Fork button.
Confirm the fork with the default settings.
Now you will have to add your personal fork as a remote in your local git repository. Click SSH to see the correct URL, and then add it like this:
git remote add me [email protected]:<USERNAME>/blender-manual-translations.git git submodule sync
Catatan
In order to push to the fork repository, you need an SSH key.
If you don't already have the file ~/.ssh/id_rsa.pub
,
there's a simple command to generate such keys which works on Linux, macOS, and in Git Bash on Windows:
ssh-keygen
This command will generate a private key id_rsa and a public key id_rsa.pub in ~/.ssh
.
The private key must never be shown or sent to anyone else to avoid compromising your account,
but the public key is safe to share.
The contents of ~/.ssh/id_rsa.pub
can be copied and pasted into
the account settings on projects.blender.org,
after clicking "Add Key". Any name for the SSH key is ok.
Perawatan
Keeping Track of Fuzzy Strings
When the manual is updated, those translations which are outdated will be marked as fuzzy. To keep track with that, you can use a tool we created for that task.
You can do this by running:
make report_po_progress
This will only give a quick summary however, you can get more information by running:
python tools_report/report_translation_progress.py locale/fr/
You should get a list of all the files with information about the number of empty and fuzzy strings. For more options see:
python tools_report/report_translation_progress.py --help
Updating PO Files
As the original manual changes, the templates will need updating. Note, doing this is not required, as administrator usually update the files for all languages at once. This allows all languages to be on the same version of the manual. However, if you need to update the files yourself, it can be done as follows:
make update_po
The updated templates can then be committed to the repository.
Lihat juga
A guide how to add a new language can be found in the Adding a Language.