Support i18n
Currently, log format is not following to oslo.i18n. This patch set makes ironic-discoverd possible to use oslo.i18n. Change-Id: I623281239cb12abffbeb377ec6f77f8aa9b90c0c Partial-Bug: #1411272
This commit is contained in:
parent
c46b21aef9
commit
590b109888
|
@ -0,0 +1,31 @@
|
|||
# Copyright 2015 NEC Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo import oslo_i18n
|
||||
|
||||
_translators = oslo_i18n.TranslatorFactory(domain='ironic-discoverd')
|
||||
|
||||
# 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
|
|
@ -3,5 +3,6 @@ Flask>=0.10,<1.0
|
|||
python-ironicclient>=0.2.1
|
||||
python-keystoneclient>=1.0.0
|
||||
requests>=2.2.0,!=2.4.0
|
||||
oslo.i18n>=1.3.0 # Apache-2.0
|
||||
six>=1.7.0
|
||||
stevedore>=1.1.0
|
||||
|
|
2
setup.py
2
setup.py
|
@ -20,7 +20,7 @@ setup(
|
|||
author_email = "dtantsur@redhat.com",
|
||||
url = "https://pypi.python.org/pypi/ironic-discoverd",
|
||||
packages = ['ironic_discoverd', 'ironic_discoverd.plugins',
|
||||
'ironic_discoverd.test'],
|
||||
'ironic_discoverd.test', 'ironic_discoverd.common'],
|
||||
install_requires = install_requires,
|
||||
entry_points = {
|
||||
'console_scripts': [
|
||||
|
|
Loading…
Reference in New Issue