From 10c28e6608af51ffd56073314c63cf763c65797c Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 21 Aug 2024 12:05:20 +0200 Subject: [PATCH 01/11] UX: warn for aggregator websites, try to nudge https://wiki.openstreetmap.org/wiki/Organised_Editing/Activities/Trziste_prace to not use aggregator websites --- langs/en.json | 1 + langs/nl.json | 1 + src/UI/InputElement/ValidatedInput.svelte | 3 +- .../InputElement/Validators/UrlValidator.ts | 45 ++++++++++++++++++- 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/langs/en.json b/langs/en.json index ff60ed212..842cb8ce5 100644 --- a/langs/en.json +++ b/langs/en.json @@ -847,6 +847,7 @@ }, "tooLong": "The text is too long, at most 255 characters are allowed. You have {count} characters now.", "url": { + "aggregator": "{host} is a third-party aggregator website. If possible, search the official website.", "description": "link to a website", "feedback": "This is not a valid web address" }, diff --git a/langs/nl.json b/langs/nl.json index e7656fec0..322381062 100644 --- a/langs/nl.json +++ b/langs/nl.json @@ -703,6 +703,7 @@ }, "tooLong": "Deze tekst is te lang. De tekst heeft {count} lettertekens, er mogen maximaal 255 letters zijn", "url": { + "aggregator": "{host} is een aggregator-website. Gebruik de officiele website indien mogelijk.", "description": "een link naar een webpagina", "feedback": "Dit is geen geldige link" }, diff --git a/src/UI/InputElement/ValidatedInput.svelte b/src/UI/InputElement/ValidatedInput.svelte index a13c355d3..30d023f6e 100644 --- a/src/UI/InputElement/ValidatedInput.svelte +++ b/src/UI/InputElement/ValidatedInput.svelte @@ -85,13 +85,12 @@ feedback?.setData(undefined) return } + feedback?.setData(validator?.getFeedback(v, getCountry)) if (!validator?.isValid(v, getCountry)) { - feedback?.setData(validator?.getFeedback(v, getCountry)) value.setData(undefined) return } - feedback?.setData(undefined) if (selectedUnit.data) { value.setData(unit.toOsm(v, selectedUnit.data)) } else { diff --git a/src/UI/InputElement/Validators/UrlValidator.ts b/src/UI/InputElement/Validators/UrlValidator.ts index c504a07ca..b4c671c97 100644 --- a/src/UI/InputElement/Validators/UrlValidator.ts +++ b/src/UI/InputElement/Validators/UrlValidator.ts @@ -1,16 +1,30 @@ import { Validator } from "../Validator" +import { Translation } from "../../i18n/Translation" +import Translations from "../../i18n/Translations" export default class UrlValidator extends Validator { private readonly _forceHttps: boolean + + private static readonly aggregatorWebsites = new Set([ + "booking.com", + "hotel-details-guide.com", "tripingguide.com", + "tripadvisor.com", "tripadvisor.co.uk", "tripadvisor.com.au", + ]) + constructor(name?: string, explanation?: string, forceHttps?: boolean) { super( name ?? "url", explanation ?? - "The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user. Furthermore, some tracking parameters will be removed", - "url" + "The validatedTextField will format URLs to always be valid and have a https://-header (even though the 'https'-part will be hidden from the user. Furthermore, some tracking parameters will be removed", + "url", ) this._forceHttps = forceHttps ?? false } + + /** + * + * new UrlValidator().reformat("https://example.com/page?fbclid=123456&utm_source=mastodon") // => "https://example.com/page" + */ reformat(str: string): string { try { let url: URL @@ -63,6 +77,33 @@ export default class UrlValidator extends Validator { } } + /** + * + * const v = new UrlValidator() + * v.getFeedback("example.").textFor("en") // => "This is not a valid web address" + * v.getFeedback("https://booking.com/some-hotel.html").textFor("en").indexOf("search the official website") > 0 // => true + * + */ + getFeedback(s: string, getCountry?: () => string): Translation | undefined { + const upstream = super.getFeedback(s, getCountry) + if (upstream) { + return upstream + } + /* + Upstream calls 'isValid', which checks if it is an actual URL. + If we reach this point, we can safely assume 'new URL' will work + */ + const url = new URL(s) + let host = url.host.toLowerCase() + if (host.startsWith("www.")) { + host = host.slice(4) + } + if (UrlValidator.aggregatorWebsites.has(host)) { + return Translations.t.validation.url.aggregator.Subs({ host }) + } + return undefined + } + isValid(str: string): boolean { try { if ( From fc79218c7d7fbbe64a97273601f4069719ffc47f Mon Sep 17 00:00:00 2001 From: mcliquid Date: Mon, 19 Aug 2024 17:05:58 +0000 Subject: [PATCH 02/11] Translated using Weblate (German) Currently translated at 100.0% (3660 of 3660 strings) Translation: MapComplete/Layer translations Translate-URL: https://hosted.weblate.org/projects/mapcomplete/layers/de/ --- langs/layers/de.json | 65 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/langs/layers/de.json b/langs/layers/de.json index 8862289c6..118d4169c 100644 --- a/langs/layers/de.json +++ b/langs/layers/de.json @@ -7322,9 +7322,6 @@ }, "9": { "then": "Die Oberfläche besteht aus Gummi, z. B. aus Gummifliesen, Gummimulch oder einer großen Gummifläche" - }, - "10": { - "then": "Die Oberfläche ist feiner Kies (weniger als 2 cm pro Stein)" } }, "question": "Welchen Bodenbelag hat dieser Spielplatz?", @@ -10525,6 +10522,34 @@ } }, "tourism_accomodation": { + "description": "Verschiedene Arten von Unterkünften", + "filter": { + "0": { + "options": { + "0": { + "question": "Alle Arten" + }, + "1": { + "question": "Hotels" + }, + "2": { + "question": "Hostels / Herbergen" + }, + "3": { + "question": "Gasthäuser und Bed & Breakfasts" + }, + "4": { + "question": "Motels" + }, + "5": { + "question": "Ferienhaus" + }, + "6": { + "question": "Ferienwohnung" + } + } + } + }, "name": "Touristische Unterkunft", "presets": { "0": { @@ -10534,6 +10559,25 @@ "1": { "description": "Ein Hostel ist eine Art von Touristenherberge, in der man in einem Zimmer schlafen kann, das man mit Fremden teilt", "title": "Ein Hostel" + }, + "2": { + "description": "Ein möbliertes Appartement oder eine Wohnung mit Kochgelegenheit und Bad in einem Gemeinschaftsgebäude, das für Ferienzwecke gemietet werden kann, normalerweise ohne Frühstück oder Rezeption", + "title": "eine Ferienwohnung" + }, + "3": { + "description": "Ein Ferienhaus oder eine Ferienwohnung mit Kochgelegenheit und Bad, das bzw. die für Ferienaufenthalte gemietet werden kann, in der Regel ohne Frühstück oder Rezeption", + "title": "ein Ferienchalet" + }, + "4": { + "description": "Ein Motel ist eine Einrichtung, die eine bezahlte Unterkunft anbietet, in der Regel für kurze Zeit, mit bequemen Parkplätzen für Kraftfahrzeuge am oder in der Nähe des Zimmers. Sie sind in der Regel billiger als ein Hotel", + "title": "ein Motel" + }, + "5": { + "description": "Ein Bed-and-Breakfast in einem Gästehaus ist ein kleiner Beherbergungsbetrieb. Oft handelt es sich um einige Zimmer in einem Privathaus, in dem die Eigentümer auch die Gäste beherbergen. Es gibt keine Rezeption und es ist auch nicht ständig Personal anwesend. In einigen Fällen erfolgt das Einchecken aus der Ferne, indem ein Zugangscode mitgeteilt wird.", + "title": "eine Frühstückspension" + }, + "6": { + "title": "eine kleine Beherbergungseinrichtung, die in der Regel vom Eigentümer betrieben wird" } }, "tagRenderings": { @@ -10549,6 +10593,21 @@ }, "1": { "then": "Hostel {name}" + }, + "2": { + "then": "B&B {name}" + }, + "3": { + "then": "Ferienhaus {name}" + }, + "4": { + "then": "Motel {name}" + }, + "5": { + "then": "Ferienwohnung {name}" + }, + "6": { + "then": "Ferienhaus {name}" } }, "render": "Touristenunterkunft {name}" From 9e2b32da098b4cb249ff15a0c83e3d7dd2851d21 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 21 Aug 2024 09:59:14 +0000 Subject: [PATCH 03/11] Translated using Weblate (Dutch) Currently translated at 78.3% (2866 of 3660 strings) Translation: MapComplete/Layer translations Translate-URL: https://hosted.weblate.org/projects/mapcomplete/layers/nl/ --- langs/layers/nl.json | 629 +++++++++++++++++++++++-------------------- 1 file changed, 341 insertions(+), 288 deletions(-) diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 6ef1acbfd..01d14a05f 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -27,6 +27,13 @@ "advertising": { "name": "Reclame", "presets": { + "10": { + "description": "Een stuk groot, weerbestendig textiel met opgedrukte reclameboodschap die permanent aan de muur hangt", + "title": "een spandoek" + }, + "14": { + "title": "een muurschildering" + }, "4": { "description": "Een klein uithangbord voor buurtadvertenties, meestal gericht op voetgangers", "title": "een uithangbord" @@ -43,13 +50,6 @@ }, "8": { "title": "een scherm op een muur" - }, - "10": { - "description": "Een stuk groot, weerbestendig textiel met opgedrukte reclameboodschap die permanent aan de muur hangt", - "title": "een spandoek" - }, - "14": { - "title": "een muurschildering" } }, "tagRenderings": { @@ -107,6 +107,9 @@ }, "title": { "mappings": { + "10": { + "then": "Muurschildering" + }, "3": { "then": "Aanplakzuil" }, @@ -124,9 +127,6 @@ }, "9": { "then": "Aanplakzuil" - }, - "10": { - "then": "Muurschildering" } } } @@ -208,6 +208,15 @@ "1": { "then": "Muurschildering" }, + "10": { + "then": "Azulejo (Spaanse siertegels)" + }, + "11": { + "then": "Tegelwerk" + }, + "12": { + "then": "Houtsculptuur" + }, "2": { "then": "Schilderij" }, @@ -231,15 +240,6 @@ }, "9": { "then": "Reliëf" - }, - "10": { - "then": "Azulejo (Spaanse siertegels)" - }, - "11": { - "then": "Tegelwerk" - }, - "12": { - "then": "Houtsculptuur" } }, "question": "Wat voor soort kunstwerk is dit?", @@ -1656,30 +1656,6 @@ "1": { "question": "Heeft een
Schuko stekker zonder aardingspin (CEE7/4 type F)
" }, - "2": { - "question": "Heeft een
Europese stekker met aardingspin (CEE7/4 type E)
" - }, - "3": { - "question": "Heeft een
Chademo
" - }, - "4": { - "question": "Heeft een
Type 1 met kabel (J1772)
" - }, - "5": { - "question": "Heeft een
Type 1 zonder kabel (J1772)
" - }, - "6": { - "question": "Heeft een
Type 1 CCS (ook gekend als Type 1 Combo)
" - }, - "7": { - "question": "Heeft een
Tesla Supercharger
" - }, - "8": { - "question": "Heeft een
Type 2 (mennekes)
" - }, - "9": { - "question": "Heeft een
Type 2 CCS (mennekes)
" - }, "10": { "question": "Heeft een
Type 2 met kabel (J1772)
" }, @@ -1710,11 +1686,35 @@ "19": { "question": "Heeft een
SEV 1011 T23 (Zwitserse 3-pin)
" }, + "2": { + "question": "Heeft een
Europese stekker met aardingspin (CEE7/4 type E)
" + }, "20": { "question": "Heeft een
AS3112 (Australische 3-pin)
" }, "21": { "question": "Heeft een
NEMA 5-20 (VS 3-pin)
" + }, + "3": { + "question": "Heeft een
Chademo
" + }, + "4": { + "question": "Heeft een
Type 1 met kabel (J1772)
" + }, + "5": { + "question": "Heeft een
Type 1 zonder kabel (J1772)
" + }, + "6": { + "question": "Heeft een
Type 1 CCS (ook gekend als Type 1 Combo)
" + }, + "7": { + "question": "Heeft een
Tesla Supercharger
" + }, + "8": { + "question": "Heeft een
Type 2 (mennekes)
" + }, + "9": { + "question": "Heeft een
Type 2 CCS (mennekes)
" } } } @@ -1770,30 +1770,6 @@ "1": { "then": "Schuko stekker zonder aardingspin (CEE7/4 type F)" }, - "2": { - "then": "Europese stekker met aardingspin (CEE7/4 type E)" - }, - "3": { - "then": "Europese stekker met aardingspin (CEE7/4 type E)" - }, - "4": { - "then": "Chademo" - }, - "5": { - "then": "Chademo" - }, - "6": { - "then": "Type 1 met kabel (J1772)" - }, - "7": { - "then": "Type 1 met kabel (J1772)" - }, - "8": { - "then": "Type 1 zonder kabel (J1772)" - }, - "9": { - "then": "Type 1 zonder kabel (J1772)" - }, "10": { "then": "Type 1 CCS (ook gekend als Type 1 Combo)" }, @@ -1824,6 +1800,9 @@ "19": { "then": "Type 2 met kabel (J1772)" }, + "2": { + "then": "Europese stekker met aardingspin (CEE7/4 type E)" + }, "20": { "then": "Tesla Supercharger CCS (een type2 CCS met Tesla-logo)" }, @@ -1854,6 +1833,9 @@ "29": { "then": "Bosch Active Connect met 3 pinnen aan een kabel" }, + "3": { + "then": "Europese stekker met aardingspin (CEE7/4 type E)" + }, "30": { "then": "Bosch Active Connect met 5 pinnen aan een kabel" }, @@ -1884,11 +1866,29 @@ "39": { "then": "AS3112 (Australische 3-pin)" }, + "4": { + "then": "Chademo" + }, "40": { "then": "NEMA 5-20 (VS 3-pin)" }, "41": { "then": "NEMA 5-20 (VS 3-pin)" + }, + "5": { + "then": "Chademo" + }, + "6": { + "then": "Type 1 met kabel (J1772)" + }, + "7": { + "then": "Type 1 met kabel (J1772)" + }, + "8": { + "then": "Type 1 zonder kabel (J1772)" + }, + "9": { + "then": "Type 1 zonder kabel (J1772)" } }, "question": "Welke aansluitingen zijn hier beschikbaar?" @@ -2082,30 +2082,6 @@ "1": { "2": "Europese stekker met aardingspin (CEE7/4 type E)" }, - "2": { - "2": "Chademo" - }, - "3": { - "2": "Type 1 met kabel (J1772)" - }, - "4": { - "2": "Type 1 zonder kabel (J1772)" - }, - "5": { - "2": "Type 1 CCS (ook gekend als Type 1 Combo)" - }, - "6": { - "2": "Tesla Supercharger" - }, - "7": { - "2": "Type 2 (mennekes)" - }, - "8": { - "2": "Type 2 CCS (mennekes)" - }, - "9": { - "2": "Type 2 met kabel (J1772)" - }, "10": { "2": "Tesla Supercharger CCS (een type2 CCS met Tesla-logo)" }, @@ -2136,8 +2112,32 @@ "19": { "2": "AS3112 (Australische 3-pin)" }, + "2": { + "2": "Chademo" + }, "20": { "2": "NEMA 5-20 (VS 3-pin)" + }, + "3": { + "2": "Type 1 met kabel (J1772)" + }, + "4": { + "2": "Type 1 zonder kabel (J1772)" + }, + "5": { + "2": "Type 1 CCS (ook gekend als Type 1 Combo)" + }, + "6": { + "2": "Tesla Supercharger" + }, + "7": { + "2": "Type 2 (mennekes)" + }, + "8": { + "2": "Type 2 CCS (mennekes)" + }, + "9": { + "2": "Type 2 met kabel (J1772)" } } } @@ -2909,6 +2909,15 @@ "1": { "then": "Dit fietspad is geplaveid" }, + "10": { + "then": "Dit fietspad is gemaakt van fijn grind" + }, + "11": { + "then": "Dit fietspad is gemaakt van kiezelsteentjes" + }, + "12": { + "then": "Dit fietspad is gemaakt van aarde" + }, "2": { "then": "Dit fietspad is gemaakt van asfalt" }, @@ -2932,15 +2941,6 @@ }, "9": { "then": "Dit fietspad is gemaakt van grind" - }, - "10": { - "then": "Dit fietspad is gemaakt van fijn grind" - }, - "11": { - "then": "Dit fietspad is gemaakt van kiezelsteentjes" - }, - "12": { - "then": "Dit fietspad is gemaakt van aarde" } }, "question": "Waaruit is het oppervlak van het fietspad van gemaakt?", @@ -2989,6 +2989,15 @@ "1": { "then": "Dit fietspad is geplaveid" }, + "10": { + "then": "Dit fietspad is gemaakt van fijn grind" + }, + "11": { + "then": "Dit fietspad is gemaakt van kiezelsteentjes" + }, + "12": { + "then": "Dit fietspad is gemaakt van aarde" + }, "2": { "then": "Dit fietspad is gemaakt van asfalt" }, @@ -3012,15 +3021,6 @@ }, "9": { "then": "Dit fietspad is gemaakt van grind" - }, - "10": { - "then": "Dit fietspad is gemaakt van fijn grind" - }, - "11": { - "then": "Dit fietspad is gemaakt van kiezelsteentjes" - }, - "12": { - "then": "Dit fietspad is gemaakt van aarde" } }, "question": "Waaruit is het oppervlak van de straat gemaakt?", @@ -4076,6 +4076,21 @@ "1": { "then": "Dit is een frituur" }, + "10": { + "then": "Dit is een Chinees restaurant" + }, + "11": { + "then": "Dit is een Grieks restaurant" + }, + "12": { + "then": "Dit is een Indisch restaurant" + }, + "13": { + "then": "Dit is een Turks restaurant (dat meer dan enkel kebab verkoopt)" + }, + "14": { + "then": "Dit is een Thaïs restaurant" + }, "2": { "then": "Dit is een pastazaak" }, @@ -4099,21 +4114,6 @@ }, "9": { "then": "Dit is een Frans restaurant" - }, - "10": { - "then": "Dit is een Chinees restaurant" - }, - "11": { - "then": "Dit is een Grieks restaurant" - }, - "12": { - "then": "Dit is een Indisch restaurant" - }, - "13": { - "then": "Dit is een Turks restaurant (dat meer dan enkel kebab verkoopt)" - }, - "14": { - "then": "Dit is een Thaïs restaurant" } }, "question": "Welk soort gerechten worden hier geserveerd?", @@ -5144,6 +5144,12 @@ "0": { "then": "Dit is een standbeeld" }, + "10": { + "then": "Dit is een kruis" + }, + "12": { + "then": "Dit is een historische tank, permanent in de publieke ruimte geplaatst als gedenkteken" + }, "2": { "then": "Dit is een zitbank die ook als herdenking dienst doet" }, @@ -5155,12 +5161,6 @@ }, "8": { "then": "Dit is een sculptuur" - }, - "10": { - "then": "Dit is een kruis" - }, - "12": { - "then": "Dit is een historische tank, permanent in de publieke ruimte geplaatst als gedenkteken" } } }, @@ -5312,6 +5312,19 @@ } } }, + "10": { + "options": { + "0": { + "question": "Alle Notes" + }, + "1": { + "question": "Verberg import Notes" + }, + "2": { + "question": "Toon enkel import Notes" + } + } + }, "2": { "options": { "0": { @@ -5367,19 +5380,6 @@ "question": "Toon enkel open Notes" } } - }, - "10": { - "options": { - "0": { - "question": "Alle Notes" - }, - "1": { - "question": "Verberg import Notes" - }, - "2": { - "question": "Toon enkel import Notes" - } - } } }, "name": "OpenStreetMap Notes", @@ -5657,6 +5657,18 @@ "1": { "then": "Dit is een normale parkeerplek." }, + "10": { + "then": "Deze parkeerplek is gereserveerd voor personeel." + }, + "11": { + "then": "Deze parkeerplek is gereserveerd voor taxis." + }, + "12": { + "then": "Deze parkeerplek is gereserveerd voor voertuigen met een aanhanger." + }, + "13": { + "then": "Deze parkeerplek is gereserveerd voor autodelen." + }, "2": { "then": "Dit is een gehandicaptenparkeerplaats." }, @@ -5680,18 +5692,6 @@ }, "9": { "then": "Deze parkeerplek is gereserveerd voor ouders met kinderen." - }, - "10": { - "then": "Deze parkeerplek is gereserveerd voor personeel." - }, - "11": { - "then": "Deze parkeerplek is gereserveerd voor taxis." - }, - "12": { - "then": "Deze parkeerplek is gereserveerd voor voertuigen met een aanhanger." - }, - "13": { - "then": "Deze parkeerplek is gereserveerd voor autodelen." } }, "question": "Wat voor parkeerplek is dit?" @@ -5960,6 +5960,9 @@ "1": { "then": "De ondergrond is zand" }, + "10": { + "then": "De ondergrond bestaat uit kleine grindsteentjes (steentjes kleiner dan 2 cm)" + }, "2": { "then": "De ondergrond bestaat uit houtsnippers" }, @@ -5983,9 +5986,6 @@ }, "9": { "then": "De ondergrond bestaat uit rubber, zoals rubberen tegels, rubber snippers of een groot rubberen oppervlak" - }, - "10": { - "then": "De ondergrond bestaat uit kleine grindsteentjes (steentjes kleiner dan 2 cm)" } }, "question": "Wat is de ondergrond van deze speeltuin?", @@ -6009,6 +6009,9 @@ "0": { "then": "Dit is een schommel" }, + "11": { + "then": "Dit is een rekstok" + }, "3": { "then": "Dit is een zandbak" }, @@ -6020,9 +6023,6 @@ }, "6": { "then": "Dit is een wipwap" - }, - "11": { - "then": "Dit is een rekstok" } }, "question": "Wat voor speeltoestel is dit?" @@ -6311,6 +6311,21 @@ "1": { "then": "Munten van 2 cent worden geaccepteerd" }, + "10": { + "then": "Munten van 20 rappen worden geaccepteerd" + }, + "11": { + "then": "Munten van ½ frank worden geaccepteerd" + }, + "12": { + "then": "Munten van 1 frank worden geaccepteerd" + }, + "13": { + "then": "Munten van 2 frank worden geaccepteerd" + }, + "14": { + "then": "Munten van 5 frank worden geaccepteerd" + }, "2": { "then": "Munten van 5 cent worden geaccepteerd" }, @@ -6334,21 +6349,6 @@ }, "9": { "then": "Munten van 10 rappen worden geaccepteerd" - }, - "10": { - "then": "Munten van 20 rappen worden geaccepteerd" - }, - "11": { - "then": "Munten van ½ frank worden geaccepteerd" - }, - "12": { - "then": "Munten van 1 frank worden geaccepteerd" - }, - "13": { - "then": "Munten van 2 frank worden geaccepteerd" - }, - "14": { - "then": "Munten van 5 frank worden geaccepteerd" } }, "question": "Met welke munten kan je hier betalen?" @@ -6361,6 +6361,15 @@ "1": { "then": "Biljetten van 10 euro worden geaccepteerd" }, + "10": { + "then": "Biljetten van 100 frank worden geaccepteerd" + }, + "11": { + "then": "Biljetten van 200 frank worden geaccepteerd" + }, + "12": { + "then": "Biljetten van 1000 frank worden geaccepteerd" + }, "2": { "then": "Biljetten van 20 euro worden geaccepteerd" }, @@ -6384,15 +6393,6 @@ }, "9": { "then": "Biljetten van 50 frank worden geaccepteerd" - }, - "10": { - "then": "Biljetten van 100 frank worden geaccepteerd" - }, - "11": { - "then": "Biljetten van 200 frank worden geaccepteerd" - }, - "12": { - "then": "Biljetten van 1000 frank worden geaccepteerd" } }, "question": "Met welke bankbiljetten kan je hier betalen?" @@ -6737,30 +6737,6 @@ "1": { "question": "Recycling van batterijen" }, - "2": { - "question": "Recycling van drankpakken" - }, - "3": { - "question": "Recycling van blikken" - }, - "4": { - "question": "Recycling van kleding" - }, - "5": { - "question": "Recycling van frituurvet" - }, - "6": { - "question": "Recycling van motorolie" - }, - "7": { - "question": "Recycling van tl-buizen" - }, - "8": { - "question": "Recycling van groen afval" - }, - "9": { - "question": "Recycling van glazen flessen" - }, "10": { "question": "Recycling van glas" }, @@ -6791,6 +6767,9 @@ "19": { "question": "Recycling van restafval" }, + "2": { + "question": "Recycling van drankpakken" + }, "20": { "question": "Recycling van inktpatronen" }, @@ -6799,6 +6778,27 @@ }, "22": { "question": "Recycling van plastic verkpakkingen, metalen verkpakkingen en drankpakken (PMD)" + }, + "3": { + "question": "Recycling van blikken" + }, + "4": { + "question": "Recycling van kleding" + }, + "5": { + "question": "Recycling van frituurvet" + }, + "6": { + "question": "Recycling van motorolie" + }, + "7": { + "question": "Recycling van tl-buizen" + }, + "8": { + "question": "Recycling van groen afval" + }, + "9": { + "question": "Recycling van glazen flessen" } } }, @@ -6866,30 +6866,6 @@ "1": { "then": "Drankpakken kunnen hier gerecycled worden" }, - "2": { - "then": "Blikken kunnen hier gerecycled worden" - }, - "3": { - "then": "Kleren kunnen hier gerecycled worden" - }, - "4": { - "then": "Frituurvet kan hier gerecycled worden" - }, - "5": { - "then": "Motorolie kan hier gerecycled worden" - }, - "6": { - "then": "TL-buizen kunnen hier gerecycled worden" - }, - "7": { - "then": "Groen afval kan hier gerecycled worden" - }, - "8": { - "then": "Organisch afval kan hier gerecycled worden" - }, - "9": { - "then": "Glazen flessen kunnen hier gerecycled worden" - }, "10": { "then": "Glas kan hier gerecycled worden" }, @@ -6920,6 +6896,9 @@ "19": { "then": "Oud metaal kan hier gerecycled worden" }, + "2": { + "then": "Blikken kunnen hier gerecycled worden" + }, "20": { "then": "Schoenen kunnen hier gerecycled worden" }, @@ -6937,6 +6916,27 @@ }, "25": { "then": "Fietsen (en fietswrakken) kunnen hier gerecycled worden" + }, + "3": { + "then": "Kleren kunnen hier gerecycled worden" + }, + "4": { + "then": "Frituurvet kan hier gerecycled worden" + }, + "5": { + "then": "Motorolie kan hier gerecycled worden" + }, + "6": { + "then": "TL-buizen kunnen hier gerecycled worden" + }, + "7": { + "then": "Groen afval kan hier gerecycled worden" + }, + "8": { + "then": "Organisch afval kan hier gerecycled worden" + }, + "9": { + "then": "Glazen flessen kunnen hier gerecycled worden" } }, "question": "Wat kan hier gerecycled worden?" @@ -7769,6 +7769,12 @@ "1": { "then": "Deze lantaarn gebruikt LEDs" }, + "10": { + "then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" + }, + "11": { + "then": "Deze lantaarn wordt verlicht met gas" + }, "2": { "then": "Deze lantaarn gebruikt gloeilampen" }, @@ -7792,12 +7798,6 @@ }, "9": { "then": "Deze lantaarn gebruikt lagedruknatriumlampen (monochroom oranje)" - }, - "10": { - "then": "Deze lantaarn gebruikt hogedruknatriumlampen (oranje met wit)" - }, - "11": { - "then": "Deze lantaarn wordt verlicht met gas" } }, "question": "Wat voor verlichting gebruikt deze lantaarn?" @@ -8348,15 +8348,68 @@ } }, "tourism_accomodation": { + "description": "Verschillende soorten overnachtingsmogelijkheden voor toeristen", + "filter": { + "0": { + "options": { + "0": { + "question": "Alle types" + }, + "1": { + "question": "Hotels" + }, + "2": { + "question": "Hostels" + }, + "3": { + "question": "Gastenkamers en bed-en-breakfasts" + }, + "4": { + "question": "Motels" + }, + "5": { + "question": "Vakantiehuisje" + }, + "6": { + "question": "Vakantie-appartement" + } + } + } + }, + "name": "Accomodatie voor toeristen", "presets": { "0": { + "description": "En hotel is een gebouw waar je tegen betaling kan overnachten voor een korte periode. Je krijgt je eigen kamer.", "title": "een hotel" + }, + "1": { + "description": "Een herberg is een gebouw waar je enkele dagen kan blijven. Je deelt een kamer met onbekenden.", + "title": "een herberg" + }, + "2": { + "description": "Een bemeubeld apparement met kookgelegenheid en een badkamer in een groter gebouw. Het appartement kan gehuurd worden voor vakanties. Er is geen receptie of ontbijt voorzien.", + "title": "een vakantie-appartement" + }, + "4": { + "title": "een motel" + } + }, + "tagRenderings": { + "name": { + "question": "Wat is de naam van deze {title()}", + "render": "{name}" } }, "title": { "mappings": { "0": { "then": "Hotel {name}" + }, + "1": { + "then": "Herberg {name}" + }, + "2": { + "then": "B&B {name}" } } } @@ -9076,30 +9129,6 @@ "1": { "question": "Verkoop van dranken" }, - "2": { - "question": "Verkoop van snoep" - }, - "3": { - "question": "Verkoop van eten" - }, - "4": { - "question": "Verkoop van sigaretten" - }, - "5": { - "question": "Verkoop van condooms" - }, - "6": { - "question": "Verkoop van koffie" - }, - "7": { - "question": "Verkoop van water" - }, - "8": { - "question": "Verkoop van kranten" - }, - "9": { - "question": "Verkoop van fietsbinnenbanden" - }, "10": { "question": "Verkoop van melk" }, @@ -9130,6 +9159,9 @@ "19": { "question": "Verkoop van bloemen" }, + "2": { + "question": "Verkoop van snoep" + }, "23": { "question": "Verkoop van fietslampjes" }, @@ -9144,6 +9176,27 @@ }, "27": { "question": "Verkoop van fietssloten" + }, + "3": { + "question": "Verkoop van eten" + }, + "4": { + "question": "Verkoop van sigaretten" + }, + "5": { + "question": "Verkoop van condooms" + }, + "6": { + "question": "Verkoop van koffie" + }, + "7": { + "question": "Verkoop van water" + }, + "8": { + "question": "Verkoop van kranten" + }, + "9": { + "question": "Verkoop van fietsbinnenbanden" } } } @@ -9234,30 +9287,6 @@ "1": { "then": "Snoep wordt verkocht" }, - "2": { - "then": "Eten wordt verkocht" - }, - "3": { - "then": "Sigaretten worden verkocht" - }, - "4": { - "then": "Condooms worden verkocht" - }, - "5": { - "then": "Koffie wordt verkocht" - }, - "6": { - "then": "Drinkwater wordt verkocht" - }, - "7": { - "then": "Kranten worden verkocht" - }, - "8": { - "then": "Binnenbanden voor fietsen worden verkocht" - }, - "9": { - "then": "Melk wordt verkocht" - }, "10": { "then": "Brood wordt verkocht" }, @@ -9288,6 +9317,9 @@ "19": { "then": "Parkeerkaarten worden verkocht" }, + "2": { + "then": "Eten wordt verkocht" + }, "21": { "then": "Openbaar vervoerkaartjes worden verkocht" }, @@ -9305,6 +9337,27 @@ }, "26": { "then": "Fietssloten worden verkocht" + }, + "3": { + "then": "Sigaretten worden verkocht" + }, + "4": { + "then": "Condooms worden verkocht" + }, + "5": { + "then": "Koffie wordt verkocht" + }, + "6": { + "then": "Drinkwater wordt verkocht" + }, + "7": { + "then": "Kranten worden verkocht" + }, + "8": { + "then": "Binnenbanden voor fietsen worden verkocht" + }, + "9": { + "then": "Melk wordt verkocht" } }, "question": "Wat verkoopt deze verkoopautomaat?", @@ -9606,4 +9659,4 @@ "render": "windturbine" } } -} \ No newline at end of file +} From 9c3ea0b8198abacf85b3acbb0899e4391c030edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Podhoreck=C3=BD?= Date: Sun, 18 Aug 2024 19:02:45 +0000 Subject: [PATCH 04/11] Translated using Weblate (Czech) Currently translated at 93.1% (621 of 667 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/cs/ --- langs/cs.json | 180 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 161 insertions(+), 19 deletions(-) diff --git a/langs/cs.json b/langs/cs.json index 9e7669b62..c78dc5f68 100644 --- a/langs/cs.json +++ b/langs/cs.json @@ -20,6 +20,7 @@ "cancel": "Zrušit", "cannotBeDeleted": "Tuto funkci nelze odstranit", "delete": "Smazat", + "deletedTitle": "Smazaná funkce", "explanations": { "hardDelete": "Tato funkce bude v OpenStreetMap odstraněna. Zkušený přispěvatel ji může obnovit", "retagNoOtherThemes": "Tato funkce bude překlasifikována a skryta z této aplikace", @@ -27,6 +28,7 @@ "selectReason": "Vyberte, proč by tato funkce měla být odstraněna", "softDelete": "Tato funkce bude v této aplikaci aktualizována a skryta. {reason}" }, + "isChanged": "Tato funkce byla změněna a již neodpovídá této vrstvě", "isDeleted": "Tato funkce je smazána", "isntAPoint": "Odstranit lze pouze uzly, vybraným prvkem je cesta, oblast nebo relace.", "loading": "Kontrola vlastností, zda lze tuto funkci odstranit.", @@ -45,15 +47,55 @@ "useSomethingElse": "Místo toho použijte jiný editor OpenStreetMap a odstraňte jej", "whyDelete": "Proč by měla být tato funkce odstraněna?" }, + "external": { + "allAreApplied": "Všechny chybějící externí hodnoty byly zkopírovány do OpenStreetMap", + "allIncluded": "Data načtená ze {source} jsou obsažena v OpenStreetMap", + "apply": "Použít", + "applyAll": "Použít všechny chybějící hodnoty", + "conflicting": { + "intro": "U následujících hodnot má OpenStreetMap jinou hodnotu než zdrojová webová stránka.", + "title": "Konfliktní položky" + }, + "currentInOsmIs": "V současné době má OpenStreetMap zaznamenány následující hodnoty:", + "done": "Hotovo", + "error": "Nelze načíst propojená data z webové stránky", + "lastModified": "Externí data byla naposledy upravena dne {date}", + "loadedFrom": "Následující data jsou načtena z {source} pomocí vloženého JSON-LD", + "missing": { + "intro": "OpenStreetMap nemá žádné informace o následujících atributech", + "title": "Chybějící položky" + }, + "noDataLoaded": "Externí webová stránka neobsahuje žádná propojená data, která by bylo možné načíst", + "overwrite": "Přepsání v OpenStreetMap", + "title": "Strukturovaná data načtená z externí webové stránky" + }, "favourite": { "loginNeeded": "

Přihlášení

Osobní rozvržení je k dispozici pouze pro uživatele OpenStreetMap", "panelIntro": "

Vaše osobní téma

Aktivujte si své oblíbené vrstvy ze všech oficiálních témat", "reload": "Znovu načíst data" }, + "favouritePoi": { + "button": { + "isFavourite": "Toto místo je v současné době označeno jako oblíbené a bude se zobrazovat na všech tematických mapách MapComplete, které navštívíte.", + "isMarkedShort": "Označeno jako oblíbené místo", + "isNotMarkedShort": "Neoznačeno jako oblíbené", + "markAsFavouriteTitle": "Označit toto místo jako oblíbené", + "markDescription": "Přidat toto místo do osobního seznamu oblíbených", + "unmark": "Odebrat z osobního seznamu oblíbených", + "unmarkNotDeleted": "Tento bod nebude smazán a bude stále viditelný na příslušné mapě pro vás i ostatní" + }, + "downloadGeojson": "Stáhněte si oblíbené položky jako geojson", + "downloadGpx": "Stáhnout oblíbené položky jako GPX", + "intro": "Označili jste {lenght} místa jako oblíbené místo.", + "introPrivacy": "Tento seznam je viditelný pouze pro vás", + "loginToSeeList": "Přihlášení pro zobrazení seznamu míst, která jste označili jako oblíbená", + "tab": "Vaše oblíbené položky a recenze", + "title": "Vaše oblíbená místa" + }, "flyer": { - "aerial": "Tato mapa používá jiné pozadí, konkrétně letecké snímky od Agency Information Flanders", - "callToAction": "Vyzkoušet na mapcomplete.org", - "cyclofix": "Cyklistické pumpy, opravárenské stanice, prodejny pitné vody a cykloprodejny jsou na CycloFix", + "aerial": "Tato mapa používá jiný podklad, a to letecké snímky od Agentschap Informatie Vlaanderen", + "callToAction": "Otestovat na mapcomplete.org", + "cyclofix": "Pumpy na kola, opravny, prodejny pitné vody a cyklistické obchody jsou na webu CycloFix", "description": "Leták formátu A4 na propagaci MapComplete", "editing": { "ex": "Zjednodušený příklad, jak to vypadá v případě přírodní rezervace, je uveden níže.", @@ -104,6 +146,7 @@ "confirmLocation": "Potvrďte toto umístění", "confirmTitle": "Přidat {title}?", "confirmWarning": "Funkce, kterou zde vytvoříte, bude viditelná pro všechny. Prosím, přidávejte věci na mapu pouze tehdy, pokud skutečně existují. Tato data využívá mnoho aplikací.", + "creating": "Tvorba nového bodu...", "disableFilters": "Vypnout všechny filtry", "disableFiltersExplanation": "Některé funkce mohou být filtrem skryty", "enableLayer": "Povolit vrstvu {name}", @@ -121,13 +164,13 @@ "intro": "Klikli jste někam, kde zatím nejsou známy žádné údaje.
", "layerNotEnabled": "Vrstva {layer} není povolena. Chcete-li přidat funkci, povolte tuto vrstvu", "openLayerControl": "Otevřete ovládací okno vrstvy", - "pleaseLogin": "Chcete-li přidat novou funkci, přihlaste se", + "pleaseLogin": "Chcete-li přidat novou funkci, přihlaste se prosím do aplikace OpenStreetMap", "presetInfo": "Nový bod zájmu bude mít {tags}", "stillLoading": "Data se stále načítají. Před přidáním nové funkce prosím chvíli počkejte.", "title": "Přidat novou funkci", "warnVisibleForEveryone": "Váš příspěvek bude viditelný pro všechny", "wrongType": "Tato funkce není uzel ani cesta a nelze ji importovat", - "zoomInFurther": "Další přiblížení pro přidání funkce.", + "zoomInFurther": "Další přiblížení a přidání funkce", "zoomInMore": "Pro import této funkce si ji více přibližte" }, "apply_button": { @@ -137,13 +180,14 @@ "attribution": { "attributionBackgroundLayer": "Aktuální vrstva pozadí je {name}", "attributionBackgroundLayerWithCopyright": "Aktuální vrstva pozadí je {name}: {copyright}", - "attributionContent": "

Všechna data jsou poskytována službou OpenStreetMap, volně opakovaně použitelná pod licencí Open DataBase.

", + "attributionContent": "

Všechna data poskytuje OpenStreetMap, volně znovu použitelná pod licence pro otevřenou databázi.

", "attributionTitle": "Oznámení o atribuci", "codeContributionsBy": "MapComplete vytvořili {contributors} a {hiddenCount} dalších přispěvatelů", "donate": "Podpořte MapComplete finančně", "editId": "Zde otevřít online editor OpenStreetMap", "editJosm": "Upravit zde pomocí JOSM", "followOnMastodon": "Sledujte MapComplete na Mastodonu", + "gotoSourceCode": "Zobrazit zdrojový kód", "iconAttribution": { "title": "Použité ikony" }, @@ -156,24 +200,39 @@ "openIssueTracker": "Nahlaste chybu", "openMapillary": "Zde otevřít Mapillary", "openOsmcha": "Podívejte se na nejnovější úpravy provedené v tématu {theme}", + "openOsmchaLastWeek": "Zobrazit úpravy za posledních 7 dní", + "openThemeDocumentation": "Otevřít dokumentaci k tematické mapě {name}", + "seeOnMapillary": "Podívejte se na tento obrázek na Mapillary", "themeBy": "Téma spravuje {author}", "title": "Autorská práva a uvedení zdroje", "translatedBy": "MapComplete přeložili {contributors} a {hiddenCount} dalších přispěvatelů" }, "back": "Zpět", "backToIndex": "Návrat na přehled všech tematických map", + "backToMap": "Zpět na mapu", "backgroundMap": "Vyberte vrstvu pozadí", "backgroundSwitch": "Přepnout pozadí", "cancel": "Zrušit", + "clearPendingChanges": "Vymazat nevyřízené změny", "confirm": "Potvrdit", - "customThemeIntro": "

Vlastní motivy

Tyto jsou dříve navštívené motivy vytvořené uživateli.", + "customThemeIntro": "Jedná se o dříve navštívená témata vytvořená uživateli.", + "customThemeTitle": "Vlastní témata", "download": { + "custom": { + "download": "Stáhnout PNG o {width} mm na šířku a {height} mm na výšku", + "downloadHelper": "Toto je určeno pro tisk", + "height": "Výška obrázku (v mm):", + "title": "Stáhněte si obrázek s vlastní šířkou a výškou", + "width": "Šířka obrázku (v mm): " + }, "downloadAsPdf": "Stáhněte si aktuální mapu ve formátu PDF", "downloadAsPdfHelper": "Ideální pro tisk aktuální mapy", "downloadAsPng": "Stáhnout jako obrázek", "downloadAsPngHelper": "Ideální pro zahrnutí do zpráv", "downloadAsSvg": "Stáhnout SVG aktuální mapy", - "downloadAsSvgHelper": "Kompatibilní s Inkscape nebo Adobe Illustrator; bude nutné další zpracování", + "downloadAsSvgHelper": "Kompatibilní s Inkscape nebo Adobe Illustrator; bude potřebovat další zpracování", + "downloadAsSvgLinesOnly": "Stáhněte si SVG aktuální mapy obsahující pouze čáry", + "downloadAsSvgLinesOnlyHelper": "Samo se protínající čáry jsou rozděleny, lze je použít s některým 3D softwarem", "downloadCSV": "Stáhnout viditelná data jako CSV", "downloadCSVHelper": "Kompatibilní s aplikacemi LibreOffice Calc, Excel, …", "downloadFeatureAsGeojson": "Stáhnout jako soubor GeoJSON", @@ -186,13 +245,24 @@ "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": { + "current_view_generic": "Exportujte PDF aktuálního zobrazení pro {paper_size} v orientaci {orientation}" + }, "title": "Stáhnout", + "toMuch": "Existuje mnoho funkcí, které lze stáhnout všechny", "uploadGpx": "Nahrajte svou trasu do OpenStreetMap" }, + "enableGeolocationForSafari": "Nezobrazilo se vám vyskakovací okno s žádostí o geografické povolení?", + "enableGeolocationForSafariLink": "Přečtěte si, jak povolit oprávnění ke geolokaci v nastavení", + "eraseValue": "Vymažte tuto hodnotu", "error": "Něco se pokazilo", "example": "Příklad", "examples": "Příklady", "fewChangesBefore": "Před přidáním nové funkce prosím odpovězte na několik otázek týkajících se stávajících funkcí.", + "filterPanel": { + "disableAll": "Zakázat vše", + "enableAll": "Povolit vše" + }, "geopermissionDenied": "Použití geolokace bylo zamítnuto", "getStartedLogin": "Přihlaste se pomocí OpenStreetMap a začněte", "getStartedNewAccount": " nebo vytvořte nový účet", @@ -200,6 +270,15 @@ "histogram": { "error_loading": "Nelze načíst histogram" }, + "labels": { + "background": "Změnit pozadí", + "filter": "Filtrovat data", + "jumpToLocation": "Přejděte na svou aktuální polohu", + "locationNotAvailable": "GPS poloha není k dispozici. Má toto zařízení polohu nebo jste v tunelu?", + "menu": "Menu", + "zoomIn": "Přiblížit", + "zoomOut": "Oddálit" + }, "layerSelection": { "title": "Výběr vrstev", "zoomInToSeeThisLayer": "Přibližte si tuto vrstvu, abyste ji viděli" @@ -218,6 +297,7 @@ "loginToStart": "Přihlaste se a odpovězte na tuto otázku", "loginWithOpenStreetMap": "Přihlaste se pomocí OpenStreetMap", "logout": "Odhlásit se", + "mappingsAreHidden": "Některé možnosti jsou skryté. Pomocí vyhledávání zobrazíte další možnosti.", "menu": { "aboutMapComplete": "O MapComplete", "filter": "Filtrování dat" @@ -244,20 +324,35 @@ "openStreetMapIntro": "

    Otevřená mapa

    Takovou, kterou může každý volně používat a upravovat. Jediné místo pro uložení všech geoinformací. Různé, malé, nekompatibilní a zastaralé mapy nejsou nikde potřeba.

    OpenStreetMap není nepřátelská mapa. Mapová data lze volně používat (s přiřazením a zveřejněním změn těchto dat). Každý může přidávat nová data a opravovat chyby. Tento web používá OpenStreetMap. Všechna data jsou odtud a vaše odpovědi a opravy se používají všude.

    Mnoho lidí a aplikací již OpenStreetMap používá: Organické mapy, OsmAnd, ale také mapy na Facebooku, Instagramu, Apple-maps a Bing-maps jsou (částečně) poháněny OpenStreetMap.

    ", "openTheMap": "Otevřít mapu", "openTheMapAtGeolocation": "Přiblížení k vaší poloze", + "openTheMapReason": "pro zobrazení, úpravu a přidání informací", "opening_hours": { - "closed_permanently": "Uzavřeno na neznámou dobu", - "closed_until": "Uzavřeno do {date}", + "all_days_from": "Otevřeno každý den {ranges}", + "closed_permanently": "Na neznámou dobu zavřeno", + "closed_until": "Otevírá v {date}", + "error": "Nepodařilo se analyzovat otevírací dobu", "error_loading": "Chyba: tyto otevírací hodiny nelze zobrazit.", + "friday": "V pátek {ranges}", "loadingCountry": "Určení země…", + "monday": "V pondělí {ranges}", "not_all_rules_parsed": "Tato otevírací doba je komplikovaná. Následující pravidla jsou ve vstupním prvku ignorována:", + "on_weekdays": "Otevřeno ve všední dny {ranges}", + "on_weekends": "Otevřeno o víkendech {ranges}", "openTill": "do", "open_24_7": "Otevřeno nepřetržitě", - "open_during_ph": "Během státního svátku je místo", + "open_during_ph": "Během státního svátku je", "opensAt": "od", "ph_closed": "zavřené", "ph_not_known": " ", "ph_open": "otevřené", - "ph_open_as_usual": "otevřené, jako obvykle" + "ph_open_as_usual": "otevřené, jako obvykle", + "ranges": "od {starttime} do {endtime}", + "rangescombined": "{range0} a {range1}", + "saturday": "V sobotu {ranges}", + "sunday": "V neděli {ranges}", + "thursday": "Ve čtvrtek {ranges}", + "tuesday": "V úterý {ranges}", + "unknown": "Otevírací doba není známa", + "wednesday": "Ve středu {ranges}" }, "osmLinkTooltip": "Prohlédněte si tento objekt na OpenStreetMap pro historii a další možnosti úprav", "pdf": { @@ -266,7 +361,8 @@ "generatedWith": "Generováno pomocí mapcomplete.org/{layoutid}", "versionInfo": "v{version} - vygenerováno {date}" }, - "pickLanguage": "Vyberte si jazyk: ", + "pickLanguage": "Vyberte jazyk", + "poweredByMapComplete": "Provozováno na MapComplete – crowdsourcované, tematické mapy s OpenStreetMap", "poweredByOsm": "Běží na OpenStreetMap", "questionBox": { "answeredMultiple": "Odpověděli jste na {answered} otázky", @@ -290,9 +386,10 @@ }, "readYourMessages": "Před přidáním nové funkce si prosím přečtěte všechny zprávy OpenStreetMap.", "removeLocationHistory": "Odstranit historii polohy", + "retry": "Zkusit znovu", "returnToTheMap": "Návrat na mapu", "save": "Uložit", - "screenToSmall": "Otevřít {theme} v novém okně", + "screenToSmall": "Otevřít {theme} v novém okně", "search": { "error": "Něco se pokazilo…", "nothing": "Nic nenalezeno…", @@ -300,13 +397,22 @@ "searchShort": "Vyhledávání…", "searching": "Hledání…" }, + "searchAnswer": "Vyhledat možnost…", + "seeIndex": "Podívejte se na přehled se všemi tematickými mapami", + "share": "Sdílet", "sharescreen": { "copiedToClipboard": "Odkaz zkopírovaný do schránky", "documentation": "Další informace o dostupných parametrech URL naleznete v dokumentaci", "embedIntro": "

    Vložte mapu na své webové stránky

    Prosíme, vložte tuto mapu na své webové stránky.
    Doporučujeme vám to udělat - nemusíte ani žádat o povolení.
    Je a vždy to bude zdarma. Čím více lidí bude projekt používat, tím bude cennější.", - "fsUserbadge": "Povolit tlačítko přihlášení", + "fsBackground": "Povolit přepínání pozadí", + "fsFilter": "Povolit možnost přepínání vrstev a filtrů", + "fsGeolocation": "Povolit geolokaci", + "fsUserbadge": "Povolit přihlašovací tlačítko a tím i možnost provádět změny", "fsWelcomeMessage": "Zobrazit vyskakovací okno s uvítací zprávou a související karty", "intro": "

    Sdílejte tuto mapu

    Sdílejte tuto mapu zkopírováním níže uvedeného odkazu a jeho zasláním přátelům a rodině:", + "openLayers": "Otevřete nabídku vrstev a filtrů", + "options": "Možnosti sdílení", + "stateIsIncluded": "Aktuální stav vrstev a filtrů je zahrnut ve sdíleném odkazu a prvku iframe.", "thanksForSharing": "Díky za sdílení!", "title": "Sdílet tuto mapu" }, @@ -314,7 +420,7 @@ "testing": "Testování - změny se neuloží", "uploadError": "Chyba při nahrávání změn: {error}", "uploadGpx": { - "choosePermission": "Níže vyberte, zda má být vaše stopa sdílena:", + "choosePermission": "Níže vyberte, jak má být vaše trasa sdílena:", "confirm": "Potvrdit nahrávání", "gpxServiceOffline": "Služba GPX je v současné době offline - nahrávání není v současné době možné. Zkuste to později.", "intro0": "Nahráním stopy si OpenStreetMap.org ponechá její úplnou kopii.", @@ -343,7 +449,41 @@ "uploadPending": "Počet nevyřízených změn: {count}", "uploadPendingSingle": "Čeká se na jednu změnu", "uploadingChanges": "Nahrávání změn…", - "useSearch": "Pro zobrazení předvoleb použijte vyhledávání výše", + "useSearch": "Pomocí vyhledávání výše zobrazíte další možnosti", + "visualFeedback": { + "closestFeaturesAre": "{n} objektů ve výřezu.", + "directionsAbsolute": { + "E": "východní", + "N": "severní", + "NE": "severovýchod", + "NW": "severozápadní", + "S": "jižní", + "SE": "jihovýchodní", + "SW": "jihozápadní", + "W": "západ" + }, + "directionsRelative": { + "behind": "za vašimi zády", + "left": "vlevo", + "right": "vpravo", + "sharp_left": "ostře vlevo", + "sharp_right": "ostře doprava", + "slight_left": "mírně vlevo", + "slight_right": "mírně vpravo", + "straight": "přímo vpřed" + }, + "fromGps": "{distance} {direction} vaší polohy", + "fromMapCenter": "{distance} {direction} středu mapy", + "in": "Přiblížení na úroveň {z}", + "islocked": "Pohled uzamčen na vaši polohu GPS, pohyb zakázán. Pro odemknutí stiskněte tlačítko geolokace.", + "locked": "Zobrazení je nyní uzamčeno na vaši polohu GPS, pohyb je zakázán.", + "navigation": "Pomocí kláves se šipkami posouvejte mapu, stisknutím mezerníku vyberte nejbližší objekt. Stisknutím čísla vyberte místa dále.", + "noCloseFeatures": "Nejsou zobrazeny žádné funkce.", + "oneFeatureInView": "Jedna funkce ve výřezu.", + "out": "Oddálení na úroveň {z}", + "viewportCenterCloseToGps": "Mapa je vycentrována kolem vaší polohy.", + "viewportCenterDetails": "Střed výřezu je vzdálen {distance} a {bearing} od vaší polohy." + }, "waitingForGeopermission": "Čekáme na vaše povolení používat geolokaci…", "waitingForLocation": "Vyhledávání vaší aktuální polohy…", "weekdays": { @@ -366,7 +506,7 @@ }, "welcomeBack": "Vítejte zpět!", "welcomeExplanation": { - "addNew": "Klepněte na mapu pro přidání nového bodu zájmu.", + "addNew": "Chybí nějaká položka? Pro přidání nového bodu zájmu použijte tlačítko vlevo dole.", "general": "Na této mapě si můžete zobrazit, upravovat a přidávat body zájmu. Přibližováním si zobrazte body zájmu a klepnutím na jeden z nich si zobrazte nebo upravte informace. Všechna data pocházejí z OpenStreetMap a jsou v ní uložena, takže je lze volně používat." }, "wikipedia": { @@ -394,7 +534,9 @@ "geolocate": "Posune mapu na aktuální polohu nebo ji přiblíží k aktuální poloze. Vyžaduje geooprávnění", "intro": "MapComplete podporuje následující klávesy:", "key": "Kombinace kláves", - "openLayersPanel": "Otevře panel vrstev a filtrů", + "openFilterPanel": "Otevře vrstvy POI a panel filtrů", + "openLayersPanel": "Otevírá panel Vrstvy pozadí", + "queryCurrentLocation": "Zobrazte adresu, která je nejblíže středu mapy", "selectAerial": "Nastavte pozadí na letecké nebo satelitní snímky. Přepíná mezi dvěma nejlepšími dostupnými vrstvami", "selectMap": "Nastavení pozadí na mapu z externích zdrojů. Přepíná mezi dvěma nejlepšími dostupnými vrstvami", "selectMapnik": "Nastavení vrstvy pozadí na OpenStreetMap-carto", From d7eb2fce471ef65e52dcf69b5395aeddcc93276e Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 21 Aug 2024 10:08:04 +0000 Subject: [PATCH 05/11] Translated using Weblate (Czech) Currently translated at 92.9% (621 of 668 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/cs/ --- langs/cs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langs/cs.json b/langs/cs.json index c78dc5f68..93ea15402 100644 --- a/langs/cs.json +++ b/langs/cs.json @@ -86,7 +86,7 @@ }, "downloadGeojson": "Stáhněte si oblíbené položky jako geojson", "downloadGpx": "Stáhnout oblíbené položky jako GPX", - "intro": "Označili jste {lenght} místa jako oblíbené místo.", + "intro": "Označili jste {length} místa jako oblíbené místo.", "introPrivacy": "Tento seznam je viditelný pouze pro vás", "loginToSeeList": "Přihlášení pro zobrazení seznamu míst, která jste označili jako oblíbená", "tab": "Vaše oblíbené položky a recenze", From c764839fdcefff316b9458067e462f282a2fe7d5 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 21 Aug 2024 17:47:58 +0200 Subject: [PATCH 06/11] Fix: remember map rotation setting --- assets/layers/usersettings/usersettings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/layers/usersettings/usersettings.json b/assets/layers/usersettings/usersettings.json index 86a82b745..6d53b55c7 100644 --- a/assets/layers/usersettings/usersettings.json +++ b/assets/layers/usersettings/usersettings.json @@ -725,7 +725,8 @@ }, "mappings": [ { - "if": "mapcomplete-fixate-north=", + "if": "mapcomplete-fixate-north=no", + "alsoShowIf": "mapcomplete-fixate-north=", "icon": "./assets/svg/compass.svg", "then": { "en": "Allow to rotate the map", From d67a525da49ba9ccbba272a481d4ba565f1bc262 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 22 Aug 2024 03:20:59 +0200 Subject: [PATCH 07/11] Fix build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 50d47a39e..86ef915fa 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "generate:contributor-list": "vite-node scripts/generateContributors.ts", "generate:service-worker": "tsc src/service-worker.ts --outFile public/service-worker.js && git_hash=$(git rev-parse HEAD) && sed -i.bak \"s/GITHUB-COMMIT/$git_hash/\" public/service-worker.js && rm public/service-worker.js.bak", "reset:layeroverview": "npm run prep:layeroverview && npm run generate:layeroverview && npm run refresh:layeroverview", - "prep:layeroverview": "mkdir -p ./src/assets/generated/layers; echo {\\\"themes\\\":[]} > ./src/assets/generated/known_themes.json && echo {\\\"layers\\\": []} > ./src/assets/generated/known_layers.json && rm -f ./src/assets/generated/layers/*.json && rm -f ./src/assets/generated/themes/*.json && cp ./assets/layers/usersettings/usersettings.json ./src/assets/generated/layers/usersettings.json && echo '{}' > ./src/assets/generated/layers/favourite.json && echo '{}' > ./src/assets/generated/layers/summary.json && echo '{}' > ./src/assets/generated/layers/last_click.json", + "prep:layeroverview": "mkdir -p ./src/assets/generated/layers; echo {\\\"themes\\\":[]} > ./src/assets/generated/known_themes.json && echo {\\\"layers\\\": []} > ./src/assets/generated/known_layers.json && rm -f ./src/assets/generated/layers/*.json && rm -f ./src/assets/generated/themes/*.json && cp ./assets/layers/usersettings/usersettings.json ./src/assets/generated/layers/usersettings.json && echo '{}' > ./src/assets/generated/layers/favourite.json && echo '{}' > ./src/assets/generated/layers/summary.json && echo '{}' > ./src/assets/generated/layers/last_click.json && echo '[]' > ./src/assets/generated/theme_overview.json", "generate": "npm run generate:licenses && npm run generate:images && npm run generate:charging-stations && npm run generate:translations && npm run refresh:layeroverview && npm run generate:service-worker", "generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -", "clean:tests": "find . -type f -name \"*.doctest.ts\" | xargs -r rm", From 2dc386fd9ad7dc1e7d5736e8d8b36169af65998b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 23 Aug 2024 03:47:04 +0200 Subject: [PATCH 08/11] UX: fix #2089, improve background selection hotkeys and add emoji to indicate categories of background layers --- .../layers/cycle_highways/cycle_highways.json | 6 +- assets/layers/usersettings/usersettings.json | 9 + assets/svg/osm-logo.svg | 862 +++++++++--------- .../themes/cycle_highways/cycle_highways.json | 1 - public/css/tagrendering.css | 4 +- src/Logic/Actors/BackgroundLayerResetter.ts | 3 +- .../Actors/PreferredRasterLayerSelector.ts | 7 +- src/Models/RasterLayers.ts | 30 +- src/Models/ThemeViewState.ts | 134 +-- src/UI/Map/Icon.svelte | 4 +- src/UI/Map/Marker.svelte | 3 +- src/UI/Map/RasterLayerPicker.svelte | 17 +- .../TagRendering/TagRenderingMapping.svelte | 9 + src/Utils.ts | 5 +- src/assets/global-raster-layers.json | 31 +- 15 files changed, 600 insertions(+), 525 deletions(-) diff --git a/assets/layers/cycle_highways/cycle_highways.json b/assets/layers/cycle_highways/cycle_highways.json index 1a6f908d1..dec199887 100644 --- a/assets/layers/cycle_highways/cycle_highways.json +++ b/assets/layers/cycle_highways/cycle_highways.json @@ -90,11 +90,11 @@ "minzoom": 6, "title": { "render": { - "en": "Cycle highway", + "en": "cycle highway", "de": "Radschnellweg", - "ca": "Via ciclista", + "ca": "via ciclista", "fr": "Aménagement cyclable", - "nl": "Fietssnelweg", + "nl": "fietssnelweg", "es": "autovía ciclista", "nb_NO": "sykkelmotorvei", "da": "cykelmotorvej", diff --git a/assets/layers/usersettings/usersettings.json b/assets/layers/usersettings/usersettings.json index 6d53b55c7..8b7ee07c6 100644 --- a/assets/layers/usersettings/usersettings.json +++ b/assets/layers/usersettings/usersettings.json @@ -374,11 +374,15 @@ "fr": "Quel fond souhaitez-vous utiliser par défaut ?", "da": "Hvilket baggrundslag skal vises som standard?" }, + "questionHint":{ + "en": "To set a specific background as default, select it in the background menu first after which it will appear here." + }, "condition": "_theme:backgroundLayer=", "mappings": [ { "if": "mapcomplete-preferred-background-layer=default", "alsoShowIf": "mapcomplete-preferred-background-layer=", + "icon": "./assets/svg/generic_map.svg", "then": { "en": "Use the default background layer", "ca": "Utilitzeu la capa de fons predeterminada", @@ -391,6 +395,9 @@ }, { "if": "mapcomplete-preferred-background-layer=osm", + "icon": { + "path":"./assets/svg/osm-logo.svg" + }, "then": { "en": "Use OpenStreetMap-carto as default layer", "ca": "Utilitzeu OpenStreetMap-carto com a capa predeterminada", @@ -403,6 +410,7 @@ }, { "if": "mapcomplete-preferred-background-layer=photo", + "icon": "\uD83D\uDEF0\uFE0F", "then": { "en": "Use aerial imagery as default background", "ca": "Utilitzeu imatges aèries com a fons predeterminat", @@ -415,6 +423,7 @@ }, { "if": "mapcomplete-preferred-background-layer=map", + "icon": "./assets/svg/generic_map.svg", "then": { "en": "Use a non-openstreetmap based map as default background", "ca": "Utilitzeu un mapa que no sigui openstreetmap com a fons predeterminat", diff --git a/assets/svg/osm-logo.svg b/assets/svg/osm-logo.svg index feb458d19..1f0bdfc66 100644 --- a/assets/svg/osm-logo.svg +++ b/assets/svg/osm-logo.svg @@ -5,12 +5,34 @@ viewBox="0 0 256 256" id="svg3038" version="1.1" + sodipodi:docname="osm-logo.svg" + inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + OpenStreetMap logo 2011 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="g1" + transform="matrix(1.0171457,0,0,1.0171457,-4.9571131,-2.8319934)"> - + transform="matrix(1.0746975,0,0,1.0746975,-6.273364,2.1695856)"> + id="g8737" + transform="translate(0,-10)"> - - - - - + clip-path="none" + transform="matrix(1,0.06864071,0,0.848698,-6.6011175e-8,36.913089)" + id="path5604-26-0-3" + d="m 174.28125,35.875 c -17.59875,0 -35.19216,6.639475 -48.71875,19.90625 -0.16722,0.163278 -0.33437,0.303117 -0.5,0.46875 -22.05595,22.055948 -26.208705,55.25122 -12.46875,81.5 l -2.28125,1.625 c 2.24879,4.23988 4.94165,8.3068 8.09375,12.125 l -13.3125,13.34375 c -1.34137,-0.58575 -2.78858,-1.03331 -4.5625,-1.375 l -2.84375,2.84375 c -1.109469,-0.48387 -2.138019,-0.81588 -3.0625,-0.875 L 30.5,229.5625 c -0.03687,1.10087 0.22615,2.18738 0.65625,3.28125 l -0.53125,0.53125 -1.09375,1.09375 c 0.715438,3.7378 2.010432,6.82294 5.46875,10.28125 3.458318,3.45832 6.420414,4.63027 10.28125,5.46875 l 1.09375,-1.09375 0.71875,-0.71875 c 1.088203,0.46225 2.129899,0.78617 3.09375,0.84375 l 64.125,-64.125 c -0.24286,-0.97475 -0.62043,-1.93546 -1.03125,-2.90625 l 3,-3 c -0.24983,-1.73198 -0.67671,-3.19803 -1.3125,-4.59375 L 128.25,161.34375 c 3.8182,3.1521 7.88512,5.84497 12.125,8.09375 L 142,167.15625 c 26.24878,13.73995 59.44405,9.58719 81.5,-12.46875 0.16563,-0.16564 0.30547,-0.33278 0.46875,-0.5 C 250.66292,126.97054 250.51736,83.267352 223.5,56.25 209.91004,42.660041 192.09307,35.875 174.28125,35.875 Z m -0.5,3.28125 c 0.10467,0.0015 0.20783,-0.002 0.3125,0 0.94919,0.0184 1.89538,0.06527 2.84375,0.125 0.95844,0.06036 1.9188,0.147513 2.875,0.25 0.0937,0.01005 0.18754,0.0208 0.28125,0.03125 0.094,0.01048 0.1873,0.02037 0.28125,0.03125 0.1457,0.01688 0.29187,0.04464 0.4375,0.0625 0.8962,0.109902 1.79491,0.228119 2.6875,0.375 0.61909,0.101874 1.22687,0.224117 1.84375,0.34375 0.34295,0.06644 0.68907,0.11558 1.03125,0.1875 0.7237,0.152111 1.43647,0.323392 2.15625,0.5 0.31305,0.07681 0.62528,0.137311 0.9375,0.21875 0.0731,0.01906 0.1457,0.04319 0.21875,0.0625 0.9559,0.252837 1.89673,0.516294 2.84375,0.8125 0.0724,0.02261 0.14641,0.03963 0.21875,0.0625 0.94741,0.299842 1.90684,0.625541 2.84375,0.96875 0.0531,0.01945 0.10323,0.04291 0.15625,0.0625 0.95458,0.352395 1.90174,0.727633 2.84375,1.125 0.0515,0.02172 0.10478,0.04064 0.15625,0.0625 0.94184,0.400051 1.88491,0.836281 2.8125,1.28125 0.042,0.02016 0.083,0.04225 0.125,0.0625 0.93538,0.451087 1.86208,0.909529 2.78125,1.40625 0.0331,0.01788 0.0607,0.04456 0.0937,0.0625 0.92681,0.502833 1.84142,1.013321 2.75,1.5625 0.0321,0.01939 0.0617,0.04305 0.0937,0.0625 0.9081,0.550934 1.79937,1.121562 2.6875,1.71875 0.54895,0.369074 1.0842,0.76954 1.625,1.15625 0.3647,0.260827 0.73291,0.512412 1.09375,0.78125 0.0185,0.01381 0.044,0.01742 0.0625,0.03125 0.87764,0.655206 1.74021,1.359931 2.59375,2.0625 1.74268,1.434371 3.43142,2.962673 5.0625,4.59375 1.62048,1.62048 3.13618,3.300564 4.5625,5.03125 0.009,0.01124 0.022,0.02 0.0312,0.03125 0.70321,0.854357 1.40674,1.715235 2.0625,2.59375 0.28277,0.378769 0.53857,0.773223 0.8125,1.15625 0.36973,0.517057 0.74014,1.037986 1.09375,1.5625 0.0162,0.02399 0.0464,0.03849 0.0625,0.0625 0.59812,0.889626 1.16704,1.777833 1.71875,2.6875 0.0195,0.03207 0.0431,0.06166 0.0625,0.09375 0.54559,0.902919 1.06267,1.829073 1.5625,2.75 0.0179,0.03294 0.0447,0.06079 0.0625,0.09375 0.498,0.921212 0.95408,1.843744 1.40625,2.78125 0.0202,0.04194 0.0424,0.08302 0.0625,0.125 0.44611,0.929867 0.88027,1.868304 1.28125,2.8125 0.0218,0.05123 0.0409,0.104977 0.0625,0.15625 0.3948,0.936122 0.77461,1.895211 1.125,2.84375 0.0194,0.05253 0.0432,0.103686 0.0625,0.15625 0.34761,0.94836 0.66558,1.884632 0.96875,2.84375 0.0227,0.07167 0.0401,0.147026 0.0625,0.21875 0.29398,0.941172 0.56134,1.893822 0.8125,2.84375 0.0195,0.07353 0.0433,0.145172 0.0625,0.21875 0.0807,0.309554 0.14258,0.627132 0.21875,0.9375 0.17661,0.719779 0.34789,1.432546 0.5,2.15625 0.0719,0.342177 0.12106,0.688299 0.1875,1.03125 0.11963,0.616882 0.24188,1.224661 0.34375,1.84375 0.14688,0.892594 0.2651,1.791302 0.375,2.6875 0.0179,0.145959 0.0456,0.291463 0.0625,0.4375 0.0108,0.09329 0.0208,0.187929 0.0312,0.28125 0.0105,0.09398 0.0212,0.187243 0.0312,0.28125 0.10249,0.9562 0.18964,1.91656 0.25,2.875 0.0592,0.94244 0.10661,1.90049 0.125,2.84375 0.002,0.10413 -0.002,0.20837 0,0.3125 0.0154,1.05333 0.004,2.10385 -0.0312,3.15625 -0.0316,0.93056 -0.0847,1.85279 -0.15625,2.78125 -0.01,0.12493 -0.0209,0.25012 -0.0312,0.375 -0.0761,0.91807 -0.16591,1.8354 -0.28125,2.75 -0.1206,0.95626 -0.27395,1.92393 -0.4375,2.875 -0.0142,0.0824 -0.0168,0.16767 -0.0312,0.25 -0.022,0.12485 -0.0397,0.25026 -0.0625,0.375 -0.16526,0.90778 -0.3579,1.81727 -0.5625,2.71875 -0.0306,0.13463 -0.0623,0.27178 -0.0937,0.40625 -0.20775,0.88866 -0.44134,1.7751 -0.6875,2.65625 -0.16391,0.58672 -0.35028,1.16705 -0.53125,1.75 -0.17541,0.56412 -0.33984,1.12724 -0.53125,1.6875 -0.29467,0.86381 -0.60475,1.70882 -0.9375,2.5625 -0.0606,0.15549 -0.12566,0.31362 -0.1875,0.46875 -0.0449,0.11246 -0.0795,0.23148 -0.125,0.34375 -0.3561,0.87862 -0.72813,1.7276 -1.125,2.59375 -0.37698,0.82347 -0.7736,1.62644 -1.1875,2.4375 -0.0805,0.15778 -0.16807,0.31147 -0.25,0.46875 -0.41528,0.7974 -0.82998,1.59095 -1.28125,2.375 -0.0952,0.16556 -0.1844,0.33506 -0.28125,0.5 -0.19907,0.33885 -0.41915,0.66384 -0.625,1 -0.36165,0.59093 -0.74237,1.16777 -1.125,1.75 -0.005,0.007 0.005,0.0238 0,0.0312 -0.49081,0.74574 -1.00593,1.48819 -1.53125,2.21875 -0.45727,0.63592 -0.95404,1.25128 -1.4375,1.875 -0.19696,0.25409 -0.36119,0.52926 -0.5625,0.78125 -0.13402,0.16779 -0.2703,0.33315 -0.40625,0.5 -0.16351,0.20064 -0.3337,0.39451 -0.5,0.59375 -0.55662,0.66705 -1.13079,1.31785 -1.71875,1.96875 -0.60631,0.67104 -1.23531,1.34705 -1.875,2 -0.16096,0.16426 -0.30567,0.33692 -0.46875,0.5 -21.13035,21.13035 -52.25869,24.49488 -77.1875,11.15625 l 0.125,-0.1875 c -3.70417,-1.89661 -7.26167,-4.14046 -10.625,-6.78125 -0.53892,-0.42315 -1.06537,-0.86982 -1.59375,-1.3125 -0.51441,-0.43097 -1.0273,-0.8629 -1.53125,-1.3125 -0.0929,-0.0836 -0.18872,-0.1658 -0.28125,-0.25 -0.82173,-0.74776 -1.61189,-1.51814 -2.40625,-2.3125 -0.79436,-0.79436 -1.56473,-1.58452 -2.3125,-2.40625 -0.0842,-0.0925 -0.16639,-0.18838 -0.25,-0.28125 -0.4496,-0.50395 -0.88153,-1.01684 -1.3125,-1.53125 -0.44268,-0.52838 -0.88935,-1.05483 -1.3125,-1.59375 -2.64079,-3.36333 -4.88464,-6.92084 -6.78125,-10.625 l -0.1875,0.125 c -13.33863,-24.92881 -9.9741,-56.057154 11.15625,-77.1875 0.16308,-0.16308 0.33574,-0.307785 0.5,-0.46875 0.65295,-0.639685 1.32896,-1.268689 2,-1.875 0.6509,-0.587956 1.3017,-1.162134 1.96875,-1.71875 0.27214,-0.227086 0.53777,-0.465624 0.8125,-0.6875 0.34347,-0.277429 0.71509,-0.511958 1.0625,-0.78125 0.62372,-0.483463 1.23908,-0.980231 1.875,-1.4375 0.73753,-0.530331 1.497,-1.03609 2.25,-1.53125 0.58223,-0.382634 1.15907,-0.763354 1.75,-1.125 0.44667,-0.27336 0.89235,-0.551116 1.34375,-0.8125 0.68145,-0.394786 1.37084,-0.757473 2.0625,-1.125 0.17606,-0.09355 0.35456,-0.18946 0.53125,-0.28125 0.94525,-0.490975 1.88143,-0.9657 2.84375,-1.40625 0.86615,-0.396875 1.71513,-0.7689 2.59375,-1.125 0.15281,-0.06193 0.31559,-0.09555 0.46875,-0.15625 0.96839,-0.384022 1.92468,-0.758909 2.90625,-1.09375 0.56026,-0.191407 1.12338,-0.355843 1.6875,-0.53125 0.58295,-0.180968 1.16328,-0.367339 1.75,-0.53125 0.88115,-0.246163 1.76759,-0.479746 2.65625,-0.6875 0.0711,-0.01664 0.14757,-0.01486 0.21875,-0.03125 0.41593,-0.09574 0.83264,-0.193899 1.25,-0.28125 0.67213,-0.140825 1.35582,-0.287161 2.03125,-0.40625 0.0823,-0.01449 0.16763,-0.01709 0.25,-0.03125 0.95107,-0.163551 1.91874,-0.316902 2.875,-0.4375 1.96365,-0.247645 3.92987,-0.401636 5.90625,-0.46875 1.0524,-0.03564 2.10292,-0.04663 3.15625,-0.03125 z" + style="opacity:0.7;fill:#2d3335;fill-opacity:1;stroke:none;filter:url(#filter8661)" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + transform="matrix(1,0,0,0.846566,0,37.660073)" + id="path3834-49-7" + d="m 9,17.25 c 0,0 7.5,11 11.75,25.75 C 25,57.75 27,68.5 27,68.5 c 0,0 -5.5,12.75 -8.25,24.75 -2.75,12 -5.75,25 -5.75,25 0,0 5.75,16 9.25,30 3.5,14 3.75,22.25 3.75,22.25 0,0 -4,10.25 -7.5,24.25 -3.5,14 -5,30.75 -5,30.75 0,0 9.25,-2 28.5,1.25 19.25,3.25 32.25,6 32.25,6 0,0 12.75,-2.75 24,-6.25 11.25,-3.5 16.25,-6.5 16.25,-6.5 0,0 5.5,0.5 22.5,6.25 17,5.75 29.25,8.5 29.25,8.5 0,0 13,-2.75 26,-5.75 13,-3 26.5,-8 26.5,-8 0,0 -0.75,-5 4.25,-24.5 5,-19.5 8.75,-28 8.75,-28 0,0 -0.5,-2.5 -3.75,-17.75 C 224.75,135.5 218,121 218,121 c 0,0 1.75,-12.5 6.75,-25.75 C 229.75,82 235,68.5 235,68.5 c 0,0 -4.75,-15.25 -7.5,-29.75 C 224.75,24.25 219.25,15 219.25,15 c 0,0 -24.25,9 -31.75,10.5 -7.5,1.5 -21,5.25 -21,5.25 0,0 -9.75,-4.25 -22,-8.5 -12.25,-4.25 -29.75,-5.5 -29.75,-5.5 0,0 -3.25,3.5 -22,8 -18.75,4.5 -27.5,5.75 -27.5,5.75 0,0 -18.5,-9 -31.5,-11.5 -13,-2.5 -24,-2 -24.75,-1.75 z" + style="opacity:0.5;fill:url(#linearGradient8735);fill-opacity:1;stroke:none;filter:url(#filter8725)" /> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10010011   - + 10010011   - + id="tspan6419" + style="fill:url(#radialGradient6427)" /> + + diff --git a/assets/themes/cycle_highways/cycle_highways.json b/assets/themes/cycle_highways/cycle_highways.json index 6a0a73699..3d58409f2 100644 --- a/assets/themes/cycle_highways/cycle_highways.json +++ b/assets/themes/cycle_highways/cycle_highways.json @@ -74,7 +74,6 @@ ] } }, - "cycle_highways" ], "overpassTimeout": 60, diff --git a/public/css/tagrendering.css b/public/css/tagrendering.css index b557bf1c6..92c9715c7 100644 --- a/public/css/tagrendering.css +++ b/public/css/tagrendering.css @@ -39,10 +39,10 @@ .mapping-icon-small { /* A mapping icon type */ - width: 1.5rem; + width: 2rem; height: fit-content; - max-height: 1.5rem; + max-height: 2rem; margin-right: 0.5rem; } diff --git a/src/Logic/Actors/BackgroundLayerResetter.ts b/src/Logic/Actors/BackgroundLayerResetter.ts index 2a6efb0b7..66343533a 100644 --- a/src/Logic/Actors/BackgroundLayerResetter.ts +++ b/src/Logic/Actors/BackgroundLayerResetter.ts @@ -19,13 +19,14 @@ export default class BackgroundLayerResetter { return } - currentBackgroundLayer.addCallbackAndRunD((l) => { + currentBackgroundLayer.addCallbackAndRunD(async (l) => { if ( l.geometry !== undefined && AvailableRasterLayers.globalLayers.find( (global) => global.properties.id !== l.properties.id ) ) { + await AvailableRasterLayers.editorLayerIndex() BackgroundLayerResetter.installHandler( currentBackgroundLayer, availableLayers.store diff --git a/src/Logic/Actors/PreferredRasterLayerSelector.ts b/src/Logic/Actors/PreferredRasterLayerSelector.ts index 2a1ef51ff..70af9c26c 100644 --- a/src/Logic/Actors/PreferredRasterLayerSelector.ts +++ b/src/Logic/Actors/PreferredRasterLayerSelector.ts @@ -61,9 +61,9 @@ export class PreferredRasterLayerSelector { * Returns 'true' if the target layer is set or is the current layer * @private */ - private updateLayer() { + private async updateLayer() { // What is the ID of the layer we have to (try to) load? - const targetLayerId = this._queryParameter.data ?? this._preferredBackgroundLayer.data + const targetLayerId = (this._queryParameter.data ?? this._preferredBackgroundLayer.data)?.toLowerCase() if (targetLayerId === undefined || targetLayerId === "default") { return } @@ -74,12 +74,13 @@ export class PreferredRasterLayerSelector { this._rasterLayerSetting.setData(global) return } + await AvailableRasterLayers.editorLayerIndex() const isCategory = targetLayerId === "photo" || targetLayerId === "osmbasedmap" || targetLayerId === "map" const available = this._availableLayers.store.data const foundLayer = isCategory ? available.find((l) => l.properties.category === targetLayerId) - : available.find((l) => l.properties.id === targetLayerId) + : available.find((l) => l.properties.id.toLowerCase() === targetLayerId) console.debug("Updating background layer to", foundLayer?.id, { targetLayerId, queryParam: this._queryParameter?.data, diff --git a/src/Models/RasterLayers.ts b/src/Models/RasterLayers.ts index d7d488c1d..017e3c4e7 100644 --- a/src/Models/RasterLayers.ts +++ b/src/Models/RasterLayers.ts @@ -28,7 +28,7 @@ export class AvailableRasterLayers { return this._editorLayerIndex } - public static globalLayers: RasterLayerPolygon[] = globallayers.layers + public static globalLayers: ReadonlyArray = globallayers.layers .filter( (properties) => properties.id !== "osm.carto" && properties.id !== "Bing" /*Added separately*/ @@ -140,28 +140,24 @@ export class RasterLayerUtils { * @param available * @param preferredCategory * @param ignoreLayer + * @param skipLayers Skip the first N layers */ public static SelectBestLayerAccordingTo( available: RasterLayerPolygon[], preferredCategory: string, - ignoreLayer?: RasterLayerPolygon + ignoreLayer?: RasterLayerPolygon, + skipLayers: number = 0 ): RasterLayerPolygon { - let secondBest: RasterLayerPolygon = undefined - for (const rasterLayer of available) { - if (rasterLayer === ignoreLayer) { - continue - } - const p = rasterLayer.properties - if (p.category === preferredCategory) { - if (p.best) { - return rasterLayer - } - if (!secondBest) { - secondBest = rasterLayer - } - } + const inCategory = available.filter(l => l.properties.category === preferredCategory) + const best : RasterLayerPolygon[] = inCategory.filter(l => l.properties.best) + const others : RasterLayerPolygon[] = inCategory.filter(l => !l.properties.best) + let all = best.concat(others) + console.log("Selected layers are:", all.map(l => l.properties.id)) + if(others.length > skipLayers){ + all = all.slice(skipLayers) } - return secondBest + + return all.find(l => l !== ignoreLayer) } } diff --git a/src/Models/ThemeViewState.ts b/src/Models/ThemeViewState.ts index 2fb45b381..1bfcd52df 100644 --- a/src/Models/ThemeViewState.ts +++ b/src/Models/ThemeViewState.ts @@ -161,7 +161,7 @@ export default class ThemeViewState implements SpecialVisualizationState { this.featureSwitches = new FeatureSwitchState(layout) this.guistate = new MenuState( this.featureSwitches.featureSwitchWelcomeMessage.data, - layout.id + layout.id, ) this.map = new UIEventSource(undefined) const geolocationState = new GeoLocationState() @@ -177,14 +177,14 @@ export default class ThemeViewState implements SpecialVisualizationState { oauth_token: QueryParameters.GetQueryParameter( "oauth_token", undefined, - "Used to complete the login" + "Used to complete the login", ), }) this.userRelatedState = new UserRelatedState( this.osmConnection, layout, this.featureSwitches, - this.mapProperties + this.mapProperties, ) this.userRelatedState.fixateNorth.addCallbackAndRunD((fixated) => { this.mapProperties.allowRotating.setData(fixated !== "yes") @@ -195,20 +195,20 @@ export default class ThemeViewState implements SpecialVisualizationState { geolocationState, this.selectedElement, this.mapProperties, - this.userRelatedState.gpsLocationHistoryRetentionTime + this.userRelatedState.gpsLocationHistoryRetentionTime, ) this.geolocationControl = new GeolocationControlState(this.geolocation, this.mapProperties) this.availableLayers = AvailableRasterLayers.layersAvailableAt( this.mapProperties.location, - this.osmConnection.isLoggedIn + this.osmConnection.isLoggedIn, ) this.layerState = new LayerState( this.osmConnection, layout.layers, layout.id, - this.featureSwitches.featureSwitchLayerDefault + this.featureSwitches.featureSwitchLayerDefault, ) { @@ -217,7 +217,7 @@ export default class ThemeViewState implements SpecialVisualizationState { const isDisplayed = QueryParameters.GetBooleanQueryParameter( "overlay-" + rasterInfo.id, rasterInfo.defaultState ?? true, - "Whether or not overlay layer " + rasterInfo.id + " is shown" + "Whether or not overlay layer " + rasterInfo.id + " is shown", ) const state = { isDisplayed } overlayLayerStates.set(rasterInfo.id, state) @@ -242,7 +242,7 @@ export default class ThemeViewState implements SpecialVisualizationState { this.osmConnection.Backend(), (id) => this.layerState.filteredLayers.get(id).isDisplayed, mvtAvailableLayers, - this.fullNodeDatabase + this.fullNodeDatabase, ) let currentViewIndex = 0 @@ -260,7 +260,7 @@ export default class ThemeViewState implements SpecialVisualizationState { id: "current_view_" + currentViewIndex, }), ] - }) + }), ) this.featuresInView = new BBoxFeatureSource(layoutSource, this.mapProperties.bounds) @@ -278,19 +278,19 @@ export default class ThemeViewState implements SpecialVisualizationState { featureSwitches: this.featureSwitches, }, layout?.isLeftRightSensitive() ?? false, - (e) => this.reportError(e) + (e) => this.reportError(e), ) this.historicalUserLocations = this.geolocation.historicalUserLocations this.newFeatures = new NewGeometryFromChangesFeatureSource( this.changes, layoutSource, - this.featureProperties + this.featureProperties, ) layoutSource.addSource(this.newFeatures) const perLayer = new PerLayerFeatureSourceSplitter( Array.from(this.layerState.filteredLayers.values()).filter( - (l) => l.layerDef?.source !== null + (l) => l.layerDef?.source !== null, ), new ChangeGeometryApplicator(this.indexedFeatures, this.changes), { @@ -301,10 +301,10 @@ export default class ThemeViewState implements SpecialVisualizationState { "Got ", features.length, "leftover features, such as", - features[0].properties + features[0].properties, ) }, - } + }, ) this.perLayer = perLayer.perLayer } @@ -344,12 +344,12 @@ export default class ThemeViewState implements SpecialVisualizationState { this.lastClickObject = new LastClickFeatureSource( this.layout, this.mapProperties.lastClickLocation, - this.userRelatedState.addNewFeatureMode + this.userRelatedState.addNewFeatureMode, ) this.osmObjectDownloader = new OsmObjectDownloader( this.osmConnection.Backend(), - this.changes + this.changes, ) this.perLayerFiltered = this.showNormalDataOn(this.map) @@ -360,7 +360,7 @@ export default class ThemeViewState implements SpecialVisualizationState { currentZoom: this.mapProperties.zoom, layerState: this.layerState, bounds: this.visualFeedbackViewportBounds, - } + }, ) this.hasDataInView = new NoElementsInViewDetector(this).hasFeatureInView this.imageUploadManager = new ImageUploadManager( @@ -368,7 +368,7 @@ export default class ThemeViewState implements SpecialVisualizationState { Imgur.singleton, this.featureProperties, this.osmConnection, - this.changes + this.changes, ) this.favourites = new FavouritesFeatureSource(this) const longAgo = new Date() @@ -414,7 +414,7 @@ export default class ThemeViewState implements SpecialVisualizationState { LayoutSource.fromCacheZoomLevel, fs, this.featureProperties, - fs.layer.layerDef.maxAgeOfCache + fs.layer.layerDef.maxAgeOfCache, ) toLocalStorage.set(layerId, storage) }) @@ -427,7 +427,7 @@ export default class ThemeViewState implements SpecialVisualizationState { const doShowLayer = this.mapProperties.zoom.map( (z) => (fs.layer.isDisplayed?.data ?? true) && z >= (fs.layer.layerDef?.minzoom ?? 0), - [fs.layer.isDisplayed] + [fs.layer.isDisplayed], ) if (!doShowLayer.data && this.featureSwitches.featureSwitchFilter.data === false) { @@ -444,7 +444,7 @@ export default class ThemeViewState implements SpecialVisualizationState { fs.layer, fs, (id) => this.featureProperties.getStore(id), - this.layerState.globalFilters + this.layerState.globalFilters, ) filteringFeatureSource.set(layerName, filtered) @@ -588,7 +588,7 @@ export default class ThemeViewState implements SpecialVisualizationState { return } this.selectClosestAtCenter(0) - } + }, ) for (let i = 1; i < 9; i++) { @@ -606,7 +606,7 @@ export default class ThemeViewState implements SpecialVisualizationState { onUp: true, }, doc, - () => this.selectClosestAtCenter(i - 1) + () => this.selectClosestAtCenter(i - 1), ) } @@ -623,7 +623,7 @@ export default class ThemeViewState implements SpecialVisualizationState { if (this.featureSwitches.featureSwitchBackgroundSelection.data) { this.guistate.backgroundLayerSelectionIsOpened.setData(true) } - } + }, ) Hotkeys.RegisterHotkey( { @@ -635,18 +635,11 @@ export default class ThemeViewState implements SpecialVisualizationState { if (this.featureSwitches.featureSwitchFilter.data) { this.guistate.openFilterView() } - } + }, ) - Hotkeys.RegisterHotkey( - { shift: "O" }, - Translations.t.hotkeyDocumentation.selectMapnik, - () => { - this.mapProperties.rasterLayer.setData(AvailableRasterLayers.osmCarto) - } - ) - const setLayerCategory = (category: EliCategory) => { + const setLayerCategory = (category: EliCategory, skipLayers: number = 0) => { const timeOfCall = new Date() - const available = this.availableLayers.store.addCallbackAndRunD((available) => { + this.availableLayers.store.addCallbackAndRunD((available) => { const now = new Date() const timeDiff = (now.getTime() - timeOfCall.getTime()) / 1000 if (timeDiff > 3) { @@ -656,9 +649,13 @@ export default class ThemeViewState implements SpecialVisualizationState { const best = RasterLayerUtils.SelectBestLayerAccordingTo( available, category, - current.data + current.data, + skipLayers ) - console.log("Best layer for category", category, "is", best.properties.id) + if(!best){ + return + } + console.log("Best layer for category", category, "is", best?.properties?.id) current.setData(best) }) } @@ -666,26 +663,43 @@ export default class ThemeViewState implements SpecialVisualizationState { Hotkeys.RegisterHotkey( { nomod: "O" }, Translations.t.hotkeyDocumentation.selectOsmbasedmap, - () => setLayerCategory("osmbasedmap") + () => setLayerCategory("osmbasedmap"), ) Hotkeys.RegisterHotkey( { nomod: "M" }, Translations.t.hotkeyDocumentation.selectMap, - () => setLayerCategory("map") + () => setLayerCategory("map"), ) Hotkeys.RegisterHotkey( { nomod: "P" }, Translations.t.hotkeyDocumentation.selectAerial, - () => setLayerCategory("photo") + () => setLayerCategory("photo"), + ) + Hotkeys.RegisterHotkey( + { shift: "O" }, + Translations.t.hotkeyDocumentation.selectOsmbasedmap, + () => setLayerCategory("osmbasedmap",2), + ) + + Hotkeys.RegisterHotkey( + { shift: "M" }, + Translations.t.hotkeyDocumentation.selectMap, + () => setLayerCategory("map",2), + ) + + Hotkeys.RegisterHotkey( + { shift: "P" }, + Translations.t.hotkeyDocumentation.selectAerial, + () => setLayerCategory("photo",2), ) Hotkeys.RegisterHotkey( { nomod: "L" }, Translations.t.hotkeyDocumentation.geolocate, () => { this.geolocationControl.handleClick() - } + }, ) return true }) @@ -697,7 +711,7 @@ export default class ThemeViewState implements SpecialVisualizationState { Translations.t.hotkeyDocumentation.translationMode, () => { Locale.showLinkToWeblate.setData(!Locale.showLinkToWeblate.data) - } + }, ) } @@ -708,7 +722,7 @@ export default class ThemeViewState implements SpecialVisualizationState { const normalLayers = this.layout.layers.filter( (l) => Constants.priviliged_layers.indexOf(l.id) < 0 && - !l.id.startsWith("note_import") + !l.id.startsWith("note_import"), ) const maxzoom = Math.min(...normalLayers.map((l) => l.minzoom)) @@ -716,7 +730,7 @@ export default class ThemeViewState implements SpecialVisualizationState { (l) => Constants.priviliged_layers.indexOf(l.id) < 0 && l.source.geojsonSource === undefined && - l.doCount + l.doCount, ) const summaryTileSource = new SummaryTileSource( Constants.SummaryServer, @@ -725,7 +739,7 @@ export default class ThemeViewState implements SpecialVisualizationState { this.mapProperties, { isActive: this.mapProperties.zoom.map((z) => z < maxzoom), - } + }, ) return new SummaryTileSourceRewriter(summaryTileSource, this.layerState.filteredLayers) @@ -746,12 +760,12 @@ export default class ThemeViewState implements SpecialVisualizationState { gps_location_history: this.geolocation.historicalUserLocations, gps_track: this.geolocation.historicalUserLocationsTrack, selected_element: new StaticFeatureSource( - this.selectedElement.map((f) => (f === undefined ? empty : [f])) + this.selectedElement.map((f) => (f === undefined ? empty : [f])), ), range: new StaticFeatureSource( this.mapProperties.maxbounds.map((bbox) => - bbox === undefined ? empty : [bbox.asGeoJson({ id: "range" })] - ) + bbox === undefined ? empty : [bbox.asGeoJson({ id: "range" })], + ), ), current_view: this.currentView, favourite: this.favourites, @@ -766,7 +780,7 @@ export default class ThemeViewState implements SpecialVisualizationState { ShowDataLayer.showRange( this.map, new StaticFeatureSource([bbox.asGeoJson({ id: "range" })]), - this.featureSwitches.featureSwitchIsTesting + this.featureSwitches.featureSwitchIsTesting, ) } const currentViewLayer = this.layout.layers.find((l) => l.id === "current_view") @@ -780,7 +794,7 @@ export default class ThemeViewState implements SpecialVisualizationState { currentViewLayer, this.layout, this.osmObjectDownloader, - this.featureProperties + this.featureProperties, ) }) } @@ -824,20 +838,20 @@ export default class ThemeViewState implements SpecialVisualizationState { const lastClickLayerConfig = new LayerConfig( last_click_layerconfig, - "last_click" + "last_click", ) const lastClickFiltered = lastClickLayerConfig.isShown === undefined ? specialLayers.last_click : specialLayers.last_click.features.mapD((fs) => - fs.filter((f) => { - const matches = lastClickLayerConfig.isShown.matchesProperties( - f.properties - ) - console.debug("LastClick ", f, "matches", matches) - return matches - }) - ) + fs.filter((f) => { + const matches = lastClickLayerConfig.isShown.matchesProperties( + f.properties, + ) + console.debug("LastClick ", f, "matches", matches) + return matches + }), + ) new ShowDataLayer(this.map, { features: new StaticFeatureSource(lastClickFiltered), layer: lastClickLayerConfig, @@ -884,7 +898,7 @@ export default class ThemeViewState implements SpecialVisualizationState { this.mapProperties.rasterLayer, this.availableLayers, this.featureSwitches.backgroundLayerId, - this.userRelatedState.preferredBackgroundLayer + this.userRelatedState.preferredBackgroundLayer, ) } @@ -900,7 +914,7 @@ export default class ThemeViewState implements SpecialVisualizationState { ? ">>> _Not_ reporting error to report server as testmode is on" : ">>> Reporting error to", Constants.ErrorReportServer, - message + message, ) if (isTesting) { return diff --git a/src/UI/Map/Icon.svelte b/src/UI/Map/Icon.svelte index 12f4eb58f..850c9eb3d 100644 --- a/src/UI/Map/Icon.svelte +++ b/src/UI/Map/Icon.svelte @@ -50,7 +50,7 @@ export let color: string | undefined = undefined export let clss: string | undefined = "" clss ??= "" - export let emojiHeight = 40 + export let emojiHeight = "40px" {#if icon} @@ -147,7 +147,7 @@ {:else if icon === "user_circle"} {:else if Utils.isEmoji(icon)} - + {icon} {:else} diff --git a/src/UI/Map/Marker.svelte b/src/UI/Map/Marker.svelte index a5f5f7d1f..47a35c0c0 100644 --- a/src/UI/Map/Marker.svelte +++ b/src/UI/Map/Marker.svelte @@ -30,6 +30,7 @@ * Class which is applied onto the individual icons */ export let clss = "" + export let emojiHeight : string = "40px" /** * Class applied onto the entire element @@ -41,7 +42,7 @@
    {#each iconsParsed as icon}
    - +
    {/each}
    diff --git a/src/UI/Map/RasterLayerPicker.svelte b/src/UI/Map/RasterLayerPicker.svelte index ad4bee8ff..37c61073e 100644 --- a/src/UI/Map/RasterLayerPicker.svelte +++ b/src/UI/Map/RasterLayerPicker.svelte @@ -23,7 +23,7 @@ let rasterLayerId = rasterLayer.sync( (l) => l?.properties?.id, [], - (id) => availableLayers.find((l) => l.properties.id === id) + (id) => availableLayers.find((l) => l.properties.id === id), ) rasterLayer.setData(availableLayers[0]) $: rasterLayer.setData(availableLayers[0]) @@ -36,13 +36,13 @@ return } rasterLayer.setData(fav) - }) + }), ) onDestroy( rasterLayer.addCallbackAndRunD((selected) => { favourite?.setData(selected.properties.id) - }) + }), ) } @@ -56,7 +56,7 @@ } else { rasterLayerOnMap.setData(undefined) } - }) + }), ) } @@ -93,6 +93,15 @@ {#each availableLayers as availableLayer} {/each} diff --git a/src/UI/Popup/TagRendering/TagRenderingMapping.svelte b/src/UI/Popup/TagRendering/TagRenderingMapping.svelte index 9677f7c1c..0dceb43f0 100644 --- a/src/UI/Popup/TagRendering/TagRenderingMapping.svelte +++ b/src/UI/Popup/TagRendering/TagRenderingMapping.svelte @@ -30,6 +30,12 @@ | "large-height" | string } + + const emojiHeights = { + "small":"2rem", + "medium":"3rem", + "large":"5rem" + } {#if mapping.icon !== undefined} @@ -42,6 +48,9 @@ }-width`, "shrink-0" )} + + emojiHeight={ emojiHeights[mapping.iconClass] ?? "2rem"} + clss={`mapping-icon-${mapping.iconClass ?? "small"}`} /> diff --git a/src/Utils.ts b/src/Utils.ts index dfc8d0d92..874b327b4 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -1727,11 +1727,12 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be } } - private static emojiRegex = /^\p{Extended_Pictographic}+$/u + private static emojiRegex = /[\p{Extended_Pictographic}🛰️]$/u /** * Returns 'true' if the given string contains at least one and only emoji characters - * @param string + * + * Utils.isEmoji("⛰\uFE0F") // => true */ public static isEmoji(string: string) { return Utils.emojiRegex.test(string) diff --git a/src/assets/global-raster-layers.json b/src/assets/global-raster-layers.json index 6b52a3eaa..2c2ad8488 100644 --- a/src/assets/global-raster-layers.json +++ b/src/assets/global-raster-layers.json @@ -1,5 +1,21 @@ { "layers": [ + { + "url": "pmtiles://https://api.protomaps.com/tiles/v3.json?key=2af8b969a9e8b692", + "style": "assets/sunny.json", + "connect-src": [ + "https://protomaps.github.io" + ], + "best": true, + "id": "protomaps.sunny", + "name": "Protomaps Sunny", + "type": "vector", + "category": "osmbasedmap", + "attribution": { + "text": "Protomaps", + "url": "https://protomaps.com/" + } + }, { "name": "OpenStreetMap Carto", "url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png", @@ -87,21 +103,6 @@ "url": "https://protomaps.com/" } }, - { - "url": "pmtiles://https://api.protomaps.com/tiles/v3.json?key=2af8b969a9e8b692", - "style": "assets/sunny.json", - "connect-src": [ - "https://protomaps.github.io" - ], - "id": "protomaps.sunny", - "name": "Protomaps Sunny", - "type": "vector", - "category": "osmbasedmap", - "attribution": { - "text": "Protomaps", - "url": "https://protomaps.com/" - } - }, { "url": "pmtiles://https://api.protomaps.com/tiles/v3.json?key=2af8b969a9e8b692", "style": "assets/sunny-unlabeled.json", From 60eeab9aa79ab1a5fc65b7f5e6efb2ebb0b6e55e Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 23 Aug 2024 11:23:20 +0200 Subject: [PATCH 09/11] Themes: Allow to delete tourism accomodation --- assets/layers/tourism_accomodation/tourism_accomodation.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/layers/tourism_accomodation/tourism_accomodation.json b/assets/layers/tourism_accomodation/tourism_accomodation.json index 9795fa3d2..0dc3a2130 100644 --- a/assets/layers/tourism_accomodation/tourism_accomodation.json +++ b/assets/layers/tourism_accomodation/tourism_accomodation.json @@ -276,5 +276,8 @@ ] } ], + "deletion": { + "softDeletionTags": "disused:tourism:={tourism}" + }, "allowMove": true } From 695800b2456aefe82d5fe1f148d2bd96e549a5c9 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 23 Aug 2024 11:39:48 +0200 Subject: [PATCH 10/11] Fix typing error with NSI-question --- src/Models/ThemeConfig/TagRenderingConfig.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Models/ThemeConfig/TagRenderingConfig.ts b/src/Models/ThemeConfig/TagRenderingConfig.ts index d83939e7d..7875b9ec9 100644 --- a/src/Models/ThemeConfig/TagRenderingConfig.ts +++ b/src/Models/ThemeConfig/TagRenderingConfig.ts @@ -973,12 +973,11 @@ export class TagRenderingConfigUtils { } const clone: TagRenderingConfig = Object.create(config) // The original mappings get "priorityIf" set - const oldMappingsCloned = - clone.mappings?.map((m) => ({ - ...m, - addExtraTags: "nobrand=", - priorityIf: m.priorityIf ?? TagUtils.Tag("id~*"), - })) ?? [] + const oldMappingsCloned = clone.mappings?.map((m) => ( { + ...m, + addExtraTags: [new Tag("nobrand","")], + priorityIf: m.priorityIf ?? TagUtils.Tag("id~*"), + })) ?? []; clone.mappings = [...oldMappingsCloned, ...extraMappings] return clone }) From c291b164069d44e22c896a617671864478c1f8b6 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 23 Aug 2024 11:39:57 +0200 Subject: [PATCH 11/11] Add sanity check --- src/Logic/Tags/And.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Logic/Tags/And.ts b/src/Logic/Tags/And.ts index 86dab3670..5e242b9b6 100644 --- a/src/Logic/Tags/And.ts +++ b/src/Logic/Tags/And.ts @@ -14,6 +14,10 @@ export class And extends TagsFilter { constructor(and: TagsFilter[]) { super() this.and = and + if(and.some(p => typeof p === "string")){ + console.error("Assertion failed: invalid subtags:", and) + throw "Assertion failed: invalid subtags found" + } } public static construct(and: TagsFilter[]): TagsFilter