Support overriding oslo localedir too
Add a gettextutils.install() helper function
to get a new gettextutils.install() function which allows the default
localedir to be overwritten via an environment variable.
Note that gettextutils.install() must be called before any other glance
modules are imported since some modules attempt to translate strings
at import time (e.g. the help strings for config options in config.py).
This is broken and inefficient, but fixing it involves adding something
like spinx's l_() function and would be very invaisve.
Also, note that calling gettextutils.install() in glance.cmd.__init__
means that no program which uses a different translation domain should
ever import any of the modules under glance.cmd.
Reviewed: https:/ /review. openstack. org/26606 github. com/openstack/ glance/ commit/ a0209e8757ae744 202f94598fc7881 96e7fbf37c
Committed: http://
Submitter: Jenkins
Branch: master
commit a0209e8757ae744 202f94598fc7881 96e7fbf37c
Author: Mark McLoughlin <email address hidden>
Date: Wed Apr 10 12:12:03 2013 +0100
Add GLANCE_LOCALEDIR env variable
Part of fixing bug #995287
Syncs these two commits from oslo-incubator:
Support overriding oslo localedir too install( ) helper function
Add a gettextutils.
to get a new gettextutils. install( ) function which allows the default
localedir to be overwritten via an environment variable.
Note that gettextutils. install( ) must be called before any other glance
modules are imported since some modules attempt to translate strings
at import time (e.g. the help strings for config options in config.py).
This is broken and inefficient, but fixing it involves adding something
like spinx's l_() function and would be very invaisve.
Also, note that calling gettextutils. install( ) in glance.cmd.__init__
means that no program which uses a different translation domain should
ever import any of the modules under glance.cmd.
Change-Id: I86562b3a65d371 673bb21f7179eec c7602bc0775