Skip to content

Commit

Permalink
Let setup.py compile_catalog process all language files
Browse files Browse the repository at this point in the history
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: I0d9cb16ac50caae570c57a1db6bed656bf13c3dc
Closes-Bug: #1536226
  • Loading branch information
ansiwen committed May 20, 2016
1 parent 1528db4 commit ece7b8f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ tag_svn_revision = 0

[compile_catalog]
directory = nova/locale
domain = nova
domain = nova nova-log-critical nova-log-error nova-log-info nova-log-warning

[update_catalog]
domain = nova
Expand Down
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ basepython = python2.7
deps = hacking
commands =
bash tools/flake8wrap.sh {posargs}
# Check that .po and .pot files are valid.
bash -c "find nova -type f -regex '.*\.pot?' -print0| \
xargs -0 -n 1 msgfmt --check-format -o /dev/null"

[testenv:py34]
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
Expand Down

0 comments on commit ece7b8f

Please sign in to comment.