From 7ca9ff472841aecefb2d4c9e4e3be62da0968923 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 24 Jun 2021 02:35:55 +0200 Subject: [PATCH] Add minimaps to climbing layer + translation sync --- assets/themes/climbing/climbing.json | 18 ++++++++++- langs/themes/ca.json | 8 ++--- langs/themes/de.json | 18 +++++------ langs/themes/en.json | 48 +++++++++++++++++----------- langs/themes/fr.json | 8 ++--- langs/themes/id.json | 8 ++--- langs/themes/ja.json | 18 +++++------ langs/themes/nb_NO.json | 6 ++-- langs/themes/nl.json | 32 +++++++++++++------ langs/themes/ru.json | 8 ++--- 10 files changed, 106 insertions(+), 66 deletions(-) diff --git a/assets/themes/climbing/climbing.json b/assets/themes/climbing/climbing.json index a99939914..261f6c68d 100644 --- a/assets/themes/climbing/climbing.json +++ b/assets/themes/climbing/climbing.json @@ -130,6 +130,9 @@ "key": "name" } }, + { + "render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }" + }, "website", "email", "phone", @@ -241,6 +244,9 @@ "tagRenderings": [ "images", "questions", + { + "render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }" + }, { "#": "name", "render": { @@ -327,6 +333,9 @@ "tagRenderings": [ "images", "questions", + { + "render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }" + }, { "#": "Name", "render": { @@ -507,7 +516,7 @@ { "if": "climbing=crag", "then": { - "en": "Climbing crag" + "en": "Climbing crag {name}" } }, { @@ -553,6 +562,9 @@ "tagRenderings": [ "images", "questions", + { + "render": "{minimap(18, id, _contained_climbing_route_ids): height: 9rem; overflow: hidden; border-radius:3rem; }" + }, { "#": "Contained routes length hist", "render": { @@ -702,6 +714,7 @@ "calculatedTags": [ "_contained_climbing_routes_properties=feat.overlapWith('climbing_route').map(f => f.feat.properties).map(p => {return {id: p.id, name: p.name, 'climbing:grade:french': p['climbing:grade:french'], 'climbing:length': p['climbing:length']} })", "_contained_climbing_routes=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => `
  • ${p.name ?? 'climbing route'} (${p['climbing:grade:french'] ?? 'unknown difficulty'}, ${p['climbing:length'] ?? 'unkown length'} meter)
  • `).join('')", + "_contained_climbing_route_ids=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p.id)", "_difficulty_hist=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p['climbing:grade:french'])", "_length_hist=JSON.parse(feat.properties._contained_climbing_routes_properties ?? '[]').map(p => p['climbing:length'])", "_contained_climbing_routes_count=JSON.parse(_contained_climbing_routes).length" @@ -751,6 +764,9 @@ "nb_NO": "En klatremulighet?" }, "tagRenderings": [ + { + "render": "{minimap(18): height: 5rem; overflow: hidden; border-radius:3rem; }" + }, { "render": { "en": "{name}", diff --git a/langs/themes/ca.json b/langs/themes/ca.json index ce636df9b..a79b0b00b 100644 --- a/langs/themes/ca.json +++ b/langs/themes/ca.json @@ -14,28 +14,28 @@ }, "1": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "2": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "3": { "tagRenderings": { - "5": { + "6": { "render": "{name}" } } }, "4": { "tagRenderings": { - "0": { + "1": { "render": "{name}" } } diff --git a/langs/themes/de.json b/langs/themes/de.json index 7dc948f4d..3588564f0 100644 --- a/langs/themes/de.json +++ b/langs/themes/de.json @@ -136,7 +136,7 @@ }, "description": "Eine Kletterhalle", "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "Wie heißt diese Kletterhalle?" } @@ -153,7 +153,7 @@ } }, "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "Wie heißt diese Kletterroute?", "mappings": { @@ -162,10 +162,10 @@ } } }, - "3": { - "render": "Diese Route ist {climbing:length} Meter lang" - }, "4": { + "render": "Diese Route ist {canonical(climbing:length)} lang" + }, + "5": { "render": "Die Schwierigkeit ist {climbing:grade:french} entsprechend des französisch/belgischen Systems" } } @@ -177,7 +177,7 @@ }, "description": "Eine Klettergelegenheit", "tagRenderings": { - "5": { + "6": { "render": "{name}", "question": "Wie heißt diese Klettergelegenheit?", "mappings": { @@ -201,10 +201,10 @@ }, "description": "Eine Klettergelegenheit?", "tagRenderings": { - "0": { + "1": { "render": "{name}" }, - "1": { + "2": { "question": "Kann hier geklettert werden?", "mappings": { "0": { @@ -226,7 +226,7 @@ "question": "Gibt es eine (inoffizielle) Website mit mehr Informationen (z.B. Topos)?" }, "4": { - "render": "Die Routen sind durchschnittlich {climbing:length}m lang", + "render": "Die Routen sind durchschnittlich {canonical(climbing:length)} lang", "question": "Wie lang sind die Routen (durchschnittlich) in Metern?" }, "5": { diff --git a/langs/themes/en.json b/langs/themes/en.json index 62d68ac53..ff61b8782 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -407,7 +407,7 @@ }, "description": "A climbing gym", "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "What is the name of this climbing gym?" } @@ -424,7 +424,7 @@ } }, "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "What is the name of this climbing route?", "mappings": { @@ -433,15 +433,15 @@ } } }, - "3": { - "question": "How long is this climbing route (in meters)?", - "render": "This route is {climbing:length} meter long" - }, "4": { + "question": "How long is this climbing route (in meters)?", + "render": "This route is {canonical(climbing:length)} long" + }, + "5": { "question": "What is the difficulty of this climbing route according to the french/belgian system?", "render": "The difficulty is {climbing:grade:french} according to the french/belgian system" }, - "5": { + "6": { "question": "How much bolts does this route have before reaching the moulinette?", "render": "This route has {climbing:bolts} bolts", "mappings": { @@ -453,7 +453,7 @@ } } }, - "7": { + "8": { "render": "The rock type is {_embedding_features_with_rock:rock} as stated on the surrounding crag" } }, @@ -469,7 +469,7 @@ "render": "Climbing opportunity", "mappings": { "0": { - "then": "Climbing crag" + "then": "Climbing crag {name}" }, "1": { "then": "Climbing area {name}" @@ -484,16 +484,16 @@ }, "description": "A climbing opportunity", "tagRenderings": { - "2": { + "3": { "render": "

    Length overview

    {histogram(_length_hist)}" }, - "3": { + "4": { "render": "

    Difficulties overview

    {histogram(_difficulty_hist)}" }, - "4": { + "5": { "render": "

    Contains {_contained_climbing_routes_count} routes

    " }, - "5": { + "6": { "render": "{name}", "question": "What is the name of this climbing opportunity?", "mappings": { @@ -502,7 +502,7 @@ } } }, - "6": { + "7": { "mappings": { "0": { "then": "A climbing boulder - a single rock or cliff with one or a few climbing routes which can be climbed safely without rope" @@ -512,7 +512,7 @@ } } }, - "7": { + "8": { "question": "What is the rock type here?", "render": "The rock type is {rock}", "mappings": { @@ -536,10 +536,10 @@ }, "description": "A climbing opportunity?", "tagRenderings": { - "0": { + "1": { "render": "{name}" }, - "1": { + "2": { "question": "Is climbing possible here?", "mappings": { "0": { @@ -556,6 +556,18 @@ } } }, + "units": { + "0": { + "applicableUnits": { + "0": { + "human": " meter" + }, + "1": { + "human": " feet" + } + } + } + }, "roamingRenderings": { "0": { "question": "Is there a (unofficial) website with more informations (e.g. topos)?" @@ -594,7 +606,7 @@ } }, "4": { - "render": "The routes are {climbing:length}m long on average", + "render": "The routes are {canonical(climbing:length)} long on average", "question": "What is the (average) length of the routes in meters?" }, "5": { diff --git a/langs/themes/fr.json b/langs/themes/fr.json index a20940d44..25bff8056 100644 --- a/langs/themes/fr.json +++ b/langs/themes/fr.json @@ -151,28 +151,28 @@ }, "1": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "2": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "3": { "tagRenderings": { - "5": { + "6": { "render": "{name}" } } }, "4": { "tagRenderings": { - "0": { + "1": { "render": "{name}" } } diff --git a/langs/themes/id.json b/langs/themes/id.json index eba943f86..31649d682 100644 --- a/langs/themes/id.json +++ b/langs/themes/id.json @@ -97,28 +97,28 @@ }, "1": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "2": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "3": { "tagRenderings": { - "5": { + "6": { "render": "{name}" } } }, "4": { "tagRenderings": { - "0": { + "1": { "render": "{name}" } } diff --git a/langs/themes/ja.json b/langs/themes/ja.json index 8253119ca..2754b8812 100644 --- a/langs/themes/ja.json +++ b/langs/themes/ja.json @@ -407,7 +407,7 @@ }, "description": "クライミングジム", "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "このクライミングジムは何という名前ですか?" } @@ -424,7 +424,7 @@ } }, "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "この登坂ルートの名前は何ですか?", "mappings": { @@ -433,10 +433,10 @@ } } }, - "3": { - "render": "このルート長は、 {climbing:length} メーターです" - }, "4": { + "render": "このルート長は、 {canonical(climbing:length)} メーターです" + }, + "5": { "render": "フランス/ベルギーのランク評価システムによると、{climbing:grade:french}の困難度です" } } @@ -448,7 +448,7 @@ }, "description": "登坂教室", "tagRenderings": { - "5": { + "6": { "render": "{name}", "question": "この登坂教室の名前は何ですか?", "mappings": { @@ -472,10 +472,10 @@ }, "description": "登坂教室?", "tagRenderings": { - "0": { + "1": { "render": "{name}" }, - "1": { + "2": { "question": "ここで登坂はできますか?", "mappings": { "0": { @@ -497,7 +497,7 @@ "question": "もっと情報のある(非公式の)ウェブサイトはありますか(例えば、topos)?" }, "4": { - "render": "ルートの長さは平均で{climbing:length} mです", + "render": "ルートの長さは平均で{canonical(climbing:length)}です", "question": "ルートの(平均)長さはメートル単位でいくつですか?" }, "5": { diff --git a/langs/themes/nb_NO.json b/langs/themes/nb_NO.json index de86503dd..9792f7c73 100644 --- a/langs/themes/nb_NO.json +++ b/langs/themes/nb_NO.json @@ -158,8 +158,8 @@ "render": "Klatrerute" }, "tagRenderings": { - "3": { - "render": "Denne ruten er {climbing:length} meter lang" + "4": { + "render": "Denne ruten er {canonical(climbing:length)} lang" } } }, @@ -182,7 +182,7 @@ }, "description": "En klatremulighet?", "tagRenderings": { - "1": { + "2": { "question": "Er klatring mulig her?", "mappings": { "0": { diff --git a/langs/themes/nl.json b/langs/themes/nl.json index 92b057af4..d6dd66dcc 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -286,7 +286,7 @@ } }, "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "Wat is de naam van dit Klimzaal?" } @@ -303,7 +303,7 @@ } }, "tagRenderings": { - "2": { + "3": { "render": "{name}", "question": "Hoe heet deze klimroute?", "mappings": { @@ -312,11 +312,11 @@ } } }, - "3": { - "question": "Hoe lang is deze klimroute (in meters)?", - "render": "Deze klimroute is {climbing:length} meter lang" - }, "4": { + "question": "Hoe lang is deze klimroute (in meters)?", + "render": "Deze klimroute is {canonical(climbing:length)} lang" + }, + "5": { "question": "Hoe moeilijk is deze klimroute volgens het Franse/Belgische systeem?", "render": "De klimmoeilijkheid is {climbing:grade:french} volgens het Franse/Belgische systeem" } @@ -340,7 +340,7 @@ }, "description": "Een klimgelegenheid", "tagRenderings": { - "5": { + "6": { "render": "{name}", "question": "Wat is de naam van dit Klimgelegenheid?", "mappings": { @@ -349,7 +349,7 @@ } } }, - "7": { + "8": { "mappings": { "0": { "then": "Kalksteen" @@ -371,7 +371,7 @@ }, "description": "Een klimgelegenheid?", "tagRenderings": { - "1": { + "2": { "mappings": { "0": { "then": "Klimmen is hier niet mogelijk" @@ -387,6 +387,18 @@ } } }, + "units": { + "0": { + "applicableUnits": { + "0": { + "human": " meter" + }, + "1": { + "human": " voet" + } + } + } + }, "roamingRenderings": { "0": { "question": "Is er een (onofficiële) website met meer informatie (b.v. met topos)?" @@ -402,7 +414,7 @@ } }, "4": { - "render": "De klimroutes zijn gemiddeld {climbing:length}m lang", + "render": "De klimroutes zijn gemiddeld {canonical(climbing:length)} lang", "question": "Wat is de (gemiddelde) lengte van de klimroutes, in meter?" }, "5": { diff --git a/langs/themes/ru.json b/langs/themes/ru.json index 99fc317db..6466db783 100644 --- a/langs/themes/ru.json +++ b/langs/themes/ru.json @@ -336,28 +336,28 @@ }, "1": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "2": { "tagRenderings": { - "2": { + "3": { "render": "{name}" } } }, "3": { "tagRenderings": { - "5": { + "6": { "render": "{name}" } } }, "4": { "tagRenderings": { - "0": { + "1": { "render": "{name}" } }