From 5528e8170e977859cf3c42561d5353af79c20c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 12 Jul 2017 07:34:06 +0200 Subject: [PATCH] Better translation --- communication.json | 5 ++--- gastro.json | 2 +- public.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/communication.json b/communication.json index 51308a7b5..62ac5144e 100644 --- a/communication.json +++ b/communication.json @@ -6,10 +6,9 @@ }, "minZoom": 13, "feature": { - "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', tags.amenity)) }}", + "title": "{{ localizedTag(tags, 'name') |default(localizedTag(tags, 'operator')) |default(tagTrans('amenity', tags.amenity)) }}", "markerSign": "{% if tags.amenity=='post_office' %}🏤{% elseif tags.amenity=='post_box'%}📮{% elseif tags.amenity=='internet_cafe' %}💻{% elseif tags.amenity=='telephone' %}✆{% endif %}", - "body": "{{ tagTrans('amenity', tags.amenity) }}
{% if tags.operator %}Operator: {{ tags.operator }}
{% endif %}", + "body": "{{ tagTrans('amenity', tags.amenity) }}
{% if tags.operator %}{{ tagTrans('operator') }}: {{ localizedTag(tags, 'operator') }}
{% endif %}", "description": "{{ tagTrans('amenity', tags.amenity) }}" } } - diff --git a/gastro.json b/gastro.json index c8d4c4b6c..a9629db2a 100644 --- a/gastro.json +++ b/gastro.json @@ -4,7 +4,7 @@ "minZoom": 16, "feature": { "markerSign": "{% if tags.amenity=='bar' %}🍸{% elseif tags.amenity=='biergarten'%}🍻{% elseif tags.amenity=='cafe' %}☕{% elseif tags.amenity=='fast_food' %}🍔{% elseif tags.amenity=='ice_cream' %}🍨{% elseif tags.amenity=='pub' %}🍺{% else %}🍴{% endif %}", - "body": "{{ tagTrans('amenity', tags.amenity) }}
{{ tagTrans('cuisine') }}: {{ tagTransList('cuisine', tags.cuisine)|default('unknown') }}", + "body": "{{ tagTrans('amenity', tags.amenity) }}
{{ tagTrans('cuisine') }}: {{ tagTransList('cuisine', tags.cuisine)|default(trans('unknown')) }}", "description": "{{ tagTrans('amenity', tags.amenity) }}" } } diff --git a/public.json b/public.json index 7364bcfec..7417e0a2a 100644 --- a/public.json +++ b/public.json @@ -8,7 +8,7 @@ "feature": { "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', tags.amenity)) }}", "markerSign": "{% if tags.amenity=='post_office' %}🏤{% elseif tags.amenity=='post_box'%}📮{% elseif tags.amenity=='internet_cafe' %}💻{% elseif tags.amenity=='telephone' %}✆{% endif %}", - "body": "{{ tagTrans('amenity', tags.amenity) }}
{% if tags.operator %}Operator: {{ tags.operator }}
{% endif %}", + "body": "{{ tagTrans('amenity', tags.amenity) }}
{% if tags.operator %}{{ tagTrans('operator'): {{ tags.operator }}
{% endif %}", "description": "{{ tagTrans('amenity', tags.amenity) }}" } }