diff --git a/static/js/app/navigation.js b/static/js/app/navigation.js index bc1451d5..3e2c61b5 100644 --- a/static/js/app/navigation.js +++ b/static/js/app/navigation.js @@ -151,7 +151,7 @@ function setCurrentSection(section) { // Update page title const titleKey = `nav.${section}`; - const defaultTitle = section.charAt(0).toUpperCase() + section.slice(1); + // TODO check why no more used: const defaultTitle = section.charAt(0).toUpperCase() + section.slice(1); appElements.pageTitle.textContent = i18n.t(titleKey); appElements.pageTitle.setAttribute('data-i18n', titleKey); diff --git a/static/js/app/trashView.js b/static/js/app/trashView.js index fc89defc..f69d8542 100644 --- a/static/js/app/trashView.js +++ b/static/js/app/trashView.js @@ -62,7 +62,7 @@ function addTrashItemToView(item) { iconClass = item.icon_class || (ui?.getIconClass ? ui.getIconClass(item.name) : 'fas fa-file'); iconSpecialClass = ui?.getIconSpecialClass ? ui.getIconSpecialClass(item.name) : ''; const cat = item.category || ''; - typeLabel = cat ? (i18n.t(`files.file_types.${cat.toLowerCase()}`) || cat) : i18n.t('files.file_types.document'); + typeLabel = cat ? i18n.t(`files.file_types.${cat.toLowerCase()}`) || cat : i18n.t('files.file_types.document'); } const isFolder = !isFile; diff --git a/static/js/app/ui.js b/static/js/app/ui.js index 4c89c5a2..0bdd375d 100644 --- a/static/js/app/ui.js +++ b/static/js/app/ui.js @@ -1282,7 +1282,7 @@ const ui = { const iconClass = file.icon_class || this.getIconClass(file.name); const iconSpecialClass = file.icon_special_class || this.getIconSpecialClass(file.name); const cat = file.category || ''; - const typeLabel = cat ? (i18n.t(`files.file_types.${cat.toLowerCase()}`) || cat) : i18n.t('files.file_types.document'); + const typeLabel = cat ? i18n.t(`files.file_types.${cat.toLowerCase()}`) || cat : i18n.t('files.file_types.document'); const fileSize = file.size_formatted || formatFileSize(file.size); const formattedDate = formatDateTime(file.modified_at); const isFav = favorites?.isFavorite(file.id, 'file'); diff --git a/static/js/app/userMenu.js b/static/js/app/userMenu.js index 18360258..81e106d4 100644 --- a/static/js/app/userMenu.js +++ b/static/js/app/userMenu.js @@ -212,7 +212,6 @@ function showUserProfileModal() { // FIXME: use classes const barColor = percentage > 90 ? '#ef4444' : percentage > 70 ? '#f59e0b' : '#22c55e'; - const existing = document.getElementById('profile-modal-overlay'); if (existing) existing.remove(); diff --git a/static/js/features/files/contextMenus.js b/static/js/features/files/contextMenus.js index 338dd01e..f322d365 100644 --- a/static/js/features/files/contextMenus.js +++ b/static/js/features/files/contextMenus.js @@ -796,8 +796,7 @@ const contextMenus = { const dialogHeader = shareDialog.querySelector('.share-dialog-header'); if (dialogHeader) { const headerSpan = dialogHeader.querySelector('span'); - const titleText = - itemType === 'file' ? i18n.t('dialogs.share_file') : i18n.t('dialogs.share_folder'); + const titleText = itemType === 'file' ? i18n.t('dialogs.share_file') : i18n.t('dialogs.share_folder'); if (headerSpan) { headerSpan.textContent = titleText; } else { @@ -995,10 +994,7 @@ const contextMenus = { ui.setSharedVisualState(item.id, item.type, true); // Show success message - ui.showNotification( - i18n.t('notifications.link_created'), - i18n.t('notifications.share_success') - ); + ui.showNotification(i18n.t('notifications.link_created'), i18n.t('notifications.share_success')); } catch (error) { console.error('Error creating shared link:', error); ui.showNotification('Error', error.message || 'Could not create shared link'); @@ -1172,10 +1168,7 @@ const contextMenus = { } await resp.json(); - ui.showNotification( - i18n.t('music.added'), - `${files.length} ${files.length === 1 ? 'track' : 'tracks'} ${i18n.t('music.added_to_playlist')}` - ); + ui.showNotification(i18n.t('music.added'), `${files.length} ${files.length === 1 ? 'track' : 'tracks'} ${i18n.t('music.added_to_playlist')}`); this.closePlaylistDialog(); diff --git a/static/js/features/files/fileOperations.js b/static/js/features/files/fileOperations.js index 9c8530d9..184c91b4 100644 --- a/static/js/features/files/fileOperations.js +++ b/static/js/features/files/fileOperations.js @@ -994,10 +994,7 @@ const fileOps = { console.log('Response status:', response.status); if (response.ok) { - ui.showNotification( - i18n.t('notifications.file_renamed'), - i18n.t('notifications.file_renamed_to', { name: newName }) - ); + ui.showNotification(i18n.t('notifications.file_renamed'), i18n.t('notifications.file_renamed_to', { name: newName })); return true; } else { const errorText = await response.text(); diff --git a/static/js/features/library/favorites.js b/static/js/features/library/favorites.js index 7ce2a490..79ab0e31 100644 --- a/static/js/features/library/favorites.js +++ b/static/js/features/library/favorites.js @@ -110,10 +110,7 @@ const favorites = { // Notify user if (ui?.showNotification) { - ui.showNotification( - i18n.t('favorites.added_title'), - `"${name}" ${i18n.t('favorites.added_msg')}` - ); + ui.showNotification(i18n.t('favorites.added_title'), `"${name}" ${i18n.t('favorites.added_msg')}`); } return true; @@ -145,10 +142,7 @@ const favorites = { this._cache.delete(this._cacheKey(id, type)); if (ui?.showNotification) { - ui.showNotification( - i18n.t('favorites.removed_title'), - `"${itemName}" ${i18n.t('favorites.removed_msg')}` - ); + ui.showNotification(i18n.t('favorites.removed_title'), `"${itemName}" ${i18n.t('favorites.removed_msg')}`); } return true; diff --git a/static/js/features/library/music.js b/static/js/features/library/music.js index 53ffced6..a75c8d00 100644 --- a/static/js/features/library/music.js +++ b/static/js/features/library/music.js @@ -183,7 +183,6 @@ const musicView = { const listEl = document.getElementById('music-playlist-list'); if (!listEl) return; - if (this.playlists.length === 0) { listEl.innerHTML = `
@@ -342,7 +341,6 @@ const musicView = { const trackListEl = document.getElementById('music-track-list'); if (!trackListEl) return; - if (this.currentTracks.length === 0) { trackListEl.innerHTML = `
@@ -477,7 +475,6 @@ const musicView = { }, async _showCreatePlaylistDialog() { - const name = await Modal.prompt({ title: i18n.t('music.create_playlist'), label: i18n.t('music.playlist_name'), @@ -531,7 +528,6 @@ const musicView = { }, async _deletePlaylist() { - if (!this.currentPlaylist) return; const confirmed = await new Promise((resolve) => { @@ -1686,7 +1682,6 @@ const musicPlayer = { const queueList = document.getElementById('player-queue-list'); if (!queueList) return; - if (this.queue.length === 0) { queueList.innerHTML = `
diff --git a/static/locales/ar.json b/static/locales/ar.json index 805b1dae..a70ef652 100644 --- a/static/locales/ar.json +++ b/static/locales/ar.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} تم الرفع" }, "storage_quota_exceeded": "تجاوز حصة التخزين" -} \ No newline at end of file +} diff --git a/static/locales/de.json b/static/locales/de.json index a80cabd5..e470e34b 100644 --- a/static/locales/de.json +++ b/static/locales/de.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} hochgeladen" }, "storage_quota_exceeded": "Speicherplatz erschöpft" -} \ No newline at end of file +} diff --git a/static/locales/en.json b/static/locales/en.json index aed7d63e..c70b250c 100644 --- a/static/locales/en.json +++ b/static/locales/en.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} uploaded" }, "storage_quota_exceeded": "Storage quota exceeded" -} \ No newline at end of file +} diff --git a/static/locales/es.json b/static/locales/es.json index bcc9f2d0..0c776c09 100644 --- a/static/locales/es.json +++ b/static/locales/es.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} subidos" }, "storage_quota_exceeded": "Cuota de almacenamiento superada" -} \ No newline at end of file +} diff --git a/static/locales/fa.json b/static/locales/fa.json index 6da758ba..023bc2d8 100644 --- a/static/locales/fa.json +++ b/static/locales/fa.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} آپلود شد" }, "storage_quota_exceeded": "سهمیه فضای ذخیره‌سازی تجاوز کرده است" -} \ No newline at end of file +} diff --git a/static/locales/fr.json b/static/locales/fr.json index e332eb5b..27ffae81 100644 --- a/static/locales/fr.json +++ b/static/locales/fr.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} téléchargés" }, "storage_quota_exceeded": "Quota de stockage dépassé" -} \ No newline at end of file +} diff --git a/static/locales/hi.json b/static/locales/hi.json index 3dc1ef48..36d79903 100644 --- a/static/locales/hi.json +++ b/static/locales/hi.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} अपलोड हुए" }, "storage_quota_exceeded": "स्टोरेज कोटा पार हो गया" -} \ No newline at end of file +} diff --git a/static/locales/it.json b/static/locales/it.json index 5ff38a4c..0e64b1d8 100644 --- a/static/locales/it.json +++ b/static/locales/it.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} caricati" }, "storage_quota_exceeded": "Quota di archiviazione superata" -} \ No newline at end of file +} diff --git a/static/locales/ja.json b/static/locales/ja.json index 00d29108..a6406a34 100644 --- a/static/locales/ja.json +++ b/static/locales/ja.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} アップロード済み" }, "storage_quota_exceeded": "ストレージ容量を超過しました" -} \ No newline at end of file +} diff --git a/static/locales/ko.json b/static/locales/ko.json index b40c1cc9..c2256ea7 100644 --- a/static/locales/ko.json +++ b/static/locales/ko.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} 업로드됨" }, "storage_quota_exceeded": "저장 공간 할당량 초과" -} \ No newline at end of file +} diff --git a/static/locales/nl.json b/static/locales/nl.json index e569cc1b..68f836cc 100644 --- a/static/locales/nl.json +++ b/static/locales/nl.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} geüpload" }, "storage_quota_exceeded": "Opslagquotum overschreden" -} \ No newline at end of file +} diff --git a/static/locales/pt.json b/static/locales/pt.json index 53bfa1ef..dc55c3ba 100644 --- a/static/locales/pt.json +++ b/static/locales/pt.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} carregados" }, "storage_quota_exceeded": "Cota de armazenamento excedida" -} \ No newline at end of file +} diff --git a/static/locales/ru.json b/static/locales/ru.json index 594dc297..d14b3185 100644 --- a/static/locales/ru.json +++ b/static/locales/ru.json @@ -680,4 +680,4 @@ "complete": "{{count}} / {{total}} загружено" }, "storage_quota_exceeded": "Превышена квота хранилища" -} \ No newline at end of file +} diff --git a/static/locales/zh.json b/static/locales/zh.json index d19300c7..9223f058 100644 --- a/static/locales/zh.json +++ b/static/locales/zh.json @@ -680,4 +680,4 @@ "complete": "已上传 {{count}} / {{total}}" }, "storage_quota_exceeded": "存储配额已超限" -} \ No newline at end of file +}