From 13c9999cf79702dfe684672f3056a976708253f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 4 Mar 2019 21:24:09 +0100 Subject: [PATCH] memorial: more types, add alias, different translation --- memorial.json | 94 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 26 deletions(-) diff --git a/memorial.json b/memorial.json index 5197f055..c61991ce 100644 --- a/memorial.json +++ b/memorial.json @@ -26,27 +26,32 @@ "feature": { "pre": [ "{% set memtype = 'yes' %}", - "{% if tags.historic == 'monument' and tags.monument == 'war_monument' %}", - " {% set memtype = 'war_memorial' %}", - "{% elseif tags.memorial %}", + "{% if tags.memorial %}", " {% set memtype = tags.memorial %}", "{% elseif attribute(tags, 'memorial:type') %}", " {% set memtype = attribute(tags, 'memorial:type') %}", "{% elseif attribute(tags, 'monument') %}", " {% set memtype = attribute(tags, 'monument') %}", - "{% endif %}" + "{% elseif attribute(tags, 'memorial_type') %}", + " {% set memtype = attribute(tags, 'memorial_type') %}", + "{% endif %}", + "", + "{% set memgroup = memtype %}", + "{% for value, data in const %}", + "{% if memtype in data.alias %}", + "{% set memgroup = value %}", + "{% endif %}", + "{% endfor %}" ], "description": [ - "{% if tags.historic == 'monument' and tags.monument == 'war_monument' %}", - " {{ tagTrans('historic', 'monument monument=war_monument') }}", - "{% elseif memtype == 'yes' %}", - " {{ tagTrans('historic', tags.historic) }}", - "{% else %}", - " {{ tagTrans('historic', 'memorial memorial=' ~ memtype) }}", + "{% if memtype != 'yes' and tags.historic == 'monument' %}", + " {{ tagTrans('historic', 'monument') }}", "{% endif %}", "", - "{% if tags.historic == 'monument' %}", - " ({{ tagTrans('historic', 'monument') }})", + "{% if memtype == 'yes' %}", + " {{ tagTrans('historic', tags.historic) }}", + "{% else %}", + " {{ tagTrans('memorial', memtype) }}", "{% endif %}" ], "priority": [ @@ -92,7 +97,7 @@ "{% endif %}", "" ], - "markerSign": "{% if memtype == 'yes' %}{% else %}{{ const[memtype].sign|raw }}{% endif %}" + "markerSign": "{{ const[memgroup].sign|raw }}" }, "info": [ "", @@ -100,7 +105,7 @@ "{% if data.zoom <= map.zoom %}", " ", " ", - " ", + " ", " ", "{% endif %}", "{% endfor %}", @@ -112,18 +117,9 @@ "{% endif %}", "
{{ markerCircle({})|raw }}
{{ data.sign|raw }}
{{ tagTrans('historic', value) }}{{ tagTrans('memorial', value) }}{% for alias in data.alias %}, {{ tagTrans('memorial', alias) }}{% endfor %}
" ], - "const1": { - "yes": { - "sign": "", - "zoom": 11 - }, - "memorial": { - "sign": "", - "zoom": 14 - } - }, "const": { "plaque": { + "alias": [ "plate" ], "sign": "", "zoom": 14 }, @@ -132,12 +128,58 @@ "zoom": 14 }, "statue": { - "sign": "", + "sign": "", "zoom": 14 }, "war_memorial": { + "alias": [ "war_monument" ], "sign": "", "zoom": 14 + }, + "stolperstein": { + "sign": "", + "zoom": 14 + }, + "stone": { + "sign": "", + "zoom": 14 + }, + "bust": { + "alias": [ "person" ], + "sign": "", + "zoom": 14 + }, + "stele": { + "alias": [ "obelisk" ], + "sign": "", + "zoom": 14 + }, + "sculpture": { + "sign": "", + "zoom": 14 + }, + "ghost_bike": { + "sign": "", + "zoom": 14 + }, + "vehicle": { + "alias": [ "tank" ], + "sign": "", + "zoom": 14 + }, + "cross": { + "sign": "", + "zoom": 14 + }, + "flood_mark": { + "alias": [ "high_water_mark" ], + "sign": "", + "zoom": 14 + }, + "grave": { + "alias": [ "graveyard" ], + "sign": "", + "zoom": 14 } }, "filter": { @@ -145,7 +187,7 @@ "name": "{{ trans('filter:type') }}", "show_default": "true", "type": "select", - "values": "{% for k, v in const %}{% endfor %}" + "values": "{% for k, v in const %}{% endfor %}" }, "conflict": { "key": "memorial:conflict",