]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/query.js
Merge remote-tracking branch 'upstream/pull/5778'
[rails.git] / app / assets / javascripts / index / query.js
index c0395c70182438a55854a8ce2068f552807d2f6b..dfe0adfe2d62fb492309562ec143dfd5fda3bed9 100644 (file)
@@ -68,9 +68,11 @@ 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 = I18n.t("geocoder.search_osm_nominatim.border_types." + tags.border_type, {
+        defaultValue: I18n.t("geocoder.search_osm_nominatim.admin_levels.level" + tags.admin_level, {
+          defaultValue: I18n.t("geocoder.search_osm_nominatim.prefix.boundary.administrative")
+        })
       });
     } else {
       const prefixes = I18n.t("geocoder.search_osm_nominatim.prefix");