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: I1f0bfb181e2b84ac6dd0ce61881cd2cc4400bdcb Closes-Bug: #1536226
This commit is contained in:
parent
3afbf86b56
commit
16d0cdba47
|
@ -49,7 +49,7 @@ source-dir = doc/source
|
|||
|
||||
[compile_catalog]
|
||||
directory = keystone/locale
|
||||
domain = keystone
|
||||
domain = keystone keystone-log-critical keystone-log-error keystone-log-info keystone-log-warning
|
||||
|
||||
[update_catalog]
|
||||
domain = keystone
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -47,9 +47,6 @@ commands =
|
|||
# Run bash8 during pep8 runs to ensure violations are caught by
|
||||
# the check and gate queues
|
||||
bashate examples/pki/gen_pki.sh
|
||||
# Check that .po and .pot files are valid.
|
||||
bash -c "find keystone -type f -regex '.*\.pot?' -print0| \
|
||||
xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
# Run security linter
|
||||
bandit -r keystone -x tests
|
||||
|
||||
|
|
Loading…
Reference in New Issue