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

번역을 검사하는 방법

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.

참고

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.

문서화

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".

Liberty에 대한 설치 가이드와 같은 stable 브랜치 문서에 대해서는, 대상 stable 브랜치 내 doc-tools-check-languages.conf 파일을 직접 수정할 필요가 있습니다.

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/.

생성된 문서에 대한 링크를 추가하려면, openstack-manuals 저장소에서 master 브랜치 내 www/<lang>/index.html 파일을 수정할 필요가 있습니다. 참고로, 웹 페이지는 master 브랜치에서 퍼블리싱이 이루어지며, Liberty와 같은 모든 릴리즈를 포함하고 있습니다. 따라서, stable 브랜치 내 www/<lang>/index.html 파일을 수정할 필요가 없습니다.

또한 다음을 확인할 수 있습니다:

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 대시보드

OpenStack-Ansible 실행하기

OpenStack-Ansible (OSA) 은 OpenStack 환경에 대한 배포 및 구성을 위해 Ansible playbook 및 role을 제공합니다. 이 프로젝트 내 일부분으로 ‘Translation Check Site’ 기능이 있습니다. OSA 인스턴스는 번역 플랫폼 으로부터 번역 문자열을 가져온 다음, Horizon에 대해 해당 문자열을 컴파일하여 제공합니다. 2 또는 4 코어 CPU와 함께 적어도 8 GB 메모리 및 70 GB 디스크 이상을 가진 머신을 필요로 합니다.

$ 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

AIO 설치에 대한 구성요소는 tests/vars/bootstrap-aio-vars.yml 에서 설정할 수 있습니다. 대상 환경에 따라 달라지지만, 설치 과정은 보통 1-2시간 소요됩니다. AIO 구성에 대한 보다 자세한 정보는 OSA AIO documentation 을 살펴봅니다.

번역이 이루어진 파일을 주기적으로 가져오려면, 다음 명령어를 수동으로 또는 cron으로 실행합니다:

$ 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"

DevStack 실행하기

대시보드 번역을 검사하기 위한 또 다른 방법은 DevStack을 로컬 환경에서 실행하는 것입니다. DevStack을 실행하기 위해서는, local.conf 파일 준비를 필요로 합니다만, 걱정할 필요는 없습니다. 몇몇 local.conf 파일들이 인터넷을 통해 공유가 이루어지고 있으며, 간단한 예제를 아래에서 볼 수 있습니다. 경험에 비추어 볼 때, DevStack을 무난하게 실행하기 위해서는 2-4개 CPU 코어, 8 GB 메모리, 그리고 20 GB 디스크를 가지는 가상 머신을 필요로 합니다. 주요 OpenStack 프로젝트만 활성화하는 경우에는, 해당 머신은 2~4GB 메모리와 같이 훨씬 적은 요구 사항이면 됩니다.

$ 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>

$BRANCHmaster, stable/newton 또는 stable/mitaka 와 같이 적절한 브랜치 이름으로 변경합니다.

다음은 핵심 구성요소 (keystone, nova, glance, neutron, cinder), horizon, swift 및 heat를 실행하는 Newton 릴리즈를 위한 local.conf 예제입니다. 핵심 horizon 코드에서 지원하는 구성요소를 선택하였습니다.

[[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

최신 번역 가져오기

번역은 프로젝트 저장소에 매일 가져오기 작업이 이루어지기에, 대부분의 경우 Zanata에서 수동으로 번역을 가져올 필요는 없습니다. 필요로 하는 것은 최신 horizon 코드를 가져오는 것입니다.

DevStack을 실행하는 머신을 갖고자 하는 경우, 두 가지 방법이 있습니다.

첫 번째 방법은 horizon 코드만 업데이트하는 것입니다. 다음 쉘스크립트는 최신 horizon 코드를 가져오고, 번역 메시지 카탈로그를 컴파일하며 apache httpd 서버를 다시 불러옵니다. $BRANCHmaster, stable/newton 또는 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

다른 방법은 DevStack을 다시 실행하는 것입니다. DevStack이 horizon 및 다른 프로젝트 최신 코드를 가져오기 위해 stack.sh 를 다시 실행하기 전에 local.confRECLONE=True 를 포함하는지를 확인합니다.

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

CLI (명령어 라인 인터페이스)

TBD

서버 프로젝트

TBD