diff --git a/horizon/templates/horizon/_script_i18n.html b/horizon/templates/horizon/_script_i18n.html new file mode 100644 index 0000000000..54eb3c2f62 --- /dev/null +++ b/horizon/templates/horizon/_script_i18n.html @@ -0,0 +1,3 @@ +{% load url from future %} +{% comment %} Django's JavaScript i18n Implementation {% endcomment %} + diff --git a/horizon/templates/horizon/_scripts.html b/horizon/templates/horizon/_scripts.html index 1f5fb5cc8e..7a997d0e3a 100644 --- a/horizon/templates/horizon/_scripts.html +++ b/horizon/templates/horizon/_scripts.html @@ -4,8 +4,7 @@ {% datepicker_locale as DATEPICKER_LOCALE %} -{% comment %} Django's JavaScript i18n Implementation {% endcomment %} - +{% include "horizon/_script_i18n.html" %} {% comment %} Compress jQuery, Angular, Plugins, Bootstrap, Hogan.js and Horizon-specific JS. {% endcomment %} {% compress js %} diff --git a/openstack_dashboard/static/dashboard/launch-instance/configuration/configuration.js b/openstack_dashboard/static/dashboard/launch-instance/configuration/configuration.js index 7e7e31e07d..eabea5afe9 100644 --- a/openstack_dashboard/static/dashboard/launch-instance/configuration/configuration.js +++ b/openstack_dashboard/static/dashboard/launch-instance/configuration/configuration.js @@ -49,7 +49,7 @@ config.label = { title: gettext('Configuration'), - subtitle: gettext(''), + subtitle: '', customizationScript: gettext('Customization Script'), customizationScriptMax: gettext('(Max: 16Kb)'), loadScriptFromFile: gettext('Load script from a file'), diff --git a/openstack_dashboard/templates/horizon/_script_i18n.html b/openstack_dashboard/templates/horizon/_script_i18n.html new file mode 100644 index 0000000000..8e9ed0e2c4 --- /dev/null +++ b/openstack_dashboard/templates/horizon/_script_i18n.html @@ -0,0 +1,3 @@ +{% load url from future %} +{% comment %} Django's JavaScript i18n Implementation {% endcomment %} + diff --git a/run_tests.sh b/run_tests.sh index 940a5cca1a..4a701b5a00 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -439,12 +439,15 @@ function run_makemessages { cd ../openstack_dashboard ${command_wrapper} $root/manage.py makemessages $DASHBOARD_OPTS $OPTS DASHBOARD_RESULT=$? + echo -n "openstack_dashboard javascript: " + ${command_wrapper} $root/manage.py makemessages -d djangojs $OPTS + DASHBOARD_JS_RESULT=$? cd .. if [ $check_only -eq 1 ]; then git checkout -- horizon/locale/en/LC_MESSAGES/django*.po git checkout -- openstack_dashboard/locale/en/LC_MESSAGES/django.po fi - exit $(($HORIZON_PY_RESULT || $HORIZON_JS_RESULT || $DASHBOARD_RESULT)) + exit $(($HORIZON_PY_RESULT || $HORIZON_JS_RESULT || $DASHBOARD_RESULT || $DASHBOARD_JS_RESULT)) } function run_compilemessages { @@ -457,7 +460,7 @@ function run_compilemessages { cd .. # English is the source language, so compiled catalogs are unnecessary. rm -vf horizon/locale/en/LC_MESSAGES/django*.mo - rm -vf openstack_dashboard/locale/en/LC_MESSAGES/django.mo + rm -vf openstack_dashboard/locale/en/LC_MESSAGES/django*.mo exit $(($HORIZON_PY_RESULT || $DASHBOARD_RESULT)) } @@ -466,6 +469,7 @@ function run_pseudo { # Use English po file as the source file/pot file just like real Horizon translations do ${command_wrapper} $root/tools/pseudo.py openstack_dashboard/locale/en/LC_MESSAGES/django.po openstack_dashboard/locale/$lang/LC_MESSAGES/django.po $lang + ${command_wrapper} $root/tools/pseudo.py openstack_dashboard/locale/en/LC_MESSAGES/djangojs.po openstack_dashboard/locale/$lang/LC_MESSAGES/djangojs.po $lang ${command_wrapper} $root/tools/pseudo.py horizon/locale/en/LC_MESSAGES/django.po horizon/locale/$lang/LC_MESSAGES/django.po $lang ${command_wrapper} $root/tools/pseudo.py horizon/locale/en/LC_MESSAGES/djangojs.po horizon/locale/$lang/LC_MESSAGES/djangojs.po $lang done