fix: Fix i18n infrastructure

Add dev dependency fix paths and key names so that the default HTML lexer can pick them up
This commit is contained in:
2025-04-13 18:54:35 +02:00
parent de91ad9367
commit 53cac9f3d2
7 changed files with 41 additions and 42 deletions

View File

@@ -29,10 +29,10 @@ async function initI18next() {
function translatePageElements() {
// Translate content inside a tag
const translatableElements = document.querySelectorAll(
"[data-i18n-key]",
"[data-i18n]",
);
translatableElements.forEach((el) => {
const key = el.getAttribute("data-i18n-key");
const key = el.getAttribute("data-i18n");
el.innerHTML = i18next.t(key);
});
// Translate alt texts