Browse Source

unfin

name-etym
parent
commit
55a0a117c3
  1. 36
      name-etymology.json

36
name-etymology.json

@ -1,29 +1,43 @@
{ {
"type": "overpass", "type": "overpass",
"name": { "name": {
"en": "Etymology"
"en": "Name Etymology"
}, },
"query": { "query": {
"16": [
"14": [
"(", "(",
"nwr[\"name:etymology\"];",
"nwr[\"name:etymology:wikidata\"];",
"nwr[\"name:etymology:wikipedia\"];",
"nwr[~\"^(old_|alt_|loc_)name(:[0-9\\-]+)$\"~\".\"];",
"nwr[~\"^(old_|alt_|loc_|)name:([0-9\\-]+:)?etymology$\"~\".\"];",
");" ");"
] ]
}, },
"feature": { "feature": {
"description": [ "description": [
"{{ attribute(tags, \"name:etymology\")|enumerate }}",
"{% if attribute(tags, \"name:etymology\") %}{{ attribute(tags, \"name:etymology\")|enumerate }}{% endif %}",
"{% if attribute(tags, \"name:start_date\") %} (since {{ attribute(tags, \"name:start_date\")|osmFormatDate({ format: \"short\" }) }}){% endif %}" "{% if attribute(tags, \"name:start_date\") %} (since {{ attribute(tags, \"name:start_date\")|osmFormatDate({ format: \"short\" }) }}){% endif %}"
], ],
"popupDescription": " ", "popupDescription": " ",
"body": [ "body": [
"{{ keyTrans('name:etymology') }}: {{ attribute(tags, \"name:etymology\")|enumerate }}<br/>",
"{{ keyTrans('name:start_date') }}: {% if attribute(tags, \"name:start_date\") %}{{ attribute(tags, \"name:start_date\")|osmFormatDate({ format: \"long\" }) }}{% else %}{{ trans('unknown') }}{% endif %}<br/>",
"{% if tags.old_name %}{{ keyTrans('old_name') }}: {{ tags.old_name|enumerate }}<br/>{% endif %}",
"{% if attribute(tags, 'old_name:etymology') %}{{ keyTrans('old_name:etymology') }}: {{ attribute(tags, 'old_name:etymology')|enumerate }}<br/>{% endif %}",
""
"<ul>",
"{% if attribute(tags, \"name:etymology\") %}<li>{{ keyTrans('name:etymology') }}: {{ attribute(tags, \"name:etymology\")|enumerate }}</li>{% endif %}",
"<li>{{ keyTrans('start_date') }} ({{ keyTrans('name') }}): {% if attribute(tags, \"name:start_date\") %}{{ attribute(tags, \"name:start_date\")|osmFormatDate({ format: \"long\" }) }}{% else %}{{ trans('unknown') }}{% endif %}</li>",
"",
"{% for k in [\"old_name\", \"alt_name\", \"loc_name\"] if attribute(tags, k) %}<li>",
" {{ keyTrans(k) }}{% if attribute(tags, k ~ ':start_date') or attribute(tags, k ~ ':end_date') %} ({{ (attribute(tags, k ~ ':start_date') ~ \"..\" ~ attribute(tags, k ~ ':end_date'))|osmFormatDate({ format: 'short' }) }}){% endif %}:",
" {{ attribute(tags, k)|enumerate }}",
" {% if attribute(tags, k ~ ':etymology') %}({{ attribute(tags, k ~ ':etymology')|enumerate }}){% endif %}",
"</li>{% endfor %}",
"",
"{% for k, v in tags|ksort %}",
"{% set m = k|matches(\"^(old_|alt_|loc_|)name:(([0-9]{4})?-([0-9]{4})?|([0-9\\-]+)?--([0-9\\-]+)?)$\") %}",
"{% if m %}",
" <li>",
" {% if m and (m[3] or m[4]) %}{{ keyTrans(m[1] ~ 'name') }} ({{ (m[3] ~ '..' ~ m[4])|osmFormatDate({ format: \"short\" }) }}): {{ v }}{% endif %}",
" {% if m and (m[5] or m[6]) %}{{ keyTrans(m[1] ~ 'name') }} ({{ (m[5] ~ '..' ~ m[6])|osmFormatDate({ format: \"short\" }) }}): {{ v }}{% endif %}",
" {% if attribute(tags, k ~ ':etymology') %}({{ attribute(tags, k ~ ':etymology') }}){% endif %}",
" </li>",
"{% endif %}{% endfor %}",
"</ul>"
] ]
} }
} }
Loading…
Cancel
Save