refactor(ui): remove unnecessary checks (i18n is always defined)

This commit is contained in:
Edouard Vanbelle
2026-04-25 22:55:42 +02:00
parent 156f3bc7ba
commit 4e2029969e
20 changed files with 142 additions and 215 deletions
+2 -5
View File
@@ -220,9 +220,7 @@ const sharedView = {
</div>
`;
if (i18n?.translateElement) {
i18n.translateElement(container);
}
i18n.translateElement(container);
},
// Attach event listeners
@@ -662,8 +660,7 @@ const sharedView = {
},
translate(key, defaultText) {
if (i18n?.t) return i18n.t(key, defaultText);
return defaultText;
return i18n.t(key, defaultText);
}
};