Deprecate _ builtin translation function
This function is discouraged for usage as per oslo.i18n guidelines [1], so we should deprecate and remove it. [1] http://docs.openstack.org/developer/oslo.i18n/usage.html Change-Id: I848ee1dbd16a23c4db42df4690bf139bd769f3e8 Partial-Bug: #1520094
This commit is contained in:
parent
2d8632e412
commit
51d4d858ac
|
@ -14,6 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import gettext
|
||||
|
||||
from debtcollector import removals
|
||||
import six
|
||||
|
||||
|
||||
|
@ -21,3 +23,8 @@ if six.PY2:
|
|||
gettext.install('neutron', unicode=1)
|
||||
else:
|
||||
gettext.install('neutron')
|
||||
|
||||
|
||||
six.moves.builtins.__dict__['_'] = removals.remove(
|
||||
message='Builtin _ translation function is deprecated in OpenStack; '
|
||||
'use the function from _i18n module for your project.')(_)
|
||||
|
|
Loading…
Reference in New Issue