From: Aaron Lidman Date: Thu, 14 Nov 2013 17:12:39 +0000 (-0800) Subject: Fix disabled overlay layers translations X-Git-Tag: live~4674^2~73 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/fd8f35309d6149f3c4924dcf95beca8ec3bbf520?hp=439ad373ec5ee364003625e56159b1dce5fb186e Fix disabled overlay layers translations --- diff --git a/app/assets/javascripts/leaflet.layers.js b/app/assets/javascripts/leaflet.layers.js index 2d28c256c..c506c951e 100644 --- a/app/assets/javascripts/leaflet.layers.js +++ b/app/assets/javascripts/leaflet.layers.js @@ -155,9 +155,9 @@ L.OSM.layers = function(options) { map.on('zoomend', function() { var disabled = map.getZoom() < minZoom + 1; $(input).prop('disabled', disabled); - disabled ? $(item).attr('class', 'disabled') : $(item).attr('class', ''); + $(item).attr('class', disabled ? 'disabled' : ''); item.attr('data-original-title', disabled ? - 'Zoom in to see ' + name.toLowerCase() : ''); + I18n.t('javascripts.site.' + refName + '_zoom_in_tooltip') : ''); }); } diff --git a/config/locales/en.yml b/config/locales/en.yml index ffaefd147..4ce5b721d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2050,6 +2050,8 @@ en: edit_disabled_tooltip: Zoom in to edit the map createnote_tooltip: Add a note to the map createnote_disabled_tooltip: Zoom in to add a note to the map + map_notes_zoom_in_tooltip: Zoom in to see map notes + map_data_zoom_in_tooltip: Zoom in to see map data notes: new: intro: "In order to improve the map the information you enter is shown to other mappers, so please be as descriptive and precise as possible when moving the marker to the correct position and entering your note below."