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
+3 -3
View File
@@ -410,7 +410,7 @@ const photosView = {
/** Render the group mode toolbar */
_renderToolbar() {
const t = (k, d) => (i18n ? i18n.t(k) : d);
const t = (k) => i18n.t(k);
const modes = [
['daily', t('photos.view_daily', 'Day')],
['monthly', t('photos.view_monthly', 'Month')],
@@ -427,7 +427,7 @@ const photosView = {
/** Render empty state */
_renderEmpty() {
const t = (k, d) => (i18n ? i18n.t(k) : d);
const t = (k) => i18n.t(k);
this._container.innerHTML = `
<div class="photos-empty">
<i class="fas fa-images"></i>
@@ -520,7 +520,7 @@ const photosView = {
document.body.appendChild(bar);
}
const t = (k, d) => (i18n ? i18n.t(k) : d);
const t = (k) => i18n.t(k);
const count = this.selected.size;
bar.innerHTML = `
<span class="selection-count">${count} ${t('photos.items_selected', 'selected')}</span>