Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
fix: address UI-sweep findings - ba/bo language fallbacks, localize remaining header/sidebar tooltips and bulk-mode strings, inline 4xx settings errors without re-POST, stop EasyMDE external Font Awesome fetch
Murtaza Nasir2410673d3cba
diff --git a/static/js/app.modular.js b/static/js/app.modular.jsindex d9388e28..9989a790 100644--- a/static/js/app.modular.js+++ b/static/js/app.modular.js@@ -2751,6 +2751,8 @@ document.addEventListener('DOMContentLoaded', async () => {const WHISPER_LANGUAGE_FALLBACK_NAMES = {haw: 'Hawaiian',yue: 'Cantonese',+ ba: 'Bashkir', // some ICU builds return the bare code+ bo: 'Tibetan',};const languageOptions = computed(() => {const uiLocale = (window.i18n && window.i18n.currentLocale) || 'en';diff --git a/static/js/modules/composables/ui.js b/static/js/modules/composables/ui.jsindex d73340b7..f82858f8 100644--- a/static/js/modules/composables/ui.js+++ b/static/js/modules/composables/ui.js@@ -531,6 +531,10 @@ export function useUI(state, utils, processedTranscription) {summaryMarkdownEditorInstance.value = new EasyMDE({element: summaryMarkdownEditor.value,spellChecker: false,+ // The vendored bundle otherwise injects a Font Awesome stylesheet+ // from an external CDN, which the app's CSP blocks (console error+ // on every editor mount). Icons come from the locally served FA.+ autoDownloadFontAwesome: false,autofocus: true,placeholder: t('form.enterSummaryMarkdown'),initialValue: selectedRecording.value?.summary || '',@@ -643,6 +647,10 @@ export function useUI(state, utils, processedTranscription) {markdownEditorInstance.value = new EasyMDE({element: notesMarkdownEditor.value,spellChecker: false,+ // The vendored bundle otherwise injects a Font Awesome stylesheet+ // from an external CDN, which the app's CSP blocks (console error+ // on every editor mount). Icons come from the locally served FA.+ autoDownloadFontAwesome: false,autofocus: true,placeholder: t('form.enterNotesMarkdown'),initialValue: selectedRecording.value?.notes || '',@@ -1985,6 +1993,10 @@ export function useUI(state, utils, processedTranscription) {recordingMarkdownEditorInstance.value = new EasyMDE({element: recordingNotesEditor.value,spellChecker: false,+ // The vendored bundle otherwise injects a Font Awesome stylesheet+ // from an external CDN, which the app's CSP blocks (console error+ // on every editor mount). Icons come from the locally served FA.+ autoDownloadFontAwesome: false,autofocus: false,// Use the same placeholder key as the plain textarea so the// wording is consistent ("Type your notes in Markdown format…").diff --git a/static/locales/de.json b/static/locales/de.jsonindex e02e2ac1..d1b5e9c1 100644--- a/static/locales/de.json+++ b/static/locales/de.json@@ -504,10 +504,12 @@"back": "Zurück","cancel": "Abbrechen","changesSaved": "Änderungen gespeichert",+ "clearAll": "Alle abwählen","close": "Schließen","confirm": "Bestätigen","delete": "Löschen","deselectAll": "Alle abwählen",+ "done": "Fertig","download": "Herunterladen","edit": "Bearbeiten","error": "Fehler",@@ -1573,6 +1575,7 @@},"tooltips": {"assignFolder": "Ordner zuweisen",+ "backToHome": "Zurück zu Speakr","bubbleView": "Sprechblasenansicht","changeSpeaker": "Sprecher ändern","clearChat": "Chat leeren",@@ -1598,6 +1601,7 @@"fullscreenVideo": "Video im Vollbild","grantPublicSharing": "Öffentliche Freigabeberechtigung erteilen","hideDetails": "Details ausblenden",+ "hideSidebar": "Seitenleiste ausblenden","hideVideo": "Video ausblenden","highlight": "Hervorheben","makeAdmin": "Zum Admin Machen",@@ -1622,6 +1626,7 @@"revokePublicSharing": "Öffentliche Freigabeberechtigung widerrufen","shareWithUsers": "Mit Benutzern teilen","showDetails": "Details anzeigen",+ "showSidebar": "Seitenleiste einblenden","showVideo": "Video einblenden","simpleView": "Einfache Ansicht","switchToDarkMode": "Zum Dunkelmodus Wechseln",@@ -1889,8 +1894,12 @@"dockFull": "Vollbild"},"bulkActions": {- "star": "Markieren",- "reprocess": "Neu verarbeiten"+ "addOrRemoveTags": "Tags hinzufügen oder entfernen",+ "deleteSelected": "Auswahl löschen",+ "exitSelection": "Auswahlmodus beenden",+ "reprocess": "Neu verarbeiten",+ "selectedCount": "{{count}} ausgewählt",+ "star": "Markieren"},"unifiedShareModal": {"noPublicLinks": "Noch keine öffentlichen Freigabe-Links",diff --git a/static/locales/en.json b/static/locales/en.jsonindex 75c48eb1..ba87bea8 100644--- a/static/locales/en.json+++ b/static/locales/en.json@@ -504,10 +504,12 @@"back": "Back","cancel": "Cancel","changesSaved": "Changes saved",+ "clearAll": "Clear all","close": "Close","confirm": "Confirm","delete": "Delete","deselectAll": "Deselect All",+ "done": "Done","download": "Download","edit": "Edit","error": "Error",@@ -1590,6 +1592,7 @@},"tooltips": {"assignFolder": "Assign Folder",+ "backToHome": "Back to Speakr","bubbleView": "Bubble view","changeSpeaker": "Change speaker","clearChat": "Clear chat",@@ -1615,6 +1618,7 @@"fullscreenVideo": "Fullscreen video","grantPublicSharing": "Grant public sharing permission","hideDetails": "Hide details",+ "hideSidebar": "Hide sidebar","hideVideo": "Hide video","highlight": "Highlight","makeAdmin": "Make Admin",@@ -1639,6 +1643,7 @@"revokePublicSharing": "Revoke public sharing permission","shareWithUsers": "Share with users","showDetails": "Show details",+ "showSidebar": "Show sidebar","showVideo": "Show video","simpleView": "Simple view","switchToDarkMode": "Switch to Dark Mode",@@ -1889,8 +1894,12 @@"dockFull": "Dock full"},"bulkActions": {- "star": "Star",- "reprocess": "Reprocess"+ "addOrRemoveTags": "Add or remove tags",+ "deleteSelected": "Delete selected",+ "exitSelection": "Exit selection mode",+ "reprocess": "Reprocess",+ "selectedCount": "{{count}} selected",+ "star": "Star"},"unifiedShareModal": {"noPublicLinks": "No public share links yet",diff --git a/static/locales/es.json b/static/locales/es.jsonindex 9a991605..dc56aa4c 100644--- a/static/locales/es.json+++ b/static/locales/es.json@@ -504,10 +504,12 @@"back": "Atrás","cancel": "Cancelar","changesSaved": "Cambios guardados",+ "clearAll": "Deseleccionar todo","close": "Cerrar","confirm": "Confirmar","delete": "Eliminar","deselectAll": "Deseleccionar Todo",+ "done": "Listo","download": "Descargar","edit": "Editar","error": "Error",@@ -1573,6 +1575,7 @@},"tooltips": {"assignFolder": "Asignar carpeta",+ "backToHome": "Volver a Speakr","bubbleView": "Vista de burbujas","changeSpeaker": "Cambiar orador","clearChat": "Limpiar chat",@@ -1598,6 +1601,7 @@"fullscreenVideo": "Vídeo en pantalla completa","grantPublicSharing": "Otorgar permiso para compartir públicamente","hideDetails": "Ocultar detalles",+ "hideSidebar": "Ocultar barra lateral","hideVideo": "Ocultar vídeo","highlight": "Resaltar","makeAdmin": "Hacer Administrador",@@ -1622,6 +1626,7 @@"revokePublicSharing": "Revocar permiso para compartir públicamente","shareWithUsers": "Compartir con usuarios","showDetails": "Mostrar detalles",+ "showSidebar": "Mostrar barra lateral","showVideo": "Mostrar vídeo","simpleView": "Vista simple","switchToDarkMode": "Cambiar a Modo Oscuro",@@ -1889,8 +1894,12 @@"dockFull": "Pantalla completa"},"bulkActions": {- "star": "Destacar",- "reprocess": "Reprocesar"+ "addOrRemoveTags": "Añadir o quitar etiquetas",+ "deleteSelected": "Eliminar seleccionados",+ "exitSelection": "Salir del modo de selección",+ "reprocess": "Reprocesar",+ "selectedCount": "{{count}} seleccionados",+ "star": "Destacar"},"unifiedShareModal": {"noPublicLinks": "Aún no hay enlaces públicos",diff --git a/static/locales/fr.json b/static/locales/fr.jsonindex 9752e99a..286e9b51 100644--- a/static/locales/fr.json+++ b/static/locales/fr.json@@ -504,10 +504,12 @@"back": "Retour","cancel": "Annuler","changesSaved": "Modifications enregistrées",+ "clearAll": "Tout désélectionner","close": "Fermer","confirm": "Confirmer","delete": "Supprimer","deselectAll": "Tout Désélectionner",+ "done": "Terminé","download": "Télécharger","edit": "Modifier","error": "Erreur",@@ -1573,6 +1575,7 @@},"tooltips": {"assignFolder": "Attribuer un dossier",+ "backToHome": "Retour à Speakr","bubbleView": "Vue bulles","changeSpeaker": "Changer le locuteur","clearChat": "Effacer le chat",@@ -1598,6 +1601,7 @@"fullscreenVideo": "Vidéo en plein écran","grantPublicSharing": "Accorder la permission de partage public","hideDetails": "Masquer les détails",+ "hideSidebar": "Masquer la barre latérale","hideVideo": "Masquer la vidéo","highlight": "Surligner","makeAdmin": "Nommer Administrateur",@@ -1622,6 +1626,7 @@"revokePublicSharing": "Révoquer la permission de partage public","shareWithUsers": "Partager avec des utilisateurs","showDetails": "Afficher les détails",+ "showSidebar": "Afficher la barre latérale","showVideo": "Afficher la vidéo","simpleView": "Vue simple","switchToDarkMode": "Passer en Mode Sombre",@@ -1889,8 +1894,12 @@"dockFull": "Plein écran"},"bulkActions": {- "star": "Favoris",- "reprocess": "Retraiter"+ "addOrRemoveTags": "Ajouter ou retirer des étiquettes",+ "deleteSelected": "Supprimer la sélection",+ "exitSelection": "Quitter le mode sélection",+ "reprocess": "Retraiter",+ "selectedCount": "{{count}} sélectionnés",+ "star": "Favoris"},"unifiedShareModal": {"noPublicLinks": "Aucun lien public pour le moment",diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.jsonindex 5d18abe6..21dba7f2 100644--- a/static/locales/pt-BR.json+++ b/static/locales/pt-BR.json@@ -504,10 +504,12 @@"back": "Voltar","cancel": "Cancelar","changesSaved": "Alterações salvas",+ "clearAll": "Desmarcar tudo","close": "Fechar","confirm": "Confirmar","delete": "Deletar","deselectAll": "Desselecionar Tudo",+ "done": "Concluído","download": "Baixar","edit": "Editar","error": "Erro",@@ -1573,6 +1575,7 @@},"tooltips": {"assignFolder": "Atribuir Pasta",+ "backToHome": "Voltar ao Speakr","bubbleView": "Visualização em bolhas","changeSpeaker": "Alterar orador","clearChat": "Limpar chat",@@ -1598,6 +1601,7 @@"fullscreenVideo": "Vídeo em tela cheia","grantPublicSharing": "Conceder permissão de compartilhamento público","hideDetails": "Ocultar detalhes",+ "hideSidebar": "Ocultar barra lateral","hideVideo": "Ocultar vídeo","highlight": "Destacar","makeAdmin": "Tornar Admin",@@ -1622,6 +1626,7 @@"revokePublicSharing": "Revogar permissão de compartilhamento público","shareWithUsers": "Compartilhar com usuários","showDetails": "Mostrar detalhes",+ "showSidebar": "Mostrar barra lateral","showVideo": "Mostrar vídeo","simpleView": "Visualização simples","switchToDarkMode": "Mudar para Modo Escuro",@@ -1889,8 +1894,12 @@"dockFull": "Tela cheia"},"bulkActions": {- "star": "Favoritar",- "reprocess": "Reprocessar"+ "addOrRemoveTags": "Adicionar ou remover tags",+ "deleteSelected": "Excluir selecionados",+ "exitSelection": "Sair do modo de seleção",+ "reprocess": "Reprocessar",+ "selectedCount": "{{count}} selecionados",+ "star": "Favoritar"},"unifiedShareModal": {"noPublicLinks": "Ainda não há links públicos",diff --git a/static/locales/ru.json b/static/locales/ru.jsonindex eb0fb6e6..fc46a09e 100644--- a/static/locales/ru.json+++ b/static/locales/ru.json@@ -504,10 +504,12 @@"back": "Назад","cancel": "Отмена","changesSaved": "Изменения сохранены",+ "clearAll": "Снять выделение","close": "Закрыть","confirm": "Подтвердить","delete": "Удалить","deselectAll": "Снять выделение со всех",+ "done": "Готово","download": "Скачать","edit": "Редактировать","error": "Ошибка",@@ -1573,6 +1575,7 @@},"tooltips": {"assignFolder": "Назначить папку",+ "backToHome": "Вернуться в Speakr","bubbleView": "Вид пузырьков","changeSpeaker": "Изменить спикера","clearChat": "Очистить чат",@@ -1598,6 +1601,7 @@"fullscreenVideo": "Видео в полноэкранном режиме","grantPublicSharing": "Предоставить разрешение на публичный доступ","hideDetails": "Скрыть детали",+ "hideSidebar": "Скрыть боковую панель","hideVideo": "Скрыть видео","highlight": "Добавить в избранное","makeAdmin": "Сделать администратором",@@ -1622,6 +1626,7 @@"revokePublicSharing": "Отозвать разрешение на публичный доступ","shareWithUsers": "Поделиться с пользователями","showDetails": "Показать детали",+ "showSidebar": "Показать боковую панель","showVideo": "Показать видео","simpleView": "Простой вид","switchToDarkMode": "Переключить на тёмную тему",@@ -1889,8 +1894,12 @@"dockFull": "Во весь экран"},"bulkActions": {- "star": "Избранное",- "reprocess": "Повторить"+ "addOrRemoveTags": "Добавить или убрать теги",+ "deleteSelected": "Удалить выбранные",+ "exitSelection": "Выйти из режима выбора",+ "reprocess": "Повторить",+ "selectedCount": "Выбрано: {{count}}",+ "star": "Избранное"},"unifiedShareModal": {"noPublicLinks": "Публичных ссылок пока нет",diff --git a/static/locales/zh.json b/static/locales/zh.jsonindex d985bbd1..c020cc38 100644--- a/static/locales/zh.json+++ b/static/locales/zh.json@@ -504,10 +504,12 @@"back": "返回","cancel": "取消","changesSaved": "更改已保存",+ "clearAll": "取消全选","close": "关闭","confirm": "确认","delete": "删除","deselectAll": "取消全选",+ "done": "完成","download": "下载","edit": "编辑","error": "错误",@@ -1573,6 +1575,7 @@},"tooltips": {"assignFolder": "分配文件夹",+ "backToHome": "返回 Speakr","bubbleView": "气泡视图","changeSpeaker": "更改发言人","clearChat": "清空聊天",@@ -1598,6 +1601,7 @@"fullscreenVideo": "视频全屏","grantPublicSharing": "授予公开分享权限","hideDetails": "隐藏详情",+ "hideSidebar": "隐藏侧边栏","hideVideo": "隐藏视频","highlight": "高亮","makeAdmin": "设为管理员",@@ -1622,6 +1626,7 @@"revokePublicSharing": "撤销公开分享权限","shareWithUsers": "与用户分享","showDetails": "显示详情",+ "showSidebar": "显示侧边栏","showVideo": "显示视频","simpleView": "简单视图","switchToDarkMode": "切换到深色模式",@@ -1889,8 +1894,12 @@"dockFull": "全屏"},"bulkActions": {- "star": "加星标",- "reprocess": "重新处理"+ "addOrRemoveTags": "添加或移除标签",+ "deleteSelected": "删除所选",+ "exitSelection": "退出选择模式",+ "reprocess": "重新处理",+ "selectedCount": "已选择 {{count}} 项",+ "star": "加星标"},"unifiedShareModal": {"noPublicLinks": "尚无公开分享链接",diff --git a/templates/account.html b/templates/account.htmlindex b51014a4..3a7ec49f 100644--- a/templates/account.html+++ b/templates/account.html@@ -4400,6 +4400,24 @@ curl "https://your-speakr-instance.com/api/recordings?token=YOUR_TOKEN_HERE"</cobody: fd,credentials: 'same-origin'});+ if (response.status >= 400 && response.status < 500) {+ // Validation rejection (e.g. a bad custom regex):+ // surface the server's message inline instead of+ // re-POSTing via the native-submit fallback, which+ // reloaded the page, dropped the active tab, and+ // double-submitted the invalid form.+ let message = `Could not save settings (HTTP ${response.status}).`;+ try {+ const data = await response.json();+ if (data && data.error) message = data.error;+ } catch (_) { /* non-JSON body — keep generic message */ }+ if (typeof showToast === 'function') {+ showToast(message, 'error');+ } else {+ alert(message);+ }+ return;+ }if (!response.ok) {throw new Error(`HTTP ${response.status}`);}diff --git a/templates/components/header.html b/templates/components/header.htmlindex 5b423134..841beeec 100644--- a/templates/components/header.html+++ b/templates/components/header.html@@ -9,7 +9,7 @@<!-- Menu Toggle Button --><button @click="toggleSidebar"class="btn btn--icon flex-shrink-0"- :title="isSidebarCollapsed ? 'Show sidebar' : 'Hide sidebar'">+ :title="isSidebarCollapsed ? t('tooltips.showSidebar') : t('tooltips.hideSidebar')"><i class="fas fa-bars text-lg"></i></button>@@ -32,7 +32,7 @@content, which made the input collapse to a few dozenpixels in edit mode. --><div class="flex items-center gap-2 min-w-0 flex-1">- <a href="/" class="flex-shrink-0 hidden sm:block" :title="'Back to Speakr'">+ <a href="/" class="flex-shrink-0 hidden sm:block" :title="t('tooltips.backToHome')"><img src="{{ url_for('static', filename='img/icon-32x32.png') }}" alt="Speakr" class="app-logo w-7 h-7"></a><h1 v-if="!editingTitle"@@ -121,12 +121,12 @@</div><button @click="toggleInbox(selectedRecording)" class="btn btn--icon hidden md:inline-flex":style="selectedRecording.is_inbox ? 'color: #3b82f6;' : ''"- :title="selectedRecording.is_inbox ? 'Mark as Read' : 'Move to Inbox'">+ :title="selectedRecording.is_inbox ? t('tooltips.markAsRead') : t('tooltips.moveToInbox')"><i class="fas fa-inbox"></i></button><button @click="toggleHighlight(selectedRecording)" class="btn btn--icon hidden md:inline-flex":style="selectedRecording.is_highlighted ? 'color: #eab308;' : ''"- :title="selectedRecording.is_highlighted ? 'Remove Highlight' : 'Highlight'">+ :title="selectedRecording.is_highlighted ? t('tooltips.removeHighlight') : t('tooltips.highlight')"><i class="fas fa-star"></i></button><button @click="editRecordingTags(selectedRecording)" class="btn btn--icon hidden md:inline-flex"@@ -162,7 +162,7 @@<i class="fas fa-share-alt"></i></button><button v-if="canDeleteRecordings && selectedRecording.can_delete !== false" @click="confirmDelete(selectedRecording)"- class="btn btn--icon hidden md:inline-flex" style="color: var(--text-danger);">+ class="btn btn--icon hidden md:inline-flex" style="color: var(--text-danger);" :title="t('buttons.delete')"><i class="fas fa-trash"></i></button><!-- Vertical divider between action icons and global controls -->diff --git a/templates/components/sidebar.html b/templates/components/sidebar.htmlindex 9e7f1030..72f17626 100644--- a/templates/components/sidebar.html+++ b/templates/components/sidebar.html@@ -36,8 +36,8 @@<button v-if="selectionMode"@click="exitSelectionMode"class="btn btn--primary"- title="Exit selection mode">- <i class="fas fa-times mr-1"></i>Done+ :title="t('bulkActions.exitSelection')">+ <i class="fas fa-times mr-1"></i>${ t('common.done') }</button><!-- New button - compact when folders enabled --><button v-if="!selectionMode && foldersEnabled && availableFolders.length > 0"@@ -382,11 +382,9 @@<div class="flex items-center gap-3"><button @click="allVisibleSelected ? clearSelection() : selectAll()"class="text-xs text-[var(--text-accent)] hover:underline">- ${ allVisibleSelected ? 'Clear all' : 'Select all' }+ ${ allVisibleSelected ? t('common.clearAll') : t('common.selectAll') }</button>- <span class="text-xs text-[var(--text-muted)]">- ${ selectedCount } selected- </span>+ <span class="text-xs text-[var(--text-muted)]" v-text="t('bulkActions.selectedCount', {count: selectedCount})"></span></div></div>@@ -600,7 +598,7 @@<button @click="openBulkTagModal('add')"class="w-10 h-10 flex items-center justify-center bg-[var(--bg-tertiary)] hover:bg-[var(--bg-input)] rounded-lg transition-colors border border-[var(--border-secondary)]"- title="Add or remove tags">+ :title="t('bulkActions.addOrRemoveTags')"><i class="fas fa-tags text-[var(--text-muted)]"></i></button>@@ -640,13 +638,13 @@<button @click="openBulkDeleteModal"class="w-10 h-10 flex items-center justify-center bg-red-600 hover:bg-red-700 text-white rounded-lg transition-colors"- title="Delete selected">+ :title="t('bulkActions.deleteSelected')"><i class="fas fa-trash"></i></button><button @click="exitSelectionMode"class="w-10 h-10 flex items-center justify-center text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-tertiary)] rounded-lg transition-colors"- title="Exit selection mode">+ :title="t('bulkActions.exitSelection')"><i class="fas fa-times"></i></button></div>@@ -665,9 +663,7 @@<i class="fas fa-times"></i></button></div>- <p class="text-sm text-[var(--text-muted)] mt-1">- ${ selectedCount } recording(s) selected- </p>+ <p class="text-sm text-[var(--text-muted)] mt-1" v-text="selectedCount !== 1 ? t('bulkReprocessModal.recordingsSelectedPlural', {count: selectedCount}) : t('bulkReprocessModal.recordingsSelected', {count: selectedCount})"></p></div><div class="p-4 max-h-64 overflow-y-auto"><!-- No Folder Option -->