From ef3eb4fcd0b0e3b0ebc005dee16eb899b73af2f7 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 2 Feb 2024 13:55:05 +0100 Subject: [PATCH 1/7] UI: fix rendering of icons in addNewPoint, fix #1722 --- assets/themes/onwheels/onwheels.json | 10 +++++++--- src/Models/ThemeConfig/PointRenderingConfig.ts | 14 +++++++------- src/UI/Popup/AddNewPoint/PresetList.svelte | 7 ++++--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 116f0a4877..fd75206f95 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -80,8 +80,10 @@ "pointRendering": [ { "=marker": [ + {"icon": "circle", + "color": "white"}, { - "icon": "circle:white;./assets/themes/onwheels/entrance.svg" + "icon": "./assets/themes/onwheels/entrance.svg" } ] } @@ -258,6 +260,7 @@ { "builtin": "parking_spaces", "override": { + "id": "parking_spaces_disabled", "source": { "osmTags": "parking_space=disabled" }, @@ -410,9 +413,10 @@ "syncSelection": "theme-only", "pointRendering": [ { - "=marker": [ + "=marker": [ {"icon": "circle", + "color": "white"}, { - "icon": "circle:white;./assets/themes/onwheels/elevator.svg" + "icon": "./assets/themes/onwheels/elevator.svg" } ], "iconSize": "40,40", diff --git a/src/Models/ThemeConfig/PointRenderingConfig.ts b/src/Models/ThemeConfig/PointRenderingConfig.ts index a522c45a74..8821adec7a 100644 --- a/src/Models/ThemeConfig/PointRenderingConfig.ts +++ b/src/Models/ThemeConfig/PointRenderingConfig.ts @@ -79,7 +79,6 @@ export default class PointRenderingConfig extends WithContextLoader { } }) - this.marker = (json.marker ?? []).map((m) => new IconConfig(m)) if (json.css !== undefined) { this.cssDef = this.tr("css", undefined) @@ -199,13 +198,14 @@ export default class PointRenderingConfig extends WithContextLoader { if (options?.noSize) { iconAndBadges.SetClass("w-full h-full") + } else { + tags.map((tags) => this.iconSize.GetRenderValue(tags).Subs(tags).txt ?? "[40,40]").map( + (size) => { + const [iconW, iconH] = size.split(",").map((x) => num(x)) + iconAndBadges.SetStyle(`width: ${iconW}px; height: ${iconH}px`) + } + ) } - tags.map((tags) => this.iconSize.GetRenderValue(tags).Subs(tags).txt ?? "[40,40]").map( - (size) => { - const [iconW, iconH] = size.split(",").map((x) => num(x)) - iconAndBadges.SetStyle(`width: ${iconW}px; height: ${iconH}px`) - } - ) const css = this.cssDef?.GetRenderValue(tags.data)?.txt const cssClasses = this.cssClasses?.GetRenderValue(tags.data)?.txt diff --git a/src/UI/Popup/AddNewPoint/PresetList.svelte b/src/UI/Popup/AddNewPoint/PresetList.svelte index 0ff3224b2a..eb2d2e8c78 100644 --- a/src/UI/Popup/AddNewPoint/PresetList.svelte +++ b/src/UI/Popup/AddNewPoint/PresetList.svelte @@ -12,6 +12,7 @@ import NextButton from "../../Base/NextButton.svelte" import ToSvelte from "../../Base/ToSvelte.svelte" import BaseUIElement from "../../BaseUIElement" + import Combine from "../../Base/Combine" /** * This component lists all the presets and allows the user to select one @@ -54,9 +55,9 @@ for (const preset of layer.presets) { const tags = TagUtils.KVtoProperties(preset.tags ?? []) - const icon: BaseUIElement = layer.mapRendering[0] - .RenderIcon(new ImmutableStore(tags)) - .html.SetClass("w-12 h-12 block relative mr-4") + const markers = layer.mapRendering.map((mr, i) => mr.RenderIcon(new ImmutableStore(tags), {noSize: i == 0}) + .html.SetClass(i == 0 ? "w-full h-full" : "")) + const icon: BaseUIElement = new Combine(markers.map(m => new Combine([m]).SetClass("absolute top-0 left-0 w-full h-full flex justify-around items-center"))).SetClass("w-12 h-12 block relative mr-4") const description = preset.description?.FirstSentence() From 5bf988cae03fe5defa2bf4fbdd514479ecb035e1 Mon Sep 17 00:00:00 2001 From: kjon Date: Wed, 24 Jan 2024 19:40:15 +0000 Subject: [PATCH 2/7] Translated using Weblate (German) Currently translated at 99.8% (603 of 604 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/de/ --- langs/de.json | 1 + 1 file changed, 1 insertion(+) diff --git a/langs/de.json b/langs/de.json index dd1f6c8628..ec745e5d96 100644 --- a/langs/de.json +++ b/langs/de.json @@ -217,6 +217,7 @@ }, "enableGeolocationForSafari": "Hast du das Popup zur Abfrage der Geo-Berechtigung nicht erhalten?", "enableGeolocationForSafariLink": "Erfahre, wie du die Geo-Berechtigung in den Einstellungen aktivieren kannst", + "eraseValue": "Wert löschen", "error": "Etwas ist schief gelaufen", "example": "Beispiel", "examples": "Beispiele", From 67bbffcf7f5001261a1387b0ab60c014fe588621 Mon Sep 17 00:00:00 2001 From: mcliquid Date: Thu, 1 Feb 2024 08:22:28 +0000 Subject: [PATCH 3/7] Translated using Weblate (German) Currently translated at 100.0% (604 of 604 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/de/ --- langs/de.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/langs/de.json b/langs/de.json index ec745e5d96..4525b4d0c8 100644 --- a/langs/de.json +++ b/langs/de.json @@ -723,7 +723,8 @@ "fediverse": { "description": "Eine Fediverse Adresse, häufig @username@server.tld", "feedback": "Eine Fediverse Adresse besteht aus @username@server.tld oder ist ein Direktlink zu einem Profil", - "invalidHost": "{host} ist kein gültiger hostname" + "invalidHost": "{host} ist kein gültiger hostname", + "onYourServer": "Siehe und folge auf deinem Server" }, "float": { "description": "eine Zahl", From 1df1919b16919463dfe348587116e822dff114d7 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Fri, 2 Feb 2024 12:38:07 +0000 Subject: [PATCH 4/7] Translated using Weblate (Polish) Currently translated at 82.2% (496 of 603 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/pl/ --- langs/pl.json | 1 - 1 file changed, 1 deletion(-) diff --git a/langs/pl.json b/langs/pl.json index de2674a928..8a601f96b6 100644 --- a/langs/pl.json +++ b/langs/pl.json @@ -186,7 +186,6 @@ "includeMetaData": "Dołącz metadane (ostatni edytor, obliczone wartości, ...)", "licenseInfo": "

Informacja o prawach autorskich

Podane dane są dostępne na licencji ODbL. Ponowne użycie jest darmowe, ale musi być
  • podane źródło © autorzy OpenStreetMap
  • Jakakolwiek zmiana musi być opublikowana na tej samej licencji.
Proszę przeczytać pełną informację o prawach autorskich dla szczegółów.", "noDataLoaded": "Nie załadowano jeszcze żadnych danych. Pobranie będzie wkrótce dostępne", - "pdf": {}, "title": "Pobierz", "uploadGpx": "Prześlij swój ślad do OpenStreetMap" }, From d517a57229ddc69d3387664588a204d42bf2eac7 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Fri, 2 Feb 2024 12:37:40 +0000 Subject: [PATCH 5/7] Translated using Weblate (Czech) Currently translated at 82.2% (496 of 603 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/cs/ --- langs/cs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/langs/cs.json b/langs/cs.json index 17aa939ff6..7c3d620220 100644 --- a/langs/cs.json +++ b/langs/cs.json @@ -186,7 +186,6 @@ "includeMetaData": "Zahrnout metadata (poslední editor, vypočtené hodnoty, ...)", "licenseInfo": "

Upozornění na autorská práva

Poskytovaná data jsou dostupná pod ODbL. Opětovné použití je zdarma pro jakýkoli účel, ale
  • musí být uveden zdroj © přispěvatelé OpenStreetMap
  • Jakákoli změna musí být publikována pod stejnou licencí
  • < /ul> Podrobnosti naleznete v úplném upozornění na autorská práva.", "noDataLoaded": "Zatím nejsou načtena žádná data. Brzy bude k dispozici ke stažení", - "pdf": {}, "title": "Stáhnout", "uploadGpx": "Nahrajte svou trasu do OpenStreetMap" }, From 4f52a905ef9f58bfb55d138db82bd160ef652ac8 Mon Sep 17 00:00:00 2001 From: paunofu Date: Sat, 27 Jan 2024 10:49:23 +0000 Subject: [PATCH 6/7] Translated using Weblate (Catalan) Currently translated at 86.8% (2765 of 3182 strings) Translation: MapComplete/Layer translations Translate-URL: https://hosted.weblate.org/projects/mapcomplete/layers/ca/ --- langs/layers/ca.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/langs/layers/ca.json b/langs/layers/ca.json index 9f06630236..c715e0989c 100644 --- a/langs/layers/ca.json +++ b/langs/layers/ca.json @@ -1894,6 +1894,32 @@ } }, "charging_station": { + "description": "Una estació de càrrega", + "filter": { + "0": { + "options": { + "0": { + "question": "Tots els tipus de vehicles" + }, + "1": { + "question": "Punt de recàrrega per a bicicletes" + } + } + }, + "2": { + "options": { + "1": { + "question": "Té un connector
    Schuko sense pin de terra (CEE7/4 tipus F)
    " + }, + "2": { + "question": "Té un connector
    endoll de paret Europeu amb un pin de terra (CEE7/4 tipus F)
    " + }, + "3": { + "question": "Té un connector
    Chademo
    " + } + } + } + }, "tagRenderings": { "Authentication": { "mappings": { @@ -2045,7 +2071,7 @@ "then": "Qualsevol persona pot utilitzar aquesta estació de recàrrega (pot ser calgui un pagament)" }, "2": { - "then": "Sols clientes del lloc al que pertany aquest punt de càrrega poden utilitzar-lo
    p.e. un punt de càrrega d'un hotel que sols poden utilizar-los els hostes" + "then": "Sols cliente del lloc al que pertany aquest punt de càrrega poden utilitzar-lo
    p.e. un punt de càrrega d'un hotel que sols poden utilizar-los els hostes" }, "3": { "then": "S'ha de sol·licitar una clau per a utilitzar aquest punt de càrrega
    p.e un punt de càrrega operat per un hotel nomes utilitzable pel seus hostes, els quals reben una clau des de recepció per a desbloquejar el punt de càrrega" From 011082a0ec85b45d84dd67654ad9aa1b984ebad0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 2 Feb 2024 14:40:48 +0100 Subject: [PATCH 7/7] Chore: translation sync --- assets/layers/aerialway/aerialway.json | 8 +- .../charging_station/charging_station.json | 20 ++-- assets/layers/shops/shops.json | 4 +- assets/layers/ski_piste/ski_piste.json | 8 +- assets/themes/onwheels/onwheels.json | 13 ++- assets/themes/ski/ski.json | 2 +- langs/layers/en.json | 92 +++++++++++++++++++ langs/themes/en.json | 4 + 8 files changed, 132 insertions(+), 19 deletions(-) diff --git a/assets/layers/aerialway/aerialway.json b/assets/layers/aerialway/aerialway.json index 6596c80273..c956043b3f 100644 --- a/assets/layers/aerialway/aerialway.json +++ b/assets/layers/aerialway/aerialway.json @@ -1,7 +1,9 @@ { "pointRendering": [ { - "location": ["start"], + "location": [ + "start" + ], "marker": [ { "icon": "square" @@ -9,7 +11,6 @@ ], "iconSize": "12,12" }, - { "location": [ "point", @@ -97,7 +98,8 @@ "en": "A magic carpet (a conveyor belt on the ground)" } }, - {"if": "aerialway=zip_line", + { + "if": "aerialway=zip_line", "then": { "en": "A zip line. (A touristical attraction where adventurous people go down at high speeds) " } diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index d12d473a66..cbb5a3876b 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -8,7 +8,8 @@ "description": { "en": "A charging station", "nl": "Oplaadpunten", - "de": "Eine Ladestation" + "de": "Eine Ladestation", + "ca": "Una estació de càrrega" }, "source": { "osmTags": { @@ -277,7 +278,7 @@ "then": { "en": "Only customers of the place this station belongs to can use this charging station
    E.g. a charging station operated by hotel which is only usable by their guests", "nl": "Enkel klanten van de bijhorende plaats mogen dit oplaadpunt gebruiken
    Bv. op de parking van een hotel en enkel toegankelijk voor klanten van dit hotel", - "ca": "Sols clientes del lloc al que pertany aquest punt de càrrega poden utilitzar-lo
    p.e. un punt de càrrega d'un hotel que sols poden utilizar-los els hostes", + "ca": "Sols cliente del lloc al que pertany aquest punt de càrrega poden utilitzar-lo
    p.e. un punt de càrrega d'un hotel que sols poden utilizar-los els hostes", "de": "Nur Kunden des Ortes, zu dem diese Station gehört, können diese Ladestation nutzen
    Z.B. eine von einem Hotel betriebene Ladestation, die nur von dessen Gästen genutzt werden kann" } }, @@ -2419,14 +2420,16 @@ "question": { "en": "All vehicle types", "nl": "Alle voertuigen", - "de": "Ladestationen für alle Fahrzeugtypen" + "de": "Ladestationen für alle Fahrzeugtypen", + "ca": "Tots els tipus de vehicles" } }, { "question": { "en": "Charging station for bicycles", "nl": "Oplaadpunten voor fietsen", - "de": "Ladestationen für Fahrräder" + "de": "Ladestationen für Fahrräder", + "ca": "Punt de recàrrega per a bicicletes" }, "osmTags": "bicycle=yes" }, @@ -2477,7 +2480,8 @@ "question": { "en": "Has a
    Schuko wall plug without ground pin (CEE7/4 type F)
    connector", "nl": "Heeft een
    Schuko stekker zonder aardingspin (CEE7/4 type F)
    ", - "de": "Verfügt über einen
    Schuko-Stecker ohne Erdungsstift (CEE7/4 Typ F)
    " + "de": "Verfügt über einen
    Schuko-Stecker ohne Erdungsstift (CEE7/4 Typ F)
    ", + "ca": "Té un connector
    Schuko sense pin de terra (CEE7/4 tipus F)
    " }, "osmTags": "socket:schuko~*" }, @@ -2485,7 +2489,8 @@ "question": { "en": "Has a
    European wall plug with ground pin (CEE7/4 type E)
    connector", "nl": "Heeft een
    Europese stekker met aardingspin (CEE7/4 type E)
    ", - "de": "Verfügt über einen
    europäischen Netzstecker mit Erdungsstift (CEE7/4 Typ E)
    Anschluss" + "de": "Verfügt über einen
    europäischen Netzstecker mit Erdungsstift (CEE7/4 Typ E)
    Anschluss", + "ca": "Té un connector
    endoll de paret Europeu amb un pin de terra (CEE7/4 tipus F)
    " }, "osmTags": "socket:typee~*" }, @@ -2493,7 +2498,8 @@ "question": { "en": "Has a
    Chademo
    connector", "nl": "Heeft een
    Chademo
    ", - "de": "Verfügt über einen
    Chademo
    Stecker" + "de": "Verfügt über einen
    Chademo
    Stecker", + "ca": "Té un connector
    Chademo
    " }, "osmTags": "socket:chademo~*" }, diff --git a/assets/layers/shops/shops.json b/assets/layers/shops/shops.json index 36b2e10ee5..e0bb68ecdd 100644 --- a/assets/layers/shops/shops.json +++ b/assets/layers/shops/shops.json @@ -644,7 +644,9 @@ "disused:shop:={shop}" ] }, - "omitDefaultDeleteReasons": ["disused"], + "omitDefaultDeleteReasons": [ + "disused" + ], "nonDeleteMappings": [ { "if": { diff --git a/assets/layers/ski_piste/ski_piste.json b/assets/layers/ski_piste/ski_piste.json index debef75be9..1cd365916c 100644 --- a/assets/layers/ski_piste/ski_piste.json +++ b/assets/layers/ski_piste/ski_piste.json @@ -109,9 +109,11 @@ "source": { "osmTags": { "and": [ - {"or": - [ "piste:type=downhill", - "piste:type=connection"] + { + "or": [ + "piste:type=downhill", + "piste:type=connection" + ] }, "area!=yes" ] diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index fd75206f95..5a5ab9b322 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -80,8 +80,10 @@ "pointRendering": [ { "=marker": [ - {"icon": "circle", - "color": "white"}, + { + "icon": "circle", + "color": "white" + }, { "icon": "./assets/themes/onwheels/entrance.svg" } @@ -413,8 +415,11 @@ "syncSelection": "theme-only", "pointRendering": [ { - "=marker": [ {"icon": "circle", - "color": "white"}, + "=marker": [ + { + "icon": "circle", + "color": "white" + }, { "icon": "./assets/themes/onwheels/elevator.svg" } diff --git a/assets/themes/ski/ski.json b/assets/themes/ski/ski.json index e64f2f14a1..c6e1ac0ced 100644 --- a/assets/themes/ski/ski.json +++ b/assets/themes/ski/ski.json @@ -24,7 +24,7 @@ "pointRendering": [ { "=iconSize": "25,25", - "=label":null + "=label": null } ] } diff --git a/langs/layers/en.json b/langs/layers/en.json index dde4ed9a83..4870a3afe1 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -235,6 +235,63 @@ } } }, + "aerialway": { + "description": "Various forms of transport for passengers and goods that use wires, including cable cars, gondolas, chair lifts, drag lifts, and zip lines. ", + "name": "Aerialways", + "pointRendering": { + "1": { + "label": { + "render": "{name}" + } + } + }, + "tagRenderings": { + "length": { + "render": "This aerialway is {_length:km} kilometer long" + }, + "type": { + "mappings": { + "0": { + "then": "This is a cable car where the car goes up and down again on the same cable." + }, + "1": { + "then": "This is a gondola where the cars go around in continuous circles" + }, + "2": { + "then": "An open chairlift with seats to sit on and open to the outside air." + }, + "3": { + "then": "An aerialway which has both chairs and gondolas in the same continuous track" + }, + "4": { + "then": "A drag lift" + }, + "5": { + "then": "A drag lift with T-shaped carriers for two passengers at a time" + }, + "6": { + "then": "A drag lift with L-shaped bars for a single passenger at a time" + }, + "7": { + "then": "A drag lift with a platter to drag a single passenger at a time" + }, + "8": { + "then": "A tow line which which drags skieers" + }, + "9": { + "then": "A magic carpet (a conveyor belt on the ground)" + }, + "10": { + "then": "A zip line. (A touristical attraction where adventurous people go down at high speeds) " + } + }, + "question": "What type of aerialway is this?" + } + }, + "title": { + "render": "Aerialway {name}" + } + }, "ambulancestation": { "description": "An ambulance station is an area for storage of ambulance vehicles, medical equipment, personal protective equipment, and other medical supplies.", "name": "Map of ambulance stations", @@ -8291,6 +8348,41 @@ "render": "Shower" } }, + "ski_piste": { + "description": "Ski and snowboard pistes", + "name": "Ski and snowboard pistes", + "tagRenderings": { + "length": { + "render": "This part of the ski piste is {_length:km} kilometer long" + }, + "piste_difficulty": { + "mappings": { + "0": { + "then": "Novice (green)" + }, + "1": { + "then": "Easy (blue)" + }, + "2": { + "then": "Intermediate (red)" + }, + "3": { + "then": "Advanced (black)" + }, + "4": { + "then": "Expert (orange/double black)" + }, + "5": { + "then": "Freeride" + } + }, + "question": "What is the difficulty of this piste?" + } + }, + "title": { + "render": "Ski piste {name}" + } + }, "slow_roads": { "description": "All carfree roads", "name": "Paths, carfree and slow roads", diff --git a/langs/themes/en.json b/langs/themes/en.json index 934d2de157..b47384a053 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -1311,6 +1311,10 @@ "shortDescription": "Sidewalk mapping", "title": "Sidewalks" }, + "ski": { + "description": "Everything you need to go skiing", + "title": "Ski pistes and aerialways" + }, "sport_pitches": { "description": "A sport pitch is an area where sports are played", "shortDescription": "A map showing sport pitches",