Fix i18n: prevent duplicate text updates

This commit is contained in:
Quanysh 2026-09-03 12:33:11 +00:00
parent c06f2ade6f
commit 1b74e5793c

View File

@ -1415,7 +1415,10 @@ function updateTexts() {
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.dataset.i18n;
if (t[key]) {
el.textContent = t[key];
// Only update if text is different to avoid unnecessary DOM changes
if (el.textContent !== t[key]) {
el.textContent = t[key];
}
}
});