Merge "Change oslo.i18n to oslo_i18n"
This commit is contained in:
commit
ff8cb77653
|
@ -24,8 +24,9 @@ import re
|
|||
|
||||
def check_oslo_namespace_imports(logical_line, blank_before, filename):
|
||||
oslo_namespace_imports = re.compile(
|
||||
r"(((from)|(import))\s+oslo\.((config)|(serialization)|(utils)))|"
|
||||
"(from\s+oslo\s+import\s+((config)|(serialization)|(utils)))")
|
||||
r"(((from)|(import))\s+oslo\."
|
||||
"((config)|(serialization)|(utils)|(i18n)))|"
|
||||
"(from\s+oslo\s+import\s+((config)|(serialization)|(utils)|(i18n)))")
|
||||
|
||||
if re.match(oslo_namespace_imports, logical_line):
|
||||
msg = ("K333: '%s' must be used instead of '%s'.") % (
|
||||
|
|
|
@ -18,10 +18,10 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html .
|
|||
|
||||
"""
|
||||
|
||||
from oslo import i18n
|
||||
import oslo_i18n
|
||||
|
||||
|
||||
_translators = i18n.TranslatorFactory(domain='keystoneclient')
|
||||
_translators = oslo_i18n.TranslatorFactory(domain='keystoneclient')
|
||||
|
||||
# The primary translation function using the well-known name "_"
|
||||
_ = _translators.primary
|
||||
|
|
Loading…
Reference in New Issue