From ebdbef810f190ab5d36d4ebfc9f4e85705a5efa9 Mon Sep 17 00:00:00 2001 From: Bart Hanssens Date: Wed, 10 May 2023 23:46:42 +0200 Subject: [PATCH 01/10] GH-1404: fix typos --- assets/layers/cafe_pub/cafe_pub.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/layers/cafe_pub/cafe_pub.json b/assets/layers/cafe_pub/cafe_pub.json index 20b469b9df..2a9591ba15 100644 --- a/assets/layers/cafe_pub/cafe_pub.json +++ b/assets/layers/cafe_pub/cafe_pub.json @@ -233,7 +233,7 @@ { "if": "amenity=cafe", "then": { - "en": "A cafe to drink tea, coffee or an alcoholical bevarage in a quiet environment", + "en": "A cafe to drink tea, coffee or an alcoholic beverage in a quiet environment", "nl": "Dit is een cafe - een plaats waar men rustig kan zitten om een thee, koffie of alcoholische drank te nuttigen.", "de": "Ein Café, um in ruhiger Umgebung Tee, Kaffee oder ein alkoholisches Getränk zu trinken", "da": "En café til at drikke te, kaffe eller en alkoholisk drik i rolige omgivelser", @@ -245,7 +245,7 @@ { "if": "amenity=restaurant", "then": { - "en": "A restuarant where one can get a proper meal", + "en": "A restaurant where one can get a proper meal", "nl": "Dit is een restaurant waar men een maaltijd geserveerd krijgt", "de": "Ein Restaurant, in dem man ordentlich essen kann", "da": "En restaurant, hvor man kan få et ordentligt måltid", @@ -369,4 +369,4 @@ "fr": "Une couche montrants les cafés et pubs où l’on peut prendre un verre. Cette couche pose des questions y afférentes.", "ca": "Una capa que mostra cafeteries i bars on un es pot reunir amb una beguda. La capa demana algunes preguntes rellevants" } -} \ No newline at end of file +} From 8d93f335e0df1280d91f56eb01bd4878e70964f6 Mon Sep 17 00:00:00 2001 From: paunofu Date: Tue, 9 May 2023 21:23:59 +0000 Subject: [PATCH 02/10] Translated using Weblate (Catalan) Currently translated at 57.5% (1621 of 2816 strings) Translation: MapComplete/Layer translations Translate-URL: https://hosted.weblate.org/projects/mapcomplete/layers/ca/ --- langs/layers/ca.json | 247 ++++++++++++++++++++++--------------------- 1 file changed, 124 insertions(+), 123 deletions(-) diff --git a/langs/layers/ca.json b/langs/layers/ca.json index a8cd6925d0..cf7a9bd3a2 100644 --- a/langs/layers/ca.json +++ b/langs/layers/ca.json @@ -35,6 +35,16 @@ "1": { "title": "un mupi" }, + "10": { + "description": "S'utilitza per a cartells publicitaris, retols de neó, logotips i cartells en entrades institucionals", + "title": "un lletrer" + }, + "11": { + "title": "una escupltura" + }, + "12": { + "title": "una paret pintada" + }, "2": { "title": "un mupi sobre la paret" }, @@ -61,16 +71,6 @@ }, "9": { "title": "un tòtem" - }, - "10": { - "description": "S'utilitza per a cartells publicitaris, retols de neó, logotips i cartells en entrades institucionals", - "title": "un lletrer" - }, - "11": { - "title": "una escupltura" - }, - "12": { - "title": "una paret pintada" } }, "tagRenderings": { @@ -165,6 +165,9 @@ "1": { "then": "Açò és un tauló d'anunis" }, + "10": { + "then": "Açò és una paret pintada" + }, "2": { "then": "Açò és una columna" }, @@ -188,9 +191,6 @@ }, "9": { "then": "Açò és un tòtem" - }, - "10": { - "then": "Açò és una paret pintada" } }, "question": "Quin tipus d'element publicitari és aquest?", @@ -205,6 +205,9 @@ "1": { "then": "Tauló d'anuncis" }, + "10": { + "then": "Paret Pintada" + }, "2": { "then": "Mupi" }, @@ -228,9 +231,6 @@ }, "9": { "then": "Tòtem" - }, - "10": { - "then": "Paret Pintada" } } } @@ -312,6 +312,15 @@ "1": { "then": "Mural" }, + "10": { + "then": "Azulejo (Rajoles decoratives espanyoles i portugueses)" + }, + "11": { + "then": "Enrajolat" + }, + "12": { + "then": "Tallat a la fusta" + }, "2": { "then": "Pintura" }, @@ -335,15 +344,6 @@ }, "9": { "then": "Relleu" - }, - "10": { - "then": "Azulejo (Rajoles decoratives espanyoles i portugueses)" - }, - "11": { - "then": "Enrajolat" - }, - "12": { - "then": "Tallat a la fusta" } }, "question": "Quin tipus d'obra és aquesta peça?", @@ -1743,6 +1743,9 @@ "1": { "question": "Té un connector
Schuko sense pin de terra (CEE7/4 tipus F)
connector" }, + "13": { + "question": "Té un connector
Tesla Supercharger (Destination) (Tipus 2 amb un cable de marca tesla)
" + }, "4": { "question": "Té un connector de
Tipus 1 amb cable (J1772)
" }, @@ -1757,9 +1760,6 @@ }, "8": { "question": "Té un connector
Tipus 2 (mennekes)
" - }, - "13": { - "question": "Té un connector
Tesla Supercharger (Destination) (Tipus 2 amb un cable de marca tesla)
" } } } @@ -1809,30 +1809,6 @@ "1": { "then": "Endoll de paret Schuko sense pin a terra (CEE7/4 tipus F)" }, - "2": { - "then": "Endoll de paret Europeu amb pin de terra (CEE7/4 tipus E)" - }, - "3": { - "then": "Endoll de paret Europeu amb pin a terra (CEE7/4 tipus E)" - }, - "4": { - "then": "CHAdeMo" - }, - "5": { - "then": "Chademo" - }, - "6": { - "then": "Tipus 1 amb cable (J1772)" - }, - "7": { - "then": "Tipus 1 amb cable (J1772)" - }, - "8": { - "then": "Tipus 1 sense cable (J1772)" - }, - "9": { - "then": "Tipus 1 sense cable (J1772)" - }, "10": { "then": "CSS 1Tipus 1 (també conegut com Tipus 1 combo)" }, @@ -1863,6 +1839,9 @@ "19": { "then": "Tipus 2 amb cable (mennekes)" }, + "2": { + "then": "Endoll de paret Europeu amb pin de terra (CEE7/4 tipus E)" + }, "20": { "then": "CSS Supercarregador Tesla (tipus2_css de la marca)" }, @@ -1880,6 +1859,27 @@ }, "26": { "then": "USB per a carregar mòbils i dispositius petits" + }, + "3": { + "then": "Endoll de paret Europeu amb pin a terra (CEE7/4 tipus E)" + }, + "4": { + "then": "CHAdeMo" + }, + "5": { + "then": "Chademo" + }, + "6": { + "then": "Tipus 1 amb cable (J1772)" + }, + "7": { + "then": "Tipus 1 amb cable (J1772)" + }, + "8": { + "then": "Tipus 1 sense cable (J1772)" + }, + "9": { + "then": "Tipus 1 sense cable (J1772)" } }, "question": "Quins tipus de connexions de càrrega estan disponibles aquí?" @@ -2870,6 +2870,21 @@ "1": { "then": "Això és una fregiduria" }, + "10": { + "then": "Aquí es serveixen plats xinesos" + }, + "11": { + "then": "Aquí es serveixen plats grecs" + }, + "12": { + "then": "Aquí es serveixen plats indis" + }, + "13": { + "then": "Aquí es serveixen plats turcs" + }, + "14": { + "then": "Aquí es serveixen plats tailandesos" + }, "2": { "then": "Principalment serveix pasta" }, @@ -2890,21 +2905,6 @@ }, "9": { "then": "Aquí es serveixen plats francesos" - }, - "10": { - "then": "Aquí es serveixen plats xinesos" - }, - "11": { - "then": "Aquí es serveixen plats grecs" - }, - "12": { - "then": "Aquí es serveixen plats indis" - }, - "13": { - "then": "Aquí es serveixen plats turcs" - }, - "14": { - "then": "Aquí es serveixen plats tailandesos" } }, "question": "Quin menjar es serveix aquí?", @@ -4183,30 +4183,6 @@ "1": { "question": "Reciclatge de piles" }, - "2": { - "question": "Reciclatge de cartrons de begudes" - }, - "3": { - "question": "Reciclatge de llaunes" - }, - "4": { - "question": "Reciclatge de roba" - }, - "5": { - "question": "Reciclatge d'oli de cuina" - }, - "6": { - "question": "Reciclatge d'oli de motor" - }, - "7": { - "question": "Reciclatge de tubs fluorescents" - }, - "8": { - "question": "Reciclatge de residus verds" - }, - "9": { - "question": "Reciclatge d'ampolles de vidre" - }, "10": { "question": "Reciclatge de vidre" }, @@ -4237,11 +4213,35 @@ "19": { "question": "Reciclatge del rebuig" }, + "2": { + "question": "Reciclatge de cartrons de begudes" + }, "20": { "question": "Reciclatge de cartutxos d'impressora" }, "21": { "question": "Reciclatge de bicicletes" + }, + "3": { + "question": "Reciclatge de llaunes" + }, + "4": { + "question": "Reciclatge de roba" + }, + "5": { + "question": "Reciclatge d'oli de cuina" + }, + "6": { + "question": "Reciclatge d'oli de motor" + }, + "7": { + "question": "Reciclatge de tubs fluorescents" + }, + "8": { + "question": "Reciclatge de residus verds" + }, + "9": { + "question": "Reciclatge d'ampolles de vidre" } } }, @@ -4304,30 +4304,6 @@ "1": { "then": "Aquí es poden reciclar els cartons de begudes" }, - "2": { - "then": "Aquí es poden reciclar llaunes" - }, - "3": { - "then": "Aquí es pot reciclar roba" - }, - "4": { - "then": "Aquí es pot reciclar oli de cuina" - }, - "5": { - "then": "Aquí es pot reciclar oli de motor" - }, - "6": { - "then": "Aquí es poden reciclar tub fluroescents" - }, - "7": { - "then": "Aquí es poden reciclar residus verds" - }, - "8": { - "then": "Ací es poden reciclar residus orgànics" - }, - "9": { - "then": "Aquí es poden reciclar ampolles de vidre" - }, "10": { "then": "Aquí es pot reciclar vidre" }, @@ -4358,6 +4334,9 @@ "19": { "then": "Aquí es poden reciclar sabates" }, + "2": { + "then": "Aquí es poden reciclar llaunes" + }, "20": { "then": "Aquí es poden reciclar petits electrodomèstics" }, @@ -4372,6 +4351,27 @@ }, "24": { "then": "Aquí es poden reciclar bicicletes" + }, + "3": { + "then": "Aquí es pot reciclar roba" + }, + "4": { + "then": "Aquí es pot reciclar oli de cuina" + }, + "5": { + "then": "Aquí es pot reciclar oli de motor" + }, + "6": { + "then": "Aquí es poden reciclar tub fluroescents" + }, + "7": { + "then": "Aquí es poden reciclar residus verds" + }, + "8": { + "then": "Ací es poden reciclar residus orgànics" + }, + "9": { + "then": "Aquí es poden reciclar ampolles de vidre" } }, "question": "Què es pot reciclar aquí?" @@ -4833,6 +4833,12 @@ "1": { "then": "Aquest fanal utilitza LED" }, + "10": { + "then": "Aquest fanal utilitza làmpades de sodi d'alta pressió (taronja amb blanc)" + }, + "11": { + "then": "Aquest fanal s'il·lumina amb gas" + }, "2": { "then": "Aquest fanal utilitza il·luminació incandescent" }, @@ -4856,12 +4862,6 @@ }, "9": { "then": "Aquest fanal utilitza làmpades de sodi de baixa pressió (taronja monocroma)" - }, - "10": { - "then": "Aquest fanal utilitza làmpades de sodi d'alta pressió (taronja amb blanc)" - }, - "11": { - "then": "Aquest fanal s'il·lumina amb gas" } }, "question": "Quin tipus d'il·luminació utilitza aquest fanal?" @@ -4958,7 +4958,8 @@ "then": "Aquesta càmera està posicionada a un arbre" } }, - "question": "Com està posicionada aquesta càmera?" + "question": "Com està posicionada aquesta càmera?", + "render": "Mètode de muntatge: {camera:mount}" }, "camera_direction": { "question": "En quina direcció geogràfica apunta aquesta càmera?", @@ -5581,4 +5582,4 @@ } } } -} \ No newline at end of file +} From 581fffef25efcc6e3ba9db733eeb9c8b42ead87c Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 12 May 2023 18:30:22 +0200 Subject: [PATCH 03/10] Chore: sync translations, fix broken image --- .../charging_station/charging_station.json | 14 +- .../charging_station.protojson | 4 +- .../surveillance_camera.json | 3 +- .../mapcomplete-changes.json | 120 +++++++-- langs/layers/ca.json | 244 +++++++++--------- 5 files changed, 229 insertions(+), 156 deletions(-) diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index fc18756bb6..6b80c7eea3 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -4605,12 +4605,12 @@ "socket:typee=1" ], "title": { - "en": "a charging station for electrical bikes with a normal european wall plug (meant to charge electrical bikes)", - "nl": "een oplaadpunt voor elektrische fietsen met een gewoon Europees stopcontact (speciaal bedoeld voor fietsen)", - "ca": "una estació de càrrega per a bicicletes elèctriques amb un endoll de paret europeu normal (destinat a carregar bicicletes elèctriques)", - "da": "en ladestation til elektriske cykler med et normalt europæisk vægstik (beregnet til opladning af elektriske cykler)", - "de": "eine Ladestation für Elektrofahrräder mit einer normalen europäischen Steckdose (zum Laden von Elektrofahrrädern)", - "es": "una estación de carga para bicicletas eléctricas con un enchufe de pared europeo normal (pensado para cargar bicicletas eléctricas)" + "en": "a charging station for electrical bikes with a normal european wall plug ", + "nl": "een oplaadpunt voor elektrische fietsen met een gewoon Europees stopcontact ", + "ca": "una estació de càrrega per a bicicletes elèctriques amb un endoll de paret europeu normal ", + "da": "en ladestation til elektriske cykler med et normalt europæisk vægstik ", + "de": "eine Ladestation für Elektrofahrräder mit einer normalen europäischen Steckdose ", + "es": "una estación de carga para bicicletas eléctricas con un enchufe de pared europeo normal " }, "preciseInput": { "preferredBackground": "map" @@ -5124,4 +5124,4 @@ }, "neededChangesets": 10 } -} \ No newline at end of file +} diff --git a/assets/layers/charging_station/charging_station.protojson b/assets/layers/charging_station/charging_station.protojson index 8aca6bfd85..dd54fb5f35 100644 --- a/assets/layers/charging_station/charging_station.protojson +++ b/assets/layers/charging_station/charging_station.protojson @@ -801,8 +801,8 @@ "socket:typee=1" ], "title": { - "en": "charging station for electrical bikes with a normal european wall plug (meant to charge electrical bikes)", - "nl": "oplaadpunt voor elektrische fietsen" + "en": "charging station for electrical bikes with a normal european wall plug ", + "nl": "oplaadpunt voor elektrische fietsen met een gewone, europese stekker " }, "preciseInput": { "preferredBackground": "map" diff --git a/assets/layers/surveillance_camera/surveillance_camera.json b/assets/layers/surveillance_camera/surveillance_camera.json index 9f9032938c..d22c119517 100644 --- a/assets/layers/surveillance_camera/surveillance_camera.json +++ b/assets/layers/surveillance_camera/surveillance_camera.json @@ -460,7 +460,8 @@ "fr": "Méthode de montage : {camera:mount}", "it": "Metodo di montaggio: {camera:mount}", "de": "Montageart: {camera:mount}", - "da": "Monteringsmetode: {camera:mount}" + "da": "Monteringsmetode: {camera:mount}", + "ca": "Mètode de muntatge: {camera:mount}" }, "freeform": { "key": "camera:mount" diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 98962045af..9ef55019b0 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -1,13 +1,22 @@ { "id": "mapcomplete-changes", "title": { - "en": "Changes made with MapComplete" + "en": "Changes made with MapComplete", + "ca": "Canvis fets amb MapComplete", + "cs": "Změny provedené pomocí MapComplete", + "de": "Änderungen mit MapComplete" }, "shortDescription": { - "en": "Shows changes made by MapComplete" + "en": "Shows changes made by MapComplete", + "ca": "Mostra els canvis fets per MapComplete", + "cs": "Zobrazuje změny provedené nástrojem MapComplete", + "de": "Zeigt Änderungen, die mit MapComplete vorgenommen wurden" }, "description": { - "en": "This maps shows all the changes made with MapComplete" + "en": "This maps shows all the changes made with MapComplete", + "ca": "Aquest mapa mostra tots els canvis fets amb MapComplete", + "cs": "Tyto mapy zobrazují všechny změny provedené pomocí MapComplete", + "de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen" }, "icon": "./assets/svg/logo.svg", "hideFromOverview": true, @@ -20,7 +29,10 @@ { "id": "mapcomplete-changes", "name": { - "en": "Changeset centers" + "en": "Changeset centers", + "ca": "Centre del conjunt de canvis", + "cs": "Centra změn", + "de": "Zentrum der Änderungssätze" }, "minzoom": 0, "source": { @@ -31,41 +43,62 @@ }, "title": { "render": { - "en": "Changeset for {theme}" + "en": "Changeset for {theme}", + "ca": "Conjunt de canvis per a {theme}", + "cs": "Sada změn pro {theme}", + "de": "Änderungssatz für {theme}" } }, "description": { - "en": "Shows all MapComplete changes" + "en": "Shows all MapComplete changes", + "ca": "Mostra tots els canvis de MapComplete", + "cs": "Zobrazí všechny změny MapComplete", + "de": "Zeigt alle MapComplete-Änderungen" }, "tagRenderings": [ { "id": "show_changeset_id", "render": { - "en": "Changeset {id}" + "en": "Changeset {id}", + "ca": "Conjunt de canvi {id}", + "cs": "Sada změn je {id}", + "de": "Änderungssatz {id}" } }, { "id": "contributor", "question": { - "en": "What contributor did make this change?" + "en": "What contributor did make this change?", + "ca": "Quin col·laborador va fer aquest canvi?", + "cs": "Který přispěvatel tuto změnu provedl?", + "de": "Wer hat diese Änderung vorgenommen?" }, "freeform": { "key": "user" }, "render": { - "en": "Change made by {user}" + "en": "Change made by {user}", + "ca": "Canvi fet per {user}", + "cs": "Změna provedená {user}", + "de": "Änderung vorgenommen von {user}" } }, { "id": "theme-id", "question": { - "en": "What theme was used to make this change?" + "en": "What theme was used to make this change?", + "ca": "Quin tema es va utilitzar per fer aquest canvi?", + "cs": "Jaké téma bylo použito k provedení této změny?", + "de": "Welches Thema wurde für diese Änderung verwendet?" }, "freeform": { "key": "theme" }, "render": { - "en": "Change with theme {theme}" + "en": "Change with theme {theme}", + "ca": "Canvi amb el tema {theme}", + "cs": "Změna pomocí tématu {theme}", + "de": "Geändert mit Thema {theme}" } }, { @@ -74,19 +107,31 @@ "key": "locale" }, "question": { - "en": "What locale (language) was this change made in?" + "en": "What locale (language) was this change made in?", + "ca": "Amb quina configuració regional (idioma) s'ha fet aquest canvi?", + "cs": "V jakém prostředí (jazyce) byla tato změna provedena?", + "de": "In welchem Gebietsschema (Sprache) wurde diese Änderung vorgenommen?" }, "render": { - "en": "User locale is {locale}" + "en": "User locale is {locale}", + "ca": "La configuració regional de l'usuari és {locale}", + "cs": "Uživatelské prostředí je {locale}", + "de": "Benutzergebietsschema ist {locale}" } }, { "id": "host", "render": { - "en": "Change with with {host}" + "en": "Change with with {host}", + "ca": "Canvi amb {host}", + "cs": "Změna u {host}", + "de": "Geändert über {host}" }, "question": { - "en": "What host (website) was this change made with?" + "en": "What host (website) was this change made with?", + "ca": "Amb quin amfitrió (lloc web) es va fer aquest canvi?", + "cs": "U jakého hostitele (webové stránky) byla tato změna provedena?", + "de": "Über welchen Host (Webseite) wurde diese Änderung vorgenommen?" }, "freeform": { "key": "host" @@ -435,7 +480,10 @@ } ], "question": { - "en": "Themename contains {search}" + "en": "Themename contains {search}", + "ca": "El nom del tema conté {search}", + "cs": "Themename obsahuje {search}", + "de": "Themename enthält {search}" } } ] @@ -451,7 +499,10 @@ } ], "question": { - "en": "Made by contributor {search}" + "en": "Made by contributor {search}", + "ca": "Fet pel col·laborador {search}", + "cs": "Vytvořil přispěvatel {search}", + "de": "Erstellt von {search}" } } ] @@ -467,7 +518,10 @@ } ], "question": { - "en": "Not made by contributor {search}" + "en": "Not made by contributor {search}", + "ca": "No fet pel col·laborador {search}", + "cs": "Ne vytvořeno přispěvatelem {search}", + "de": "Nicht erstellt von {search}" } } ] @@ -484,7 +538,10 @@ } ], "question": { - "en": "Made before {search}" + "en": "Made before {search}", + "ca": "Fet abans de {search}", + "cs": "Vytvořeno před {search}", + "de": "Erstellt vor {search}" } } ] @@ -501,7 +558,10 @@ } ], "question": { - "en": "Made after {search}" + "en": "Made after {search}", + "ca": "Fet després de {search}", + "cs": "Vytvořeno po {search}", + "de": "Erstellt nach {search}" } } ] @@ -517,7 +577,10 @@ } ], "question": { - "en": "User language (iso-code) {search}" + "en": "User language (iso-code) {search}", + "ca": "Idioma de l'usuari (codi iso) {search}", + "cs": "Jazyk uživatele (iso-kód) {search}", + "de": "Benutzersprache (ISO-Code) {search}" } } ] @@ -533,7 +596,10 @@ } ], "question": { - "en": "Made with host {search}" + "en": "Made with host {search}", + "ca": "Fet amb l'amfitrió {search}", + "cs": "Vyrobeno u hostitele {search}", + "de": "Erstellt mit host {search}" } } ] @@ -544,7 +610,10 @@ { "osmTags": "add-image>0", "question": { - "en": "Changeset added at least one image" + "en": "Changeset added at least one image", + "ca": "El conjunt de canvis ha afegit almenys una imatge", + "cs": "Sada změn přidala alespoň jeden obrázek", + "de": "Im Änderungssatz wurde mindestens ein Bild hinzugefügt" } } ] @@ -559,7 +628,10 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here" + "en": "More statistics can be found here", + "ca": "Es poden trobar més estadístiques aquí", + "cs": "Další statistiky lze nalézt zde", + "de": "Weitere Statistiken hier" } }, { diff --git a/langs/layers/ca.json b/langs/layers/ca.json index cf7a9bd3a2..5f69ee6696 100644 --- a/langs/layers/ca.json +++ b/langs/layers/ca.json @@ -35,16 +35,6 @@ "1": { "title": "un mupi" }, - "10": { - "description": "S'utilitza per a cartells publicitaris, retols de neó, logotips i cartells en entrades institucionals", - "title": "un lletrer" - }, - "11": { - "title": "una escupltura" - }, - "12": { - "title": "una paret pintada" - }, "2": { "title": "un mupi sobre la paret" }, @@ -71,6 +61,16 @@ }, "9": { "title": "un tòtem" + }, + "10": { + "description": "S'utilitza per a cartells publicitaris, retols de neó, logotips i cartells en entrades institucionals", + "title": "un lletrer" + }, + "11": { + "title": "una escupltura" + }, + "12": { + "title": "una paret pintada" } }, "tagRenderings": { @@ -165,9 +165,6 @@ "1": { "then": "Açò és un tauló d'anunis" }, - "10": { - "then": "Açò és una paret pintada" - }, "2": { "then": "Açò és una columna" }, @@ -191,6 +188,9 @@ }, "9": { "then": "Açò és un tòtem" + }, + "10": { + "then": "Açò és una paret pintada" } }, "question": "Quin tipus d'element publicitari és aquest?", @@ -205,9 +205,6 @@ "1": { "then": "Tauló d'anuncis" }, - "10": { - "then": "Paret Pintada" - }, "2": { "then": "Mupi" }, @@ -231,6 +228,9 @@ }, "9": { "then": "Tòtem" + }, + "10": { + "then": "Paret Pintada" } } } @@ -312,15 +312,6 @@ "1": { "then": "Mural" }, - "10": { - "then": "Azulejo (Rajoles decoratives espanyoles i portugueses)" - }, - "11": { - "then": "Enrajolat" - }, - "12": { - "then": "Tallat a la fusta" - }, "2": { "then": "Pintura" }, @@ -344,6 +335,15 @@ }, "9": { "then": "Relleu" + }, + "10": { + "then": "Azulejo (Rajoles decoratives espanyoles i portugueses)" + }, + "11": { + "then": "Enrajolat" + }, + "12": { + "then": "Tallat a la fusta" } }, "question": "Quin tipus d'obra és aquesta peça?", @@ -1743,9 +1743,6 @@ "1": { "question": "Té un connector
Schuko sense pin de terra (CEE7/4 tipus F)
connector" }, - "13": { - "question": "Té un connector
Tesla Supercharger (Destination) (Tipus 2 amb un cable de marca tesla)
" - }, "4": { "question": "Té un connector de
Tipus 1 amb cable (J1772)
" }, @@ -1760,6 +1757,9 @@ }, "8": { "question": "Té un connector
Tipus 2 (mennekes)
" + }, + "13": { + "question": "Té un connector
Tesla Supercharger (Destination) (Tipus 2 amb un cable de marca tesla)
" } } } @@ -1809,6 +1809,30 @@ "1": { "then": "Endoll de paret Schuko sense pin a terra (CEE7/4 tipus F)" }, + "2": { + "then": "Endoll de paret Europeu amb pin de terra (CEE7/4 tipus E)" + }, + "3": { + "then": "Endoll de paret Europeu amb pin a terra (CEE7/4 tipus E)" + }, + "4": { + "then": "CHAdeMo" + }, + "5": { + "then": "Chademo" + }, + "6": { + "then": "Tipus 1 amb cable (J1772)" + }, + "7": { + "then": "Tipus 1 amb cable (J1772)" + }, + "8": { + "then": "Tipus 1 sense cable (J1772)" + }, + "9": { + "then": "Tipus 1 sense cable (J1772)" + }, "10": { "then": "CSS 1Tipus 1 (també conegut com Tipus 1 combo)" }, @@ -1839,9 +1863,6 @@ "19": { "then": "Tipus 2 amb cable (mennekes)" }, - "2": { - "then": "Endoll de paret Europeu amb pin de terra (CEE7/4 tipus E)" - }, "20": { "then": "CSS Supercarregador Tesla (tipus2_css de la marca)" }, @@ -1859,27 +1880,6 @@ }, "26": { "then": "USB per a carregar mòbils i dispositius petits" - }, - "3": { - "then": "Endoll de paret Europeu amb pin a terra (CEE7/4 tipus E)" - }, - "4": { - "then": "CHAdeMo" - }, - "5": { - "then": "Chademo" - }, - "6": { - "then": "Tipus 1 amb cable (J1772)" - }, - "7": { - "then": "Tipus 1 amb cable (J1772)" - }, - "8": { - "then": "Tipus 1 sense cable (J1772)" - }, - "9": { - "then": "Tipus 1 sense cable (J1772)" } }, "question": "Quins tipus de connexions de càrrega estan disponibles aquí?" @@ -2870,21 +2870,6 @@ "1": { "then": "Això és una fregiduria" }, - "10": { - "then": "Aquí es serveixen plats xinesos" - }, - "11": { - "then": "Aquí es serveixen plats grecs" - }, - "12": { - "then": "Aquí es serveixen plats indis" - }, - "13": { - "then": "Aquí es serveixen plats turcs" - }, - "14": { - "then": "Aquí es serveixen plats tailandesos" - }, "2": { "then": "Principalment serveix pasta" }, @@ -2905,6 +2890,21 @@ }, "9": { "then": "Aquí es serveixen plats francesos" + }, + "10": { + "then": "Aquí es serveixen plats xinesos" + }, + "11": { + "then": "Aquí es serveixen plats grecs" + }, + "12": { + "then": "Aquí es serveixen plats indis" + }, + "13": { + "then": "Aquí es serveixen plats turcs" + }, + "14": { + "then": "Aquí es serveixen plats tailandesos" } }, "question": "Quin menjar es serveix aquí?", @@ -4183,6 +4183,30 @@ "1": { "question": "Reciclatge de piles" }, + "2": { + "question": "Reciclatge de cartrons de begudes" + }, + "3": { + "question": "Reciclatge de llaunes" + }, + "4": { + "question": "Reciclatge de roba" + }, + "5": { + "question": "Reciclatge d'oli de cuina" + }, + "6": { + "question": "Reciclatge d'oli de motor" + }, + "7": { + "question": "Reciclatge de tubs fluorescents" + }, + "8": { + "question": "Reciclatge de residus verds" + }, + "9": { + "question": "Reciclatge d'ampolles de vidre" + }, "10": { "question": "Reciclatge de vidre" }, @@ -4213,35 +4237,11 @@ "19": { "question": "Reciclatge del rebuig" }, - "2": { - "question": "Reciclatge de cartrons de begudes" - }, "20": { "question": "Reciclatge de cartutxos d'impressora" }, "21": { "question": "Reciclatge de bicicletes" - }, - "3": { - "question": "Reciclatge de llaunes" - }, - "4": { - "question": "Reciclatge de roba" - }, - "5": { - "question": "Reciclatge d'oli de cuina" - }, - "6": { - "question": "Reciclatge d'oli de motor" - }, - "7": { - "question": "Reciclatge de tubs fluorescents" - }, - "8": { - "question": "Reciclatge de residus verds" - }, - "9": { - "question": "Reciclatge d'ampolles de vidre" } } }, @@ -4304,6 +4304,30 @@ "1": { "then": "Aquí es poden reciclar els cartons de begudes" }, + "2": { + "then": "Aquí es poden reciclar llaunes" + }, + "3": { + "then": "Aquí es pot reciclar roba" + }, + "4": { + "then": "Aquí es pot reciclar oli de cuina" + }, + "5": { + "then": "Aquí es pot reciclar oli de motor" + }, + "6": { + "then": "Aquí es poden reciclar tub fluroescents" + }, + "7": { + "then": "Aquí es poden reciclar residus verds" + }, + "8": { + "then": "Ací es poden reciclar residus orgànics" + }, + "9": { + "then": "Aquí es poden reciclar ampolles de vidre" + }, "10": { "then": "Aquí es pot reciclar vidre" }, @@ -4334,9 +4358,6 @@ "19": { "then": "Aquí es poden reciclar sabates" }, - "2": { - "then": "Aquí es poden reciclar llaunes" - }, "20": { "then": "Aquí es poden reciclar petits electrodomèstics" }, @@ -4351,27 +4372,6 @@ }, "24": { "then": "Aquí es poden reciclar bicicletes" - }, - "3": { - "then": "Aquí es pot reciclar roba" - }, - "4": { - "then": "Aquí es pot reciclar oli de cuina" - }, - "5": { - "then": "Aquí es pot reciclar oli de motor" - }, - "6": { - "then": "Aquí es poden reciclar tub fluroescents" - }, - "7": { - "then": "Aquí es poden reciclar residus verds" - }, - "8": { - "then": "Ací es poden reciclar residus orgànics" - }, - "9": { - "then": "Aquí es poden reciclar ampolles de vidre" } }, "question": "Què es pot reciclar aquí?" @@ -4833,12 +4833,6 @@ "1": { "then": "Aquest fanal utilitza LED" }, - "10": { - "then": "Aquest fanal utilitza làmpades de sodi d'alta pressió (taronja amb blanc)" - }, - "11": { - "then": "Aquest fanal s'il·lumina amb gas" - }, "2": { "then": "Aquest fanal utilitza il·luminació incandescent" }, @@ -4862,6 +4856,12 @@ }, "9": { "then": "Aquest fanal utilitza làmpades de sodi de baixa pressió (taronja monocroma)" + }, + "10": { + "then": "Aquest fanal utilitza làmpades de sodi d'alta pressió (taronja amb blanc)" + }, + "11": { + "then": "Aquest fanal s'il·lumina amb gas" } }, "question": "Quin tipus d'il·luminació utilitza aquest fanal?" @@ -5582,4 +5582,4 @@ } } } -} +} \ No newline at end of file From be488bafb76cc8bba82b9daf676bce09cb8b890d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 12 May 2023 18:39:48 +0200 Subject: [PATCH 04/10] Fix broken image --- .../charging_station/charging_station.json | 12 +- .../mapcomplete-changes.json | 120 ++++-------------- css/index-tailwind-output.css | 16 +-- 3 files changed, 38 insertions(+), 110 deletions(-) diff --git a/assets/layers/charging_station/charging_station.json b/assets/layers/charging_station/charging_station.json index 6b80c7eea3..ffca8017a7 100644 --- a/assets/layers/charging_station/charging_station.json +++ b/assets/layers/charging_station/charging_station.json @@ -4605,12 +4605,12 @@ "socket:typee=1" ], "title": { - "en": "a charging station for electrical bikes with a normal european wall plug ", - "nl": "een oplaadpunt voor elektrische fietsen met een gewoon Europees stopcontact ", - "ca": "una estació de càrrega per a bicicletes elèctriques amb un endoll de paret europeu normal ", - "da": "en ladestation til elektriske cykler med et normalt europæisk vægstik ", - "de": "eine Ladestation für Elektrofahrräder mit einer normalen europäischen Steckdose ", - "es": "una estación de carga para bicicletas eléctricas con un enchufe de pared europeo normal " + "en": "a charging station for electrical bikes with a normal european wall plug ", + "nl": "een oplaadpunt voor elektrische fietsen met een gewoon Europees stopcontact ", + "ca": "una estació de càrrega per a bicicletes elèctriques amb un endoll de paret europeu normal ", + "da": "en ladestation til elektriske cykler med et normalt europæisk vægstik ", + "de": "eine Ladestation für Elektrofahrräder mit einer normalen europäischen Steckdose ", + "es": "una estación de carga para bicicletas eléctricas con un enchufe de pared europeo normal " }, "preciseInput": { "preferredBackground": "map" diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 9ef55019b0..98962045af 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -1,22 +1,13 @@ { "id": "mapcomplete-changes", "title": { - "en": "Changes made with MapComplete", - "ca": "Canvis fets amb MapComplete", - "cs": "Změny provedené pomocí MapComplete", - "de": "Änderungen mit MapComplete" + "en": "Changes made with MapComplete" }, "shortDescription": { - "en": "Shows changes made by MapComplete", - "ca": "Mostra els canvis fets per MapComplete", - "cs": "Zobrazuje změny provedené nástrojem MapComplete", - "de": "Zeigt Änderungen, die mit MapComplete vorgenommen wurden" + "en": "Shows changes made by MapComplete" }, "description": { - "en": "This maps shows all the changes made with MapComplete", - "ca": "Aquest mapa mostra tots els canvis fets amb MapComplete", - "cs": "Tyto mapy zobrazují všechny změny provedené pomocí MapComplete", - "de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen" + "en": "This maps shows all the changes made with MapComplete" }, "icon": "./assets/svg/logo.svg", "hideFromOverview": true, @@ -29,10 +20,7 @@ { "id": "mapcomplete-changes", "name": { - "en": "Changeset centers", - "ca": "Centre del conjunt de canvis", - "cs": "Centra změn", - "de": "Zentrum der Änderungssätze" + "en": "Changeset centers" }, "minzoom": 0, "source": { @@ -43,62 +31,41 @@ }, "title": { "render": { - "en": "Changeset for {theme}", - "ca": "Conjunt de canvis per a {theme}", - "cs": "Sada změn pro {theme}", - "de": "Änderungssatz für {theme}" + "en": "Changeset for {theme}" } }, "description": { - "en": "Shows all MapComplete changes", - "ca": "Mostra tots els canvis de MapComplete", - "cs": "Zobrazí všechny změny MapComplete", - "de": "Zeigt alle MapComplete-Änderungen" + "en": "Shows all MapComplete changes" }, "tagRenderings": [ { "id": "show_changeset_id", "render": { - "en": "Changeset {id}", - "ca": "Conjunt de canvi {id}", - "cs": "Sada změn je {id}", - "de": "Änderungssatz {id}" + "en": "Changeset {id}" } }, { "id": "contributor", "question": { - "en": "What contributor did make this change?", - "ca": "Quin col·laborador va fer aquest canvi?", - "cs": "Který přispěvatel tuto změnu provedl?", - "de": "Wer hat diese Änderung vorgenommen?" + "en": "What contributor did make this change?" }, "freeform": { "key": "user" }, "render": { - "en": "Change made by {user}", - "ca": "Canvi fet per {user}", - "cs": "Změna provedená {user}", - "de": "Änderung vorgenommen von {user}" + "en": "Change made by {user}" } }, { "id": "theme-id", "question": { - "en": "What theme was used to make this change?", - "ca": "Quin tema es va utilitzar per fer aquest canvi?", - "cs": "Jaké téma bylo použito k provedení této změny?", - "de": "Welches Thema wurde für diese Änderung verwendet?" + "en": "What theme was used to make this change?" }, "freeform": { "key": "theme" }, "render": { - "en": "Change with theme {theme}", - "ca": "Canvi amb el tema {theme}", - "cs": "Změna pomocí tématu {theme}", - "de": "Geändert mit Thema {theme}" + "en": "Change with theme {theme}" } }, { @@ -107,31 +74,19 @@ "key": "locale" }, "question": { - "en": "What locale (language) was this change made in?", - "ca": "Amb quina configuració regional (idioma) s'ha fet aquest canvi?", - "cs": "V jakém prostředí (jazyce) byla tato změna provedena?", - "de": "In welchem Gebietsschema (Sprache) wurde diese Änderung vorgenommen?" + "en": "What locale (language) was this change made in?" }, "render": { - "en": "User locale is {locale}", - "ca": "La configuració regional de l'usuari és {locale}", - "cs": "Uživatelské prostředí je {locale}", - "de": "Benutzergebietsschema ist {locale}" + "en": "User locale is {locale}" } }, { "id": "host", "render": { - "en": "Change with with {host}", - "ca": "Canvi amb {host}", - "cs": "Změna u {host}", - "de": "Geändert über {host}" + "en": "Change with with {host}" }, "question": { - "en": "What host (website) was this change made with?", - "ca": "Amb quin amfitrió (lloc web) es va fer aquest canvi?", - "cs": "U jakého hostitele (webové stránky) byla tato změna provedena?", - "de": "Über welchen Host (Webseite) wurde diese Änderung vorgenommen?" + "en": "What host (website) was this change made with?" }, "freeform": { "key": "host" @@ -480,10 +435,7 @@ } ], "question": { - "en": "Themename contains {search}", - "ca": "El nom del tema conté {search}", - "cs": "Themename obsahuje {search}", - "de": "Themename enthält {search}" + "en": "Themename contains {search}" } } ] @@ -499,10 +451,7 @@ } ], "question": { - "en": "Made by contributor {search}", - "ca": "Fet pel col·laborador {search}", - "cs": "Vytvořil přispěvatel {search}", - "de": "Erstellt von {search}" + "en": "Made by contributor {search}" } } ] @@ -518,10 +467,7 @@ } ], "question": { - "en": "Not made by contributor {search}", - "ca": "No fet pel col·laborador {search}", - "cs": "Ne vytvořeno přispěvatelem {search}", - "de": "Nicht erstellt von {search}" + "en": "Not made by contributor {search}" } } ] @@ -538,10 +484,7 @@ } ], "question": { - "en": "Made before {search}", - "ca": "Fet abans de {search}", - "cs": "Vytvořeno před {search}", - "de": "Erstellt vor {search}" + "en": "Made before {search}" } } ] @@ -558,10 +501,7 @@ } ], "question": { - "en": "Made after {search}", - "ca": "Fet després de {search}", - "cs": "Vytvořeno po {search}", - "de": "Erstellt nach {search}" + "en": "Made after {search}" } } ] @@ -577,10 +517,7 @@ } ], "question": { - "en": "User language (iso-code) {search}", - "ca": "Idioma de l'usuari (codi iso) {search}", - "cs": "Jazyk uživatele (iso-kód) {search}", - "de": "Benutzersprache (ISO-Code) {search}" + "en": "User language (iso-code) {search}" } } ] @@ -596,10 +533,7 @@ } ], "question": { - "en": "Made with host {search}", - "ca": "Fet amb l'amfitrió {search}", - "cs": "Vyrobeno u hostitele {search}", - "de": "Erstellt mit host {search}" + "en": "Made with host {search}" } } ] @@ -610,10 +544,7 @@ { "osmTags": "add-image>0", "question": { - "en": "Changeset added at least one image", - "ca": "El conjunt de canvis ha afegit almenys una imatge", - "cs": "Sada změn přidala alespoň jeden obrázek", - "de": "Im Änderungssatz wurde mindestens ein Bild hinzugefügt" + "en": "Changeset added at least one image" } } ] @@ -628,10 +559,7 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here", - "ca": "Es poden trobar més estadístiques aquí", - "cs": "Další statistiky lze nalézt zde", - "de": "Weitere Statistiken hier" + "en": "More statistics can be found here" } }, { diff --git a/css/index-tailwind-output.css b/css/index-tailwind-output.css index 9ab2f31155..893d526b5f 100644 --- a/css/index-tailwind-output.css +++ b/css/index-tailwind-output.css @@ -1376,14 +1376,6 @@ video { border-radius: 1.5rem; } -.rounded-xl { - border-radius: 0.75rem; -} - -.rounded-lg { - border-radius: 0.5rem; -} - .rounded { border-radius: 0.25rem; } @@ -1400,6 +1392,14 @@ video { border-radius: 0.375rem; } +.rounded-lg { + border-radius: 0.5rem; +} + +.rounded-xl { + border-radius: 0.75rem; +} + .rounded-sm { border-radius: 0.125rem; } From 201f5446f808f0f1174b0f18b57f1cf06913fef0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 14 May 2023 23:03:54 +0200 Subject: [PATCH 05/10] Theme: Exclude 'malls' from 'shops' layer --- assets/layers/shops/shops.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/layers/shops/shops.json b/assets/layers/shops/shops.json index e6253ad26d..6fb292a4a9 100644 --- a/assets/layers/shops/shops.json +++ b/assets/layers/shops/shops.json @@ -16,7 +16,8 @@ "source": { "osmTags": { "and": [ - "shop~*" + "shop~*", + "shop!=mall" ] } }, @@ -412,4 +413,4 @@ "accepts_cards", "has_organic" ] -} \ No newline at end of file +} From d8a5f3c2be985c4fcbedfda09564ae5d02e6e5b4 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 16 May 2023 01:33:58 +0200 Subject: [PATCH 06/10] Fix: correctly optimize 'key=A&key!=B' into 'key=A' --- Logic/Tags/And.ts | 22 ++++++++++++++++++++-- test/Logic/Tags/OptimizeTags.spec.ts | 24 ++++++++++++++++-------- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/Logic/Tags/And.ts b/Logic/Tags/And.ts index 771dffe534..04c79a83ce 100644 --- a/Logic/Tags/And.ts +++ b/Logic/Tags/And.ts @@ -243,7 +243,9 @@ export class And extends TagsFilter { properties[opt.key] = opt.value } } - for (const opt of optimized) { + + for (let i = 0; i < optimized.length; i++){ + const opt = optimized[i]; if (opt instanceof Tag) { const k = opt.key const v = properties[k] @@ -264,7 +266,23 @@ export class And extends TagsFilter { if (v === undefined) { continue } - if (v !== opt.value) { + if(opt.invert){ + // We should _not_ match this value + // If 'v' is given, we already know what value it should be + // If 'v' is the not-expected value, we have a conflict and return false + // Otherwise, we can safely drop this value + + const doesMatch = (typeof opt.value === "string" && v === opt.value) || + (v.match( opt.value) !== null) + + if(doesMatch){ + // We have a conflict as 'opt' is inverted + return false + }else{ + optimized.splice(i, 1) + i-- + } + }else if (v !== opt.value) { // detected an internal conflict return false } diff --git a/test/Logic/Tags/OptimizeTags.spec.ts b/test/Logic/Tags/OptimizeTags.spec.ts index ab7127d727..06110eb54c 100644 --- a/test/Logic/Tags/OptimizeTags.spec.ts +++ b/test/Logic/Tags/OptimizeTags.spec.ts @@ -1,10 +1,10 @@ -import { TagsFilter } from "../../../Logic/Tags/TagsFilter" -import { And } from "../../../Logic/Tags/And" -import { Tag } from "../../../Logic/Tags/Tag" -import { TagUtils } from "../../../Logic/Tags/TagUtils" -import { Or } from "../../../Logic/Tags/Or" -import { RegexTag } from "../../../Logic/Tags/RegexTag" -import { describe, expect, it } from "vitest" +import {TagsFilter} from "../../../Logic/Tags/TagsFilter" +import {And} from "../../../Logic/Tags/And" +import {Tag} from "../../../Logic/Tags/Tag" +import {TagUtils} from "../../../Logic/Tags/TagUtils" +import {Or} from "../../../Logic/Tags/Or" +import {RegexTag} from "../../../Logic/Tags/RegexTag" +import {describe, expect, it} from "vitest" describe("Tag optimalization", () => { describe("And", () => { @@ -71,6 +71,14 @@ describe("Tag optimalization", () => { expect(TagUtils.toString(opt)).toBe("amenity=binoculars&bicycle=yes") }) + it("should correctly optimize key=A&key!=B into key=A", () => { + const t = new And([new Tag("shop", "sports"), new RegexTag("shop", "mall", true)]) + const opt = t.optimize() + expect(typeof opt !== "boolean").true + expect(TagUtils.toString(opt)).toBe("shop=sports") + + }) + it("should optimize nested ORs", () => { const filter = TagUtils.Tag({ or: [ @@ -263,7 +271,7 @@ describe("Tag optimalization", () => { or: [ "club=climbing", { - and: ["sport=climbing", { or: ["club~*", "office~*"] }], + and: ["sport=climbing", {or: ["club~*", "office~*"]}], }, { and: [ From 82a860cbf5bad2ab1b4d9b806e9f18e4d5cbc054 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 16 May 2023 01:34:17 +0200 Subject: [PATCH 07/10] Fix: _actually_ run the *.spec.ts-tests... --- vitest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vitest.config.ts b/vitest.config.ts index 396c31d598..0d00fdf487 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -6,6 +6,6 @@ export default defineConfig({ test: { globals: true, setupFiles: ["./test/testhooks.ts"], - include: ["./test", "./*.doctest.ts", "./**/*.doctest.ts"], + include: ["./test/*.spec.ts","./test/**/*.spec.ts", "./*.doctest.ts", "./**/*.doctest.ts"], }, }) From 6f3285fbd742e6b8e638b25e0470d2931b6f6395 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 16 May 2023 01:34:57 +0200 Subject: [PATCH 08/10] Refactoring: improve codeQuality.spec.ts to use promises --- test/CodeQuality.spec.ts | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/test/CodeQuality.spec.ts b/test/CodeQuality.spec.ts index 4be39f914b..dbe177efa6 100644 --- a/test/CodeQuality.spec.ts +++ b/test/CodeQuality.spec.ts @@ -7,8 +7,8 @@ import { describe, it } from "vitest" * @param reason * @private */ -function detectInCode(forbidden: string, reason: string): (done: () => void) => void { - return (done: () => void) => { +function detectInCode(forbidden: string, reason: string): Promise { + return new Promise((done) => { const excludedDirs = [ ".git", "node_modules", @@ -49,14 +49,23 @@ function detectInCode(forbidden: string, reason: string): (done: () => void) => console.error(found.length, "issues found") throw msg } - done() } ) - } + }) +} + +function wrap(promise: Promise): ((done: () => void) => void) { + return (done => { + promise.then(done) + }) +} + +function itAsync(name: string, promise: Promise){ + it(name, wrap(promise)) } describe("Code quality", () => { - it( + itAsync( "should not contain reverse", detectInCode( "reverse()", @@ -64,12 +73,12 @@ describe("Code quality", () => { ) ) - it( + itAsync( "should not contain 'constructor.name'", detectInCode("constructor\\.name", "This is not allowed, as minification does erase names.") ) - it( + itAsync( "should not contain 'innerText'", detectInCode( "innerText", @@ -77,7 +86,7 @@ describe("Code quality", () => { ) ) - it( + itAsync( "should not contain 'import * as name from \"xyz.json\"'", detectInCode( 'import \\* as [a-zA-Z0-9_]\\+ from \\"[.-_/a-zA-Z0-9]\\+\\.json\\"', @@ -85,7 +94,7 @@ describe("Code quality", () => { ) ) - it( + itAsync( "should not contain '[\"default\"]'", detectInCode('\\[\\"default\\"\\]', "Possible leftover of faulty default import") ) From a29e0a553bd76108c78ed13a59af4ffff37646e5 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 16 May 2023 01:35:39 +0200 Subject: [PATCH 09/10] Documentation: improve error message --- Models/ThemeConfig/SourceConfig.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Models/ThemeConfig/SourceConfig.ts b/Models/ThemeConfig/SourceConfig.ts index 1badbc57b6..7ad5647649 100644 --- a/Models/ThemeConfig/SourceConfig.ts +++ b/Models/ThemeConfig/SourceConfig.ts @@ -57,7 +57,9 @@ export default class SourceConfig { throw ( "Error at " + context + - ": the specified tags are conflicting with each other: they will never match anything at all" + ": the specified tags are conflicting with each other: they will never match anything at all.\n" + + "\tThe offending tags are: "+params.osmTags.asHumanString(false, false, {})+ + "\tThey optmize into 'false' " ) } if (optimized === true) { From fbbebce30eea7b92776b4f0b627731e8010cf200 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 16 May 2023 01:36:09 +0200 Subject: [PATCH 10/10] Bump version number --- Models/Constants.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Models/Constants.ts b/Models/Constants.ts index 85a282e203..7e44f7276d 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -1,7 +1,7 @@ import { Utils } from "../Utils" export default class Constants { - public static vNumber = "0.27.3" + public static vNumber = "0.27.4" public static ImgurApiKey = "7070e7167f0a25a" public static readonly mapillary_client_token_v4 = diff --git a/package.json b/package.json index 2a273bbf93..f9f3f48d42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.25.1", + "version": "0.27.4", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues",