Replace deprecated ugettext_lazy
The ugettext_lazy method has been deprecated since Django 3.0[1]. This was already replaced in Horizon repo by [2]. [1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3 [2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee This change also removes usage of the deprecated methods in the pybabel command to extract log messages. Change-Id: I6a1f17e310f20e3dc6b510308fb4bd5e768b0212
This commit is contained in:
parent
8974cb6771
commit
8ae2c2517d
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
import horizon
|
import horizon
|
||||||
|
|
||||||
|
14
tox.ini
14
tox.ini
@ -92,11 +92,13 @@ commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasen
|
|||||||
[testenv:extractmessages]
|
[testenv:extractmessages]
|
||||||
commands =
|
commands =
|
||||||
pybabel extract -F babel-django.cfg \
|
pybabel extract -F babel-django.cfg \
|
||||||
-o ironic_ui/locale/django.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
|
-o ironic_ui/locale/django.pot \
|
||||||
-k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2 -k npgettext:1c,2,3 \
|
-k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
|
||||||
-k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 --add-comments Translators: ironic_ui
|
-k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 \
|
||||||
|
--add-comments Translators: ironic_ui
|
||||||
pybabel extract -F babel-djangojs.cfg \
|
pybabel extract -F babel-djangojs.cfg \
|
||||||
-o ironic_ui/locale/djangojs.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
|
-o ironic_ui/locale/djangojs.pot \
|
||||||
-k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2 -k npgettext:1c,2,3 \
|
-k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
|
||||||
-k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 --add-comments Translators: ironic_ui
|
-k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 \
|
||||||
|
--add-comments Translators: ironic_ui
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user