summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-04-15 06:38:40 +0000
committerGerrit Code Review <review@openstack.org>2013-04-15 06:38:40 +0000
commit9d52e07f602e9afd5ef730bf6399228975fac16f (patch)
tree33fce315dc83f7af2a26721fb94053cd95b5a14d /doc
parent0fc0588a41d85a61695f4fa0aab238784ffe5999 (diff)
parent5e7ef210c01d3db8c79b969da3aeda50d57c4923 (diff)
downloadnova-9d52e07f602e9afd5ef730bf6399228975fac16f.tar.gz
nova-9d52e07f602e9afd5ef730bf6399228975fac16f.tar.xz
nova-9d52e07f602e9afd5ef730bf6399228975fac16f.zip
Merge "Add NOVA_LOCALEDIR env variable"
Diffstat (limited to 'doc')
-rw-r--r--doc/source/devref/il8n.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/source/devref/il8n.rst b/doc/source/devref/il8n.rst
index ce708449d..900ea8a28 100644
--- a/doc/source/devref/il8n.rst
+++ b/doc/source/devref/il8n.rst
@@ -24,10 +24,14 @@ in nova/tests/test_localization.py.
The ``_()`` function is brought into the global scope by doing::
- import gettext
- gettext.install("nova", unicode=1)
+ from nova.openstack.common import gettextutils
+ gettextutils.install('nova')
These lines are needed in any toplevel script before any nova modules are
imported. If this code is missing, it may result in an error that looks like::
NameError: name '_' is not defined
+
+The gettextutils.install() function also queries the NOVA_LOCALEDIR environment
+variable to allow overriding the default localedir with a specific custom
+location for Nova's message catalog.