doc: contextual/plural translation requires oslo.i18n >=2.1.0
We introduced contextual/plural translation in version 2.1.0, so declare this in documentation to avoid AttributeError. Change-Id: Iadc24d19e2a2b799a5009a806ee7c64867b1d554 Related-Bug: #1525992
This commit is contained in:
parent
59bb7070f3
commit
e749d84f3b
@ -45,6 +45,9 @@ And recommend the following code to use plural form::
|
|||||||
The contextual form and plural form are used only when needed.
|
The contextual form and plural form are used only when needed.
|
||||||
By default, the translation should use the ``_()``.
|
By default, the translation should use the ``_()``.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
These two functions were only available in oslo.i18n >= 2.1.0.
|
||||||
|
|
||||||
Log Translation
|
Log Translation
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
@ -41,9 +41,11 @@ the marker functions the factory creates.
|
|||||||
_ = _translators.primary
|
_ = _translators.primary
|
||||||
|
|
||||||
# The contextual translation function using the name "_C"
|
# The contextual translation function using the name "_C"
|
||||||
|
# requires oslo.i18n >=2.1.0
|
||||||
_C = _translators.contextual_form
|
_C = _translators.contextual_form
|
||||||
|
|
||||||
# The plural translation function using the name "_P"
|
# The plural translation function using the name "_P"
|
||||||
|
# requires oslo.i18n >=2.1.0
|
||||||
_P = _translators.plural_form
|
_P = _translators.plural_form
|
||||||
|
|
||||||
# Translators for log levels.
|
# Translators for log levels.
|
||||||
|
Loading…
Reference in New Issue
Block a user