general: add javascript catalog to translate map tooltips (#26266)
This commit is contained in:
parent
397a5e42c0
commit
b74b099f85
|
@ -274,7 +274,8 @@ class Map(CellBase):
|
|||
verbose_name = _('Map')
|
||||
|
||||
class Media:
|
||||
js = ('xstatic/leaflet.js', 'js/leaflet-gps.js', 'js/combo.map.js',
|
||||
js = ('/jsi18n',
|
||||
'xstatic/leaflet.js', 'js/leaflet-gps.js', 'js/combo.map.js',
|
||||
'xstatic/leaflet.markercluster.js')
|
||||
css = {'all': ('xstatic/leaflet.css', 'css/combo.map.css')}
|
||||
|
||||
|
|
|
@ -137,7 +137,11 @@ $(function() {
|
|||
}
|
||||
var map_controls_position = $('body').data('map-controls-position') || 'topleft';
|
||||
if (map_options.maxZoom != map_options.minZoom) {
|
||||
new L.Control.Zoom({position: map_controls_position}).addTo(map);
|
||||
new L.Control.Zoom({
|
||||
position: map_controls_position,
|
||||
zoomInTitle: gettext('Zoom in'),
|
||||
zoomOutTitle: gettext('Zoom out')
|
||||
}).addTo(map);
|
||||
}
|
||||
if (L.Control.Gps && $map_widget.data('include-geoloc-button')) {
|
||||
var gps_control = new L.Control.Gps({position: map_controls_position});
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# Combo French Translation.
|
||||
# Copyright (C) 2018 Entr'ouvert
|
||||
# This file is distributed under the same license as the Combo package.
|
||||
# Frederic Peters <fpeters@entrouvert.com>, 2018.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: combo(js) 0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-13 07:22+0000\n"
|
||||
"PO-Revision-Date: 2018-09-13 09:29+0200\n"
|
||||
"Last-Translator: Frederic Peters <<fpeters@entrouvert.com>\n"
|
||||
"Language: French\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"
|
||||
|
||||
#: apps/maps/static/js/combo.map.js:142
|
||||
msgid "Zoom in"
|
||||
msgstr "Zoomer"
|
||||
|
||||
#: apps/maps/static/js/combo.map.js:143
|
||||
msgid "Zoom out"
|
||||
msgstr "Dézoomer"
|
|
@ -19,6 +19,7 @@ from django.conf.urls import include, url
|
|||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.views.i18n import javascript_catalog
|
||||
|
||||
from .urls_utils import decorated_includes, manager_required
|
||||
|
||||
|
@ -34,6 +35,7 @@ urlpatterns = [
|
|||
url(r'^logout/$', logout, name='auth_logout'),
|
||||
url(r'^login/$', login, name='auth_login'),
|
||||
url(r'^404$', error404),
|
||||
url(r'^jsi18n$', javascript_catalog, name='javascript-catalog'),
|
||||
]
|
||||
|
||||
handler404 = error404
|
||||
|
|
Loading…
Reference in New Issue