diff --git a/babel-django.cfg b/babel-django.cfg index 4697f2a..ad09d34 100644 --- a/babel-django.cfg +++ b/babel-django.cfg @@ -1,5 +1,5 @@ [extractors] django = django_babel.extract:extract_django -[python: zaqar_ui/**.py] -[django: zaqar_ui/**/templates/**.html] +[python: **.py] +[django: templates/**.html] diff --git a/babel-djangojs.cfg b/babel-djangojs.cfg index 40f859b..a8273b6 100644 --- a/babel-djangojs.cfg +++ b/babel-djangojs.cfg @@ -5,10 +5,10 @@ # details on how this works. angular = horizon.utils.babel_extract_angular:extract_angular -[javascript: zaqar_ui/**.js] +[javascript: **.js] # We need to look into all static folders for HTML files. # The **/static ensures that we also search within # /openstack_dashboard/dashboards/XYZ/static which will ensure # that plugins are also translated. -[angular: zaqar_ui/**/static/**.html] +[angular: **/static/**.html] diff --git a/run_tests.sh b/run_tests.sh index 1342187..8960c2d 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -415,12 +415,13 @@ function babel_extract { KEYWORDS+=" -k ugettext_noop -k ugettext_lazy -k ungettext_lazy:1,2" KEYWORDS+=" -k npgettext:1c,2,3 -k pgettext_lazy:1c,2 -k npgettext_lazy:1c,2,3" - ${command_wrapper} pybabel extract -F babel-${DOMAIN}.cfg -o zaqar_ui/locale/${DOMAIN}.pot $KEYWORDS . + mkdir -p locale + ${command_wrapper} pybabel extract -F ../babel-${DOMAIN}.cfg -o locale/${DOMAIN}.pot $KEYWORDS . } function run_makemessages { - echo -n "zaqar ui: " + cd zaqar_ui babel_extract django ZAQAR_PY_RESULT=$? @@ -428,8 +429,9 @@ function run_makemessages { babel_extract djangojs ZAQAR_JS_RESULT=$? + cd ../ if [ $check_only -eq 1 ]; then - git checkout -- zaqar_ui/locale/django*.pot + rm -f zaqar_ui/locale/django*.pot fi exit $(($ZAQAR_PY_RESULT || $ZAQAR_JS_RESULT))