Make oslo.i18n an optional dependency
In an ideal world we would have all messages translated to at least major languages. In reality, ironic has never boasted a great set of translation, and according to Zanata only 2.94% of messages are translated for ironic in Train (1.33% for ironic-inspector). Given that ironic-python-agent is not translated at all, using i18n by default seems an overkill. Change-Id: I30d0f5ae6c7428ebbf018e14a3b78c430681c6a6
This commit is contained in:
parent
9be0a750a9
commit
306fbe8e35
|
@ -13,8 +13,12 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
try:
|
||||||
import oslo_i18n
|
import oslo_i18n
|
||||||
|
except ImportError:
|
||||||
|
def _(msg):
|
||||||
|
return msg
|
||||||
|
else:
|
||||||
_translators = oslo_i18n.TranslatorFactory(domain='ironicclient')
|
_translators = oslo_i18n.TranslatorFactory(domain='ironicclient')
|
||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The dependency on ``oslo.i18n`` is now optional. If you would like messages
|
||||||
|
from ironicclient to be translated, you need to install it explicitly.
|
|
@ -8,7 +8,6 @@ jsonschema>=2.6.0 # MIT
|
||||||
keystoneauth1>=3.4.0 # Apache-2.0
|
keystoneauth1>=3.4.0 # Apache-2.0
|
||||||
osc-lib>=1.10.0 # Apache-2.0
|
osc-lib>=1.10.0 # Apache-2.0
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
oslo.i18n>=3.15.3 # Apache-2.0
|
|
||||||
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
|
||||||
oslo.utils>=3.33.0 # Apache-2.0
|
oslo.utils>=3.33.0 # Apache-2.0
|
||||||
PyYAML>=3.12 # MIT
|
PyYAML>=3.12 # MIT
|
||||||
|
|
Loading…
Reference in New Issue