|
|
@ -1,29 +1,43 @@ |
|
|
|
{ |
|
|
|
"type": "overpass", |
|
|
|
"name": { |
|
|
|
"en": "Etymology" |
|
|
|
"en": "Name Etymology" |
|
|
|
}, |
|
|
|
"query": { |
|
|
|
"16": [ |
|
|
|
"14": [ |
|
|
|
"(", |
|
|
|
"nwr[\"name:etymology\"];", |
|
|
|
"nwr[\"name:etymology:wikidata\"];", |
|
|
|
"nwr[\"name:etymology:wikipedia\"];", |
|
|
|
"nwr[~\"^(old_|alt_|loc_|int_|nat_|official_|reg_)name(:[0-9\\-]+)$\"~\".\"];", |
|
|
|
"nwr[~\"^(old_|alt_|loc_|int_|nat_|official_|reg_)name([0-9]*)$\"~\".\"];", |
|
|
|
"nwr[~\"^(old_|alt_|loc_|int_|nat_|official_|reg_|)name:([0-9\\-]+:)?etymology$\"~\".\"];", |
|
|
|
");" |
|
|
|
] |
|
|
|
}, |
|
|
|
"feature": { |
|
|
|
"description": [ |
|
|
|
"{{ attribute(tags, \"name:etymology\")|enumerate }}", |
|
|
|
"{% if attribute(tags, \"name:start_date\") %}(since {{ attribute(tags, \"name:start_date\")|osmFormatDate({ format: \"short\" }) }}){% endif %}" |
|
|
|
"{% 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 %}" |
|
|
|
], |
|
|
|
"popupDescription": " ", |
|
|
|
"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 %}", |
|
|
|
"{% if attribute(tags, \"name:start_date\") %}<li>{{ keyTrans('start_date') }} ({{ keyTrans('name') }}): {% if attribute(tags, \"name:start_date\") %}{{ attribute(tags, \"name:start_date\")|osmFormatDate({ format: \"long\" }) }}{% endif %}</li>{% endif %}", |
|
|
|
"", |
|
|
|
"{% for k, v in tags|ksort %}", |
|
|
|
" {% set m = k|matches(\"^(old_|alt_|loc_|int_|nat_|official_|reg_|)name([0-9]*)$\") %}", |
|
|
|
" {% if m and k != 'name' %}<li>", |
|
|
|
" {{ keyTrans(m[1] ~ 'name') }}{% if m[2] %} #{{ m[2] }}{% endif %}{% 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>{% endif %}", |
|
|
|
"", |
|
|
|
" {% 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>" |
|
|
|
] |
|
|
|
} |
|
|
|
} |