From f77139726d6f51ea51497ab443510f267d4062df Mon Sep 17 00:00:00 2001 From: Hufkratzer Date: Mon, 19 Aug 2019 10:44:37 +0200 Subject: [PATCH] make pitchnames translatable make pitchnames translatable in weblate, eg for a tennis court define "tag:leisure pitch sport=tennis" --- leisure.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/leisure.json b/leisure.json index 7a018065..4da0924f 100644 --- a/leisure.json +++ b/leisure.json @@ -28,9 +28,17 @@ }, "feature": { "description": [ - "{{ tagTrans('leisure', tags.leisure) }}", "{% if tags.leisure == 'pitch' and tags.sport %}", - "- {{ tagTransList('sport', tags.sport) }}", + " {% set pitchName = tagTrans('leisure', 'pitch sport=' ~ tags.sport) %}", + "{% endif %}", + "", + "{% if pitchName and pitchName != tags.sport %}", + " {{ pitchName }} ", + "{% else %}", + " {{ tagTrans('leisure', tags.leisure) }}", + " {% if tags.leisure == 'pitch' and tags.sport %}", + " - {{ tagTransList('sport', tags.sport) }}", + " {% endif %}", "{% endif %}" ] }