X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d3b2b47964ec91ef1ab1946b7258a06665caced..e2e61692ea04fc156221082aeddc21ea18facdec:/app/assets/javascripts/index/query.js diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index ee9d3f415..790057400 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -68,12 +68,14 @@ OSM.Query = function (map) { const tags = feature.tags; let prefix = ""; - if (tags.boundary === "administrative" && tags.admin_level) { - prefix = I18n.t("geocoder.search_osm_nominatim.admin_levels.level" + tags.admin_level, { - defaultValue: I18n.t("geocoder.search_osm_nominatim.prefix.boundary.administrative") + if (tags.boundary === "administrative" && (tags.border_type || tags.admin_level)) { + prefix = OSM.i18n.t("geocoder.search_osm_nominatim.border_types." + tags.border_type, { + defaultValue: OSM.i18n.t("geocoder.search_osm_nominatim.admin_levels.level" + tags.admin_level, { + defaultValue: OSM.i18n.t("geocoder.search_osm_nominatim.prefix.boundary.administrative") + }) }); } else { - const prefixes = I18n.t("geocoder.search_osm_nominatim.prefix"); + const prefixes = OSM.i18n.t("geocoder.search_osm_nominatim.prefix"); for (const key in tags) { const value = tags[key]; @@ -98,7 +100,7 @@ OSM.Query = function (map) { } if (!prefix) { - prefix = I18n.t("javascripts.query." + feature.type); + prefix = OSM.i18n.t("javascripts.query." + feature.type); } return prefix; @@ -211,14 +213,14 @@ OSM.Query = function (map) { if (results.remark) { $("