From 7d1afac35b7b05c9b10e51148f0cb5ec5a266bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 9 Dec 2022 20:57:18 +0100 Subject: [PATCH] footways: either tranlate incline or show value --- footways.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/footways.yaml b/footways.yaml index 1d990e4..c9f057f 100644 --- a/footways.yaml +++ b/footways.yaml @@ -109,9 +109,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', tags.smoothness) }} {% endif %} - {% if tags.incline %}
  • + {% set v = tags.incline %} + {% if v %}
  • {{ keyTrans('incline') }}: - {{ tags.incline|formatUnit('incline') }} + {{ v in ['up', 'down', 'yes'] ? tagTrans('incline', v) : v }}
  • {% endif %} {% endif %} @@ -138,9 +139,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', attribute(tags, 'sidewalk:left:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} {% endif %} - {% if attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline')) %}
  • + {% set v = attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline'))|default(tags.incline) %} + {% if v %}
  • {{ keyTrans('incline') }}: - {{ attribute(tags, 'sidewalk:left:incline')|default(attribute(tags, 'sidewalk:both:incline'))|formatUnit('incline') }} + {{ v in ['up', 'down', 'yes'] ? tagTrans('incline', v) : v }}
  • {% endif %} {% endif %} @@ -168,9 +170,10 @@ feature: {{ keyTrans('smoothness') }}: {{ tagTrans('smoothness', attribute(tags, 'sidewalk:right:smoothness')|default(attribute(tags, 'sidewalk:both:smoothness'))) }} {% endif %} - {% if attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline')) %}
  • + {% set v = attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline'))|default(tags.incline) %} + {% if i %}
  • {{ keyTrans('incline') }}: - {{ attribute(tags, 'sidewalk:right:incline')|default(attribute(tags, 'sidewalk:both:incline'))|formatUnit('incline') }} + {{ v in ['up', 'down', 'yes'] ? tagTrans('incline', v) : v }}
  • {% endif %} {% endif %}