+++ This bug was initially created as a clone of Bug #892602 +++ This probably applies to all services, but let's start with Nova ... Firstly, we don't include compiled message catalogs in our packages (i.e. .mo files) - we should be able to do e.g. 'python setup.py compile_catalog' to help with this. To understand what's going on here, read docs about babel and look at setup.cfg. Secondly, at runtime, we do: gettext.install('nova', unicode=1) which means that gettext looks for message catalogs in e.g. /usr/share/locale/$LANG/LC_MESSAGES/nova.mo so, we either need to install them there or use the 'localedir' argument to gettext.install() to tell gettext where they are --- Additional comment from RHEL Product and Program Management on 2013-01-07 06:45:16 EST --- Since this issue was entered in bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. --- Additional comment from Alan Pevec on 2013-11-18 13:20:36 EST --- Please implement in Fedora/RDO first.
Nikola, is this task still something we want to complete? It looks like compiling the binary catalogs saves us about 30% in space over the .po file, but are there other advantages?
The spec files don't call "setup.py compile_catalog", so the .mo files have never been created. I'm just working upstream to fix https://bugs.launchpad.net/openstack-i18n/+bug/1536226 so that all .mo files are generated. Then I will add the missing "setup.py compile_catalog" to the spec file in order to create the mo. files and let it remove the .po files as well.
Looks like upstream fix is in PBR so we need to rebase/backport that in separate BZ against python-pbr ?
No, I landed a feature in babel directly upstream: https://github.com/python-babel/babel/pull/335 There will be a babel release soon, and then we just need that version during packaging time (or whenever setup.py compile_catalog is called). The setup.cfg will be adapted upstream as soon as the release is out.
(In reply to Sven Anderson from comment #7) > No, I landed a feature in babel directly upstream: > https://github.com/python-babel/babel/pull/335 This is included in Babel 2.3.4 https://github.com/python-babel/babel/commit/9edb9a0309270e23a9a8f62d226ef8e8ef04fe26 > There will be a babel release soon, and then we just need that version > during packaging time (or whenever setup.py compile_catalog is called). We have 2.3.4 available in RDO buildroot, please propose changes to rpm-master. > The setup.cfg will be adapted upstream as soon as the release is out. Has that happened?
> > The setup.cfg will be adapted upstream as soon as the release is out. > Has that happened? Answering to myself, linking to upstream review in External Trackers.
The only package currently doing compile_catalog is python-django-openstack-auth https://github.com/search?q=org%3Ardo-packages+compile_catalog&ref=searchresults&type=Code
I proposed changes to include all catalogs into setup.cfg for all components that used several catalogs. Most got merged, only glance and newton is missing: https://review.openstack.org/#/q/topic:bug/1536226 BUT: that is not a requirement for adding `setup.py compile_catalog` to the spec files. So, we can do that right away. I also talked to the translations people in Austin and they said, these additional catalogs are empty anyways, but they wanted to keep them for reasons I was unable to understand. So this all is a lot of fuss about nothing. :-/
Apparently the missing commands have been added already for most components, see https://github.com/search?q=org%3Ardo-packages+compile_catalog&ref=searchresults&type=Code Here the change for nova: https://github.com/rdo-packages/nova-distgit/commit/4bd3bb8f1417df106f457deadbcc62c0dd84d53a Setting status to modified.
Apparently the missing commands have been added already for most components, see https://github.com/search?q=org%3Ardo-packages+compile_catalog&ref=searchresults&type=Code Here the change for nova: https://github.com/rdo-packages/nova-distgit/commit/4bd3bb8f1417df106f457deadbcc62c0dd84d53a Setting status to CLOSED.