diff options
author | Davanum Srinivas <dims@linux.vnet.ibm.com> | 2015-01-10 22:26:32 -0500 |
---|---|---|
committer | Davanum Srinivas <davanum@gmail.com> | 2015-02-06 06:03:10 -0500 |
commit | af2d6c9576b1ac5f3b3768870bb15d9b5cf1610b (patch) | |
tree | 5a6d58e8d0c6cc68a732418dfbd24015460f88b1 /nova/i18n.py | |
parent | ff219370f3e1c836603b218dd3225f81ba3938b4 (diff) | |
download | nova-af2d6c9576b1ac5f3b3768870bb15d9b5cf1610b.tar.gz |
Switch to using oslo_* instead of oslo.*
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
This commit includes:
- using oslo_utils instead of oslo.utils
- using oslo_serialization instead of oslo.serialization
- using oslo_db instead of oslo.db
- using oslo_i18n instead of oslo.i18n
- using oslo_middleware instead of oslo.middleware
- using oslo_config instead of oslo.config
- using oslo_messaging instead of "from oslo import messaging"
- using oslo_vmware instead of oslo.vmware
Change-Id: I3e2eb147b321ce3e928817b62abcb7d023c5f13f
Diffstat (limited to 'nova/i18n.py')
-rw-r--r-- | nova/i18n.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/i18n.py b/nova/i18n.py index 9057911d9f..05378e80c2 100644 --- a/nova/i18n.py +++ b/nova/i18n.py @@ -18,11 +18,11 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html . """ -from oslo import i18n +import oslo_i18n DOMAIN = 'nova' -_translators = i18n.TranslatorFactory(domain=DOMAIN) +_translators = oslo_i18n.TranslatorFactory(domain=DOMAIN) # The primary translation function using the well-known name "_" _ = _translators.primary @@ -39,8 +39,8 @@ _LC = _translators.log_critical def translate(value, user_locale): - return i18n.translate(value, user_locale) + return oslo_i18n.translate(value, user_locale) def get_available_languages(): - return i18n.get_available_languages(DOMAIN) + return oslo_i18n.get_available_languages(DOMAIN) |