Merge "Fixed dashboard angular translation issue"
This commit is contained in:
commit
936e190c18
3
horizon/templates/horizon/_script_i18n.html
Normal file
3
horizon/templates/horizon/_script_i18n.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% load url from future %}
|
||||
{% comment %} Django's JavaScript i18n Implementation {% endcomment %}
|
||||
<script type="text/javascript" src="{% url 'horizon:jsi18n' 'horizon' %}"></script>
|
@ -4,8 +4,7 @@
|
||||
|
||||
{% datepicker_locale as DATEPICKER_LOCALE %}
|
||||
|
||||
{% comment %} Django's JavaScript i18n Implementation {% endcomment %}
|
||||
<script type="text/javascript" src="{% url 'horizon:jsi18n' 'horizon' %}"></script>
|
||||
{% include "horizon/_script_i18n.html" %}
|
||||
|
||||
{% comment %} Compress jQuery, Angular, Plugins, Bootstrap, Hogan.js and Horizon-specific JS. {% endcomment %}
|
||||
{% compress 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'),
|
||||
|
3
openstack_dashboard/templates/horizon/_script_i18n.html
Normal file
3
openstack_dashboard/templates/horizon/_script_i18n.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% load url from future %}
|
||||
{% comment %} Django's JavaScript i18n Implementation {% endcomment %}
|
||||
<script type="text/javascript" src="{% url 'horizon:jsi18n' 'horizon+openstack_dashboard' %}"></script>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user