Browse Source

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
changes/32/20332/2
He Jie Xu 9 years ago
parent
commit
c740986599
  1. 1
      .gitignore
  2. 1
      MANIFEST.in
  3. 2
      babel.cfg
  4. 0
      quantum/locale/quantum.pot
  5. 15
      setup.cfg
  6. 1
      tools/test-requires

1
.gitignore

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

1
MANIFEST.in

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

2
babel.cfg

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

0
quantum/locale/quantum.pot

15
setup.cfg

@ -14,3 +14,18 @@ cover-package = quantum
cover-html = true
cover-erase = true
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

1
tools/test-requires

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

Loading…
Cancel
Save