Add translation support

Add initial translation support. This will be followed by an infra
change, and then we can go through strings adding translation tags.

Change-Id: I1ce92fd1f2657e59a8b4597c5a01a98af80f4bf3
This commit is contained in:
Rob Cresswell 2016-09-01 15:11:33 +01:00
parent a2de2553fa
commit 7e8189b9ac

13
tox.ini
View File

@ -39,3 +39,16 @@ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
[testenv:releasenotes]
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:extractmessages]
commands =
pybabel extract -F babel-django.cfg \
-o ironic_ui/locale/django.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
-k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2 -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 \
-o ironic_ui/locale/djangojs.pot -k gettext_noop -k gettext_lazy -k ngettext_lazy:1,2 \
-k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2 -k npgettext:1c,2,3 \
-k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3 --add-comments Translators: ironic_ui