Fix: "Foto folgt"-Platzhalter (Bild-Fehler-Fallback) i18n-fähig gemacht
Gefunden bei systematischem Re-Check aller Seiten: der Platzhaltertext für fehlgeschlagene Bilder auf index.html (Foto-Collage) und profil.html war hart kodiert Deutsch. Jetzt über window.dogiUebersetzen() gelöst.
This commit is contained in:
@@ -257,4 +257,8 @@ window.I18N_PAGE = {
|
|||||||
de: "Status gerade nicht abrufbar", "de-CH": "Status grad nöd abrufbar",
|
de: "Status gerade nicht abrufbar", "de-CH": "Status grad nöd abrufbar",
|
||||||
en: "Status currently unavailable", fr: "Statut actuellement indisponible", pt: "Status indisponível no momento",
|
en: "Status currently unavailable", fr: "Statut actuellement indisponible", pt: "Status indisponível no momento",
|
||||||
},
|
},
|
||||||
|
idx_foto_folgt: {
|
||||||
|
de: "Foto folgt", "de-CH": "Foto chunnt bald",
|
||||||
|
en: "Photo coming soon", fr: "Photo à venir", pt: "Foto em breve",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -79,4 +79,8 @@ window.I18N_PAGE = {
|
|||||||
de: "Zum Scout-Team", "de-CH": "Zum Scout-Team",
|
de: "Zum Scout-Team", "de-CH": "Zum Scout-Team",
|
||||||
en: "To the Scout Team", fr: "Vers l'équipe Scouts", pt: "Para a equipe Scouts",
|
en: "To the Scout Team", fr: "Vers l'équipe Scouts", pt: "Para a equipe Scouts",
|
||||||
},
|
},
|
||||||
|
pr_foto_folgt: {
|
||||||
|
de: "Foto folgt", "de-CH": "Foto chunnt bald",
|
||||||
|
en: "Photo coming soon", fr: "Photo à venir", pt: "Foto em breve",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-1
@@ -263,7 +263,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
() => {
|
() => {
|
||||||
const div = document.createElement("div");
|
const div = document.createElement("div");
|
||||||
div.className = "img-placeholder";
|
div.className = "img-placeholder";
|
||||||
div.innerHTML = `${img.dataset.fallback}<br><span class="small">Foto folgt</span>`;
|
const fotoFolgtText = window.dogiUebersetzen ? window.dogiUebersetzen("idx_foto_folgt") : "Foto folgt";
|
||||||
|
div.innerHTML = `${img.dataset.fallback}<br><span class="small">${fotoFolgtText}</span>`;
|
||||||
img.replaceWith(div);
|
img.replaceWith(div);
|
||||||
},
|
},
|
||||||
{ once: true }
|
{ once: true }
|
||||||
|
|||||||
+1
-1
@@ -181,7 +181,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
"error",
|
"error",
|
||||||
() => {
|
() => {
|
||||||
document.getElementById("profil-photo-frame").innerHTML =
|
document.getElementById("profil-photo-frame").innerHTML =
|
||||||
`<div class="img-placeholder" style="position:absolute;inset:0;">${person.name}<br><span class="small">Foto folgt</span></div>`;
|
`<div class="img-placeholder" style="position:absolute;inset:0;">${person.name}<br><span class="small">${window.dogiUebersetzen ? window.dogiUebersetzen("pr_foto_folgt") : "Foto folgt"}</span></div>`;
|
||||||
},
|
},
|
||||||
{ once: true }
|
{ once: true }
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user