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 -3
View File
@@ -3,10 +3,9 @@ import { i18n } from '../../core/i18n.js';
const API = '/api';
/* ── i18n helper — falls back to key if i18n not ready ── */
/* ── i18n helper ── */
function t(key, params) {
if (i18n && typeof i18n.t === 'function') return i18n.t(key, params);
return key.split('.').pop().replace(/_/g, ' ');
return i18n.t(key, params);
}
function headers() {