Browse Source

keyTrans() to translate keys

master
parent
commit
07d9e0b6ad
  1. 4
      children.json
  2. 2
      communication.json
  3. 2
      education.json
  4. 2
      gastro.json
  5. 2
      places.json
  6. 2
      power.json
  7. 2
      public.json
  8. 2
      railway.json

4
children.json

@ -4,7 +4,7 @@
"minZoom": 15, "minZoom": 15,
"feature": { "feature": {
"markerSign": "{% if tags.leisure=='playground' %}&#9977;{% elseif tags.leisure=='summer_camp'%}&#127957;{% elseif tags.leisure=='indoor_play' or tags.kids_area %}&#127968;{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}<i class=\"fa fa-shopping-cart\"></i>{% elseif tags.amenity=='toilets' and tags.diaper %}&#128701;&#128700;{% endif %}", "markerSign": "{% if tags.leisure=='playground' %}&#9977;{% elseif tags.leisure=='summer_camp'%}&#127957;{% elseif tags.leisure=='indoor_play' or tags.kids_area %}&#127968;{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}<i class=\"fa fa-shopping-cart\"></i>{% elseif tags.amenity=='toilets' and tags.diaper %}&#128701;&#128700;{% endif %}",
"body": "{% if tags.leisure=='playground' %}{{ tagTrans('leisure', 'playground') }}{% elseif tags.leisure=='summer_camp'%}{{ tagTrans('leisure', 'summer_camp') }}{% elseif tags.leisure=='indoor_play' %}{{ tagTrans('leisure', 'indoor_play') }}{% elseif tags.kids_area %}{{ tagTrans('kids_area') }}{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{{ tagTrans('shop') }}: {{ tagTrans('shop', tags.shop) }}{% elseif tags.amenity=='toilets' and tags.diaper %}{{ tagTrans('amenity', 'toilets') }} with diaper changing table{% endif %}",
"description": "{% if tags.leisure=='playground' %}{{ tagTrans('leisure', 'playground') }}{% elseif tags.leisure=='summer_camp'%}{{ tagTrans('leisure', 'summer_camp') }}{% elseif tags.leisure=='indoor_play' %}{{ tagTrans('leisure', 'indoor_play') }}{% elseif tags.kids_area %}{{ tagTrans('kids_area') }}{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{{ tagTrans('shop') }}: {{ tagTrans('shop', tags.shop) }}{% elseif tags.amenity=='toilets' and tags.diaper %}{{ tagTrans('amenity', 'toilets') }} with diaper changing table{% endif %}"
"body": "{% if tags.leisure=='playground' %}{{ tagTrans('leisure', 'playground') }}{% elseif tags.leisure=='summer_camp'%}{{ tagTrans('leisure', 'summer_camp') }}{% elseif tags.leisure=='indoor_play' %}{{ tagTrans('leisure', 'indoor_play') }}{% elseif tags.kids_area %}{{ keyTrans('kids_area') }}{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{{ keyTrans('shop') }}: {{ tagTrans('shop', tags.shop) }}{% elseif tags.amenity=='toilets' and tags.diaper %}{{ tagTrans('amenity', 'toilets') }} with diaper changing table{% endif %}",
"description": "{% if tags.leisure=='playground' %}{{ tagTrans('leisure', 'playground') }}{% elseif tags.leisure=='summer_camp'%}{{ tagTrans('leisure', 'summer_camp') }}{% elseif tags.leisure=='indoor_play' %}{{ tagTrans('leisure', 'indoor_play') }}{% elseif tags.kids_area %}{{ keyTrans('kids_area') }}{% elseif tags.shop=='baby_goods' or tags.shop=='toys' %}{{ keyTrans('shop') }}: {{ tagTrans('shop', tags.shop) }}{% elseif tags.amenity=='toilets' and tags.diaper %}{{ tagTrans('amenity', 'toilets') }} with diaper changing table{% endif %}"
} }
} }

2
communication.json

@ -8,7 +8,7 @@
"feature": { "feature": {
"title": "{{ localizedTag(tags, 'name') |default(localizedTag(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' %}&#127972;{% elseif tags.amenity=='post_box'%}&#128238;{% elseif tags.amenity=='internet_cafe' %}&#128187;{% elseif tags.amenity=='telephone' %}&#9990;{% endif %}", "markerSign": "{% if tags.amenity=='post_office' %}&#127972;{% elseif tags.amenity=='post_box'%}&#128238;{% elseif tags.amenity=='internet_cafe' %}&#128187;{% elseif tags.amenity=='telephone' %}&#9990;{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{% if tags.operator %}{{ tagTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br/>{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br/>{% endif %}",
"description": "{{ tagTrans('amenity', tags.amenity) }}" "description": "{{ tagTrans('amenity', tags.amenity) }}"
} }
} }

2
education.json

@ -8,7 +8,7 @@
"minZoom": 11, "minZoom": 11,
"feature": { "feature": {
"markerSign": "{% if tags.amenity == 'university' or tags.amenity == 'college' %}🎓{% elseif tags.amenity == 'library' %}🕮{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}🏫{% elseif tags.amenity == 'kindergarten' %}⛹{% elseif tags.amenity == 'public_bookcase' %}📚{% endif %}", "markerSign": "{% if tags.amenity == 'university' or tags.amenity == 'college' %}🎓{% elseif tags.amenity == 'library' %}🕮{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}🏫{% elseif tags.amenity == 'kindergarten' %}⛹{% elseif tags.amenity == 'public_bookcase' %}📚{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{% if tags.operator %}{{ tagTrans('operator') }}: {{ tags.operator }}<br/>{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}<br/>{% endif %}",
"description": "{{ tagTrans('amenity', tags.amenity) }}", "description": "{{ tagTrans('amenity', tags.amenity) }}",
"priority": "{% if tags.amenity == 'university' %}0{% elseif tags.amenity == 'college' %}1{% elseif tags.amenity == 'library' %}2{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}3{% elseif tags.amenity == 'kindergarten' %}4{% elseif tags.amenity == 'public_bookcase' %}5{% endif %}" "priority": "{% if tags.amenity == 'university' %}0{% elseif tags.amenity == 'college' %}1{% elseif tags.amenity == 'library' %}2{% elseif tags.amenity == 'school' or tags.amenity == 'language_school' %}3{% elseif tags.amenity == 'kindergarten' %}4{% elseif tags.amenity == 'public_bookcase' %}5{% endif %}"
} }

2
gastro.json

@ -4,7 +4,7 @@
"minZoom": 16, "minZoom": 16,
"feature": { "feature": {
"markerSign": "{% if tags.amenity=='bar' %}&#127864;{% elseif tags.amenity=='biergarten'%}&#127867;{% elseif tags.amenity=='cafe' %}&#9749;{% elseif tags.amenity=='fast_food' %}&#127828;{% elseif tags.amenity=='ice_cream' %}&#127848;{% elseif tags.amenity=='pub' %}&#127866;{% else %}&#127860;{% endif %}", "markerSign": "{% if tags.amenity=='bar' %}&#127864;{% elseif tags.amenity=='biergarten'%}&#127867;{% elseif tags.amenity=='cafe' %}&#9749;{% elseif tags.amenity=='fast_food' %}&#127828;{% elseif tags.amenity=='ice_cream' %}&#127848;{% elseif tags.amenity=='pub' %}&#127866;{% else %}&#127860;{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{{ tagTrans('cuisine') }}: {{ tagTransList('cuisine', tags.cuisine)|default(trans('unknown')) }}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{{ keyTrans('cuisine') }}: {{ tagTransList('cuisine', tags.cuisine)|default(trans('unknown')) }}",
"description": "{{ tagTrans('amenity', tags.amenity) }}" "description": "{{ tagTrans('amenity', tags.amenity) }}"
} }
} }

2
places.json

@ -13,7 +13,7 @@
"minZoom": 0, "minZoom": 0,
"feature": { "feature": {
"title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}", "title": "{% set loc_name = localizedTag(tags, 'name') %}{{ loc_name }}{% if loc_name != tags.name %} ({{ tags.name }}){% endif %}",
"body": "{{ tagTrans('place', tags.place) }}\n{% if tags.population %}<br/>{{ tagTrans('population') }}: {{ tags.population }}{% endif %} \n",
"body": "{{ tagTrans('place', tags.place) }}\n{% if tags.population %}<br/>{{ keyTrans('population') }}: {{ tags.population }}{% endif %} \n",
"description": "{{ tagTrans('place', tags.place) }}", "description": "{{ tagTrans('place', tags.place) }}",
"priority": "{% set priorities = { 'continent': 0, 'country': 1, 'state': 2, 'region': 3, 'city': 4, 'town': 5, 'village': 6, 'suburb': 7, 'hamlet': 8, 'quarter': 9, neighbourhood: 10, 'isolated_dwelling': 11, 'farm': 12 } %}{{ priorities[tags.place] }}" "priority": "{% set priorities = { 'continent': 0, 'country': 1, 'state': 2, 'region': 3, 'city': 4, 'town': 5, 'village': 6, 'suburb': 7, 'hamlet': 8, 'quarter': 9, neighbourhood: 10, 'isolated_dwelling': 11, 'farm': 12 } %}{{ priorities[tags.place] }}"
} }

2
power.json

@ -9,7 +9,7 @@
"minZoom": 11, "minZoom": 11,
"feature": { "feature": {
"markerSign": "", "markerSign": "",
"body": "{{ tagTrans('power', tags.power) }}\n{% set x='generator:source' %}{% if tags[x] %}<br/>{{ tagTrans('generator:source') }}: {{ tagTransList('generator:source', tags[x]) }}{% endif %}\n{% set x='generator:method' %}{% if tags[x] %}<br/>{{ tagTrans('generator:method') }}: {{ tagTransList('generator:method', tags[x]) }}{% endif %}\n{% set x='generator:type' %}{% if tags[x] %}<br/>{{ tagTransList('generator:type') }}: {{ tagTrans('generator:type', tags[x]) }}{% endif %}",
"body": "{{ tagTrans('power', tags.power) }}\n{% set x='generator:source' %}{% if tags[x] %}<br/>{{ keyTrans('generator:source') }}: {{ tagTransList('generator:source', tags[x]) }}{% endif %}\n{% set x='generator:method' %}{% if tags[x] %}<br/>{{ keyTrans('generator:method') }}: {{ tagTransList('generator:method', tags[x]) }}{% endif %}\n{% set x='generator:type' %}{% if tags[x] %}<br/>{{ tagTransList('generator:type') }}: {{ tagTrans('generator:type', tags[x]) }}{% endif %}",
"description": "{{ tagTrans('power', tags.power) }}{% set x='generator:source' %}{% if tags[x] %}, {{ tagTransList('generator:source', tags[x]) }}{% endif %}", "description": "{{ tagTrans('power', tags.power) }}{% set x='generator:source' %}{% if tags[x] %}, {{ tagTransList('generator:source', tags[x]) }}{% endif %}",
"priority": "{% if tags.power == 'plant' %}0{% elseif tags.power == 'generator' or tags.power == 'line' %}1{% elseif tags.power == 'substation' %}2{% else %}3{% endif %}" "priority": "{% if tags.power == 'plant' %}0{% elseif tags.power == 'generator' or tags.power == 'line' %}1{% elseif tags.power == 'substation' %}2{% else %}3{% endif %}"
} }

2
public.json

@ -8,7 +8,7 @@
"feature": { "feature": {
"title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', tags.amenity)) }}", "title": "{{ tags.name|default(tags.operator)|default(tagTrans('amenity', tags.amenity)) }}",
"markerSign": "{% if tags.amenity=='post_office' %}&#127972;{% elseif tags.amenity=='post_box'%}&#128238;{% elseif tags.amenity=='internet_cafe' %}&#128187;{% elseif tags.amenity=='telephone' %}&#9990;{% endif %}", "markerSign": "{% if tags.amenity=='post_office' %}&#127972;{% elseif tags.amenity=='post_box'%}&#128238;{% elseif tags.amenity=='internet_cafe' %}&#128187;{% elseif tags.amenity=='telephone' %}&#9990;{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{% if tags.operator %}{{ tagTrans('operator') }}: {{ tags.operator }}<br/>{% endif %}",
"body": "{{ tagTrans('amenity', tags.amenity) }}<br/>{% if tags.operator %}{{ keyTrans('operator') }}: {{ tags.operator }}<br/>{% endif %}",
"description": "{{ tagTrans('amenity', tags.amenity) }}" "description": "{{ tagTrans('amenity', tags.amenity) }}"
} }
} }

2
railway.json

@ -16,7 +16,7 @@
"opacity": 1.0 "opacity": 1.0
}, },
"markerSign": "", "markerSign": "",
"body": "{{ tagTrans('railway', tags.railway) }}<br/>\n{% if tags.operator %}{{ tagTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}\n{% if tags.usage %}{{ tagTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}\n{% if tags.service %}{{ tagTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}\n{{ tagTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>\n{% if tags.electrified == 'no' %}{{ tagTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ tagTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ tagTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ tagTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}\n",
"body": "{{ tagTrans('railway', tags.railway) }}<br/>\n{% if tags.operator %}{{ keyTrans('operator') }}: {{ localizedTag(tags, 'operator') }}<br>{% endif %}\n{% if tags.usage %}{{ keyTrans('usage') }}: {{ tagTrans('usage', tags.usage)|default(trans('unknown')) }}<br/>{% endif %}\n{% if tags.service %}{{ keyTrans('service') }}: {{ tagTrans('service', tags.service ) }}<br/>{% endif %}\n{{ keyTrans('gauge') }}: {{ tags.gauge|default(trans('unknown')) }}<br/>\n{% if tags.electrified == 'no' %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', 'no') }}{% elseif tags.electrified %}{{ keyTrans('electrified') }}: {{ tagTrans('electrified', tags.electrified) }}, {{ keyTrans('voltage') }}: {{ tags.voltage|default(trans('unknown')) }}, {{ keyTrans('frequency') }}: {{ tags.frequency|default(trans('unknown')) }}<br/>{% endif %}\n",
"description": "{{ tagTrans('railway', tags.railway) }}", "description": "{{ tagTrans('railway', tags.railway) }}",
"priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}", "priority": "{% if tags.railway == 'station' %}0{% elseif tags.railway in [ 'halt', 'tram_stop' ] %}1{% else %}5{% endif %}",
"title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}" "title": "{% if tags.ref %}{{ localizedTag(tags, 'ref') }} - {% endif %}{{ localizedTag(tags, 'name')|default(localizedTag(tags, 'operator'))|default(trans('unnamed')) }}"

Loading…
Cancel
Save