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 -6
View File
@@ -50,12 +50,8 @@ const multiSelect = {
// ── Helpers for i18n ────────────────────────────────────
_t(key, vars) {
if (i18n && typeof i18n.t === 'function') {
const val = i18n.t(key, vars);
// If i18n returned the key itself, it's missing → fall back
if (val && val !== key) return val;
}
return null;
const val = i18n.t(key, vars);
return val !== key ? val : null;
},
// ── Selection state management ──────────────────────────