Add i18n support

There are translatable strings in this library and we need to
support that properly. Replace the stub _() with a proper
implementation based on oslo.i18n.
This commit is contained in:
Ben Nemec 2018-09-12 22:28:44 +00:00
parent 302c40a857
commit 1f333e1aea
3 changed files with 5 additions and 3 deletions

View File

@ -21,9 +21,7 @@ import enum
from oslo_config import cfg
import prettytable
def _(s):
return s
from oslo_upgradecheck._i18n import _
class UpgradeCheckCode(enum.IntEnum):

View File

@ -4,5 +4,6 @@
Babel>=1.3
oslo.config
oslo.i18n
enum34
prettytable

View File

@ -58,3 +58,6 @@ show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]
import_exception = oslo_upgradecheck._i18n