From 65929967bc84ede4f1ae425ed0d47230d8ac5524 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Sun, 15 Aug 2021 21:27:20 +0200
Subject: [PATCH] buildings-start_date: use building type as description, start
 date as details

---
 buildings-start_date.json | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/buildings-start_date.json b/buildings-start_date.json
index 599a85e..d8e7798 100644
--- a/buildings-start_date.json
+++ b/buildings-start_date.json
@@ -16,6 +16,9 @@
     },
     "feature": {
         "pre": [
+            "{% set type = tags.building|split(';')[0] %}",
+            "{% if tags.military %}{% set type = 'military' %}{% endif %}",
+            "",
             "{% set start_date = tags.start_date %}",
             "{% if attribute(tags, 'building:start_date') %}{% set start_date = attribute(tags, 'building:start_date') %}{% endif %}",
             "{# Deprecated tags #}",
@@ -59,6 +62,21 @@
             "{% endif %}"
         ],
         "description": [
+            "{% if tags.building == 'yes' and tags.military %}",
+            "{{ tagTrans('building', 'military') }}",
+            "{% elseif tags.building == 'yes' %}",
+            "{{ keyTrans('building') }}",
+            "{% else %}",
+            "{{ tagTransList('building', tags.building) }}",
+            "{% endif %}",
+            "{% if tags.building == 'construction' and tags.construction %}",
+            "({{ tagTransList('building', tags.construction) }})",
+            "{% endif %}",
+            "{% if tags.building in  [ 'yes', 'military' ] and tags.military %}",
+            "({{ tagTransList('military', tags.military) }})",
+            "{% endif %}"
+        ],
+        "details": [
             "{% if start_date %}",
             "{{ start_date|osmFormatDate({ format: 'short' }) }}",
             "{% else %}",