From 1209b2e9a7c3a5160dc0f0bf636ffe72726ef7ff Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 11 Dec 2024 01:50:58 +0000 Subject: [PATCH 1/6] Translated using Weblate (German) Currently translated at 95.0% (3876 of 4077 strings) Translation: MapComplete/layers Translate-URL: https://translate.mapcomplete.org/projects/mapcomplete/layers/de/ --- langs/layers/de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langs/layers/de.json b/langs/layers/de.json index d46384237..0ff6bf6ca 100644 --- a/langs/layers/de.json +++ b/langs/layers/de.json @@ -12761,4 +12761,4 @@ "render": "Windrad" } } -} \ No newline at end of file +} From a53060ae2161c93364903a5fabe8b8a0d63c0923 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 11 Dec 2024 01:51:29 +0000 Subject: [PATCH 2/6] Translated using Weblate (Spanish) Currently translated at 94.1% (3839 of 4077 strings) Translation: MapComplete/layers Translate-URL: https://translate.mapcomplete.org/projects/mapcomplete/layers/es/ --- langs/layers/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langs/layers/es.json b/langs/layers/es.json index 60b2bc672..7fad31e65 100644 --- a/langs/layers/es.json +++ b/langs/layers/es.json @@ -12664,4 +12664,4 @@ "render": "aerogenerador" } } -} \ No newline at end of file +} From 7d55df2dd33fc8b403c5f6dff601a9110912f559 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 11 Dec 2024 01:54:33 +0000 Subject: [PATCH 3/6] Translated using Weblate (Polish) Currently translated at 24.9% (1018 of 4077 strings) Translation: MapComplete/layers Translate-URL: https://translate.mapcomplete.org/projects/mapcomplete/layers/pl/ --- langs/layers/pl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langs/layers/pl.json b/langs/layers/pl.json index 57fb49c93..1cf5b10ad 100644 --- a/langs/layers/pl.json +++ b/langs/layers/pl.json @@ -3700,4 +3700,4 @@ "render": "turbina wiatrowa" } } -} \ No newline at end of file +} From db058f40255fd90cad57cd571a8617e87d236067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Wed, 11 Dec 2024 12:28:30 +0000 Subject: [PATCH 4/6] Translated using Weblate (Hungarian) Currently translated at 100.0% (651 of 651 strings) Translation: MapComplete/core Translate-URL: https://translate.mapcomplete.org/projects/mapcomplete/core/hu/ --- langs/hu.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/langs/hu.json b/langs/hu.json index a825d7648..7a2a5e8bc 100644 --- a/langs/hu.json +++ b/langs/hu.json @@ -848,5 +848,8 @@ "empty": "Adj meg néhány Wikidata-bejegyzést", "startsWithQ": "A Wikidata-azonosító Q-val kezdődik, amelyet egy szám követ" } + }, + "inspector": { + "menu": "Közreműködő megvizsgálása" } } From 22c348af27677cd97f124dc45f63276d91b40152 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 13 Dec 2024 13:47:47 +0100 Subject: [PATCH 5/6] Fix: fix possible failing upload (error report postmortem) --- src/Logic/ImageProviders/ImageUploadManager.ts | 14 +++++++++----- src/UI/Image/UploadImage.svelte | 10 +++++----- src/UI/SpecialVisualizations.ts | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Logic/ImageProviders/ImageUploadManager.ts b/src/Logic/ImageProviders/ImageUploadManager.ts index 01f68b1da..11e1974cf 100644 --- a/src/Logic/ImageProviders/ImageUploadManager.ts +++ b/src/Logic/ImageProviders/ImageUploadManager.ts @@ -107,12 +107,15 @@ export class ImageUploadManager { * @param file a jpg file to upload * @param tagsStore The tags of the feature * @param targetKey Use this key to save the attribute under. Default: 'image' + * @param noblur if true, then the api call will indicate that the image is already blurred. The server won't apply blurring in this case + * @param feature the feature this image is about. Will be used as fallback to get the GPS-coordinates */ public async uploadImageAndApply( file: File, tagsStore: UIEventSource, targetKey: string, - noblur: boolean + noblur: boolean, + feature: Feature ): Promise { const canBeUploaded = this.canBeUploaded(file) if (canBeUploaded !== true) { @@ -130,7 +133,8 @@ export class ImageUploadManager { author, file, targetKey, - noblur + noblur, + feature ) if (!uploadResult) { return @@ -157,7 +161,7 @@ export class ImageUploadManager { blob: File, targetKey: string | undefined, noblur: boolean, - feature?: Feature, + feature: Feature, ignoreGps: boolean = false ): Promise { this.increaseCountFor(this._uploadStarted, featureId) @@ -186,7 +190,7 @@ export class ImageUploadManager { } } try { - ;({ key, value, absoluteUrl } = await this._uploader.uploadImage( + ({ key, value, absoluteUrl } = await this._uploader.uploadImage( blob, location, author, @@ -196,7 +200,7 @@ export class ImageUploadManager { this.increaseCountFor(this._uploadRetried, featureId) console.error("Could not upload image, trying again:", e) try { - ;({ key, value, absoluteUrl } = await this._uploader.uploadImage( + ({ key, value, absoluteUrl } = await this._uploader.uploadImage( blob, location, author, diff --git a/src/UI/Image/UploadImage.svelte b/src/UI/Image/UploadImage.svelte index 250da9d3e..8e6a8c284 100644 --- a/src/UI/Image/UploadImage.svelte +++ b/src/UI/Image/UploadImage.svelte @@ -13,10 +13,10 @@ import FileSelector from "../Base/FileSelector.svelte" import LoginButton from "../Base/LoginButton.svelte" import { Translation } from "../i18n/Translation" - import Camera from "@babeard/svelte-heroicons/solid/Camera" import LayerConfig from "../../Models/ThemeConfig/LayerConfig" import NoteCommentElement from "../Popup/Notes/NoteCommentElement" import type { Feature } from "geojson" + import Camera from "@babeard/svelte-heroicons/mini/Camera" export let state: SpecialVisualizationState @@ -24,7 +24,7 @@ export let targetKey: string = undefined export let layer: LayerConfig export let noBlur: boolean = false - export let feature: Feature = undefined + export let feature: Feature /** * Image to show in the button * NOT the image to upload! @@ -65,13 +65,13 @@ } const url = uploadResult.absoluteUrl await state.osmConnection.addCommentToNote(tags.data.id, url) - NoteCommentElement.addCommentTo(url, >tags, { + NoteCommentElement.addCommentTo(url, >tags, { osmConnection: state.osmConnection, }) return } - await state?.imageUploadManager?.uploadImageAndApply(file, tags, targetKey, noBlur) + await state?.imageUploadManager?.uploadImageAndApply(file, tags, targetKey, noBlur, feature) } catch (e) { console.error(e) state.reportError(e, "Could not upload image") @@ -133,9 +133,9 @@ cls="flex justify-center md:hidden button" multiple={true} on:submit={(e) => { - return handleFiles(e.detail, true) e.preventDefault() e.stopPropagation() + return handleFiles(e.detail, true) }} > diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts index 9b709ef0b..412805f01 100644 --- a/src/UI/SpecialVisualizations.ts +++ b/src/UI/SpecialVisualizations.ts @@ -750,7 +750,7 @@ export default class SpecialVisualizations { feature, labelText: args[1], image: args[2], - noBlur: noBlur === "true" || noBlur === "yes", + noBlur: noBlur === "true" || noBlur === "yes" }) }, }, @@ -1090,7 +1090,7 @@ export default class SpecialVisualizations { tags .map((tags) => tags[args[0]]) .map((commentsStr) => { - const comments: any[] = JSON.parse(commentsStr) + const comments: { text: string }[] = JSON.parse(commentsStr) const startLoc = Number(args[1] ?? 0) if (!isNaN(startLoc) && startLoc > 0) { comments.splice(0, startLoc) From a10df88be8df03d1d77be73515e8301e29e8cf0d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 13 Dec 2024 14:01:07 +0100 Subject: [PATCH 6/6] UX: fix #2310 --- src/UI/ThemeViewGUI.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/UI/ThemeViewGUI.svelte b/src/UI/ThemeViewGUI.svelte index ade3f9562..a127789e4 100644 --- a/src/UI/ThemeViewGUI.svelte +++ b/src/UI/ThemeViewGUI.svelte @@ -42,11 +42,9 @@ import DrawerLeft from "./Base/DrawerLeft.svelte" import DrawerRight from "./Base/DrawerRight.svelte" import SearchResults from "./Search/SearchResults.svelte" - import { CloseButton } from "flowbite-svelte" import Hash from "../Logic/Web/Hash" import Searchbar from "./Base/Searchbar.svelte" import ChevronRight from "@babeard/svelte-heroicons/mini/ChevronRight" - import ChevronLeft from "@babeard/svelte-heroicons/solid/ChevronLeft" import { Drawer } from "flowbite-svelte" import { linear } from "svelte/easing" @@ -201,8 +199,8 @@ {/if} +
-
@@ -220,7 +218,7 @@ {:else if state.theme.hasPresets()} ✨ {:else} - + {/if} {/if}