Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat(dictionary): redesign dictionary page with list view, inline edit, and bulk import/export (#933)
Gabriel Stein188e650901ce
diff --git a/preload.js b/preload.jsindex cec0672da..cb76aa222 100644--- a/preload.js+++ b/preload.js@@ -85,6 +85,7 @@ contextBridge.exposeInMainWorld("electronAPI", {deleteNote: (id) => ipcRenderer.invoke("db-delete-note", id),exportNote: (noteId, format) => ipcRenderer.invoke("export-note", noteId, format),exportTranscript: (noteId, format) => ipcRenderer.invoke("export-transcript", noteId, format),+ exportDictionary: (words) => ipcRenderer.invoke("export-dictionary", words),searchNotes: (query, limit) => ipcRenderer.invoke("db-search-notes", query, limit),semanticSearchNotes: (query, limit) =>ipcRenderer.invoke("db-semantic-search-notes", query, limit),diff --git a/src/components/DictionaryView.tsx b/src/components/DictionaryView.tsxindex 654854e5a..c8aa435f7 100644--- a/src/components/DictionaryView.tsx+++ b/src/components/DictionaryView.tsx@@ -1,31 +1,69 @@-import { useState, useCallback } from "react";+import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { BookOpen, X, CornerDownLeft, Info } from "lucide-react";+import { CornerDownLeft, Download, Pencil, Upload, X } from "lucide-react";import { Input } from "./ui/input";+import { Textarea } from "./ui/textarea";+import { Button } from "./ui/button";import { ConfirmDialog } from "./ui/dialog";+import { useToast } from "./ui/useToast";import { useSettings } from "../hooks/useSettings";import { getAgentName } from "../utils/agentName";+const parseWords = (text: string): string[] =>+ text+ .split(/[,\n]/)+ .map((w) => w.trim())+ .filter(Boolean);+export default function DictionaryView() {const { t } = useTranslation();const { customDictionary, setCustomDictionary } = useSettings();const agentName = getAgentName();+ const { toast } = useToast();+const [newWord, setNewWord] = useState("");+ const [bulkText, setBulkText] = useState("");+ const [showBulkImport, setShowBulkImport] = useState(false);+ const [editingWord, setEditingWord] = useState<string | null>(null);+ const [editValue, setEditValue] = useState("");const [confirmClear, setConfirmClear] = useState(false);- const [showInfo, setShowInfo] = useState(false);- const isEmpty = customDictionary.length === 0;+ const pendingImportCount = useMemo(() => parseWords(bulkText).length, [bulkText]);++ const searchQuery = newWord.trim().toLowerCase();+ const visibleWords = useMemo(+ () =>+ searchQuery+ ? customDictionary.filter((w) => w.toLowerCase().includes(searchQuery))+ : customDictionary,+ [customDictionary, searchQuery]+ );++ const addWords = useCallback(+ (text: string): number => {+ const existing = new Set(customDictionary.map((w) => w.toLowerCase()));+ const words = parseWords(text).filter((w) => {+ if (existing.has(w.toLowerCase())) return false;+ existing.add(w.toLowerCase());+ return true;+ });+ if (words.length > 0) {+ setCustomDictionary([...customDictionary, ...words]);+ }+ return words.length;+ },+ [customDictionary, setCustomDictionary]+ );const handleAdd = useCallback(() => {- const words = newWord- .split(",")- .map((w) => w.trim())- .filter((w) => w && !customDictionary.includes(w));- if (words.length > 0) {- setCustomDictionary([...customDictionary, ...words]);- setNewWord("");- }- }, [newWord, customDictionary, setCustomDictionary]);+ if (addWords(newWord) > 0) setNewWord("");+ }, [addWords, newWord]);++ const handleImport = useCallback(() => {+ addWords(bulkText);+ setBulkText("");+ setShowBulkImport(false);+ }, [addWords, bulkText]);const handleRemove = useCallback((word: string) => {@@ -35,8 +73,36 @@ export default function DictionaryView() {[customDictionary, setCustomDictionary, agentName]);+ const startEdit = useCallback((word: string) => {+ setEditingWord(word);+ setEditValue(word);+ }, []);++ const commitEdit = useCallback(() => {+ if (!editingWord) return;+ const trimmed = editValue.trim();+ const isDuplicate = customDictionary.some(+ (w) => w !== editingWord && w.toLowerCase() === trimmed.toLowerCase()+ );+ if (trimmed && trimmed !== editingWord && !isDuplicate) {+ setCustomDictionary(customDictionary.map((w) => (w === editingWord ? trimmed : w)));+ }+ setEditingWord(null);+ }, [editingWord, editValue, customDictionary, setCustomDictionary]);++ const handleExport = useCallback(async () => {+ const result = await window.electronAPI?.exportDictionary?.(customDictionary);+ if (result?.error) {+ toast({+ title: t("dictionary.exportFailed"),+ description: result.error,+ variant: "destructive",+ });+ }+ }, [customDictionary, toast, t]);+return (- <div className="flex flex-col h-full">+ <div className="flex flex-col h-full overflow-y-auto"><ConfirmDialogopen={confirmClear}onOpenChange={setConfirmClear}@@ -46,23 +112,10 @@ export default function DictionaryView() {variant="destructive"/>- {isEmpty ? (- /* ─── Empty state ─── */- <div className="flex-1 flex flex-col items-center justify-center px-8 -mt-4">- <div className="w-10 h-10 rounded-[10px] bg-gradient-to-b from-primary/8 to-primary/4 dark:from-primary/12 dark:to-primary/6 border border-primary/10 dark:border-primary/15 flex items-center justify-center mb-4">- <BookOpen- size={17}- strokeWidth={1.5}- className="text-primary/50 dark:text-primary/60"- />- </div>-- <h2 className="text-xs font-semibold text-foreground mb-1">{t("dictionary.title")}</h2>- <p className="text-xs text-foreground/30 text-center leading-relaxed max-w-[240px] mb-6">- {t("dictionary.description")}- </p>-- <div className="w-full max-w-[260px] relative">+ <div className="px-5 py-4 flex flex-col gap-3">+ {/* ─── Add word ─── */}+ <div>+ <div className="relative"><Inputplaceholder={t("dictionary.addPlaceholder")}value={newWord}@@ -70,145 +123,162 @@ export default function DictionaryView() {onKeyDown={(e) => {if (e.key === "Enter") handleAdd();}}- className="w-full h-8 text-xs pr-8 placeholder:text-foreground/20"+ className="w-full h-8 text-xs pr-24 placeholder:text-foreground/20"/>- {newWord.trim() ? (+ <div className="absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center gap-2"><buttononClick={handleAdd}+ disabled={!newWord.trim()}aria-label={t("dictionary.addWord")}- className="absolute right-2 top-1/2 -translate-y-1/2 text-primary/50 hover:text-primary transition-colors"+ className="flex items-center gap-1 text-xs text-foreground/30 enabled:hover:text-primary disabled:text-foreground/15 transition-colors">- <CornerDownLeft size={11} />+ {t("dictionary.add")}+ <CornerDownLeft size={10} /></button>- ) : (- <kbd className="absolute right-2.5 top-1/2 -translate-y-1/2 text-xs text-foreground/12 font-mono select-none pointer-events-none">- ⏎- </kbd>- )}- </div>-- <div className="flex items-center gap-1.5 mt-3">- {["OpenWhispr", "Dr. Smith", "gRPC"].map((ex) => (- <span- key={ex}- className="text-xs text-foreground/12 px-1.5 py-0.5 rounded-[4px] border border-dashed border-foreground/6 dark:border-white/5"+ <div className="w-px h-3.5 bg-foreground/10 dark:bg-white/8" />+ <button+ onClick={() => setShowBulkImport(true)}+ aria-label={t("dictionary.importWords")}+ className="text-foreground/30 hover:text-foreground/60 transition-colors">- {ex}- </span>- ))}+ <Upload size={11} />+ </button>+ </div></div>+ <p className="mt-1.5 text-xs text-foreground/15">{t("dictionary.separatorHint")}</p>+ </div>- <div className="mt-8 w-full max-w-[260px]">- <button- onClick={() => setShowInfo(!showInfo)}- aria-expanded={showInfo}- aria-label={t("dictionary.howItWorks")}- className="flex items-center gap-1 text-xs text-foreground/15 hover:text-foreground/30 transition-colors mx-auto"- >- <Info size={9} />- {t("dictionary.howItWorks")}- </button>- {showInfo && (- <div className="mt-2.5 rounded-md bg-foreground/[0.02] dark:bg-white/[0.02] border border-foreground/5 dark:border-white/4 px-3 py-2.5">- <p className="text-xs text-foreground/25 leading-[1.6]">- {t("dictionary.howItWorksDetail")}- </p>+ {/* ─── Bulk import ─── */}+ {showBulkImport && (+ <div className="rounded-md border border-primary/30 dark:border-primary/40 px-3 pt-2.5 pb-2">+ <Textarea+ autoFocus+ value={bulkText}+ onChange={(e) => setBulkText(e.target.value)}+ placeholder={t("dictionary.importPlaceholder")}+ rows={4}+ className="min-h-[72px] resize-none border-0 shadow-none rounded-none bg-transparent p-0 text-xs text-foreground placeholder:text-foreground/20 hover:border-0 focus:border-0 focus:ring-0"+ />+ <div className="flex items-center justify-between pt-1.5">+ <p className="text-xs text-foreground/20">+ {t("dictionary.separateWithCommas")}+ {pendingImportCount > 0 && (+ <span className="text-success">+ {" • "}+ {t("dictionary.wordsReady", { count: pendingImportCount })}+ </span>+ )}+ </p>+ <div className="flex items-center gap-2">+ <Button+ variant="ghost"+ size="sm"+ onClick={() => {+ setBulkText("");+ setShowBulkImport(false);+ }}+ >+ {t("common.cancel")}+ </Button>+ <Button size="sm" onClick={handleImport} disabled={pendingImportCount === 0}>+ {t("dictionary.import")}+ </Button></div>- )}- </div>- </div>- ) : (- /* ─── Populated state ─── */- <>- <div className="px-5 pt-4 pb-2.5 flex items-baseline justify-between">- <div className="flex items-baseline gap-2">- <h2 className="text-xs font-semibold text-foreground">{t("dictionary.title")}</h2>- <span className="text-xs text-foreground/15 font-mono tabular-nums">- {customDictionary.length}- </span></div>- <button- onClick={() => setConfirmClear(true)}- aria-label={t("dictionary.clearAll")}- className="text-xs text-foreground/15 hover:text-destructive/70 transition-colors"- >- {t("dictionary.clearAll")}- </button></div>+ )}- <div className="px-5 pb-3">- <div className="relative">- <Input- placeholder={t("dictionary.addPlaceholder")}- value={newWord}- onChange={(e) => setNewWord(e.target.value)}- onKeyDown={(e) => {- if (e.key === "Enter") handleAdd();- }}- className="w-full h-7 text-xs pr-8 placeholder:text-foreground/20"- />- {newWord.trim() ? (+ {/* ─── Dictionary list ─── */}+ <div className="rounded-md border border-foreground/8 dark:border-white/6 bg-foreground/[0.02] dark:bg-white/[0.03] px-4 py-3">+ <div className="flex items-center justify-between">+ <h3 className="text-xs font-semibold text-foreground/40">+ {t("dictionary.yourDictionary")}+ </h3>+ <div className="flex items-center gap-3">+ {customDictionary.length > 0 && (<button- onClick={handleAdd}- aria-label={t("dictionary.addWord")}- className="absolute right-2 top-1/2 -translate-y-1/2 text-primary/50 hover:text-primary transition-colors"+ onClick={() => setConfirmClear(true)}+ aria-label={t("dictionary.clearAll")}+ className="text-xs text-foreground/15 hover:text-destructive/70 transition-colors">- <CornerDownLeft size={10} />+ {t("dictionary.clearAll")}</button>- ) : (- <kbd className="absolute right-2.5 top-1/2 -translate-y-1/2 text-xs text-foreground/12 font-mono select-none pointer-events-none">- ⏎- </kbd>)}+ <button+ onClick={handleExport}+ disabled={customDictionary.length === 0}+ aria-label={t("dictionary.exportDictionary")}+ className="text-foreground/25 enabled:hover:text-foreground/60 disabled:text-foreground/10 transition-colors"+ >+ <Download size={12} />+ </button></div></div>+ <div className="mt-2.5 border-t border-dashed border-foreground/10 dark:border-white/8" />- <div className="mx-5 h-px bg-border/8 dark:bg-white/3" />-- <div className="flex-1 overflow-y-auto px-5 py-3">- <div className="flex flex-wrap gap-1.5">- {customDictionary.map((word) => {+ {customDictionary.length === 0 ? (+ <p className="py-6 text-xs text-foreground/20 text-center">{t("dictionary.empty")}</p>+ ) : visibleWords.length === 0 ? (+ <p className="py-6 text-xs text-foreground/20 text-center">+ {t("dictionary.noMatches", { word: newWord.trim() })}+ </p>+ ) : (+ <ul>+ {visibleWords.map((word) => {const isAgentName = word === agentName;+ const isEditing = editingWord === word;return (- <span+ <likey={word}- className={`group inline-flex items-center gap-1 py-[3px]- rounded-[5px] text-xs- border transition-colors duration-150- ${- isAgentName- ? "pl-2.5 pr-2.5 bg-primary/10 dark:bg-primary/15 text-primary border-primary/20 dark:border-primary/30"- : "pl-2.5 pr-1 bg-foreground/[0.02] dark:bg-white/[0.03] text-foreground/60 dark:text-foreground/50 border-foreground/8 dark:border-white/6 hover:border-foreground/15 dark:hover:border-white/12 hover:bg-foreground/[0.04] dark:hover:bg-white/[0.06] hover:text-foreground/80 dark:hover:text-foreground/70"- }`}+ className="group flex items-center gap-2 h-9 border-b border-foreground/4 dark:border-white/3 last:border-b-0"title={isAgentName ? t("dictionary.autoManaged") : undefined}>- {word}- {!isAgentName && (- <button- onClick={() => handleRemove(word)}- aria-label={t("dictionary.removeWord", { word })}- className="p-0.5 rounded-sm- opacity-0 group-hover:opacity-100- text-foreground/25 hover:!text-destructive/70- transition-colors duration-150"+ {isEditing ? (+ <Input+ autoFocus+ value={editValue}+ onChange={(e) => setEditValue(e.target.value)}+ onKeyDown={(e) => {+ if (e.key === "Enter") commitEdit();+ if (e.key === "Escape") setEditingWord(null);+ }}+ onBlur={commitEdit}+ className="h-7 text-xs flex-1"+ />+ ) : (+ <span+ className={`flex-1 text-xs truncate ${+ isAgentName ? "text-primary" : "text-foreground/60"+ }`}>- <X size={10} strokeWidth={2} />- </button>+ {word}+ </span>)}- </span>+ {!isAgentName && !isEditing && (+ <div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-150">+ <button+ onClick={() => startEdit(word)}+ aria-label={t("dictionary.editWord", { word })}+ className="p-1 text-foreground/25 hover:text-foreground/60 transition-colors"+ >+ <Pencil size={11} />+ </button>+ <button+ onClick={() => handleRemove(word)}+ aria-label={t("dictionary.removeWord", { word })}+ className="p-1 text-foreground/25 hover:text-destructive/70 transition-colors"+ >+ <X size={11} strokeWidth={2} />+ </button>+ </div>+ )}+ </li>);})}- </div>- </div>-- <div className="px-5 pb-3 flex items-start gap-1.5">- <Info size={9} className="text-foreground/10 mt-px shrink-0" />- <p className="text-xs text-foreground/12 leading-relaxed">- {t("dictionary.inputHint")}- </p>- </div>- </>- )}+ </ul>+ )}+ </div>+ </div></div>);}diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex 5638305b5..cf0e57af6 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -1419,6 +1419,26 @@ class IPCHandlers {}});+ ipcMain.handle("export-dictionary", async (event, words) => {+ try {+ const { dialog } = require("electron");+ const fs = require("fs");++ const result = await dialog.showSaveDialog({+ defaultPath: "dictionary.txt",+ filters: [{ name: "Text", extensions: ["txt"] }],+ });++ if (result.canceled || !result.filePath) return { success: false };++ fs.writeFileSync(result.filePath, words.join("\n"), "utf-8");+ return { success: true };+ } catch (error) {+ debugLogger.error("Error exporting dictionary", { error: error.message }, "dictionary");+ return { success: false, error: error.message };+ }+ });+ipcMain.handle("select-audio-file", async () => {const { dialog } = require("electron");const result = await dialog.showOpenDialog({diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 2d6841e59..1a3044e24 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -2148,15 +2148,24 @@"addWord": "Wort hinzufügen","removeWord": "{{word}} entfernen","clearAll": "Alle löschen",- "howItWorks": "So funktioniert es",- "howItWorksDetail": "Hinzugefügte Wörter werden in den KI-Prompt aufgenommen, damit das Modell diese Begriffe bei der Transkriptionsbereinigung erkennt und beibehält.","autoManaged": "Agent-Name (automatisch verwaltet)",- "inputHint": "Enter drücken zum Hinzufügen",- "title": "Benutzerdefiniertes Wörterbuch",- "description": "Bringe der KI dein Vokabular bei – Namen, Fachbegriffe und Ausdrücke, die sie sonst übersehen könnte","clearTitle": "Wörterbuch leeren?","clearDescription": "Dadurch werden alle Wörter aus deinem benutzerdefinierten Wörterbuch entfernt. Diese Aktion kann nicht rückgängig gemacht werden.",- "addPlaceholder": "Ein Wort oder eine Phrase hinzufügen..."+ "addPlaceholder": "Wort eingeben",+ "add": "Hinzufügen",+ "importWords": "Wörter importieren",+ "separatorHint": "Mit Kommas trennen — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Wörter durch Kommas getrennt einfügen...",+ "separateWithCommas": "Mit Kommas trennen",+ "wordsReady_one": "{{count}} Wort bereit",+ "wordsReady_other": "{{count}} Wörter bereit",+ "import": "Importieren",+ "yourDictionary": "Dein Wörterbuch",+ "exportDictionary": "Wörterbuch exportieren",+ "exportFailed": "Export fehlgeschlagen",+ "empty": "Noch keine Wörter",+ "editWord": "{{word}} bearbeiten",+ "noMatches": "Keine Treffer — Enter drücken, um \"{{word}}\" hinzuzufügen"},"sidebar": {"home": "Startseite",diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex c03584666..393035953 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -2352,18 +2352,27 @@}},"dictionary": {- "title": "Custom Dictionary",- "description": "Teach the AI your vocabulary — names, jargon, and terms it might otherwise miss","clearTitle": "Clear dictionary?","clearDescription": "This will remove all words from your custom dictionary. This action cannot be undone.","addWord": "Add word",- "addPlaceholder": "Add a word or phrase...",+ "addPlaceholder": "Type a word","removeWord": "Remove {{word}}","clearAll": "Clear all",- "howItWorks": "How it works",- "howItWorksDetail": "Words are fed as context hints to the speech model, helping it recognize uncommon terms. For difficult words, try adding context like \"The word is Synty\" alongside the word itself.","autoManaged": "Auto-managed — synced from agent name",- "inputHint": "Separate multiple words with commas. Add context phrases like \"The word is Synty\" for better recognition."+ "add": "Add",+ "importWords": "Import words",+ "separatorHint": "Separate with commas — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Paste words separated by commas...",+ "separateWithCommas": "Separate with commas",+ "wordsReady_one": "{{count}} word ready",+ "wordsReady_other": "{{count}} words ready",+ "import": "Import",+ "yourDictionary": "Your dictionary",+ "exportDictionary": "Export dictionary",+ "exportFailed": "Export failed",+ "empty": "No words yet",+ "editWord": "Edit {{word}}",+ "noMatches": "No matches — press Enter to add \"{{word}}\""},"support": {"documentation": "Documentation",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 2d701df04..f81d8c69b 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -2196,15 +2196,24 @@"addWord": "Añadir palabra","removeWord": "Eliminar {{word}}","clearAll": "Borrar todo",- "howItWorks": "Cómo funciona",- "howItWorksDetail": "Las palabras que agregas se incluyen en el prompt de IA para que el modelo las reconozca y preserve durante la corrección de transcripción.","autoManaged": "Nombre del agente (gestionado automáticamente)",- "inputHint": "Pulsa Enter para agregar",- "title": "Diccionario personalizado",- "description": "Enseña a la IA tu vocabulario: nombres, jerga y términos que podría pasar por alto","clearTitle": "¿Borrar el diccionario?","clearDescription": "Esto eliminará todas las palabras de tu diccionario personalizado. Esta acción no se puede deshacer.",- "addPlaceholder": "Añadir una palabra o frase..."+ "addPlaceholder": "Escribe una palabra",+ "add": "Añadir",+ "importWords": "Importar palabras",+ "separatorHint": "Separa con comas — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Pega palabras separadas por comas...",+ "separateWithCommas": "Separa con comas",+ "wordsReady_one": "{{count}} palabra lista",+ "wordsReady_other": "{{count}} palabras listas",+ "import": "Importar",+ "yourDictionary": "Tu diccionario",+ "exportDictionary": "Exportar diccionario",+ "exportFailed": "Error al exportar",+ "empty": "Aún no hay palabras",+ "editWord": "Editar {{word}}",+ "noMatches": "Sin coincidencias — pulsa Enter para añadir \"{{word}}\""},"sidebar": {"home": "Inicio",diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex b1e8f63b4..4e73ee837 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -2256,18 +2256,27 @@}},"dictionary": {- "title": "Dictionnaire personnalisé",- "description": "Apprenez à l'IA votre vocabulaire — noms, jargon et termes qu'elle pourrait autrement manquer","clearTitle": "Vider le dictionnaire ?","clearDescription": "Cela supprimera tous les mots de votre dictionnaire personnalisé. Cette action est irréversible.","addWord": "Ajouter un mot",- "addPlaceholder": "Ajouter un mot ou une expression...",+ "addPlaceholder": "Saisissez un mot","removeWord": "Supprimer {{word}}","clearAll": "Tout effacer",- "howItWorks": "Comment ça marche",- "howItWorksDetail": "Les mots sont transmis comme indices contextuels au modèle vocal, l'aidant à reconnaître les termes peu courants. Pour les mots difficiles, essayez d'ajouter du contexte comme « Le mot est Synty » en plus du mot lui-même.","autoManaged": "Géré automatiquement — synchronisé depuis le nom de l'agent",- "inputHint": "Séparez les mots par des virgules. Ajoutez des phrases de contexte comme « Le mot est Synty » pour une meilleure reconnaissance."+ "add": "Ajouter",+ "importWords": "Importer des mots",+ "separatorHint": "Séparez par des virgules — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Collez des mots séparés par des virgules...",+ "separateWithCommas": "Séparez par des virgules",+ "wordsReady_one": "{{count}} mot prêt",+ "wordsReady_other": "{{count}} mots prêts",+ "import": "Importer",+ "yourDictionary": "Votre dictionnaire",+ "exportDictionary": "Exporter le dictionnaire",+ "exportFailed": "Échec de l'exportation",+ "empty": "Aucun mot pour l'instant",+ "editWord": "Modifier {{word}}",+ "noMatches": "Aucune correspondance — appuyez sur Entrée pour ajouter « {{word}} »"},"support": {"documentation": "Documentation",diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 9fe407ecc..498076efa 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -2148,15 +2148,24 @@"addWord": "Aggiungi parola","removeWord": "Rimuovi {{word}}","clearAll": "Cancella tutto",- "howItWorks": "Come funziona",- "howItWorksDetail": "Le parole aggiunte vengono incluse nel prompt dell'IA, in modo che il modello sappia cercare e preservare questi termini durante la correzione della trascrizione.","autoManaged": "Gestito automaticamente",- "inputHint": "Premi Invio per aggiungere",- "title": "Dizionario personalizzato",- "description": "Insegna all'IA il tuo vocabolario — nomi, gergo e termini che potrebbe altrimenti non riconoscere","clearTitle": "Svuotare il dizionario?","clearDescription": "Verranno rimossi tutti i termini dal tuo dizionario personalizzato. Questa azione non può essere annullata.",- "addPlaceholder": "Aggiungi una parola o una frase..."+ "addPlaceholder": "Digita una parola",+ "add": "Aggiungi",+ "importWords": "Importa parole",+ "separatorHint": "Separa con virgole — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Incolla parole separate da virgole...",+ "separateWithCommas": "Separa con virgole",+ "wordsReady_one": "{{count}} parola pronta",+ "wordsReady_other": "{{count}} parole pronte",+ "import": "Importa",+ "yourDictionary": "Il tuo dizionario",+ "exportDictionary": "Esporta dizionario",+ "exportFailed": "Esportazione non riuscita",+ "empty": "Nessuna parola",+ "editWord": "Modifica {{word}}",+ "noMatches": "Nessuna corrispondenza — premi Invio per aggiungere \"{{word}}\""},"sidebar": {"home": "Home",diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 979acc777..45c4c3f8f 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -2076,15 +2076,24 @@"addWord": "単語を追加","removeWord": "{{word}} を削除","clearAll": "すべてクリア",- "howItWorks": "仕組み",- "howItWorksDetail": "追加した単語は AI プロンプトに含まれ、文字起こし時にこれらの用語を正確に認識・保持します。","autoManaged": "自動管理",- "inputHint": "Enter で追加",- "title": "カスタム辞書",- "description": "AIに語彙を学習させましょう — 名前、専門用語、見落とされがちな表現など","clearTitle": "辞書をクリアしますか?","clearDescription": "カスタム辞書のすべての単語が削除されます。この操作は元に戻せません。",- "addPlaceholder": "単語やフレーズを追加..."+ "addPlaceholder": "単語を入力",+ "add": "追加",+ "importWords": "単語をインポート",+ "separatorHint": "カンマで区切る — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "カンマ区切りの単語を貼り付け...",+ "separateWithCommas": "カンマで区切る",+ "wordsReady_other": "{{count}} 個の単語が準備完了",+ "import": "インポート",+ "yourDictionary": "あなたの辞書",+ "exportDictionary": "辞書をエクスポート",+ "exportFailed": "エクスポートに失敗しました",+ "empty": "まだ単語がありません",+ "editWord": "{{word}} を編集",+ "wordsReady_one": "{{count}} 個の単語が準備完了",+ "noMatches": "一致なし — Enter キーで「{{word}}」を追加"},"referral": {"title": "紹介して特典をゲット",diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 823d54215..87af4bf64 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -2148,15 +2148,24 @@"addWord": "Adicionar palavra","removeWord": "Remover {{word}}","clearAll": "Limpar tudo",- "howItWorks": "Como funciona",- "howItWorksDetail": "As palavras adicionadas são incluídas no prompt de IA para que o modelo saiba procurar e preservar esses termos durante a limpeza da transcrição.","autoManaged": "Gerenciado automaticamente",- "inputHint": "Pressione Enter para adicionar",- "title": "Dicionário personalizado",- "description": "Ensine a IA o seu vocabulário — nomes, jargões e termos que ela poderia não reconhecer","clearTitle": "Limpar o dicionário?","clearDescription": "Isso removerá todas as palavras do seu dicionário personalizado. Esta ação não pode ser desfeita.",- "addPlaceholder": "Adicionar uma palavra ou frase..."+ "addPlaceholder": "Digite uma palavra",+ "add": "Adicionar",+ "importWords": "Importar palavras",+ "separatorHint": "Separe com vírgulas — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Cole palavras separadas por vírgulas...",+ "separateWithCommas": "Separe com vírgulas",+ "wordsReady_one": "{{count}} palavra pronta",+ "wordsReady_other": "{{count}} palavras prontas",+ "import": "Importar",+ "yourDictionary": "Seu dicionário",+ "exportDictionary": "Exportar dicionário",+ "exportFailed": "Falha ao exportar",+ "empty": "Nenhuma palavra ainda",+ "editWord": "Editar {{word}}",+ "noMatches": "Nenhuma correspondência — pressione Enter para adicionar \"{{word}}\""},"sidebar": {"home": "Início",diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 9dabf6f02..e804bc556 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -2150,15 +2150,26 @@"addWord": "Добавить слово","removeWord": "Удалить {{word}}","clearAll": "Очистить все",- "howItWorks": "Как это работает",- "howItWorksDetail": "Добавленные слова включаются в промпт ИИ, чтобы модель распознавала и сохраняла эти термины при очистке транскрипции.","autoManaged": "Имя агента (управляется автоматически)",- "inputHint": "Нажмите Enter для добавления",- "addPlaceholder": "Добавить слово или фразу...",- "title": "Словарь",- "description": "Добавьте слова для улучшения транскрипции",+ "addPlaceholder": "Введите слово","clearTitle": "Очистить словарь?",- "clearDescription": "Все слова будут удалены без возможности восстановления."+ "clearDescription": "Все слова будут удалены без возможности восстановления.",+ "add": "Добавить",+ "importWords": "Импортировать слова",+ "separatorHint": "Разделяйте запятыми — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "Вставьте слова, разделённые запятыми...",+ "separateWithCommas": "Разделяйте запятыми",+ "wordsReady_one": "{{count}} слово готово",+ "wordsReady_few": "{{count}} слова готовы",+ "wordsReady_many": "{{count}} слов готово",+ "wordsReady_other": "{{count}} слова готово",+ "import": "Импортировать",+ "yourDictionary": "Ваш словарь",+ "exportDictionary": "Экспортировать словарь",+ "exportFailed": "Не удалось экспортировать",+ "empty": "Пока нет слов",+ "editWord": "Изменить {{word}}",+ "noMatches": "Совпадений нет — нажмите Enter, чтобы добавить «{{word}}»"},"sidebar": {"home": "Главная",diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 2968a6c6e..6c264dea0 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -2143,15 +2143,24 @@"addWord": "添加词语","removeWord": "移除 {{word}}","clearAll": "全部清除",- "howItWorks": "工作原理",- "howItWorksDetail": "你添加的词汇会被包含在 AI 提示词中,以便模型在转录整理时能够识别并保留这些词汇。","autoManaged": "助手名称(自动管理)",- "inputHint": "按回车键添加",- "title": "自定义词典",- "description": "教 AI 学习你的词汇 — 名字、行话和它可能遗漏的术语","clearTitle": "清空词典?","clearDescription": "这将删除自定义词典中的所有词汇,此操作无法撤销。",- "addPlaceholder": "添加词语或短语..."+ "addPlaceholder": "输入词语",+ "add": "添加",+ "importWords": "导入词语",+ "separatorHint": "用逗号分隔 — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "粘贴以逗号分隔的词语...",+ "separateWithCommas": "用逗号分隔",+ "wordsReady_other": "{{count}} 个词语就绪",+ "import": "导入",+ "yourDictionary": "你的词典",+ "exportDictionary": "导出词典",+ "exportFailed": "导出失败",+ "empty": "暂无词语",+ "editWord": "编辑 {{word}}",+ "wordsReady_one": "{{count}} 个词语就绪",+ "noMatches": "无匹配项 — 按 Enter 添加“{{word}}”"},"sidebar": {"home": "首页",diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 790bf2ca6..e395ec86a 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -2143,15 +2143,24 @@"addWord": "新增詞語","removeWord": "移除 {{word}}","clearAll": "全部清除",- "howItWorks": "運作方式",- "howItWorksDetail": "你新增的詞彙會包含在 AI 提示詞中,讓模型在轉錄整理時能辨識並保留這些詞彙。","autoManaged": "助理名稱(自動管理)",- "inputHint": "按 Enter 新增",- "title": "自訂字典",- "description": "教 AI 學習你的詞彙 — 名字、專業術語和它可能遺漏的表達","clearTitle": "清空字典?","clearDescription": "這將移除自訂字典中的所有詞彙。此操作無法復原。",- "addPlaceholder": "新增詞語或片語..."+ "addPlaceholder": "輸入詞語",+ "add": "新增",+ "importWords": "匯入詞語",+ "separatorHint": "用逗號分隔 — OpenWhispr, Supabase, John Snow, ARR",+ "importPlaceholder": "貼上以逗號分隔的詞語...",+ "separateWithCommas": "用逗號分隔",+ "wordsReady_other": "{{count}} 個詞語就緒",+ "import": "匯入",+ "yourDictionary": "你的詞典",+ "exportDictionary": "匯出詞典",+ "exportFailed": "匯出失敗",+ "empty": "尚無詞語",+ "editWord": "編輯 {{word}}",+ "wordsReady_one": "{{count}} 個詞語就緒",+ "noMatches": "無相符項目 — 按 Enter 新增「{{word}}」"},"sidebar": {"home": "首頁",diff --git a/src/types/electron.ts b/src/types/electron.tsindex cbbe73e30..c068b5d23 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -602,6 +602,7 @@ declare global {noteId: number,format: "txt" | "srt" | "json" | "md") => Promise<{ success: boolean; error?: string }>;+ exportDictionary: (words: string[]) => Promise<{ success: boolean; error?: string }>;searchNotes: (query: string, limit?: number) => Promise<NoteItem[]>;semanticSearchNotes: (query: string, limit?: number) => Promise<NoteItem[]>;semanticReindexAll: () => Promise<{ success: boolean; indexed?: number; error?: string }>;