switch to oslo_i18n
oslo.i18n 1.2.0 has dropped old namespace, now the new namespace is oslo_i18n, let's sync it Change-Id: I33e231524ce23035d32dd96a103d46d14437d580
This commit is contained in:
parent
a78961db68
commit
5ea2e283cd
@ -18,11 +18,11 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html
|
||||
|
||||
"""
|
||||
|
||||
from oslo import i18n
|
||||
import oslo_i18n
|
||||
|
||||
DOMAIN = 'ceilometer'
|
||||
|
||||
_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)
|
||||
|
Loading…
Reference in New Issue
Block a user