From 57d85bf49363bb70aea16cc3ee6e53537e8f6470 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 26 Apr 2025 14:32:41 +0200 Subject: [PATCH] UI: make sure all delete reasons have a translations, fix #2389 --- langs/en.json | 4 ++++ test/UI/PanoramaxDeleteReasonTranslations.spec.ts | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/UI/PanoramaxDeleteReasonTranslations.spec.ts diff --git a/langs/en.json b/langs/en.json index 923021a67..d572a4dea 100644 --- a/langs/en.json +++ b/langs/en.json @@ -568,9 +568,13 @@ "otherFreeform": "Please specify why this image should be removed:", "placeholder": "Explain why the picture should be deleted", "report": { + "blur_excess": "There is too much blurred, making the picture unusable", + "blur_missing": "One or more faces are not properly blurred", "copyright": "The picture contains copyrighted content", "inappropriate": "This picture is inappropriate (it contains nudity, calls for hate or is not streetview)", + "mislocated": "This picture is in a wrong location", "other": "Another reason, please specify", + "picture_low_quality": "This picture has a low quality and is not useable", "privacy": "The picture shows a private property" }, "requestDeletion": "Request picture deletion", diff --git a/test/UI/PanoramaxDeleteReasonTranslations.spec.ts b/test/UI/PanoramaxDeleteReasonTranslations.spec.ts new file mode 100644 index 000000000..49d744297 --- /dev/null +++ b/test/UI/PanoramaxDeleteReasonTranslations.spec.ts @@ -0,0 +1,14 @@ +import { describe, it } from "vitest" +import { REPORT_REASONS } from "panoramax-js" +import Translations from "../../src/UI/i18n/Translations" + +describe("PanoramaxDeleteReasonsTranslations", () => { + it("should have a translation for every possible delete reason", () => { + const t = Translations.t.image.panoramax + for (const reason of REPORT_REASONS) { + if (t.report[reason] === undefined) { + throw "No translation for delete reason " + reason + } + } + }) +})