translation in JS-files

This commit is contained in:
Oskar Hahn 2012-04-16 11:12:21 +02:00
parent c1cd0a2805
commit 80c5bfbba9
2 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@
<link rel="shortcut icon" href="{% static 'images/favicon.png' %}" type="image/png" />
<script type="text/javascript" src="{% static 'javascript/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/utils.js' %}"></script>
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
{% block header %}
{% endblock %}
</head>

View File

@ -17,8 +17,10 @@ import settings
from utils.views import FrontPage
handler500 = 'openslides.utils.views.server_error'
urlpatterns = patterns('',
# frontpage
(r'^$', FrontPage.as_view()),
@ -32,6 +34,10 @@ urlpatterns = patterns('',
(r'^i18n/', include('django.conf.urls.i18n')),
)
js_info_dict = {
'packages': [],
}
for plugin in settings.INSTALLED_PLUGINS:
try:
mod = import_module(plugin + '.urls')
@ -40,10 +46,12 @@ for plugin in settings.INSTALLED_PLUGINS:
plugin_name = mod.__name__.split('.')[0]
urlpatterns += patterns('', (r'^%s/' % plugin_name, include('%s.urls' % plugin_name)))
js_info_dict['packages'].append(plugin_name)
urlpatterns += patterns('',
(r'^500/$', 'openslides.utils.views.server_error'),
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
url(r'^login/$',
'django.contrib.auth.views.login',