fix sonar findings and translation structure
Sonarqube Scanner / Prepare environment (push) Successful in 19s
Sonarqube Scanner / Build and test (push) Successful in 43s
Sonarqube Scanner / SonarQube analysis (push) Failing after 2m28s
Sonarqube Scanner / Deploy to Server (push) Successful in 16s

This commit is contained in:
Florian Zumpe
2026-10-01 16:31:46 +02:00
parent 2b42507f13
commit 5c4d20bd1d
30 changed files with 1753 additions and 894 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ globalThis.Wegwichtel ??= {};
function key(value) {
const url = new URL(value, globalThis.location.origin);
if (url.origin !== globalThis.location.origin) throw new TypeError(ns.I18n.t("offline-storage.inhalte.von.anderen.seiten.konnen.hier.nicht"));
if (url.origin !== globalThis.location.origin) throw new TypeError(ns.I18n.t("offline-storage.error.foreign-origin"));
url.searchParams.delete('v');
if (url.pathname.startsWith('/api/')) url.searchParams.delete('_');
url.hash = '';
@@ -60,7 +60,7 @@ globalThis.Wegwichtel ??= {};
}
async function put(stage, url, response) {
if (!response.ok || response.type === 'opaque') throw new Error(ns.I18n.t("offline-storage.ein.teil.konnte.nicht.gespeichert.werden.prufe"));
if (!response.ok || response.type === 'opaque') throw new Error(ns.I18n.t("offline-storage.error.response"));
const normalized = key(url);
if (stage.mode === 'cache') {
const cache = await caches.open(stage.id);