misc: complete and allow translation of leaflet title attribute (#88610) #1310
|
@ -26,6 +26,8 @@ $(window).on('wcs:maps-init', function() {
|
|||
}
|
||||
map_options.gestureHandling = true;
|
||||
var map = L.map($(this).attr('id'), map_options);
|
||||
map.attributionControl.setPrefix(
|
||||
'<a href="https://leafletjs.com" title="' + WCS_I18N.map_leaflet_title_attribute + '">Leaflet</a>')
|
||||
|
||||
var map_controls_position = $('body').data('map-controls-position') || 'topleft';
|
||||
if (! ($map_widget.parents('#sidebar').length || $map_widget.parents('td').length)) {
|
||||
new L.Control.Zoom({
|
||||
|
@ -204,7 +206,7 @@ $(window).on('wcs:maps-init', function() {
|
|||
|
||||
$map_widget.on('set-geolocation', function(e, coords, options) {
|
||||
if (map.marker === null) {
|
||||
map.marker = L.marker([0, 0]);
|
||||
map.marker = L.marker([0, 0], {alt: WCS_I18N.map_position_marker_alt});
|
||||
fpeters
commented
Mais pour le marqueur aussi, par défaut il a alt="Marker", pas traduit. Mais pour le marqueur aussi, par défaut il a alt="Marker", pas traduit.
|
||||
map.marker.addTo(map);
|
||||
}
|
||||
map.marker.setLatLng(coords);
|
||||
|
|
|
@ -74,12 +74,14 @@ def i18n_js(request):
|
|||
'geoloc_permission_denied': _('Geolocation: permission denied'),
|
||||
'geoloc_position_unavailable': _('Geolocation: position unavailable'),
|
||||
'geoloc_timeout': _('Geolocation: timeout'),
|
||||
'map_position_marker_alt': _('Marker of selected position'),
|
||||
fpeters
commented
Comme juste "Marqueur" ça faisait un peu léger j'ai explicité. Comme juste "Marqueur" ça faisait un peu léger j'ai explicité.
|
||||
'map_search_error': _('An error occured while fetching results'),
|
||||
'map_search_hint': _('Search address'),
|
||||
'map_search_searching': _('Searching...'),
|
||||
'map_zoom_in': _('Zoom in'),
|
||||
'map_zoom_out': _('Zoom out'),
|
||||
'map_display_position': _('Display my position'),
|
||||
'map_leaflet_title_attribute': _('Leaflet, a JavaScript library for interactive maps'),
|
||||
's2_errorloading': _('The results could not be loaded'),
|
||||
's2_nomatches': _('No matches found'),
|
||||
's2_tooshort': _('Please enter more characters'),
|
||||
|
|
Loading…
Reference in New Issue
J'avais d'abord uniquement vu ici une chaine en anglais.