From 7e8189b9ac1c5e818b695f0555994ff15d1465b7 Mon Sep 17 00:00:00 2001 From: Rob Cresswell Date: Thu, 1 Sep 2016 15:11:33 +0100 Subject: [PATCH] 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 --- tox.ini | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tox.ini b/tox.ini index 9e9cd9c0..a80a9ca3 100644 --- a/tox.ini +++ b/tox.ini @@ -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 + +