From 0edcc9d3282efb66ee458b7d489dd698aac41668 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 19 Sep 2017 17:08:31 -0400 Subject: [PATCH] Adjust feature tooltip message when OSM layer is hidden (re: https://github.com/openstreetmap/iD/issues/4292#issuecomment-330588097) --- data/core.yaml | 1 + dist/locales/en.json | 3 ++- modules/ui/map_data.js | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index ad6eae123..9873c1660 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -397,6 +397,7 @@ en: fill_area: Fill Areas map_features: Map Features autohidden: "These features have been automatically hidden because too many would be shown on the screen. You can zoom in to edit them." + osmhidden: "These features have been automatically hidden because the OpenStreetMap layer is hidden." feature: points: description: Points diff --git a/dist/locales/en.json b/dist/locales/en.json index 72bb2b2d3..45fbb7888 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -488,7 +488,8 @@ }, "fill_area": "Fill Areas", "map_features": "Map Features", - "autohidden": "These features have been automatically hidden because too many would be shown on the screen. You can zoom in to edit them." + "autohidden": "These features have been automatically hidden because too many would be shown on the screen. You can zoom in to edit them.", + "osmhidden": "These features have been automatically hidden because the OpenStreetMap layer is hidden." }, "feature": { "points": { diff --git a/modules/ui/map_data.js b/modules/ui/map_data.js index 4ea88c40e..21c71324f 100644 --- a/modules/ui/map_data.js +++ b/modules/ui/map_data.js @@ -335,7 +335,8 @@ export function uiMapData(context) { key = (d === 'wireframe' ? t('area_fill.wireframe.key') : null); if (name === 'feature' && autoHiddenFeature(d)) { - tip += '
' + t('map_data.autohidden') + '
'; + var msg = showsLayer('osm') ? t('map_data.autohidden') : t('map_data.osmhidden'); + tip += '
' + msg + '
'; } return uiTooltipHtml(tip, key); })