From 74ac9bf93fdce2f0f140c44d4ee3b8932216691f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 13 Sep 2018 10:01:33 +0200 Subject: [PATCH 2/2] maps: translate tooltip texts (#26375) --- wcs/qommon/static/js/qommon.map.js | 11 +++++++++-- wcs/root.py | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/wcs/qommon/static/js/qommon.map.js b/wcs/qommon/static/js/qommon.map.js index 8ee049bdb..82934a76c 100644 --- a/wcs/qommon/static/js/qommon.map.js +++ b/wcs/qommon/static/js/qommon.map.js @@ -26,9 +26,16 @@ $(window).on('load', function() { } var map = L.map($(this).attr('id'), map_options); var map_controls_position = $('body').data('map-controls-position') || 'topleft'; - new L.Control.Zoom({position: map_controls_position}).addTo(map); + new L.Control.Zoom({ + position: map_controls_position, + zoomInTitle: WCS_I18N.map_zoom_in, + zoomOutTitle: WCS_I18N.map_zoom_out + }).addTo(map); $map_widget[0].leaflet_map = map; - var gps_control = new L.Control.Gps({position: map_controls_position}); + var gps_control = new L.Control.Gps({ + position: map_controls_position, + tooltipTitle: WCS_I18N.map_display_position + }); var hidden = $(this).prev(); map.marker = null; var latlng; diff --git a/wcs/root.py b/wcs/root.py index 7e3523aad..586dcdbe8 100644 --- a/wcs/root.py +++ b/wcs/root.py @@ -366,6 +366,9 @@ class RootDirectory(Directory): 'geoloc_permission_denied': _('Geolocation: permission denied'), 'geoloc_position_unavailable': _('Geolocation: position unavailable'), 'geoloc_timeout': _('Geolocation: timeout'), + 'map_zoom_in': _('Zoom in'), + 'map_zoom_out': _('Zoom out'), + 'map_display_position': _('Display my position'), } return 'WCS_I18N = %s;\n' % json.dumps(strings) -- 2.19.0