Let setup.py compile_catalog process all language files

Two years ago the translation files have been split into several
files, separating the log messages of different log levels from each
other, like X.pot, X-log-warning.pot, X-log-info.pot, and so on.
However, the setup.py command `compile_catalogs`, that comes from the
babel package and compiles the corresponding .po files into .mo
files, only supported one file per python package.  This means that
during packaging `compile_catalogs` never compiled the X-log-*.po
files, so the corresponding translations were always missing.

Since babel 2.3 the domain can be set to a space separated list of
domains.  This change adds the the additional log level files to the
domain list.

The obsolete check that .po and .pot files are valid is removed from
tox.ini.

Change-Id: I149c2254cb04297e598cfd3ca73b24efd0c8ef18
Closes-Bug: #1536226
This commit is contained in:
Sven Anderson 2016-05-20 16:20:48 +02:00
parent 112a25c82d
commit 0adde01a06
2 changed files with 1 additions and 3 deletions

View File

@ -87,7 +87,7 @@ tag_svn_revision = 0
[compile_catalog]
directory = cinder/locale
domain = cinder
domain = cinder cinder-log-error cinder-log-info cinder-log-warning
[update_catalog]
domain = cinder

View File

@ -59,8 +59,6 @@ setenv =
[testenv:pep8]
commands =
flake8 {posargs} .
# Check that .po and .pot files are valid:
bash -c "find cinder -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
{toxinidir}/tools/config/check_uptodate.sh
{toxinidir}/tools/check_exec.py {toxinidir}/cinder