]> git.openstreetmap.org Git - rails.git/commitdiff
Handle unknown admin_level values
authorTom Hughes <tom@compton.nu>
Fri, 7 Nov 2014 19:17:34 +0000 (19:17 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 7 Nov 2014 19:17:34 +0000 (19:17 +0000)
app/assets/javascripts/index/query.js

index 99bb9d9c8abcf368875256a37b8f089395494060..1f45a687278a37a797576628107037830cb9751a 100644 (file)
@@ -82,7 +82,10 @@ OSM.Query = function(map) {
     var prefix = "";
 
     if (tags.boundary === "administrative" && tags.admin_level) {
-      prefix = I18n.t("geocoder.search_osm_nominatim.admin_levels.level" + 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")
+      })
     } else {
       var prefixes = I18n.t("geocoder.search_osm_nominatim.prefix");