Sprachen hinzufügen¶
Vorbereitung¶
If the language you want to translate has not been started by someone else already and you wish to create a set of new files for the desired language, say ‚fr‘ (French), then you must first use the environment you have created, as guided in Getting Started, in particular Dependencies installieren and Building the Manual sections.
Dies gibt Ihnen eine Basis-Umgebung für:
Das Erstellen einer neuen Übersetzungssprache aus englischer Quelle.
Das Ausführen des
make-Befehls, um übersetzte Texte aus .po-Dateien zu lokalen Testzwecken in HTML-Dateien umzuwandeln.Update-Änderungen in englischen Texten, die von Mitwirkenden hinzugefügt wurden.
Untenstehende Beispiele zeigen den Ablauf zur Erstellung neuer Dateien für Französisch, Sprachcode fr, unter Linux. Andere Betriebssysteme können leicht davon abweichen, sollten jedoch im Wesentlichen gleich funktionieren.
Create a Blender ID if you have not done so already.
Log into projects.blender.org and Create an Issue requesting for commit access in order to transfer changes to the central repository of the translation team.
Open an instance of a console application.
Change the current working directory to the directory of
blender-manual, where the instance ofMakefileresides.
Trying the Make Process to Create HTML Files in English¶
Stellen Sie sicher, dass die vorherige Instanz des
build-Verzeichnisses entfernt wurde, falls eines existierte:make cleanWandeln Sie alle
.rst-files in.pot-files um:make gettextHTML-Dateien erstellen:
make htmlAfter this, you can actually view the created html files locally by opening the
blender-manual/build/html/index.htmlfile.
Dateien für die Zielsprache generieren¶
Überprüfen Sie den aktuellen Übersetzungsstand mit dem Befehl:
git clone https://projects.blender.org/blender/blender-manual-translations.git locale
This will download all language sets available in the repository into the
localedirectory of your drive. You can go to thelocaledirectory to see the hidden subdirectory.gitwithin it, together with directories of languages. You’ll need to add your own set of files for the language you are trying to translating to.From the
blender-manualdirectory to generate a set of files forfrlanguage:make update_poDiese Dateien sind noch immer nur auf Englisch, alle
msgstr-Einträge sind leer.Senden Sie ein neues Set von Dateien an die zentrale Repository:
cd locale git add fr git commit -m "Initial commit language set of files for French"
Tipp
Es wird empfohlen zwei Umgebungsvariablen für diese Ordner zu erstellen in
bashrc, um es für die Übersetzung und Ergebnisprüfung angenehmer zu machen, Batch/Shell - Befehle zu ändern oder zu skripten.export BLENDER_MAN_EN=$HOME/<directory to make file directory above>/blender-manual export BLENDER_MAN_FR=$BLENDER_MAN_EN/locale
Newly generated files will contain some placeholders for authors and revision dates etc. If you find the job of replacing them repetitive, make use of the script
change_placeholders.shin the subdirectory~/blender-manual/tools/util_maintenance, make a copy of that to your localbindirectory and replace all values that were mentioned in the file with your specific details, then after each change to a file, you would do following commands to update the file with your personal details, revision date and time, plus generating the html files for your language, which you can view using your internet browser:$HOME/bin/change_placeholders.sh $BLENDER_MAN_FR make -d --trace -w -B -e SPHINXOPTS="-D language='fr'" 2>&1