From fd8f35309d6149f3c4924dcf95beca8ec3bbf520 Mon Sep 17 00:00:00 2001 From: Aaron Lidman Date: Thu, 14 Nov 2013 09:12:39 -0800 Subject: [PATCH] Fix disabled overlay layers translations --- app/assets/javascripts/leaflet.layers.js | 4 ++-- config/locales/en.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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." -- 2.43.2