Every top-level script in every project needs to call gettext.install()
so that a _() builtin function is installed and strings are translated
using the correct translation domain.
However, translations are always installed in the default localedir
(which is commonly '/usr/share/locale') and, in cases like devstack, may
be found in a project-specific localedir. To support such a use case we
should have project-specific environment variables for overriding the
default value of localedir - e.g. NOVA_LOCALEDIR.
Add a new gettextutils.install() helper method to make this as easy as
possible for projects to get right.
Reviewed: https:/ /review. openstack. org/25820 github. com/openstack/ oslo-incubator/ commit/ d8b66c7c1bb2867 2402f2bf1e410a1 ee8fc4bfb6
Committed: http://
Submitter: Jenkins
Branch: master
commit d8b66c7c1bb2867 2402f2bf1e410a1 ee8fc4bfb6
Author: Mark McLoughlin <email address hidden>
Date: Mon Apr 1 02:01:00 2013 +0100
Add a gettextutils. install( ) helper function
Part of fixing bug #995287
Every top-level script in every project needs to call gettext.install()
so that a _() builtin function is installed and strings are translated
using the correct translation domain.
However, translations are always installed in the default localedir locale' ) and, in cases like devstack, may
(which is commonly '/usr/share/
be found in a project-specific localedir. To support such a use case we
should have project-specific environment variables for overriding the
default value of localedir - e.g. NOVA_LOCALEDIR.
Add a new gettextutils. install( ) helper method to make this as easy as
possible for projects to get right.
Change-Id: I6c8549c8ff0079 7c96f2dd4b0b526 6d18d77aa19