Skip to content
Snippets Groups Projects
Commit 5d8deb56 authored by Martin Burchell's avatar Martin Burchell
Browse files

Internationalise javascript

parent 1b1e16fe
No related branches found
No related tags found
2 merge requests!166Staging,!153Javascript internationalisation
$(document).ready(function() { $(document).ready(function() {
$('#age-range-selector').multiselect({ $('#age-range-selector').multiselect({
nonSelectedText: 'All Ages', nonSelectedText: gettext('All Ages'),
buttonClass: 'form-control', buttonClass: 'form-control',
includeResetOption: true, includeResetOption: true,
numberDisplayed: 1 numberDisplayed: 1
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
</div> </div>
{% endblock content %} {% endblock content %}
{% block bootstrap3_extra_js %} {% block bootstrap3_extra_js %}
{# don't seem to be able to add this to the assets blob #}
<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
{% assets "javascript_assets" %} {% assets "javascript_assets" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script> <script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %} {% endassets %}
......
...@@ -3,6 +3,7 @@ from __future__ import absolute_import, unicode_literals ...@@ -3,6 +3,7 @@ from __future__ import absolute_import, unicode_literals
from django.conf import settings from django.conf import settings
from django.conf.urls import include, url from django.conf.urls import include, url
from django.contrib import admin from django.contrib import admin
from django.views.i18n import JavaScriptCatalog
urlpatterns = [ urlpatterns = [
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
...@@ -11,7 +12,8 @@ urlpatterns = [ ...@@ -11,7 +12,8 @@ urlpatterns = [
url(r'^dashboard/', include('dashboard.urls')), url(r'^dashboard/', include('dashboard.urls')),
url(r'^users/', include('users.urls')), url(r'^users/', include('users.urls')),
url(r'^view-edit/', include('tabbed_page.urls')), url(r'^view-edit/', include('tabbed_page.urls')),
url(r'^', include('hid.urls')) url(r'^', include('hid.urls')),
url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'),
] ]
if settings.DEBUG: if settings.DEBUG:
......
File added
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-16 06:13+0600\n"
"PO-Revision-Date: 2020-01-16 00:15+0000\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.6\n"
#: internewshid/hid/static/hid/js/enable_multiselect.js:3
msgid "All Ages"
msgstr ""
File added
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-16 06:13+0600\n"
"PO-Revision-Date: 2020-01-16 00:15+0000\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 2.0.6\n"
#: internewshid/hid/static/hid/js/enable_multiselect.js:3
msgid "All Ages"
msgstr "Tous les ages"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment