diff --git a/Logic/Osm/ChangesetHandler.ts b/Logic/Osm/ChangesetHandler.ts index 35266c1b9a..d29e7e805c 100644 --- a/Logic/Osm/ChangesetHandler.ts +++ b/Logic/Osm/ChangesetHandler.ts @@ -271,7 +271,7 @@ export class ChangesetHandler { path = path.substr(1, path.lastIndexOf("/")); const metadata = [ ["created_by", `MapComplete ${Constants.vNumber}`], - ["language", Locale.language.data], + ["locale", Locale.language.data], ["host", window.location.host], ["path", path], ["source", self.changes.state["currentUserLocation"]?.features?.data?.length > 0 ? "survey" : undefined], diff --git a/Models/Constants.ts b/Models/Constants.ts index 38df9df039..fda82beda6 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import {Utils} from "../Utils"; export default class Constants { - public static vNumber = "0.15.1"; + public static vNumber = "0.15.2"; public static ImgurApiKey = '7070e7167f0a25a' public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85" diff --git a/Models/ThemeConfig/LayoutConfig.ts b/Models/ThemeConfig/LayoutConfig.ts index 1126b24be2..70c7218b2d 100644 --- a/Models/ThemeConfig/LayoutConfig.ts +++ b/Models/ThemeConfig/LayoutConfig.ts @@ -70,8 +70,7 @@ export default class LayoutConfig { { if (typeof json.title === "string") { - console.error("The title is not a translation, it instead is ", json.title, "("+typeof json.title+")") - throw `The title of a theme should always be a translation, as it sets the corresponding languages (${context}.title)` + throw `The title of a theme should always be a translation, as it sets the corresponding languages (${context}.title). The themenID is ${this.id}; the offending object is ${JSON.stringify(json.title)} which is a ${typeof json.title})` } if (this.language.length == 0) { throw `No languages defined. Define at least one language. (${context}.languages)` diff --git a/UI/ImportFlow/ImportViewerGui.ts b/UI/ImportFlow/ImportViewerGui.ts index 2c2db12d86..e740bd9430 100644 --- a/UI/ImportFlow/ImportViewerGui.ts +++ b/UI/ImportFlow/ImportViewerGui.ts @@ -199,11 +199,12 @@ class ImportInspector extends VariableUiElement { constructor(userDetails: { uid: number } | { display_name: string, search?: string }, state: UserRelatedState) { let url; + if (userDetails["uid"] !== undefined) { - url = "https://api.openstreetmap.org/api/0.6/notes/search.json?user=" + userDetails["uid"] + "&limit=10000&sort=created_at&q=%23import" + url = "https://api.openstreetmap.org/api/0.6/notes/search.json?user=" + userDetails["uid"] + "&closed=730&limit=10000&sort=created_at&q=%23import" } else { url = "https://api.openstreetmap.org/api/0.6/notes/search.json?display_name=" + - encodeURIComponent(userDetails["display_name"]) + "&limit=10000&sort=created_at&q=" + encodeURIComponent(userDetails["search"] ?? "#import") + encodeURIComponent(userDetails["display_name"]) + "&limit=10000&closed=730&sort=created_at&q=" + encodeURIComponent(userDetails["search"] ?? "#import") } diff --git a/assets/layers/gps_track/gps_track.json b/assets/layers/gps_track/gps_track.json index c55ae757bc..ff7a9f4c25 100644 --- a/assets/layers/gps_track/gps_track.json +++ b/assets/layers/gps_track/gps_track.json @@ -26,7 +26,7 @@ } ], "name": { - "en":"Your travelled track", + "en": "Your travelled track", "nl": "Jouw afgelegde route" }, "mapRendering": [ diff --git a/assets/themes/cyclestreets/cyclestreets.json b/assets/themes/cyclestreets/cyclestreets.json index cd29516921..846eff12a6 100644 --- a/assets/themes/cyclestreets/cyclestreets.json +++ b/assets/themes/cyclestreets/cyclestreets.json @@ -274,7 +274,8 @@ "de": "Diese Straße ist eine Fahrradstraße (mit einer Geschwindigkeitsbegrenzung von 30 km/h)", "it": "Questa è una strada ciclabile (e ha un limite di velocità massima di 30 km/h)", "hu": "Ez az utca kerékpárosutca (és 30 km/h a sebességkorlátozás)" - } + }, + "hideInAnswer": "_country!=be" }, { "if": { @@ -292,7 +293,7 @@ "it": "Questa è una strada ciclabile", "hu": "Ez az utca kerékpárosutca" }, - "hideInAnswer": true + "hideInAnswer": "_country=be" }, { "if": { diff --git a/assets/themes/natuurpunt/natuurpunt.json b/assets/themes/natuurpunt/natuurpunt.json index 8d0b88cb9f..ecb81ab3a3 100644 --- a/assets/themes/natuurpunt/natuurpunt.json +++ b/assets/themes/natuurpunt/natuurpunt.json @@ -324,5 +324,4 @@ "enableIframePopout": false, "enableBackgroundLayerSelection": false, "enableNoteImports": false - } \ No newline at end of file diff --git a/css/index-tailwind-output.css b/css/index-tailwind-output.css index 7b5133e610..23a816f5cb 100644 --- a/css/index-tailwind-output.css +++ b/css/index-tailwind-output.css @@ -1100,6 +1100,10 @@ video { max-height: 2rem; } +.max-h-6 { + max-height: 1.5rem; +} + .w-full { width: 100%; } diff --git a/langs/layers/en.json b/langs/layers/en.json index ce91aac50c..ccd37f4537 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -3119,6 +3119,7 @@ } }, "gps_track": { + "name": "Your travelled track", "tagRenderings": { "Privacy notice": { "render": "This is the path you've travelled since this website is opened. Don't worry - this is only visible to you and no one else. Your location data is never sent off-device." diff --git a/langs/layers/nl.json b/langs/layers/nl.json index b1134deff1..8654aec170 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3066,6 +3066,7 @@ } }, "gps_track": { + "name": "Jouw afgelegde route", "tagRenderings": { "Privacy notice": { "render": "Dit is waar je was sinds je deze website hebt geopened. Dit is enkel zichtbaar voor jou en niemand anders, je locatie wordt niet verstuurd" diff --git a/langs/themes/en.json b/langs/themes/en.json index 39eed9ed52..2933fd553e 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -22,7 +22,30 @@ "8": { "renderings": { "0": { - "question": "How much bicycle_type " + "question": "How much type_plural can be rented here? ", + "render": "{capacity:bicycle_type} type_plural can be rented here" + } + }, + "rewrite": { + "into": { + "0": { + "1": "city bikes" + }, + "1": { + "1": "electrical bikes" + }, + "2": { + "1": "bikes for children" + }, + "3": { + "1": "BMX bikes" + }, + "4": { + "1": "mountainbike" + }, + "5": { + "1": "bicycle panniers" + } } } }, @@ -36,6 +59,12 @@ }, "2": { "then": "BMX bikes can be rented here" + }, + "3": { + "then": "Mountainbikes can be rented here" + }, + "4": { + "then": "Bikes for childs can be rented here" } }, "question": "What kind of bicycles and accessories are rented here?", diff --git a/langs/themes/nl.json b/langs/themes/nl.json index c24154e254..b5b3de28be 100644 --- a/langs/themes/nl.json +++ b/langs/themes/nl.json @@ -26,11 +26,51 @@ "8": { "renderings": { "0": { - "question": "Hoeveel " + "question": "Hoeveel type_plural kunnen hier uitgeleend worden?", + "render": "{capacity:bicycle_type} type_plural kunnen hier uitgeleend worden" + } + }, + "rewrite": { + "into": { + "0": { + "1": "Stadsfietsen" + }, + "1": { + "1": "elektrische fietsen" + }, + "2": { + "1": "Kinderfietsen" + }, + "3": { + "1": "BMX-fietsen" + }, + "4": { + "1": "mountainbike" + }, + "5": { + "1": "Fietstassen" + } } } }, "bicycle-types": { + "mappings": { + "0": { + "then": "Gewone stadsfietsen kunnen hier gehuurd worden" + }, + "1": { + "then": "Elektrische fietsen kunnen hier gehuurd worden" + }, + "2": { + "then": "BMX-fietsen kunnen hier gehuurd worden" + }, + "3": { + "then": "Mountainbikes kunnen hier gehuurd worden" + }, + "4": { + "then": "Kinderfietsen kunnen hier gehuurd worden" + } + }, "question": "Wat voor soort fietsen en fietstoebehren worden hier verhuurd?" }, "bicycle_rental_type": { diff --git a/package.json b/package.json index 282bd9ad36..3bd8d0567c 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "generate:contributor-list": "git log --pretty='%aN' | sort | uniq -c | sort -hr | sed 's/ *\\([0-9]*\\) \\(.*\\)$/{\"contributor\":\"\\2\", \"commits\":\\1}/' | tr '\\n' ',' | sed 's/^/{\"contributors\":[/' | sed 's/,$/]}/' | jq > assets/contributors.json", "generate:schemas": "ts2json-schema -p Models/ThemeConfig/Json/ -o Docs/Schemas/ -t tsconfig.json -R . -m \".*ConfigJson\" && ts-node scripts/fixSchemas.ts ", "optimize-images": "cd assets/generated/ && find -name '*.png' -exec optipng '{}' \\; && echo 'PNGs are optimized'", - "reset:layeroverview": "echo {\\\"layers\\\":[], \\\"themes\\\":[]} > ./assets/generated/known_layers_and_themes.json", + "reset:layeroverview": "echo {\\\"layers\\\":[], \\\"themes\\\":[]} > ./assets/generated/known_layers_and_themes.json && echo {\\\"layers\\\": []} > ./assets/generated/known_layers.json", "generate": "mkdir -p ./assets/generated && npm run reset:layeroverview && npm run generate:images && npm run generate:charging-stations && npm run generate:translations && npm run generate:licenses && npm run generate:layeroverview", "generate:charging-stations": "cd ./assets/layers/charging_station && ts-node csvToJson.ts && cd -", "prepare-deploy": "./scripts/build.sh",