Merge "Make i18n log translation functions as no-op"
This commit is contained in:
commit
eeaaa42fd7
@ -41,18 +41,6 @@ asse_equal_end_with_none_re = re.compile(
|
||||
asse_equal_start_with_none_re = re.compile(
|
||||
r"(.)*assertEqual\(None, (\w|\.|\'|\"|\[|\])+\)")
|
||||
unicode_func_re = re.compile(r"(\s|\W|^)unicode\(")
|
||||
log_translation = re.compile(
|
||||
r"(.)*LOG\.(audit)\(\s*('|\")")
|
||||
log_translation_info = re.compile(
|
||||
r"(.)*LOG\.(info)\(\s*(_\(|'|\")")
|
||||
log_translation_exception = re.compile(
|
||||
r"(.)*LOG\.(exception)\(\s*(_\(|'|\")")
|
||||
log_translation_error = re.compile(
|
||||
r"(.)*LOG\.(error)\(\s*(_\(|'|\")")
|
||||
log_translation_critical = re.compile(
|
||||
r"(.)*LOG\.(critical)\(\s*(_\(|'|\")")
|
||||
log_translation_warning = re.compile(
|
||||
r"(.)*LOG\.(warning)\(\s*(_\(|'|\")")
|
||||
dict_constructor_with_list_copy_re = re.compile(r".*\bdict\((\[)?(\(|\[)")
|
||||
|
||||
|
||||
|
@ -20,12 +20,20 @@ _translators = TranslatorFactory(domain='glance')
|
||||
# The primary translation function using the well-known name "_"
|
||||
_ = _translators.primary
|
||||
|
||||
# Translators for log levels.
|
||||
#
|
||||
# The abbreviated names are meant to reflect the usual use of a short
|
||||
# name like '_'. The "L" is for "log" and the other letter comes from
|
||||
# the level.
|
||||
_LI = _translators.log_info
|
||||
_LW = _translators.log_warning
|
||||
_LE = _translators.log_error
|
||||
_LC = _translators.log_critical
|
||||
|
||||
# i18n log translation functions are deprecated. While removing the invocations
|
||||
# requires a lot of reviewing effort, we decide to make it as no-op functions.
|
||||
def _LI(msg):
|
||||
return msg
|
||||
|
||||
|
||||
def _LW(msg):
|
||||
return msg
|
||||
|
||||
|
||||
def _LE(msg):
|
||||
return msg
|
||||
|
||||
|
||||
def _LC(msg):
|
||||
return msg
|
||||
|
Loading…
x
Reference in New Issue
Block a user