From 6c6b34dc53d602d8394fa354dc8c90e7df802ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 9 Jan 2019 21:37:23 +0100 Subject: [PATCH] gastro: improve diet filter --- gastro.json | 20 +++++++++++++++++++- lang/de.json | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gastro.json b/gastro.json index a61b60d5..83d645bc 100644 --- a/gastro.json +++ b/gastro.json @@ -46,6 +46,7 @@ ], "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}" }, + "info": "{{ repoTrans('Objects with diet information') }}", "filter": { "amenity": { "name": "{{ keyTrans('amenity') }}", @@ -89,7 +90,24 @@ "diet": { "name": "{{ keyTrans('diet') }}", "type": "select", - "values": [ "diet:vegan", "diet:vegetarian", "diet:pescetarian", "diet:lacto_vegetarian", "diet:ovo_vegetarian", "diet:fruitarian", "diet:raw", "diet:gluten_free", "diet:dairy_free", "diet:lactose_free", "diet:halal", "diet:kosher" ], + "values": { + "*": { + "name": "{{ repoTrans('Objects with diet information') }}", + "query": "nwr[~\"^diet:\"~\".\"]" + }, + "diet:vegan": {}, + "diet:vegetarian": {}, + "diet:pescetarian": {}, + "diet:lacto_vegetarian": {}, + "diet:ovo_vegetarian": {}, + "diet:fruitarian": {}, + "diet:raw": {}, + "diet:gluten_free": {}, + "diet:dairy_free": {}, + "diet:lactose_free": {}, + "diet:halal": {}, + "diet:kosher": {} + }, "valueName": "{{ keyTrans(value) }}", "op": "has_key_value" } diff --git a/lang/de.json b/lang/de.json index 64e096f9..48e550a9 100644 --- a/lang/de.json +++ b/lang/de.json @@ -68,5 +68,6 @@ "category:waste": "Entsorgung", "category:water": "Gewässer", "category:wikipedia": "Wikipedia", - "category:works": "Fabriken" + "category:works": "Fabriken", + "Objects with diet information": "Objekte mit Ernährungsinformationen" }