Use babel to generate translation file

Fixes bug 1103519

Following http://wiki.openstack.org/Translations to integrate transifex
translation into quantum

We added the empty file quantum/locale/quantum.pot to avoid the
failure of the Jenkin's translation-jobs because git doesn't allow empty
directory to be added into the repository.

After this patch accepted, we need to do as below:
1. Make the transifex quantum project
(https://www.transifex.com/projects/p/quantum/) as part of the
openstack transifex project hub and give access to the transifex
openstack Jenkins account.

2. Add the translation-jobs into openstack/openstack-ci-puppet for
ceilometer.

Change-Id: I329a8bdc51ed8a0e75399c592d3991b1ec06a855
This commit is contained in:
He Jie Xu 2013-01-24 00:07:18 +08:00
parent f45a0153b8
commit c740986599
6 changed files with 20 additions and 0 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ run_tests.log
setuptools*.egg/ setuptools*.egg/
.tox/ .tox/
.venv/ .venv/
*.mo

View File

@ -5,6 +5,7 @@ include quantum/db/migration/README
include quantum/db/migration/alembic.ini include quantum/db/migration/alembic.ini
include quantum/db/migration/alembic/script.py.mako include quantum/db/migration/alembic/script.py.mako
include quantum/db/migration/alembic/versions/README include quantum/db/migration/alembic/versions/README
recursive-include quantum/locale *
exclude .gitignore exclude .gitignore
exclude .gitreview exclude .gitreview

2
babel.cfg Normal file
View File

@ -0,0 +1,2 @@
[python: **.py]

View File

View File

@ -14,3 +14,18 @@ cover-package = quantum
cover-html = true cover-html = true
cover-erase = true cover-erase = true
where=quantum/tests/unit where=quantum/tests/unit
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = quantum/locale/quantum.pot
[compile_catalog]
directory = quantum/locale
domain = quantum
[update_catalog]
domain = quantum
output_dir = quantum/locale
input_file = quantum/locale/quantum.pot

View File

@ -1,3 +1,4 @@
Babel>=0.9.6
cliff cliff
coverage coverage
distribute>=0.6.24 distribute>=0.6.24