summaryrefslogtreecommitdiffstats
path: root/openstack/common
diff options
context:
space:
mode:
Diffstat (limited to 'openstack/common')
-rw-r--r--openstack/common/gettextutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack/common/gettextutils.py b/openstack/common/gettextutils.py
index efc6ec2..e816f14 100644
--- a/openstack/common/gettextutils.py
+++ b/openstack/common/gettextutils.py
@@ -26,12 +26,12 @@ Usual usage in an openstack.common module:
import gettext
import os
-
-t = gettext.translation('oslo', 'locale', fallback=True)
+_localedir = os.environ.get('oslo'.upper() + '_LOCALEDIR')
+_t = gettext.translation('oslo', localedir=_localedir, fallback=True)
def _(msg):
- return t.ugettext(msg)
+ return _t.ugettext(msg)
def install(domain):