[ English | 한국어 (대한민국) | Indonesia | русский | 中文 (简体, 中国) | Deutsch | English (United Kingdom) | 日本語 ]

Wie Übersetzungen überprüfen

It is important to validate your translations by applying them in a real situation where they are rendered and visualized. This page describes how to check your translations.

Bemerkung

translation check refers to build OpenStack artifacts with translated strings and check how the translated strings are shown on an actual screen as part of the translation process.

Dokumentation

Translated documents are available at the OpenStack Documentation site. It is updated daily. Most contents are linked from:

The documents are maintained in the doc directory using reStructuredText and built by Sphinx. Translated strings are stored as Gettext PO file format in locale/<lang>/LC_MESSAGES directory.

Documents on openstack-manuals

For OpenStack documentation, openstack-manuals git repository hosts essential OpenStack documents such as Installation Guide, and Virtual Machine Image Guide.

To build a translated document on this repository, you need to update the file doc-tools-check-languages.conf in each repository, and add an entry to BOOKS like ["ja"]="install-guide".

Für ein Dokument in einem stabilen Zweig, wie der Installationsleitfaden für Liberty, müssen Sie die Datei doc-tools-check-languages.conf direkt stabilen Zweig als Ziel aktualisieren.

You can check a generated document for a specified branch on https://docs.openstack.org/<branch>/<language>/<document>. For example, the link of Japanese Ubuntu Installation Guide for Liberty is https://docs.openstack.org/liberty/ja/install-guide-ubuntu/.

Um einen Link zu einem generierten Dokument hinzuzufügen, müssen Sie die Datei www/<lang>/index.html im master branch of the openstack-manuals Repository aktualisieren. Beachten Sie dass die Webseite vom master Branch veröffentlicht wird, welche die Seiten für alle Versionen wie etwas Liberty enthält. Dann brauchen Sie nicht die Datei www/<lang>/index.html im stabilen Branch aktualisieren.

Sie können auch überprüfen:

OpenStack project documentation

Currently, we support translations for small set of OpenStack project documentations like Horizon, OpenStack-Ansible, and OpenStack-Helm upon requests and available bandwidth. Top-level directory structure on doc/source/ follows with Documentation Contributor Guide - Project guide setup and the corresponding generated documents for master branch are available at https://docs.openstack.org/<project>/latest/<language>/<document> URL. For project team documents in stable branch, you can check the documents with https://docs.openstack.org/<project>/<branch>/<language>/<document> URL.

Here are sample document links as examples:

OpenStack Dashboard

Arbeiten mit OpenStack-Ansible

OpenStack-Ansible (OSA) stellt Ansible Playbooks und Rollen für Bereitstellung und Konfiguration von OpenStack Umgebungen zur Verfügung. Als Teil des Projekts wurde eine Funktion namens ‚Translation Check Site‘ entwickelt. Eine OSA Instanz holt Übersetzungen von der Übersetzungsplattform, kompiliert diese und stellt sie in Horizon bereit. SIe brauchen eine Maschine mit 2 oder 4 CPU Cores, wenigstens 8 GB Speicher und 70 GB Festplatte, um OSA laufen zu lassen.

$ BRANCH=master
$ git clone -b ${BRANCH} https://github.com/openstack/openstack-ansible /opt/openstack-ansible
$ cd /opt/openstack-ansible
$ ./scripts/gate-check-commit.sh translations

Sie können die Komponenten Ihrer AIO Installation in tests/vars/bootstrap-aio-vars.yml setzen. Abhängig von Ihrer Umgebung dauert die Installation zwischen 1 und 2 Stunden. Für mehr Details zu AIO Konfiguration schauen Sie OSA AIO Dokumentation.

Um Übersetzungen regelmässig abzuholen, rufen Sie dieses Kommando manuell oder als Cronjob auf:

$ cd /opt/openstack-ansible/playbooks; \
  openstack-ansible os-horizon-install.yml \
  -e horizon_translations_update=True \
  -e horizon_translations_project_version=master \
  --tags "horizon-config"

Arbeiten mit DevStack

EIne andere zweckmässige Methode zum Überprüfen der Dashboard-Übersetzungen ist DevStack in Ihrer lokalen Umgebung. Um DevStack laufen zu lassen, brauchen Sie eine Anpassung der Datei local.conf, aber keine Sorge: Es gibt verschiedene local.conf Dateien im Internet und eine Minimalkonfiguration steht unten. Nach unseren Erfahrungen brauchen Sie eine Maschine mit 2 oder 4 CPU Cores, 8 GB Speicher und 20 GB Festplatte, um DevStack komfortabel laufen zu lassen. Wenn Sie nur einige wichtige OpenStack Projekte laufen lassen, brauch die Maschine weniger als 2~4 GB Speicher.

$ BRANCH=master
$ git clone https://opendev.org/openstack/devstack.git
$ cd devstack
$ git checkout $BRANCH
<prepare local.conf>
$ ./stack.sh
<wait and wait... it takes 20 or 30 minutes>

Ersetzen Sie $BRANCH mit einem geeigneten Branch wie master, stable/newton oder stable/mitaka.

Es folgt ein Beispiel von local.conf für Newton-Version, welche Kernkomponenten betreibt (keystone, nova, glance, neutron, cinder), horizon, swift und heat. Das sind die Komponenten, die hauptsächlich im Code von Horizon gewählt werden.

[[local|localrc]]
BRANCH=stable/newton
# NOTE: We need to specify a branch explicitly until DevStack stable branch
# is prepared. At now, swift has no stable/newton branch.
CINDER_BRANCH=$BRANCH
GLANCE_BRANCH=$BRANCH
HEAT_BRANCH=$BRANCH
HORIZON_BRANCH=$BRANCH
KEYSTONE_BRANCH=$BRANCH
NEUTRON_BRANCH=$BRANCH
NOVA_BRANCH=$BRANCH
SWIFT_BRANCH=master

# When OS_CLOUD envvar is set, DevStack will be confused.
unset OS_CLOUD

# Ensure to fetch the latest repository when rerunning DevStack
RECLONE=True

# Translation check site usually does not use tempest.
disable_service tempest

enable_service heat h-api h-api-cfn h-api-cw h-eng
enable_service s-proxy s-object s-container s-account

enable_plugin neutron https://git.openstack.org/openstack/neutron $BRANCH
enable_service q-qos

enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas $BRANCH

LOGFILE=$DEST/logs/devstack.log
SCREEN_HARDSTATUS="%{= rw} %H %{= wk} %L=%-w%{= bw}%30L> %n%f %t*%{= wk}%+Lw%-17< %-=%{= gk} %y/%m    /%d %c"
LOGDAYS=2
IDENTITY_API_VERSION=3

ADMIN_PASSWORD=change_me
MYSQL_PASSWORD=change_me
RABBIT_PASSWORD=change_me
SERVICE_PASSWORD=change_me

Die letzten Übersetzungen importieren

Übersetzungen werden täglich in ein Projekt-Repository importiert, sodass Sie in den meisten Fällen die Übersetungen manuell von Zanata pullen müssen. Was Sie brauchen ist der neueste Horizon-Code.

Es gibt 2 Wege, um eine Maschine mit DevStack laufen zu lassen.

Ein Weg ist die Aktualisierung des Horizon-Codes. Das folgende Shell-Skript holt den neuesten Horizon-Code, kompiliert den Übersetzungsnachrichtenkatalog und läd den Apache-HTTPD-Server neu. Ersetzen SIe $BRANCH mit einem geeigneten Branch wie master`, stable/newton oder stable/mitaka.

#!/bin/bash

# Target branch: master, stable/pike, ...
BRANCH=stable/pike

cd /opt/stack/horizon

# Remove stale compiled python files
find horizon -name '*.pyc' | xargs rm
find openstack_dashboard -name '*.pyc' | xargs rm

# Fetch the latest code from git
git checkout $BRANCH
git remote update origin
git merge origin/$BRANCH

python manage.py compilemessages
python manage.py collectstatic --noinput
python manage.py compress --force
sudo service apache2 reload

Der andere Weg ist DevStack neu laufen zu lassen. Stellen Sie sicher, dass RECLONE=True in Ihrer local.conf steht, bevor Sie stack.sh neu laufen lassen und so DevStack den neuesten Code von Horizon und den anderen Projekten bezieht.

$ cd devstack
$ ./unstack.sh
<Ensure RECLONE=True in your local.conf>
$ ./stack.sh
<It takes 10 or 15 minutes>

CLI (command line interface)

TBD

Serverprojekte

TBD