From 5ea2e283cdf38f9ac0de97d9ef9ad7e023211df4 Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Mon, 12 Jan 2015 20:16:20 +0800 Subject: [PATCH] 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 --- ceilometer/i18n.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ceilometer/i18n.py b/ceilometer/i18n.py index e9ad5bbf2..d0a7d2548 100644 --- a/ceilometer/i18n.py +++ b/ceilometer/i18n.py @@ -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)