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": [ "
{{ markerCircle({})|raw }} {{ data.sign|raw }} | ",
- " {{ tagTrans('historic', value) }} | ", + "{{ tagTrans('memorial', value) }}{% for alias in data.alias %}, {{ tagTrans('memorial', alias) }}{% endfor %} | ", "