refactor(ui): remove unnecessary checks (i18n is always defined)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user