misc: complete and allow translation of leaflet title attribute (#88610)
gitea/wcs/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2024-03-25 11:45:05 +01:00
parent e0857ce653
commit c7c0c9a380
2 changed files with 3 additions and 0 deletions

View File

@ -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({

View File

@ -80,6 +80,7 @@ def i18n_js(request):
'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'),