Local, full Windows search replacement, clipboard manager, and launcher: files, apps, settings and semantic media search with Google's EmbeddingGemma 2.
Rust clipboard-historyembedding-modelsembeddinggemma-2embeddinggemma2embeddingslocal-firstmcp-serversearchsemantic-searchwindows-11
Add first-phase interface localization for 13 languages
ampersandruba2f5a903e76
diff --git a/README.md b/README.mdindex 9512989..f660273 100644--- a/README.md+++ b/README.md@@ -19,6 +19,7 @@ Search by name or exact words, or describe what you remember. Google's **Embeddi| **Windows settings** | `bluetooth`, `settings: sound` | Open settings pages such as Wi-Fi, display, storage, sound and Windows Update. || **Calculations** | `24*1.2`, `20% of 150`, `sqrt(81)` | Get an instant local answer; press **Enter** to copy it. |+- **Interface languages (preview):** choose from 13 languages in Settings, or follow the system language. Core search and navigation are translated; advanced settings currently fall back to English.- **File search:** combine names, exact words and semantic matches. Read PDF, Word, Excel and PowerPoint content; optionally use OCR for screenshot text. Search across 100+ languages and opt into code search.- **Indexing controls:** choose Quick or Full files first, prepare one batch ahead, and let long documents yield between chunk groups. Optional near-identical video frame skipping reduces repeated embeddings; learned estimates cover known queued work. Select FP32 or FP16 semantic caching without rebuilding your index, and optionally enable Rank Calibration at search time.- **Picture grid:** browse Images or Videos as thumbnails, with keyboard navigation and its own remembered preview width. Video frame thumbnails load on demand and stay in a bounded RAM cache.diff --git a/native/docs/LOCALIZATION.md b/native/docs/LOCALIZATION.mdnew file mode 100644index 0000000..4fb1add--- /dev/null+++ b/native/docs/LOCALIZATION.md@@ -0,0 +1,38 @@+# Interface localization — first implementation++Settings → Language selects the interface language, or follows the Windows **UI language** (not its regional number/date format). Changes preview immediately in both search windows. Use the existing Save/Undo bar to keep or undo the selection. No restart or index update is required.++Languages: English, Spanish, Brazilian Portuguese, French, German, Italian, Russian, Simplified Chinese, Traditional Chinese, Japanese, Korean, Hindi, Vietnamese. Portuguese regional variants currently use Brazilian Portuguese; Spanish regional variants share one catalog. Unsupported system languages fall back to English.++## Current coverage++Each catalog contains the same 99 core messages: navigation, search placeholders, search modes and file types, search/AI/Clipboard controls, common source/exclusion/index actions, Settings section labels, Save/Undo, playback tooltips, result summaries and footer shortcut actions. The interface language does not change queries, filenames, saved search values, API model IDs, AI prompts/responses, log records or the search index.++This is **partial interface localization**, not a claim that every screen is translated. Advanced settings, detailed tooltips, confirmations, installer/tray text, detailed indexing/model states and errors still use English. Translations need review by native speakers, especially technical vocabulary and Hindi text shaping. Glyph availability alone does not verify complex-script shaping. Right-to-left languages are outside this first set.++## Implementation++UTF-8 JSON catalogs live in `native/locales`. English display text is the stable message key. Missing keys safely display their English key; unsupported locale preferences resolve to English. Catalogs are embedded and parsed once; language selection performs no network requests and adds no service/dependency. Settings keep canonical English enum values and persist a separate language code.++Windows system font fallbacks cover the supported scripts; no fonts are downloaded or bundled. Nirmala collections are supported as well as Segoe UI, Microsoft YaHei and Malgun. Japanese/Traditional Chinese interfaces prefer their installed regional font. Fonts are read only at initial setup or when the effective language changes. Machines missing optional language fonts may need the corresponding Windows language/font feature. Bold text inherits script fallbacks too.++## Extending coverage++1. Add the display-only call through `i18n::t`; never translate IDs, comparisons, protocol values or saved enums.+2. Add the same key to every catalog. Keep product names, API paths, shortcuts and technical identifiers unchanged.+3. For dynamic messages, add a full message template with named placeholders and validate that every translation preserves those placeholders. Do not concatenate translated fragments for grammar-sensitive messages. The current count summaries intentionally use a compact noun label without singular/plural inflection; grammatical plural templates are a follow-up.+4. Test Save/Undo, restart, both window sizes, long German/Portuguese labels, Hindi shaping, CJK glyphs and non-English filenames.++## Follow-up work++- Translate advanced settings, help text and confirmation dialogs in coherent screen-sized groups.+- Introduce parameterized messages/plurals before migrating detailed worker statuses/errors.+- Localize tray/installer text and audit dialog buttons supplied by Windows.+- Native-speaker terminology and layout review for each language; complex-script shaping support as needed.++## Validation of this first pass++- 166 automated tests passed; 10 existing opt-in tests were not run. Includes catalog key parity, locale fallback/region mapping, saved language migration, canonical search settings and unchanged indexing source signatures.+- All 13 languages rendered in isolated application profiles, alternating main/compact popup windows and dark/light themes; German, Japanese, Spanish and Hindi screenshots were inspected.+- Installed Windows fonts covered every character in all 13 catalogs on this Windows 11 test machine. This optional-font coverage check reports missing font features on other machines; it does not establish native-speaker or complex-script shaping correctness.+- The application build and formatting check passed. No release/install or changes to the user's active index were performed for this PR.diff --git a/native/locales/de.json b/native/locales/de.jsonnew file mode 100644index 0000000..ec7832c--- /dev/null+++ b/native/locales/de.json@@ -0,0 +1,101 @@+{+ "Search": "Suchen",+ "Sources": "Quellen",+ "Hardware": "Hardware",+ "Scheduling": "Zeitplanung",+ "Settings": "Einstellungen",+ "Models and AI": "Modelle und KI",+ "Logs": "Protokolle",+ "About": "Über",+ "Clipboard": "Zwischenablage",+ "Emoji": "Emojis",+ "AI": "KI",+ "All": "Alle",+ "All files": "Alle Dateien",+ "Images": "Bilder",+ "Videos": "Videos",+ "Documents": "Dokumente",+ "Audio / video": "Audio / Video",+ "Folders": "Ordner",+ "Code": "Code",+ "Programs": "Programme",+ "Hybrid": "Hybrid",+ "File/Folder Names": "Datei-/Ordnernamen",+ "Semantic": "Semantisch",+ "Open full app": "App öffnen",+ "Filter": "Filter",+ "File type": "Dateityp",+ "All sources": "Alle Quellen",+ "Saved searches": "Gespeicherte Suchen",+ "Save Search": "Suche speichern",+ "Search Anything": "Alles durchsuchen",+ "Ask AI": "KI fragen",+ "Search emoji": "Emojis suchen",+ "Search clipboard history": "Zwischenablage durchsuchen",+ "What are you looking for?": "Was suchen Sie?",+ "Send": "Senden",+ "Screenshot": "Bildschirmfoto",+ "New Conversation": "Neues Gespräch",+ "Read Aloud": "Vorlesen",+ "Save": "Speichern",+ "Undo": "Rückgängig",+ "Cancel": "Abbrechen",+ "Remove": "Entfernen",+ "Refresh": "Aktualisieren",+ "Test": "Testen",+ "Install": "Installieren",+ "Uninstall": "Deinstallieren",+ "Pause": "Pausieren",+ "Resume": "Fortsetzen",+ "Language": "Sprache",+ "Use system language": "Systemsprache verwenden",+ "Appearance": "Darstellung",+ "Dark": "Dunkel",+ "Light": "Hell",+ "System": "System",+ "Search and dictation": "Suche und Diktat",+ "Keyboard Shortcut": "Tastenkombinationen",+ "Global Search": "Globale Suche",+ "Cycle file types": "Dateitypen wechseln",+ "Dictate": "Diktieren",+ "Microphone": "Mikrofon",+ "Brief": "Kurz",+ "Medium": "Mittel",+ "Full": "Vollständig",+ "Transcribing…": "Transkription…",+ "Pause read aloud": "Vorlesen pausieren",+ "Resume read aloud": "Vorlesen fortsetzen",+ "Stop playback": "Wiedergabe stoppen",+ "Exit": "Beenden",+ "results": "Ergebnisse",+ "Find files, meanings, programs and Windows settings.": "Dateien, Bedeutungen, Programme und Windows-Einstellungen finden.",+ "Unsaved changes": "Ungespeicherte Änderungen",+ "Index status": "Indexstatus",+ "Update index": "Index aktualisieren",+ "Cancel indexing": "Indexierung abbrechen",+ "Add folder / drive": "Ordner / Laufwerk hinzufügen",+ "Add files": "Dateien hinzufügen",+ "Select/Deselect all": "Alle auswählen/abwählen",+ "Remove selected": "Auswahl entfernen",+ "Exclude folder": "Ordner ausschließen",+ "Exclude files": "Dateien ausschließen",+ "Add exclusion": "Ausschluss hinzufügen",+ "Status": "Status",+ "Local": "Lokal",+ "Remote": "Remote",+ "items": "Einträge",+ "AI response": "KI-Antwort",+ "Read answers aloud automatically": "Antworten automatisch vorlesen",+ "select": "auswählen",+ "open": "öffnen",+ "copy": "kopieren",+ "preview": "Vorschau",+ "send": "senden",+ "stop": "stoppen",+ "dismiss": "schließen",+ "cycle tools": "Modus wechseln",+ "page": "blättern",+ "Ready — models load only when needed": "Bereit — Modelle werden bei Bedarf geladen",+ "Back to search": "Zurück zur Suche",+ "Cycle Search / Clipboard / AI": "Suche / Zwischenablage / KI wechseln"+}diff --git a/native/locales/en.json b/native/locales/en.jsonnew file mode 100644index 0000000..76a4709--- /dev/null+++ b/native/locales/en.json@@ -0,0 +1,101 @@+{+ "Search": "Search",+ "Sources": "Sources",+ "Hardware": "Hardware",+ "Scheduling": "Scheduling",+ "Settings": "Settings",+ "Models and AI": "Models and AI",+ "Logs": "Logs",+ "About": "About",+ "Clipboard": "Clipboard",+ "Emoji": "Emoji",+ "AI": "AI",+ "All": "All",+ "All files": "All files",+ "Images": "Images",+ "Videos": "Videos",+ "Documents": "Documents",+ "Audio / video": "Audio / video",+ "Folders": "Folders",+ "Code": "Code",+ "Programs": "Programs",+ "Hybrid": "Hybrid",+ "File/Folder Names": "File/Folder Names",+ "Semantic": "Semantic",+ "Open full app": "Open full app",+ "Filter": "Filter",+ "File type": "File type",+ "All sources": "All sources",+ "Saved searches": "Saved searches",+ "Save Search": "Save Search",+ "Search Anything": "Search Anything",+ "Ask AI": "Ask AI",+ "Search emoji": "Search emoji",+ "Search clipboard history": "Search clipboard history",+ "What are you looking for?": "What are you looking for?",+ "Send": "Send",+ "Screenshot": "Screenshot",+ "New Conversation": "New Conversation",+ "Read Aloud": "Read Aloud",+ "Save": "Save",+ "Undo": "Undo",+ "Cancel": "Cancel",+ "Remove": "Remove",+ "Refresh": "Refresh",+ "Test": "Test",+ "Install": "Install",+ "Uninstall": "Uninstall",+ "Pause": "Pause",+ "Resume": "Resume",+ "Language": "Language",+ "Use system language": "Use system language",+ "Appearance": "Appearance",+ "Dark": "Dark",+ "Light": "Light",+ "System": "System",+ "Search and dictation": "Search and dictation",+ "Keyboard Shortcut": "Keyboard Shortcut",+ "Global Search": "Global Search",+ "Cycle file types": "Cycle file types",+ "Dictate": "Dictate",+ "Microphone": "Microphone",+ "Brief": "Brief",+ "Medium": "Medium",+ "Full": "Full",+ "Transcribing…": "Transcribing…",+ "Pause read aloud": "Pause read aloud",+ "Resume read aloud": "Resume read aloud",+ "Stop playback": "Stop playback",+ "Exit": "Exit",+ "results": "results",+ "Find files, meanings, programs and Windows settings.": "Find files, meanings, programs and Windows settings.",+ "Unsaved changes": "Unsaved changes",+ "Index status": "Index status",+ "Update index": "Update index",+ "Cancel indexing": "Cancel indexing",+ "Add folder / drive": "Add folder / drive",+ "Add files": "Add files",+ "Select/Deselect all": "Select/Deselect all",+ "Remove selected": "Remove selected",+ "Exclude folder": "Exclude folder",+ "Exclude files": "Exclude files",+ "Add exclusion": "Add exclusion",+ "Status": "Status",+ "Local": "Local",+ "Remote": "Remote",+ "items": "items",+ "AI response": "AI response",+ "Read answers aloud automatically": "Read answers aloud automatically",+ "select": "select",+ "open": "open",+ "copy": "copy",+ "preview": "preview",+ "send": "send",+ "stop": "stop",+ "dismiss": "dismiss",+ "cycle tools": "cycle tools",+ "page": "page",+ "Ready — models load only when needed": "Ready — models load only when needed",+ "Back to search": "Back to search",+ "Cycle Search / Clipboard / AI": "Cycle Search / Clipboard / AI"+}diff --git a/native/locales/es.json b/native/locales/es.jsonnew file mode 100644index 0000000..a1c1f57--- /dev/null+++ b/native/locales/es.json@@ -0,0 +1,101 @@+{+ "Search": "Buscar",+ "Sources": "Fuentes",+ "Hardware": "Hardware",+ "Scheduling": "Programación",+ "Settings": "Ajustes",+ "Models and AI": "Modelos e IA",+ "Logs": "Registros",+ "About": "Acerca de",+ "Clipboard": "Portapapeles",+ "Emoji": "Emojis",+ "AI": "IA",+ "All": "Todo",+ "All files": "Todos los archivos",+ "Images": "Imágenes",+ "Videos": "Vídeos",+ "Documents": "Documentos",+ "Audio / video": "Audio / vídeo",+ "Folders": "Carpetas",+ "Code": "Código",+ "Programs": "Programas",+ "Hybrid": "Híbrida",+ "File/Folder Names": "Nombres de archivos/carpetas",+ "Semantic": "Semántica",+ "Open full app": "Abrir aplicación",+ "Filter": "Filtrar",+ "File type": "Tipo de archivo",+ "All sources": "Todas las fuentes",+ "Saved searches": "Búsquedas guardadas",+ "Save Search": "Guardar búsqueda",+ "Search Anything": "Buscar cualquier cosa",+ "Ask AI": "Preguntar a la IA",+ "Search emoji": "Buscar emojis",+ "Search clipboard history": "Buscar en el portapapeles",+ "What are you looking for?": "¿Qué estás buscando?",+ "Send": "Enviar",+ "Screenshot": "Captura de pantalla",+ "New Conversation": "Nueva conversación",+ "Read Aloud": "Leer en voz alta",+ "Save": "Guardar",+ "Undo": "Deshacer",+ "Cancel": "Cancelar",+ "Remove": "Quitar",+ "Refresh": "Actualizar",+ "Test": "Probar",+ "Install": "Instalar",+ "Uninstall": "Desinstalar",+ "Pause": "Pausar",+ "Resume": "Reanudar",+ "Language": "Idioma",+ "Use system language": "Usar idioma del sistema",+ "Appearance": "Apariencia",+ "Dark": "Oscuro",+ "Light": "Claro",+ "System": "Sistema",+ "Search and dictation": "Búsqueda y dictado",+ "Keyboard Shortcut": "Atajos de teclado",+ "Global Search": "Búsqueda global",+ "Cycle file types": "Cambiar tipo de archivo",+ "Dictate": "Dictar",+ "Microphone": "Micrófono",+ "Brief": "Breve",+ "Medium": "Media",+ "Full": "Completa",+ "Transcribing…": "Transcribiendo…",+ "Pause read aloud": "Pausar lectura",+ "Resume read aloud": "Reanudar lectura",+ "Stop playback": "Detener reproducción",+ "Exit": "Salir",+ "results": "resultados",+ "Find files, meanings, programs and Windows settings.": "Encuentra archivos, significados, programas y ajustes de Windows.",+ "Unsaved changes": "Cambios sin guardar",+ "Index status": "Estado del índice",+ "Update index": "Actualizar índice",+ "Cancel indexing": "Cancelar indexación",+ "Add folder / drive": "Añadir carpeta / unidad",+ "Add files": "Añadir archivos",+ "Select/Deselect all": "Seleccionar/Deseleccionar todo",+ "Remove selected": "Quitar selección",+ "Exclude folder": "Excluir carpeta",+ "Exclude files": "Excluir archivos",+ "Add exclusion": "Añadir exclusión",+ "Status": "Estado",+ "Local": "Local",+ "Remote": "Remoto",+ "items": "elementos",+ "AI response": "Respuesta de IA",+ "Read answers aloud automatically": "Leer respuestas automáticamente",+ "select": "seleccionar",+ "open": "abrir",+ "copy": "copiar",+ "preview": "vista previa",+ "send": "enviar",+ "stop": "detener",+ "dismiss": "cerrar",+ "cycle tools": "cambiar modo",+ "page": "desplazar",+ "Ready — models load only when needed": "Listo — los modelos se cargan cuando se necesitan",+ "Back to search": "Volver a buscar",+ "Cycle Search / Clipboard / AI": "Alternar búsqueda / portapapeles / IA"+}diff --git a/native/locales/fr.json b/native/locales/fr.jsonnew file mode 100644index 0000000..eaad5d7--- /dev/null+++ b/native/locales/fr.json@@ -0,0 +1,101 @@+{+ "Search": "Rechercher",+ "Sources": "Sources",+ "Hardware": "Matériel",+ "Scheduling": "Planification",+ "Settings": "Paramètres",+ "Models and AI": "Modèles et IA",+ "Logs": "Journaux",+ "About": "À propos",+ "Clipboard": "Presse-papiers",+ "Emoji": "Émojis",+ "AI": "IA",+ "All": "Tout",+ "All files": "Tous les fichiers",+ "Images": "Images",+ "Videos": "Vidéos",+ "Documents": "Documents",+ "Audio / video": "Audio / vidéo",+ "Folders": "Dossiers",+ "Code": "Code",+ "Programs": "Programmes",+ "Hybrid": "Hybride",+ "File/Folder Names": "Noms de fichiers/dossiers",+ "Semantic": "Sémantique",+ "Open full app": "Ouvrir l’application",+ "Filter": "Filtrer",+ "File type": "Type de fichier",+ "All sources": "Toutes les sources",+ "Saved searches": "Recherches enregistrées",+ "Save Search": "Enregistrer la recherche",+ "Search Anything": "Rechercher",+ "Ask AI": "Demander à l’IA",+ "Search emoji": "Rechercher un émoji",+ "Search clipboard history": "Rechercher dans le presse-papiers",+ "What are you looking for?": "Que recherchez-vous ?",+ "Send": "Envoyer",+ "Screenshot": "Capture d’écran",+ "New Conversation": "Nouvelle conversation",+ "Read Aloud": "Lire à voix haute",+ "Save": "Enregistrer",+ "Undo": "Annuler",+ "Cancel": "Annuler",+ "Remove": "Supprimer",+ "Refresh": "Actualiser",+ "Test": "Tester",+ "Install": "Installer",+ "Uninstall": "Désinstaller",+ "Pause": "Pause",+ "Resume": "Reprendre",+ "Language": "Langue",+ "Use system language": "Utiliser la langue du système",+ "Appearance": "Apparence",+ "Dark": "Sombre",+ "Light": "Clair",+ "System": "Système",+ "Search and dictation": "Recherche et dictée",+ "Keyboard Shortcut": "Raccourcis clavier",+ "Global Search": "Recherche globale",+ "Cycle file types": "Parcourir les types de fichiers",+ "Dictate": "Dicter",+ "Microphone": "Microphone",+ "Brief": "Brève",+ "Medium": "Moyenne",+ "Full": "Complète",+ "Transcribing…": "Transcription…",+ "Pause read aloud": "Suspendre la lecture",+ "Resume read aloud": "Reprendre la lecture",+ "Stop playback": "Arrêter la lecture",+ "Exit": "Quitter",+ "results": "résultats",+ "Find files, meanings, programs and Windows settings.": "Recherchez des fichiers, des concepts, des programmes et des paramètres Windows.",+ "Unsaved changes": "Modifications non enregistrées",+ "Index status": "État de l’index",+ "Update index": "Actualiser l’index",+ "Cancel indexing": "Annuler l’indexation",+ "Add folder / drive": "Ajouter un dossier / lecteur",+ "Add files": "Ajouter des fichiers",+ "Select/Deselect all": "Tout sélectionner/désélectionner",+ "Remove selected": "Supprimer la sélection",+ "Exclude folder": "Exclure un dossier",+ "Exclude files": "Exclure des fichiers",+ "Add exclusion": "Ajouter une exclusion",+ "Status": "État",+ "Local": "Local",+ "Remote": "Distant",+ "items": "éléments",+ "AI response": "Réponse de l’IA",+ "Read answers aloud automatically": "Lire les réponses automatiquement",+ "select": "sélectionner",+ "open": "ouvrir",+ "copy": "copier",+ "preview": "aperçu",+ "send": "envoyer",+ "stop": "arrêter",+ "dismiss": "fermer",+ "cycle tools": "changer de mode",+ "page": "défiler",+ "Ready — models load only when needed": "Prêt — les modèles se chargent à la demande",+ "Back to search": "Retour à la recherche",+ "Cycle Search / Clipboard / AI": "Basculer recherche / presse-papiers / IA"+}diff --git a/native/locales/hi.json b/native/locales/hi.jsonnew file mode 100644index 0000000..96f2340--- /dev/null+++ b/native/locales/hi.json@@ -0,0 +1,101 @@+{+ "Search": "खोजें",+ "Sources": "स्रोत",+ "Hardware": "हार्डवेयर",+ "Scheduling": "शेड्यूल",+ "Settings": "सेटिंग",+ "Models and AI": "मॉडल और AI",+ "Logs": "लॉग",+ "About": "परिचय",+ "Clipboard": "क्लिपबोर्ड",+ "Emoji": "इमोजी",+ "AI": "AI",+ "All": "सभी",+ "All files": "सभी फ़ाइलें",+ "Images": "चित्र",+ "Videos": "वीडियो",+ "Documents": "दस्तावेज़",+ "Audio / video": "ऑडियो / वीडियो",+ "Folders": "फ़ोल्डर",+ "Code": "कोड",+ "Programs": "प्रोग्राम",+ "Hybrid": "हाइब्रिड",+ "File/Folder Names": "फ़ाइल/फ़ोल्डर नाम",+ "Semantic": "अर्थ आधारित",+ "Open full app": "पूरा ऐप खोलें",+ "Filter": "फ़िल्टर",+ "File type": "फ़ाइल प्रकार",+ "All sources": "सभी स्रोत",+ "Saved searches": "सहेजी गई खोजें",+ "Save Search": "खोज सहेजें",+ "Search Anything": "कुछ भी खोजें",+ "Ask AI": "AI से पूछें",+ "Search emoji": "इमोजी खोजें",+ "Search clipboard history": "क्लिपबोर्ड इतिहास खोजें",+ "What are you looking for?": "आप क्या ढूँढ रहे हैं?",+ "Send": "भेजें",+ "Screenshot": "स्क्रीनशॉट",+ "New Conversation": "नई बातचीत",+ "Read Aloud": "पढ़कर सुनाएँ",+ "Save": "सहेजें",+ "Undo": "पूर्ववत करें",+ "Cancel": "रद्द करें",+ "Remove": "हटाएँ",+ "Refresh": "रीफ़्रेश करें",+ "Test": "जाँचें",+ "Install": "इंस्टॉल करें",+ "Uninstall": "अनइंस्टॉल करें",+ "Pause": "रोकें",+ "Resume": "जारी रखें",+ "Language": "भाषा",+ "Use system language": "सिस्टम की भाषा उपयोग करें",+ "Appearance": "दिखावट",+ "Dark": "गहरा",+ "Light": "हल्का",+ "System": "सिस्टम",+ "Search and dictation": "खोज और बोलकर लिखना",+ "Keyboard Shortcut": "कीबोर्ड शॉर्टकट",+ "Global Search": "वैश्विक खोज",+ "Cycle file types": "फ़ाइल प्रकार बदलें",+ "Dictate": "बोलकर लिखें",+ "Microphone": "माइक्रोफ़ोन",+ "Brief": "संक्षिप्त",+ "Medium": "मध्यम",+ "Full": "पूर्ण",+ "Transcribing…": "लिखा जा रहा है…",+ "Pause read aloud": "पढ़ना रोकें",+ "Resume read aloud": "पढ़ना जारी रखें",+ "Stop playback": "प्लेबैक रोकें",+ "Exit": "बाहर निकलें",+ "results": "परिणाम",+ "Find files, meanings, programs and Windows settings.": "फ़ाइलें, अर्थ, प्रोग्राम और Windows सेटिंग खोजें।",+ "Unsaved changes": "बिना सहेजे बदलाव",+ "Index status": "इंडेक्स की स्थिति",+ "Update index": "इंडेक्स अपडेट करें",+ "Cancel indexing": "इंडेक्सिंग रद्द करें",+ "Add folder / drive": "फ़ोल्डर / ड्राइव जोड़ें",+ "Add files": "फ़ाइलें जोड़ें",+ "Select/Deselect all": "सभी चुनें/चयन हटाएँ",+ "Remove selected": "चुने हुए हटाएँ",+ "Exclude folder": "फ़ोल्डर छोड़ें",+ "Exclude files": "फ़ाइलें छोड़ें",+ "Add exclusion": "बहिष्करण जोड़ें",+ "Status": "स्थिति",+ "Local": "स्थानीय",+ "Remote": "रिमोट",+ "items": "आइटम",+ "AI response": "AI का जवाब",+ "Read answers aloud automatically": "जवाब अपने आप पढ़ें",+ "select": "चुनें",+ "open": "खोलें",+ "copy": "कॉपी",+ "preview": "पूर्वावलोकन",+ "send": "भेजें",+ "stop": "रोकें",+ "dismiss": "बंद करें",+ "cycle tools": "मोड बदलें",+ "page": "पृष्ठ",+ "Ready — models load only when needed": "तैयार — ज़रूरत होने पर ही मॉडल लोड होते हैं",+ "Back to search": "खोज पर लौटें",+ "Cycle Search / Clipboard / AI": "खोज / क्लिपबोर्ड / AI बदलें"+}diff --git a/native/locales/it.json b/native/locales/it.jsonnew file mode 100644index 0000000..d77bc59--- /dev/null+++ b/native/locales/it.json@@ -0,0 +1,101 @@+{+ "Search": "Cerca",+ "Sources": "Sorgenti",+ "Hardware": "Hardware",+ "Scheduling": "Pianificazione",+ "Settings": "Impostazioni",+ "Models and AI": "Modelli e IA",+ "Logs": "Registri",+ "About": "Informazioni",+ "Clipboard": "Appunti",+ "Emoji": "Emoji",+ "AI": "IA",+ "All": "Tutti",+ "All files": "Tutti i file",+ "Images": "Immagini",+ "Videos": "Video",+ "Documents": "Documenti",+ "Audio / video": "Audio / video",+ "Folders": "Cartelle",+ "Code": "Codice",+ "Programs": "Programmi",+ "Hybrid": "Ibrida",+ "File/Folder Names": "Nomi di file/cartelle",+ "Semantic": "Semantica",+ "Open full app": "Apri applicazione",+ "Filter": "Filtro",+ "File type": "Tipo di file",+ "All sources": "Tutte le sorgenti",+ "Saved searches": "Ricerche salvate",+ "Save Search": "Salva ricerca",+ "Search Anything": "Cerca qualsiasi cosa",+ "Ask AI": "Chiedi all’IA",+ "Search emoji": "Cerca emoji",+ "Search clipboard history": "Cerca negli appunti",+ "What are you looking for?": "Cosa stai cercando?",+ "Send": "Invia",+ "Screenshot": "Schermata",+ "New Conversation": "Nuova conversazione",+ "Read Aloud": "Leggi ad alta voce",+ "Save": "Salva",+ "Undo": "Annulla",+ "Cancel": "Annulla",+ "Remove": "Rimuovi",+ "Refresh": "Aggiorna",+ "Test": "Prova",+ "Install": "Installa",+ "Uninstall": "Disinstalla",+ "Pause": "Pausa",+ "Resume": "Riprendi",+ "Language": "Lingua",+ "Use system language": "Usa lingua di sistema",+ "Appearance": "Aspetto",+ "Dark": "Scuro",+ "Light": "Chiaro",+ "System": "Sistema",+ "Search and dictation": "Ricerca e dettatura",+ "Keyboard Shortcut": "Scorciatoie da tastiera",+ "Global Search": "Ricerca globale",+ "Cycle file types": "Cambia tipo di file",+ "Dictate": "Detta",+ "Microphone": "Microfono",+ "Brief": "Breve",+ "Medium": "Media",+ "Full": "Completa",+ "Transcribing…": "Trascrizione…",+ "Pause read aloud": "Sospendi lettura",+ "Resume read aloud": "Riprendi lettura",+ "Stop playback": "Interrompi riproduzione",+ "Exit": "Esci",+ "results": "risultati",+ "Find files, meanings, programs and Windows settings.": "Trova file, significati, programmi e impostazioni di Windows.",+ "Unsaved changes": "Modifiche non salvate",+ "Index status": "Stato dell’indice",+ "Update index": "Aggiorna indice",+ "Cancel indexing": "Annulla indicizzazione",+ "Add folder / drive": "Aggiungi cartella / unità",+ "Add files": "Aggiungi file",+ "Select/Deselect all": "Seleziona/Deseleziona tutto",+ "Remove selected": "Rimuovi selezionati",+ "Exclude folder": "Escludi cartella",+ "Exclude files": "Escludi file",+ "Add exclusion": "Aggiungi esclusione",+ "Status": "Stato",+ "Local": "Locale",+ "Remote": "Remoto",+ "items": "elementi",+ "AI response": "Risposta IA",+ "Read answers aloud automatically": "Leggi automaticamente le risposte",+ "select": "seleziona",+ "open": "apri",+ "copy": "copia",+ "preview": "anteprima",+ "send": "invia",+ "stop": "interrompi",+ "dismiss": "chiudi",+ "cycle tools": "cambia modalità",+ "page": "scorri",+ "Ready — models load only when needed": "Pronto — i modelli si caricano quando servono",+ "Back to search": "Torna alla ricerca",+ "Cycle Search / Clipboard / AI": "Alterna ricerca / appunti / IA"+}diff --git a/native/locales/ja.json b/native/locales/ja.jsonnew file mode 100644index 0000000..b4231cb--- /dev/null+++ b/native/locales/ja.json@@ -0,0 +1,101 @@+{+ "Search": "検索",+ "Sources": "ソース",+ "Hardware": "ハードウェア",+ "Scheduling": "スケジュール",+ "Settings": "設定",+ "Models and AI": "モデルと AI",+ "Logs": "ログ",+ "About": "このアプリについて",+ "Clipboard": "クリップボード",+ "Emoji": "絵文字",+ "AI": "AI",+ "All": "すべて",+ "All files": "すべてのファイル",+ "Images": "画像",+ "Videos": "動画",+ "Documents": "文書",+ "Audio / video": "音声 / 動画",+ "Folders": "フォルダー",+ "Code": "コード",+ "Programs": "プログラム",+ "Hybrid": "ハイブリッド",+ "File/Folder Names": "ファイル・フォルダー名",+ "Semantic": "セマンティック",+ "Open full app": "アプリを開く",+ "Filter": "フィルター",+ "File type": "ファイルの種類",+ "All sources": "すべてのソース",+ "Saved searches": "保存した検索",+ "Save Search": "検索を保存",+ "Search Anything": "何でも検索",+ "Ask AI": "AI に質問",+ "Search emoji": "絵文字を検索",+ "Search clipboard history": "クリップボード履歴を検索",+ "What are you looking for?": "何をお探しですか?",+ "Send": "送信",+ "Screenshot": "スクリーンショット",+ "New Conversation": "新しい会話",+ "Read Aloud": "読み上げ",+ "Save": "保存",+ "Undo": "元に戻す",+ "Cancel": "キャンセル",+ "Remove": "削除",+ "Refresh": "更新",+ "Test": "テスト",+ "Install": "インストール",+ "Uninstall": "アンインストール",+ "Pause": "一時停止",+ "Resume": "再開",+ "Language": "言語",+ "Use system language": "システム言語を使用",+ "Appearance": "外観",+ "Dark": "ダーク",+ "Light": "ライト",+ "System": "システム",+ "Search and dictation": "検索と音声入力",+ "Keyboard Shortcut": "キーボードショートカット",+ "Global Search": "グローバル検索",+ "Cycle file types": "ファイルの種類を切り替え",+ "Dictate": "音声入力",+ "Microphone": "マイク",+ "Brief": "短め",+ "Medium": "標準",+ "Full": "詳細",+ "Transcribing…": "文字起こし中…",+ "Pause read aloud": "読み上げを一時停止",+ "Resume read aloud": "読み上げを再開",+ "Stop playback": "再生を停止",+ "Exit": "終了",+ "results": "件",+ "Find files, meanings, programs and Windows settings.": "ファイル、意味、プログラム、Windows の設定を検索します。",+ "Unsaved changes": "未保存の変更",+ "Index status": "インデックスの状態",+ "Update index": "インデックスを更新",+ "Cancel indexing": "インデックス作成を中止",+ "Add folder / drive": "フォルダー / ドライブを追加",+ "Add files": "ファイルを追加",+ "Select/Deselect all": "すべて選択/解除",+ "Remove selected": "選択項目を削除",+ "Exclude folder": "フォルダーを除外",+ "Exclude files": "ファイルを除外",+ "Add exclusion": "除外を追加",+ "Status": "状態",+ "Local": "ローカル",+ "Remote": "リモート",+ "items": "件",+ "AI response": "AI の応答",+ "Read answers aloud automatically": "回答を自動で読み上げる",+ "select": "選択",+ "open": "開く",+ "copy": "コピー",+ "preview": "プレビュー",+ "send": "送信",+ "stop": "停止",+ "dismiss": "閉じる",+ "cycle tools": "モード切替",+ "page": "スクロール",+ "Ready — models load only when needed": "準備完了 — 必要なときだけモデルを読み込みます",+ "Back to search": "検索に戻る",+ "Cycle Search / Clipboard / AI": "検索 / クリップボード / AI を切り替え"+}diff --git a/native/locales/ko.json b/native/locales/ko.jsonnew file mode 100644index 0000000..f869292--- /dev/null+++ b/native/locales/ko.json@@ -0,0 +1,101 @@+{+ "Search": "검색",+ "Sources": "검색 위치",+ "Hardware": "하드웨어",+ "Scheduling": "예약",+ "Settings": "설정",+ "Models and AI": "모델 및 AI",+ "Logs": "로그",+ "About": "정보",+ "Clipboard": "클립보드",+ "Emoji": "이모지",+ "AI": "AI",+ "All": "전체",+ "All files": "모든 파일",+ "Images": "이미지",+ "Videos": "동영상",+ "Documents": "문서",+ "Audio / video": "오디오 / 동영상",+ "Folders": "폴더",+ "Code": "코드",+ "Programs": "프로그램",+ "Hybrid": "하이브리드",+ "File/Folder Names": "파일/폴더 이름",+ "Semantic": "의미 검색",+ "Open full app": "전체 앱 열기",+ "Filter": "필터",+ "File type": "파일 형식",+ "All sources": "모든 위치",+ "Saved searches": "저장된 검색",+ "Save Search": "검색 저장",+ "Search Anything": "무엇이든 검색",+ "Ask AI": "AI에게 질문",+ "Search emoji": "이모지 검색",+ "Search clipboard history": "클립보드 기록 검색",+ "What are you looking for?": "무엇을 찾으시나요?",+ "Send": "보내기",+ "Screenshot": "스크린샷",+ "New Conversation": "새 대화",+ "Read Aloud": "소리 내어 읽기",+ "Save": "저장",+ "Undo": "실행 취소",+ "Cancel": "취소",+ "Remove": "제거",+ "Refresh": "새로 고침",+ "Test": "테스트",+ "Install": "설치",+ "Uninstall": "제거",+ "Pause": "일시 중지",+ "Resume": "다시 시작",+ "Language": "언어",+ "Use system language": "시스템 언어 사용",+ "Appearance": "모양",+ "Dark": "어둡게",+ "Light": "밝게",+ "System": "시스템",+ "Search and dictation": "검색 및 받아쓰기",+ "Keyboard Shortcut": "키보드 단축키",+ "Global Search": "전역 검색",+ "Cycle file types": "파일 형식 순환",+ "Dictate": "받아쓰기",+ "Microphone": "마이크",+ "Brief": "짧게",+ "Medium": "보통",+ "Full": "자세히",+ "Transcribing…": "받아쓰는 중…",+ "Pause read aloud": "읽기 일시 중지",+ "Resume read aloud": "읽기 다시 시작",+ "Stop playback": "재생 중지",+ "Exit": "종료",+ "results": "개 결과",+ "Find files, meanings, programs and Windows settings.": "파일, 의미, 프로그램 및 Windows 설정을 찾습니다.",+ "Unsaved changes": "저장되지 않은 변경 사항",+ "Index status": "색인 상태",+ "Update index": "색인 업데이트",+ "Cancel indexing": "색인 취소",+ "Add folder / drive": "폴더 / 드라이브 추가",+ "Add files": "파일 추가",+ "Select/Deselect all": "모두 선택/해제",+ "Remove selected": "선택 항목 제거",+ "Exclude folder": "폴더 제외",+ "Exclude files": "파일 제외",+ "Add exclusion": "제외 항목 추가",+ "Status": "상태",+ "Local": "로컬",+ "Remote": "원격",+ "items": "개 항목",+ "AI response": "AI 응답",+ "Read answers aloud automatically": "답변 자동 읽기",+ "select": "선택",+ "open": "열기",+ "copy": "복사",+ "preview": "미리 보기",+ "send": "보내기",+ "stop": "중지",+ "dismiss": "닫기",+ "cycle tools": "모드 전환",+ "page": "스크롤",+ "Ready — models load only when needed": "준비됨 — 필요할 때만 모델 로드",+ "Back to search": "검색으로 돌아가기",+ "Cycle Search / Clipboard / AI": "검색 / 클립보드 / AI 전환"+}diff --git a/native/locales/pt-BR.json b/native/locales/pt-BR.jsonnew file mode 100644index 0000000..d8db6dd--- /dev/null+++ b/native/locales/pt-BR.json@@ -0,0 +1,101 @@+{+ "Search": "Pesquisar",+ "Sources": "Fontes",+ "Hardware": "Hardware",+ "Scheduling": "Agendamento",+ "Settings": "Configurações",+ "Models and AI": "Modelos e IA",+ "Logs": "Logs",+ "About": "Sobre",+ "Clipboard": "Área de transferência",+ "Emoji": "Emojis",+ "AI": "IA",+ "All": "Tudo",+ "All files": "Todos os arquivos",+ "Images": "Imagens",+ "Videos": "Vídeos",+ "Documents": "Documentos",+ "Audio / video": "Áudio / vídeo",+ "Folders": "Pastas",+ "Code": "Código",+ "Programs": "Programas",+ "Hybrid": "Híbrida",+ "File/Folder Names": "Nomes de arquivos/pastas",+ "Semantic": "Semântica",+ "Open full app": "Abrir aplicativo",+ "Filter": "Filtrar",+ "File type": "Tipo de arquivo",+ "All sources": "Todas as fontes",+ "Saved searches": "Pesquisas salvas",+ "Save Search": "Salvar pesquisa",+ "Search Anything": "Pesquisar qualquer coisa",+ "Ask AI": "Pergunte à IA",+ "Search emoji": "Pesquisar emojis",+ "Search clipboard history": "Pesquisar histórico da área de transferência",+ "What are you looking for?": "O que você procura?",+ "Send": "Enviar",+ "Screenshot": "Captura de tela",+ "New Conversation": "Nova conversa",+ "Read Aloud": "Ler em voz alta",+ "Save": "Salvar",+ "Undo": "Desfazer",+ "Cancel": "Cancelar",+ "Remove": "Remover",+ "Refresh": "Atualizar",+ "Test": "Testar",+ "Install": "Instalar",+ "Uninstall": "Desinstalar",+ "Pause": "Pausar",+ "Resume": "Retomar",+ "Language": "Idioma",+ "Use system language": "Usar idioma do sistema",+ "Appearance": "Aparência",+ "Dark": "Escuro",+ "Light": "Claro",+ "System": "Sistema",+ "Search and dictation": "Pesquisa e ditado",+ "Keyboard Shortcut": "Atalhos de teclado",+ "Global Search": "Pesquisa global",+ "Cycle file types": "Alternar tipos de arquivo",+ "Dictate": "Ditar",+ "Microphone": "Microfone",+ "Brief": "Breve",+ "Medium": "Média",+ "Full": "Completa",+ "Transcribing…": "Transcrevendo…",+ "Pause read aloud": "Pausar leitura",+ "Resume read aloud": "Retomar leitura",+ "Stop playback": "Parar reprodução",+ "Exit": "Sair",+ "results": "resultados",+ "Find files, meanings, programs and Windows settings.": "Encontre arquivos, significados, programas e configurações do Windows.",+ "Unsaved changes": "Alterações não salvas",+ "Index status": "Status do índice",+ "Update index": "Atualizar índice",+ "Cancel indexing": "Cancelar indexação",+ "Add folder / drive": "Adicionar pasta / unidade",+ "Add files": "Adicionar arquivos",+ "Select/Deselect all": "Selecionar/Desmarcar tudo",+ "Remove selected": "Remover selecionados",+ "Exclude folder": "Excluir pasta",+ "Exclude files": "Excluir arquivos",+ "Add exclusion": "Adicionar exclusão",+ "Status": "Status",+ "Local": "Local",+ "Remote": "Remoto",+ "items": "itens",+ "AI response": "Resposta da IA",+ "Read answers aloud automatically": "Ler respostas automaticamente",+ "select": "selecionar",+ "open": "abrir",+ "copy": "copiar",+ "preview": "prévia",+ "send": "enviar",+ "stop": "parar",+ "dismiss": "fechar",+ "cycle tools": "alternar modos",+ "page": "rolar",+ "Ready — models load only when needed": "Pronto — modelos carregam apenas quando necessário",+ "Back to search": "Voltar à pesquisa",+ "Cycle Search / Clipboard / AI": "Alternar pesquisa / área de transferência / IA"+}diff --git a/native/locales/ru.json b/native/locales/ru.jsonnew file mode 100644index 0000000..9e2038d--- /dev/null+++ b/native/locales/ru.json@@ -0,0 +1,101 @@+{+ "Search": "Поиск",+ "Sources": "Источники",+ "Hardware": "Оборудование",+ "Scheduling": "Расписание",+ "Settings": "Настройки",+ "Models and AI": "Модели и ИИ",+ "Logs": "Журналы",+ "About": "О программе",+ "Clipboard": "Буфер обмена",+ "Emoji": "Эмодзи",+ "AI": "ИИ",+ "All": "Все",+ "All files": "Все файлы",+ "Images": "Изображения",+ "Videos": "Видео",+ "Documents": "Документы",+ "Audio / video": "Аудио / видео",+ "Folders": "Папки",+ "Code": "Код",+ "Programs": "Программы",+ "Hybrid": "Гибридный",+ "File/Folder Names": "Имена файлов/папок",+ "Semantic": "Семантический",+ "Open full app": "Открыть приложение",+ "Filter": "Фильтр",+ "File type": "Тип файла",+ "All sources": "Все источники",+ "Saved searches": "Сохранённые поиски",+ "Save Search": "Сохранить поиск",+ "Search Anything": "Найти что угодно",+ "Ask AI": "Спросить ИИ",+ "Search emoji": "Найти эмодзи",+ "Search clipboard history": "Поиск в буфере обмена",+ "What are you looking for?": "Что вы ищете?",+ "Send": "Отправить",+ "Screenshot": "Снимок экрана",+ "New Conversation": "Новый разговор",+ "Read Aloud": "Читать вслух",+ "Save": "Сохранить",+ "Undo": "Отменить",+ "Cancel": "Отмена",+ "Remove": "Удалить",+ "Refresh": "Обновить",+ "Test": "Проверить",+ "Install": "Установить",+ "Uninstall": "Удалить",+ "Pause": "Пауза",+ "Resume": "Продолжить",+ "Language": "Язык",+ "Use system language": "Использовать язык системы",+ "Appearance": "Оформление",+ "Dark": "Тёмная",+ "Light": "Светлая",+ "System": "Системная",+ "Search and dictation": "Поиск и диктовка",+ "Keyboard Shortcut": "Сочетания клавиш",+ "Global Search": "Глобальный поиск",+ "Cycle file types": "Переключить тип файла",+ "Dictate": "Диктовать",+ "Microphone": "Микрофон",+ "Brief": "Кратко",+ "Medium": "Средне",+ "Full": "Полностью",+ "Transcribing…": "Распознавание…",+ "Pause read aloud": "Приостановить чтение",+ "Resume read aloud": "Продолжить чтение",+ "Stop playback": "Остановить воспроизведение",+ "Exit": "Выход",+ "results": "результатов",+ "Find files, meanings, programs and Windows settings.": "Поиск файлов, смыслов, программ и настроек Windows.",+ "Unsaved changes": "Несохранённые изменения",+ "Index status": "Состояние индекса",+ "Update index": "Обновить индекс",+ "Cancel indexing": "Отменить индексацию",+ "Add folder / drive": "Добавить папку / диск",+ "Add files": "Добавить файлы",+ "Select/Deselect all": "Выбрать/снять все",+ "Remove selected": "Удалить выбранное",+ "Exclude folder": "Исключить папку",+ "Exclude files": "Исключить файлы",+ "Add exclusion": "Добавить исключение",+ "Status": "Состояние",+ "Local": "Локально",+ "Remote": "Удалённо",+ "items": "элементов",+ "AI response": "Ответ ИИ",+ "Read answers aloud automatically": "Автоматически читать ответы",+ "select": "выбрать",+ "open": "открыть",+ "copy": "копировать",+ "preview": "просмотр",+ "send": "отправить",+ "stop": "стоп",+ "dismiss": "закрыть",+ "cycle tools": "сменить режим",+ "page": "прокрутить",+ "Ready — models load only when needed": "Готово — модели загружаются по запросу",+ "Back to search": "Назад к поиску",+ "Cycle Search / Clipboard / AI": "Переключить поиск / буфер обмена / ИИ"+}diff --git a/native/locales/vi.json b/native/locales/vi.jsonnew file mode 100644index 0000000..af9e15a--- /dev/null+++ b/native/locales/vi.json@@ -0,0 +1,101 @@+{+ "Search": "Tìm kiếm",+ "Sources": "Nguồn",+ "Hardware": "Phần cứng",+ "Scheduling": "Lịch trình",+ "Settings": "Cài đặt",+ "Models and AI": "Mô hình và AI",+ "Logs": "Nhật ký",+ "About": "Giới thiệu",+ "Clipboard": "Bảng nhớ tạm",+ "Emoji": "Biểu tượng cảm xúc",+ "AI": "AI",+ "All": "Tất cả",+ "All files": "Tất cả tệp",+ "Images": "Hình ảnh",+ "Videos": "Video",+ "Documents": "Tài liệu",+ "Audio / video": "Âm thanh / video",+ "Folders": "Thư mục",+ "Code": "Mã nguồn",+ "Programs": "Chương trình",+ "Hybrid": "Kết hợp",+ "File/Folder Names": "Tên tệp/thư mục",+ "Semantic": "Ngữ nghĩa",+ "Open full app": "Mở ứng dụng",+ "Filter": "Bộ lọc",+ "File type": "Loại tệp",+ "All sources": "Tất cả nguồn",+ "Saved searches": "Tìm kiếm đã lưu",+ "Save Search": "Lưu tìm kiếm",+ "Search Anything": "Tìm mọi thứ",+ "Ask AI": "Hỏi AI",+ "Search emoji": "Tìm biểu tượng cảm xúc",+ "Search clipboard history": "Tìm lịch sử bảng nhớ tạm",+ "What are you looking for?": "Bạn đang tìm gì?",+ "Send": "Gửi",+ "Screenshot": "Ảnh chụp màn hình",+ "New Conversation": "Cuộc trò chuyện mới",+ "Read Aloud": "Đọc thành tiếng",+ "Save": "Lưu",+ "Undo": "Hoàn tác",+ "Cancel": "Hủy",+ "Remove": "Xóa",+ "Refresh": "Làm mới",+ "Test": "Kiểm tra",+ "Install": "Cài đặt",+ "Uninstall": "Gỡ cài đặt",+ "Pause": "Tạm dừng",+ "Resume": "Tiếp tục",+ "Language": "Ngôn ngữ",+ "Use system language": "Dùng ngôn ngữ hệ thống",+ "Appearance": "Giao diện",+ "Dark": "Tối",+ "Light": "Sáng",+ "System": "Hệ thống",+ "Search and dictation": "Tìm kiếm và đọc chính tả",+ "Keyboard Shortcut": "Phím tắt",+ "Global Search": "Tìm kiếm toàn cục",+ "Cycle file types": "Chuyển loại tệp",+ "Dictate": "Đọc chính tả",+ "Microphone": "Micrô",+ "Brief": "Ngắn gọn",+ "Medium": "Vừa",+ "Full": "Đầy đủ",+ "Transcribing…": "Đang chuyển thành văn bản…",+ "Pause read aloud": "Tạm dừng đọc",+ "Resume read aloud": "Tiếp tục đọc",+ "Stop playback": "Dừng phát",+ "Exit": "Thoát",+ "results": "kết quả",+ "Find files, meanings, programs and Windows settings.": "Tìm tệp, ý nghĩa, chương trình và cài đặt Windows.",+ "Unsaved changes": "Thay đổi chưa lưu",+ "Index status": "Trạng thái chỉ mục",+ "Update index": "Cập nhật chỉ mục",+ "Cancel indexing": "Hủy lập chỉ mục",+ "Add folder / drive": "Thêm thư mục / ổ đĩa",+ "Add files": "Thêm tệp",+ "Select/Deselect all": "Chọn/Bỏ chọn tất cả",+ "Remove selected": "Xóa mục đã chọn",+ "Exclude folder": "Loại trừ thư mục",+ "Exclude files": "Loại trừ tệp",+ "Add exclusion": "Thêm mục loại trừ",+ "Status": "Trạng thái",+ "Local": "Cục bộ",+ "Remote": "Từ xa",+ "items": "mục",+ "AI response": "Phản hồi AI",+ "Read answers aloud automatically": "Tự động đọc câu trả lời",+ "select": "chọn",+ "open": "mở",+ "copy": "sao chép",+ "preview": "xem trước",+ "send": "gửi",+ "stop": "dừng",+ "dismiss": "đóng",+ "cycle tools": "đổi chế độ",+ "page": "cuộn",+ "Ready — models load only when needed": "Sẵn sàng — chỉ tải mô hình khi cần",+ "Back to search": "Quay lại tìm kiếm",+ "Cycle Search / Clipboard / AI": "Chuyển tìm kiếm / bảng nhớ tạm / AI"+}diff --git a/native/locales/zh-CN.json b/native/locales/zh-CN.jsonnew file mode 100644index 0000000..536ed34--- /dev/null+++ b/native/locales/zh-CN.json@@ -0,0 +1,101 @@+{+ "Search": "搜索",+ "Sources": "来源",+ "Hardware": "硬件",+ "Scheduling": "计划",+ "Settings": "设置",+ "Models and AI": "模型与 AI",+ "Logs": "日志",+ "About": "关于",+ "Clipboard": "剪贴板",+ "Emoji": "表情",+ "AI": "AI",+ "All": "全部",+ "All files": "所有文件",+ "Images": "图片",+ "Videos": "视频",+ "Documents": "文档",+ "Audio / video": "音频 / 视频",+ "Folders": "文件夹",+ "Code": "代码",+ "Programs": "程序",+ "Hybrid": "混合",+ "File/Folder Names": "文件/文件夹名称",+ "Semantic": "语义",+ "Open full app": "打开完整应用",+ "Filter": "筛选",+ "File type": "文件类型",+ "All sources": "所有来源",+ "Saved searches": "已保存搜索",+ "Save Search": "保存搜索",+ "Search Anything": "搜索任何内容",+ "Ask AI": "询问 AI",+ "Search emoji": "搜索表情",+ "Search clipboard history": "搜索剪贴板历史",+ "What are you looking for?": "您在找什么?",+ "Send": "发送",+ "Screenshot": "截图",+ "New Conversation": "新对话",+ "Read Aloud": "朗读",+ "Save": "保存",+ "Undo": "撤销",+ "Cancel": "取消",+ "Remove": "移除",+ "Refresh": "刷新",+ "Test": "测试",+ "Install": "安装",+ "Uninstall": "卸载",+ "Pause": "暂停",+ "Resume": "继续",+ "Language": "语言",+ "Use system language": "使用系统语言",+ "Appearance": "外观",+ "Dark": "深色",+ "Light": "浅色",+ "System": "系统",+ "Search and dictation": "搜索与听写",+ "Keyboard Shortcut": "键盘快捷键",+ "Global Search": "全局搜索",+ "Cycle file types": "切换文件类型",+ "Dictate": "听写",+ "Microphone": "麦克风",+ "Brief": "简短",+ "Medium": "适中",+ "Full": "完整",+ "Transcribing…": "正在转写…",+ "Pause read aloud": "暂停朗读",+ "Resume read aloud": "继续朗读",+ "Stop playback": "停止播放",+ "Exit": "退出",+ "results": "个结果",+ "Find files, meanings, programs and Windows settings.": "查找文件、语义、程序和 Windows 设置。",+ "Unsaved changes": "未保存的更改",+ "Index status": "索引状态",+ "Update index": "更新索引",+ "Cancel indexing": "取消索引",+ "Add folder / drive": "添加文件夹 / 驱动器",+ "Add files": "添加文件",+ "Select/Deselect all": "全选/取消全选",+ "Remove selected": "移除所选",+ "Exclude folder": "排除文件夹",+ "Exclude files": "排除文件",+ "Add exclusion": "添加排除项",+ "Status": "状态",+ "Local": "本地",+ "Remote": "远程",+ "items": "个项目",+ "AI response": "AI 回复",+ "Read answers aloud automatically": "自动朗读回答",+ "select": "选择",+ "open": "打开",+ "copy": "复制",+ "preview": "预览",+ "send": "发送",+ "stop": "停止",+ "dismiss": "关闭",+ "cycle tools": "切换模式",+ "page": "翻页",+ "Ready — models load only when needed": "就绪 — 模型仅在需要时加载",+ "Back to search": "返回搜索",+ "Cycle Search / Clipboard / AI": "切换搜索 / 剪贴板 / AI"+}diff --git a/native/locales/zh-TW.json b/native/locales/zh-TW.jsonnew file mode 100644index 0000000..f5a5153--- /dev/null+++ b/native/locales/zh-TW.json@@ -0,0 +1,101 @@+{+ "Search": "搜尋",+ "Sources": "來源",+ "Hardware": "硬體",+ "Scheduling": "排程",+ "Settings": "設定",+ "Models and AI": "模型與 AI",+ "Logs": "記錄",+ "About": "關於",+ "Clipboard": "剪貼簿",+ "Emoji": "表情符號",+ "AI": "AI",+ "All": "全部",+ "All files": "所有檔案",+ "Images": "圖片",+ "Videos": "影片",+ "Documents": "文件",+ "Audio / video": "音訊 / 影片",+ "Folders": "資料夾",+ "Code": "程式碼",+ "Programs": "程式",+ "Hybrid": "混合",+ "File/Folder Names": "檔案/資料夾名稱",+ "Semantic": "語意",+ "Open full app": "開啟完整應用程式",+ "Filter": "篩選",+ "File type": "檔案類型",+ "All sources": "所有來源",+ "Saved searches": "已儲存搜尋",+ "Save Search": "儲存搜尋",+ "Search Anything": "搜尋任何內容",+ "Ask AI": "詢問 AI",+ "Search emoji": "搜尋表情符號",+ "Search clipboard history": "搜尋剪貼簿歷程",+ "What are you looking for?": "您在找什麼?",+ "Send": "傳送",+ "Screenshot": "螢幕截圖",+ "New Conversation": "新對話",+ "Read Aloud": "朗讀",+ "Save": "儲存",+ "Undo": "復原",+ "Cancel": "取消",+ "Remove": "移除",+ "Refresh": "重新整理",+ "Test": "測試",+ "Install": "安裝",+ "Uninstall": "解除安裝",+ "Pause": "暫停",+ "Resume": "繼續",+ "Language": "語言",+ "Use system language": "使用系統語言",+ "Appearance": "外觀",+ "Dark": "深色",+ "Light": "淺色",+ "System": "系統",+ "Search and dictation": "搜尋與聽寫",+ "Keyboard Shortcut": "鍵盤快捷鍵",+ "Global Search": "全域搜尋",+ "Cycle file types": "切換檔案類型",+ "Dictate": "聽寫",+ "Microphone": "麥克風",+ "Brief": "簡短",+ "Medium": "適中",+ "Full": "完整",+ "Transcribing…": "正在轉錄…",+ "Pause read aloud": "暫停朗讀",+ "Resume read aloud": "繼續朗讀",+ "Stop playback": "停止播放",+ "Exit": "結束",+ "results": "個結果",+ "Find files, meanings, programs and Windows settings.": "尋找檔案、語意、程式與 Windows 設定。",+ "Unsaved changes": "未儲存的變更",+ "Index status": "索引狀態",+ "Update index": "更新索引",+ "Cancel indexing": "取消索引",+ "Add folder / drive": "新增資料夾 / 磁碟機",+ "Add files": "新增檔案",+ "Select/Deselect all": "全選/取消全選",+ "Remove selected": "移除所選",+ "Exclude folder": "排除資料夾",+ "Exclude files": "排除檔案",+ "Add exclusion": "新增排除項目",+ "Status": "狀態",+ "Local": "本機",+ "Remote": "遠端",+ "items": "個項目",+ "AI response": "AI 回覆",+ "Read answers aloud automatically": "自動朗讀回答",+ "select": "選取",+ "open": "開啟",+ "copy": "複製",+ "preview": "預覽",+ "send": "傳送",+ "stop": "停止",+ "dismiss": "關閉",+ "cycle tools": "切換模式",+ "page": "翻頁",+ "Ready — models load only when needed": "就緒 — 模型僅在需要時載入",+ "Back to search": "返回搜尋",+ "Cycle Search / Clipboard / AI": "切換搜尋 / 剪貼簿 / AI"+}diff --git a/native/src/app.rs b/native/src/app.rsindex b599ec5..958ecd6 100644--- a/native/src/app.rs+++ b/native/src/app.rs@@ -1,3 +1,4 @@+use crate::i18n::t;use crate::{config::{Settings, Source},db::{Database, Hit, SourceStats, Stats},@@ -289,40 +290,9 @@ impl App {if s.include_programs {crate::platform::warm_programs();}+ crate::i18n::set_language(&s.language);crate::appearance::apply(&cc.egui_ctx, &s);- let mut fonts = egui::FontDefinitions::default();- let system = std::path::PathBuf::from(- std::env::var("SystemRoot").unwrap_or_else(|_| "C:\\Windows".into()),- )- .join("Fonts");- for name in ["segoeui.ttf", "seguiemj.ttf", "Nirmala.ttf", "msyh.ttc"] {- if let Ok(bytes) = std::fs::read(system.join(name)) {- fonts- .font_data- .insert(name.into(), egui::FontData::from_owned(bytes).into());- for family in [egui::FontFamily::Proportional, egui::FontFamily::Monospace] {- fonts.families.entry(family).or_default().push(name.into());- }- }- }- if let Ok(bytes) = std::fs::read(system.join("segoeuib.ttf")) {- fonts- .font_data- .insert("bold".into(), egui::FontData::from_owned(bytes).into());- fonts- .families- .insert(egui::FontFamily::Name("bold".into()), vec!["bold".into()]);- }- if let Some(family) = fonts.families.get_mut(&egui::FontFamily::Proportional) {- family.retain(|name| name != "segoeui.ttf");- family.insert(0, "segoeui.ttf".into());- }- let fallback = fonts.families[&egui::FontFamily::Proportional].clone();- fonts- .families- .entry(egui::FontFamily::Name("bold".into()))- .or_insert(fallback);- cc.egui_ctx.set_fonts(fonts);+ crate::i18n::apply(&cc.egui_ctx, &s.language);egui_extras::install_image_loaders(&cc.egui_ctx);let saved_start_hidden = s.start_hidden;let window_state = crate::config::WindowState::load(&home);@@ -592,7 +562,7 @@ impl App {}if args.iter().any(|a| a == "--smoke-transcribing") {app.dictation_busy = true;- app.dictation_status = "Transcribing...".into();+ app.dictation_status = "Transcribing…".into();app.query.clear();}if let Some(status) = get("--smoke-status") {@@ -1864,7 +1834,9 @@ impl App {}if !self.quick&& self.page != 0- && ui.button("Back to search · Ctrl+F").clicked()+ && ui+ .button(format!("{} · Ctrl+F", t("Back to search")))+ .clicked(){self.page = 0;ctx.memory_mut(|m| m.request_focus(egui::Id::new("query")));@@ -1936,7 +1908,7 @@ impl App {egui::ViewportCommand::Minimized(true)});}- if self.quick && ui.button("Open full app").clicked() {+ if self.quick && ui.button(t("Open full app")).clicked() {self.quick = false;ctx.send_viewport_cmd(egui::ViewportCommand::MinInnerSize(egui::vec2(780.0, 540.0,@@ -1954,8 +1926,8 @@ impl App {}fn search_ui(&mut self, ui: &mut egui::Ui, ctx: &egui::Context) {if !self.quick {- ui.heading("What are you looking for?");- ui.label("Find files, meanings, programs and Windows settings.");+ ui.heading(t("What are you looking for?"));+ ui.label(t("Find files, meanings, programs and Windows settings."));ui.add_space(8.0);}let mut query = self.query.clone();@@ -2022,10 +1994,10 @@ impl App {} else {ui.visuals().text_color()})- .hint_text(if recording {+ .hint_text(t(if recording {""} else if self.dictation_busy {- "Transcribing..."+ "Transcribing…"} else {match self.tool.as_str() {"AI" => "Ask AI",@@ -2033,7 +2005,7 @@ impl App {"Clipboard" => "Search clipboard history",_ => "Search Anything",}- })+ })).font(egui::TextStyle::Heading).id(egui::Id::new("query")),);@@ -2073,17 +2045,17 @@ impl App {.truncate().height(360.0).width(114.0)- .selected_text(if self.category == "All files" {+ .selected_text(t(if self.category == "All files" {"All"} else {&self.category- })+ })).show_ui(ui, |ui| {for category in CATEGORIES {let choice = ui.selectable_value(&mut self.category,category.into(),- category,+ t(category),);if self.smoke.is_some() && category == "Programs" {ctx.data_mut(|d| {@@ -2181,7 +2153,7 @@ impl App {}if self.tool == "Search"&& !self.query.trim().is_empty()- && ui.button("Save Search").clicked()+ && ui.button(t("Save Search")).clicked(){self.save_search_name = self.query.clone();self.save_search_open = true;@@ -2196,7 +2168,7 @@ impl App {)).selected(self.tool == "Emoji"),)- .on_hover_text("Emoji")+ .on_hover_text(t("Emoji")).clicked(){self.switch_tool("Emoji");@@ -2270,7 +2242,7 @@ impl App {self.accent(),18.0,),- label,+ t(label),).selected(self.tool == label),)@@ -2291,7 +2263,7 @@ impl App {ui.spacing_mut().icon_width_inner = 8.0;if self.ai_busy {if ui- .add_sized([88.0, 34.0], egui::Button::new("Stop"))+ .add_sized([88.0, 34.0], egui::Button::new(t("stop"))).clicked(){self.stop_ai();@@ -2301,7 +2273,7 @@ impl App {let enabled = !self.query.trim().is_empty() && !self.dictation_busy;let accent = self.accent();let send = ui.add_enabled(enabled,- egui::Button::new("Send")+ egui::Button::new(t("Send")).min_size(egui::vec2(88.0, 34.0)).fill(accent.gamma_multiply(if enabled {0.35} else {0.12})).stroke(egui::Stroke::new(1.0, accent)),@@ -2316,7 +2288,7 @@ impl App {}if self.saved_settings.tts_enabled {ui.add(egui::Checkbox::new(&mut self.read_aloud,- RichText::new("Read Aloud").size(11.0),+ RichText::new(t("Read Aloud")).size(11.0),)).on_hover_text("Automatically read completed AI replies using your TTS server",@@ -2324,12 +2296,12 @@ impl App {},);if ui- .add_enabled(!self.ai_busy, egui::Button::new("New Conversation"))+ .add_enabled(!self.ai_busy, egui::Button::new(t("New Conversation"))).clicked(){self.new_conversation();}- egui::ComboBox::from_id_salt("ai-response-length").width(125.0).selected_text(format!("Response: {}",self.response_length)).show_ui(ui,|ui|{for style in ["Brief","Medium","Full"]{ui.selectable_value(&mut self.response_length,style.into(),style);}}).response.on_hover_text("Response length: Brief (concise voice assistant), Medium (8–12 sentences or two paragraphs), Full (model default)");+ egui::ComboBox::from_id_salt("ai-response-length").width(125.0).selected_text(t(&self.response_length).to_owned()).show_ui(ui,|ui|{for style in ["Brief","Medium","Full"]{ui.selectable_value(&mut self.response_length,style.into(),t(style));}}).response.on_hover_text("Response length: Brief (concise voice assistant), Medium (8–12 sentences or two paragraphs), Full (model default)");if ui.add_enabled(!self.ai_busy && self.saved_settings.llm_vision,@@ -2339,7 +2311,7 @@ impl App {self.accent(),18.0,),- "Screenshot",+ t("Screenshot"),),).on_hover_text("Requires a vision model enabled in Models and AI")@@ -2374,13 +2346,13 @@ impl App {let filtered = self.category != "All files"|| !self.scope.is_empty()|| !self.exclude_types.trim().is_empty();- let filter = ui.button(if filtered { "Filter •" } else { "Filter" });+ let filter = ui.button(format!("{}{}", t("Filter"), if filtered { " •" } else { "" }));if filter.clicked() {self.filter_open = !self.filter_open;self.filter_anchor = filter.rect.left_bottom();}let mut filter_open = self.filter_open;- let filter_window=egui::Window::new("Filter")+ let filter_window=egui::Window::new(t("Filter")).id(egui::Id::new("search-filter-panel")).open(&mut filter_open).collapsible(false)@@ -2391,7 +2363,7 @@ impl App {.max_width(320.0).max_height(330.0).vscroll(true).show(ctx, |ui| {ui.set_min_width(240.0);- ui.label("File type");+ ui.label(t("File type"));let response = combo(ui, "category", &mut self.category, &CATEGORIES);if self.type_flash@@ -2405,7 +2377,7 @@ impl App {);}ui.separator();- ui.label("Sources");+ ui.label(t("Sources"));let mut scopes: Vec<String> = if self.scope.starts_with('[') {serde_json::from_str(&self.scope).unwrap_or_default()} else if self.scope.is_empty() {@@ -2416,7 +2388,7 @@ impl App {egui::ComboBox::from_id_salt("scope").close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside).selected_text(if scopes.is_empty() {- "All sources".into()+ t("All sources").into()} else if scopes.len() == 1 {std::path::Path::new(scopes[0].trim_end_matches(['\\', '/'])).file_name()@@ -2429,7 +2401,7 @@ impl App {.truncate().show_ui(ui, |ui| {if ui- .selectable_label(scopes.is_empty(), "All sources")+ .selectable_label(scopes.is_empty(), t("All sources")).clicked(){scopes.clear();@@ -2474,7 +2446,7 @@ impl App {self.filter_open = filter_open;let mut selected = None;egui::ComboBox::from_id_salt("saved-searches")- .selected_text("Saved searches")+ .selected_text(t("Saved searches")).width(120.0).truncate().show_ui(ui, |ui| {@@ -3081,7 +3053,7 @@ impl App {Err(e) => self.run(Err(e)),}}- if ui.button("Stop playback").clicked() {+ if ui.button(t("Stop playback")).clicked() {crate::platform::stop_playback();self.status = "Playback stopped".into();}@@ -3130,7 +3102,7 @@ impl App {ui.heading("Your sources");ui.label("Quick names for entire drives; Full index for content and media.");ui.group(|ui| {- ui.heading("Index status");+ ui.heading(t("Index status"));ui.label(format!("{} files · {} Full · {} Quick · {} vectors",self.stats.files, self.stats.full, self.stats.quick, self.stats.vectors@@ -3175,7 +3147,7 @@ impl App {if ui.add_enabled(!self.indexing && !self.setup_busy,- egui::Button::new("Update index"),+ egui::Button::new(t("Update index")),).clicked(){@@ -3184,11 +3156,11 @@ impl App {if ui.add_enabled(self.indexing,- egui::Button::new(if self.engine.control.paused.load(Ordering::Relaxed) {+ egui::Button::new(t(if self.engine.control.paused.load(Ordering::Relaxed) {"Resume"} else {"Pause"- }),+ })),).clicked(){@@ -3198,7 +3170,7 @@ impl App {.fetch_xor(true, Ordering::Relaxed);}if ui- .add_enabled(self.indexing, egui::Button::new("Cancel indexing"))+ .add_enabled(self.indexing, egui::Button::new(t("Cancel indexing"))).clicked(){self.engine.control.cancel_by_user();@@ -3253,7 +3225,7 @@ impl App {);ui.horizontal(|ui| {combo(ui, "add_mode", &mut self.source_mode, &["quick", "full"]);- if ui.button("Add folder / drive").clicked() {+ if ui.button(t("Add folder / drive")).clicked() {if let Some(path) = rfd::FileDialog::new().pick_folder() {self.s.roots.push(Source {path: path.to_string_lossy().into_owned(),@@ -3261,7 +3233,7 @@ impl App {});}}- if ui.button("Add files").clicked() {+ if ui.button(t("Add files")).clicked() {if let Some(paths) = rfd::FileDialog::new().pick_files() {for path in paths {self.s.roots.push(Source {@@ -3271,11 +3243,11 @@ impl App {}}}- if ui.button("Select/Deselect all").clicked() {+ if ui.button(t("Select/Deselect all")).clicked() {let selected = !self.source_selected.iter().all(|v| *v);self.source_selected = vec![selected; self.s.roots.len()];}- if ui.button("Remove selected").clicked() {+ if ui.button(t("Remove selected")).clicked() {self.source_selected.resize(self.s.roots.len(), false);for i in (0..self.s.roots.len()).rev() {if self.source_selected[i] {@@ -3318,7 +3290,7 @@ impl App {n.files, n.added_hour));}- if ui.small_button("Remove").clicked() {+ if ui.small_button(t("Remove")).clicked() {remove = Some(i);}});@@ -3342,12 +3314,12 @@ impl App {ui.separator();ui.heading("Exclude from indexing and searches");ui.horizontal(|ui| {- if ui.button("Exclude folder").clicked() {+ if ui.button(t("Exclude folder")).clicked() {if let Some(p) = rfd::FileDialog::new().pick_folder() {self.s.exclusions.push(p.to_string_lossy().into_owned());}}- if ui.button("Exclude files").clicked() {+ if ui.button(t("Exclude files")).clicked() {if let Some(files) = rfd::FileDialog::new().pick_files() {self.s.exclusions@@ -3361,7 +3333,7 @@ impl App {.hint_text("Enter a file or folder path").desired_width(320.0),);- if ui.button("Add exclusion").clicked() && !self.manual_exclude.is_empty() {+ if ui.button(t("Add exclusion")).clicked() && !self.manual_exclude.is_empty() {self.s.exclusions.push(std::mem::take(&mut self.manual_exclude));@@ -3370,11 +3342,11 @@ impl App {self.exclusion_selected.resize(self.s.exclusions.len(), false);ui.horizontal(|ui| {- if ui.button("Select/Deselect all").clicked() {+ if ui.button(t("Select/Deselect all")).clicked() {let selected = !self.exclusion_selected.iter().all(|v| *v);self.exclusion_selected.fill(selected);}- if ui.button("Remove selected").clicked() {+ if ui.button(t("Remove selected")).clicked() {for i in (0..self.s.exclusions.len()).rev() {if self.exclusion_selected[i] {self.s.exclusions.remove(i);@@ -3408,7 +3380,7 @@ impl App {).response.on_hover_text(p);- if ui.small_button("Remove").clicked() {+ if ui.small_button(t("Remove")).clicked() {remove = Some(i);}});@@ -3684,7 +3656,7 @@ impl App {}fn footer_text(&self) -> String {if self.page != 0 {- return self.status.clone();+ return t(&self.status).to_owned();}if self.dictation_busy {return "Transcribing…".into();@@ -3740,7 +3712,7 @@ impl App {}for notice in [&self.dictation_status, &self.tts_status] {if !notice.is_empty() && !notice.starts_with("Recording") {- return notice.clone();+ return t(notice).to_owned();}}if !self.status.is_empty()@@ -3748,15 +3720,20 @@ impl App {&& !self.status.starts_with("Targeted changes")&& !self.status.starts_with("Recovery/"){- return self.status.clone();+ return t(&self.status).to_owned();}match self.tool.as_str() {- "Search" => format!("{} results · {:.1} ms", self.hits.len(), self.search_ms),+ "Search" => format!(+ "{} {} · {:.1} ms",+ self.hits.len(),+ t("results"),+ self.search_ms+ ),"AI" => self.ai_elapsed- .map(|s| format!("AI response · {s:.1} s"))+ .map(|s| format!("{} · {s:.1} s", t("AI response"))).unwrap_or_default(),- "Clipboard" => format!("{} items", self.tool_items.len()),+ "Clipboard" => format!("{} {}", self.tool_items.len(), t("items")),"Emoji" => format!("{} emoji", self.tool_items.len()),_ => String::new(),}@@ -3777,7 +3754,7 @@ impl App {.layout(egui::Layout::left_to_right(egui::Align::Center)),);let start = if self.quick {- let button = left.button("Open full app");+ let button = left.button(t("Open full app"));if self.smoke.is_some() {ctx.data_mut(|d| {d.insert_temp(egui::Id::new("qa-open-full"), button.rect);@@ -3823,7 +3800,7 @@ impl App {if key.is_empty() {continue;}- right.label(RichText::new(action).size(11.0));+ right.label(RichText::new(t(action)).size(11.0));right.label(RichText::new(key).size(11.0).strong().color(self.accent()));}let end = (right.min_rect().left() - 8.0).max(start);@@ -3883,11 +3860,11 @@ impl App {self.accent(),18.0,)))- .on_hover_text(if paused {+ .on_hover_text(t(if paused {"Resume read aloud"} else {"Pause read aloud"- });+ }));if self.smoke.is_some() {ctx.data_mut(|d| d.insert_temp(egui::Id::new("qa-playback-pause"), pause.rect));}@@ -3900,7 +3877,7 @@ impl App {self.accent(),18.0,)))- .on_hover_text("Stop playback")+ .on_hover_text(t("Stop playback")).clicked(){self.stop_read_aloud();@@ -3990,7 +3967,7 @@ impl App {}fn components_ui(&mut self, ui: &mut egui::Ui) {ui.group(|ui|{- ui.heading("Status");+ ui.heading(t("Status"));let loaded=self.engine.models.loaded.load(Ordering::Acquire);for(key,name)in [("runtime","Local llama-server"),("embedding","EmbeddingGemma 2"),("encoder","Photos / audio / video encoder"),("ocr","Tesseract OCR"),("dictation","Parakeet dictation"),("ffmpeg","FFmpeg"),("pdf","PDF renderer")]{let usage=self.component_stats.get(key).cloned().unwrap_or_default();@@ -4009,8 +3986,8 @@ impl App {ui.with_layout(egui::Layout::right_to_left(egui::Align::Center),|ui|{if remote {return;}let managed=crate::resources::managed(&self.home,&self.s,key);- if installed{if ui.add_enabled(!self.setup_busy&&managed,egui::Button::new("Uninstall")).on_hover_text(if managed{"Remove this downloaded item"}else{"External or bundled: managed by its installer"}).clicked(){self.remove_component=Some(key.into());}}- else if ui.add_enabled(!self.setup_busy&&!["ffmpeg","pdf"].contains(&key),egui::Button::new("Install")).clicked(){self.install_component(key);}+ if installed{if ui.add_enabled(!self.setup_busy&&managed,egui::Button::new(t("Uninstall"))).on_hover_text(if managed{"Remove this downloaded item"}else{"External or bundled: managed by its installer"}).clicked(){self.remove_component=Some(key.into());}}+ else if ui.add_enabled(!self.setup_busy&&!["ffmpeg","pdf"].contains(&key),egui::Button::new(t("Install"))).clicked(){self.install_component(key);}});});}@@ -4212,7 +4189,7 @@ impl App {}self.components_ui(ui);- ui.heading("Hardware");+ ui.heading(t("Hardware"));ui.heading("Inference hardware");combo(ui,@@ -4484,13 +4461,28 @@ impl App {});}fn settings(&mut self, ui: &mut egui::Ui, ctx: &egui::Context) {- ui.heading("Settings");- ui.collapsing("Saved searches", |ui| {+ ui.heading(t("Settings"));+ ui.horizontal(|ui| {+ ui.label(t("Language"));+ egui::ComboBox::from_id_salt("interface-language")+ .selected_text(crate::i18n::language_name(&self.s.language))+ .show_ui(ui, |ui| {+ for (code, name) in crate::i18n::LANGUAGES {+ let name = if *code == "system" {+ t("Use system language")+ } else {+ name+ };+ ui.selectable_value(&mut self.s.language, (*code).into(), name);+ }+ });+ });+ ui.collapsing(t("Saved searches"), |ui| {let mut remove = None;for (i, search) in self.s.saved_searches.iter_mut().enumerate() {ui.horizontal(|ui| {ui.add(egui::TextEdit::singleline(&mut search.name));- if ui.button("Remove").clicked() {+ if ui.button(t("Remove")).clicked() {remove = Some(i);}});@@ -4500,17 +4492,17 @@ impl App {}});- ui.heading("Search and dictation");+ ui.heading(t("Search and dictation"));ui.group(|ui| {- ui.label(RichText::new("Keyboard Shortcut").strong());+ ui.label(RichText::new(t("Keyboard Shortcut")).strong());egui::Grid::new("keyboard-shortcuts").num_columns(2).spacing([18.0,10.0]).show(ui,|ui|{- ui.label("Global Search");+ ui.label(t("Global Search"));if ui.button(if self.hotkey_capture{"Press shortcut…"}else{&self.s.hotkey}).clicked(){self.hotkey_capture=true;}ui.end_row();- ui.label("Cycle Search / Clipboard / AI");+ ui.label(t("Cycle Search / Clipboard / AI"));if ui.button(if self.llm_hotkey_capture{"Press shortcut…"}else{&self.s.llm_hotkey}).clicked(){self.llm_hotkey_capture=true;}ui.end_row();- ui.label("Cycle file types");+ ui.label(t("Cycle file types"));if ui.button(if self.type_hotkey_capture{"Press shortcut…"}else{&self.s.type_hotkey}).clicked(){self.type_hotkey_capture=true;}ui.end_row();- ui.label("Dictate");+ ui.label(t("Dictate"));if ui.button(if self.global_voice_capture{"Press shortcut…"}else{&self.s.voice_search_hotkey}).clicked(){self.global_voice_capture=true;}ui.end_row();});ui.weak("Click a shortcut, then press the keys to assign it. Dictate opens quick search or records in the current search.");@@ -4520,7 +4512,7 @@ impl App {self.refresh_microphones();}ui.horizontal(|ui| {- ui.label("Microphone");+ ui.label(t("Microphone"));egui::ComboBox::from_id_salt("microphone").selected_text(if self.s.microphone.is_empty() {"Windows default"@@ -4535,7 +4527,7 @@ impl App {}});if ui- .add_enabled(!self.microphones_busy, egui::Button::new("Refresh"))+ .add_enabled(!self.microphones_busy, egui::Button::new(t("Refresh"))).clicked(){self.refresh_microphones();@@ -4553,7 +4545,7 @@ impl App {self.s.tts_enabled,egui::Checkbox::new(&mut self.s.voice_read_aloud,- "Read answers aloud automatically",+ t("Read answers aloud automatically"),),).on_hover_text("Enable text to speech in Models and AI first");@@ -4604,7 +4596,7 @@ impl App {}}ui.weak("Tab cycles enabled search modes. Emoji stays available by its button.");- ui.heading("Appearance");+ ui.heading(t("Appearance"));combo(ui, "theme", &mut self.s.theme, &["System", "Dark", "Light"]);ui.horizontal(|ui| {ui.label("App theme color");@@ -5086,7 +5078,7 @@ impl App {}if self.ai_busy || self.ai_error.is_some() {ui.label(- RichText::new("AI")+ RichText::new(t("AI")).size(20.0).family(egui::FontFamily::Name("bold".into())).strong(),@@ -5429,7 +5421,7 @@ impl App {}),);if ui- .add_enabled(!self.connections[index].busy, egui::Button::new("Test"))+ .add_enabled(!self.connections[index].busy, egui::Button::new(t("Test"))).on_hover_text("Test API connection and authentication using the model-list endpoint",)@@ -5471,7 +5463,7 @@ impl App {}let before_llm = self.remote_signature(2);- ui.heading("Models and AI");+ ui.heading(t("Models and AI"));self.embedding_settings(ui);ui.separator();self.dictation_settings(ui);@@ -5758,7 +5750,7 @@ impl App {ui.separator();}fn scheduling(&mut self, ui: &mut egui::Ui) {- ui.heading("Scheduling");+ ui.heading(t("Scheduling"));ui.checkbox(&mut self.s.watch_changes,"Automatically index changed files and folders (respects idle rules)",@@ -5903,7 +5895,7 @@ impl App {ui.label("VectorDash must remain running. Closing to tray keeps schedules active; it does not wake a sleeping PC.");}fn logs(&mut self, ui: &mut egui::Ui) {- ui.heading("Logs");+ ui.heading(t("Logs"));ui.horizontal(|ui| {if ui.selectable_label(!self.model_logs && !self.file_logs, "VectorDash logs")@@ -5991,6 +5983,7 @@ impl App {}impl eframe::App for App {fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {+ crate::i18n::apply(ctx, &self.s.language);use raw_window_handle::HasWindowHandle;if self.smoke.is_some() && self.tool == "AI" {let args = std::env::args().collect::<Vec<_>>();@@ -6571,7 +6564,7 @@ impl eframe::App for App {).show(ui, |ui| {for i in [0, 1, 2, 3, 5, 4, 6, 7] {- let label = &PAGES[i];+ let label = &t(PAGES[i]);let icon = [crate::icons::Icon::Search,crate::icons::Icon::Sources,@@ -6620,9 +6613,9 @@ impl eframe::App for App {self.accent(),22.0,)))- .on_hover_text("Exit VectorDash")+ .on_hover_text(format!("{} VectorDash", t("Exit")))} else {- ui.button("Exit VectorDash")+ ui.button(format!("{} VectorDash", t("Exit")))};if exit.clicked() {self.exiting = true;@@ -6714,12 +6707,12 @@ impl eframe::App for App {.frame(egui::Frame::NONE.inner_margin(egui::Margin::symmetric(20, 10))).show(ctx, |ui| {ui.horizontal(|ui| {- ui.label("Unsaved changes");+ ui.label(t("Unsaved changes"));ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {if ui.add_enabled(!self.index_clearing,- egui::Button::new("Undo")+ egui::Button::new(t("Undo")).fill(Color32::TRANSPARENT).stroke(egui::Stroke::new(1.0, self.accent())),)@@ -6731,7 +6724,7 @@ impl eframe::App for App {.add_enabled(!self.index_clearing,egui::Button::new(- RichText::new("Save").strong().color(Color32::WHITE),+ RichText::new(t("Save")).strong().color(Color32::WHITE),).fill(Color32::from_rgb(195, 45, 65)),)@@ -6949,7 +6942,7 @@ impl eframe::App for App {egui::Window::new("Uninstall downloaded item?").collapsible(false).resizable(false).show(ctx,|ui|{ui.label(format!("Remove the downloaded {key} files? Index data is kept. Active indexing and model work will stop."));ui.horizontal(|ui|{- if ui.button("Uninstall").clicked(){+ if ui.button(t("Uninstall")).clicked(){self.remove_component=None;self.setup_busy=true;self.dictation_cancel.store(true,Ordering::Release);self.engine.control.cancel_by_user();let home=self.home.clone();let settings=self.s.clone();let models=self.engine.models.clone();let tx=self.engine.tx.clone();std::thread::spawn(move||{let result=models.stop().and_then(|_|{@@ -6960,7 +6953,7 @@ impl eframe::App for App {crate::resources::uninstall(&home,&settings,&key)}).map_err(|e|e.to_string());let _=tx.send(Event::ComponentRemoved(key,result));});}- if ui.button("Cancel").clicked(){self.remove_component=None;}+ if ui.button(t("Cancel")).clicked(){self.remove_component=None;}});});}@@ -6980,7 +6973,7 @@ impl eframe::App for App {.add_enabled(!self.save_search_name.trim().is_empty()&& !self.query.trim().is_empty(),- egui::Button::new("Save"),+ egui::Button::new(t("Save")),).clicked(){@@ -7005,7 +6998,7 @@ impl eframe::App for App {self.save();self.save_search_open = false;}- if ui.button("Cancel").clicked() {+ if ui.button(t("Cancel")).clicked() {self.save_search_open = false;}});@@ -7017,7 +7010,7 @@ impl eframe::App for App {ui.label("Remove all saved clipboard entries? Your current Windows clipboard is kept.");ui.horizontal(|ui|{if ui.button("Clear history").clicked(){self.clipboard_clear_confirm=false;let store=crate::launcher::Clipboard::new(&self.home);let tx=self.engine.tx.clone();std::thread::spawn(move||{let _=tx.send(Event::ClipboardCleared(store.clear().map_err(|e|e.to_string())));});}- if ui.button("Cancel").clicked(){self.clipboard_clear_confirm=false;}+ if ui.button(t("Cancel")).clicked(){self.clipboard_clear_confirm=false;}});});}@@ -7178,7 +7171,7 @@ impl eframe::App for App {self.delete_confirm = None;self.changed();}- if ui.button("Cancel").clicked() {+ if ui.button(t("Cancel")).clicked() {self.delete_confirm = None;}});@@ -7188,7 +7181,7 @@ impl eframe::App for App {egui::Window::new("Uninstall downloaded models and runtimes?").collapsible(false).show(ctx,|ui|{ui.label("Remove managed downloads from the current and legacy VectorDash folders? Source files, external tools and the index are kept. Automatic indexing will pause.");if ui.button("Uninstall downloads").clicked(){self.uninstall_downloads();}- if ui.button("Cancel").clicked(){self.uninstall_confirm=false;}+ if ui.button(t("Cancel")).clicked(){self.uninstall_confirm=false;}});}if self.clear_index_confirm {@@ -7203,7 +7196,7 @@ impl eframe::App for App {self.status = "Stopping indexing and clearing the active index…".into();self.engine.clear_index();}- if ui.button("Cancel").clicked() { self.clear_index_confirm = false; }+ if ui.button(t("Cancel")).clicked() { self.clear_index_confirm = false; }});});}@@ -7212,6 +7205,8 @@ impl eframe::App for App {&& (self.qa_screenshot.is_none() || self.qa_captured){let mut data = serde_json::json!({"ok":true,"native_rust":true,"tool":self.tool,"tools":self.saved_settings.search_tools(),"footer":self.footer_text(),"embedding_activity":self.embedding_activity(),"ai_elapsed":self.ai_elapsed,"dictation_status":self.dictation_status,"query":self.query,"ai_busy":self.ai_busy,"ai_answer":self.ai_answer,"model_loaded":self.engine.models.loaded.load(Ordering::Relaxed),"frames":self.frames,"max_frame_interval_ms":self.max_frame_ms,"dark_mode":ctx.style().visuals.dark_mode,"hidden_reopened":self.qa_hidden_reopened,"ocr_enabled":self.s.ocr_enabled,"ocr_setup_selected":self.ocr_setup,"results":self.hits.len(),"selected":self.selected,"result_scroll_offset":self.result_scroll_offset,"scope":self.scope,"quick_look":self.large_preview,"quick_look_size":self.qa_child_size,"cpu":crate::scheduling::metrics().cpu,"gpu":crate::scheduling::metrics().gpu,"query_focus":ctx.memory(|m|m.has_focus(egui::Id::new("query"))),"ai_metrics":self.ai_metrics.label(),"tts_busy":self.tts_busy,"tts_paused":self.tts_paused.load(Ordering::Acquire),"connection_results":self.connections.iter().map(|s|s.result.as_ref().map(|r|r.is_ok())).collect::<Vec<_>>(),"ai_scroll_offset":self.ai_scroll_offset,"qa_ai_scroll_before":self.qa_ai_scroll_before,"qa_ai_followup_sent":self.qa_ai_followup_sent,"tts_status":self.tts_status,"tts_notice":self.tts_notice,"tts_voices":self.tts_voices,"response_length":self.response_length,"toolbar_top":self.qa_toolbar_top,"filters_top":self.qa_filter_top,"query_selected":egui::text_edit::TextEditState::load(ctx,egui::Id::new("query")).and_then(|s|s.cursor.char_range()).map(|r|r.as_sorted_char_range().len()).unwrap_or(0)});+ data["language"] = serde_json::json!(self.s.language);+ data["localized_search"] = serde_json::json!(t("Search"));data["source_list"] = serde_json::json!(ctx.data(|d| d.get_temp::<[f32; 2]>(egui::Id::new("qa-inclusion"))));@@ -7295,25 +7290,25 @@ impl eframe::App for App {}fn combo(ui: &mut egui::Ui, id: &str, value: &mut String, items: &[&str]) -> egui::Response {egui::ComboBox::from_id_salt(id)- .selected_text(if *value == "Both" {+ .selected_text(t(if *value == "Both" {"Hybrid"} else if *value == "Names" {"File/Folder Names"} else {value.as_str()- })+ })).show_ui(ui, |ui| {for item in items {ui.selectable_value(value,(*item).into(),- if *item == "Both" {+ t(if *item == "Both" {"Hybrid"} else if *item == "Names" {"File/Folder Names"} else {*item- },+ }),);}})diff --git a/native/src/config.rs b/native/src/config.rsindex 562917e..0347b24 100644--- a/native/src/config.rs+++ b/native/src/config.rs@@ -57,6 +57,7 @@ pub struct Settings {pub github_token: String,pub encrypt_index: bool,pub performance: String,+ pub language: String,pub theme: String,pub accent: [u8; 3],pub popup_opacity: f32,@@ -202,6 +203,7 @@ impl Default for Settings {github_token: String::new(),encrypt_index: true,performance: "Balanced".into(),+ language: "system".into(),theme: "Dark".into(),accent: [133, 115, 255],popup_opacity: 0.8,diff --git a/native/src/i18n.rs b/native/src/i18n.rsnew file mode 100644index 0000000..6aca342--- /dev/null+++ b/native/src/i18n.rs@@ -0,0 +1,284 @@+use std::{cell::Cell, collections::HashMap, sync::OnceLock};++pub const LANGUAGES: &[(&str, &str)] = &[+ ("system", "Use system language"),+ ("en", "English"),+ ("es", "Español"),+ ("pt-BR", "Português (Brasil)"),+ ("fr", "Français"),+ ("de", "Deutsch"),+ ("it", "Italiano"),+ ("ru", "Русский"),+ ("zh-CN", "简体中文"),+ ("zh-TW", "繁體中文"),+ ("ja", "日本語"),+ ("ko", "한국어"),+ ("hi", "हिन्दी"),+ ("vi", "Tiếng Việt"),+];+const CATALOGS: &[&str] = &[+ include_str!("../locales/en.json"),+ include_str!("../locales/es.json"),+ include_str!("../locales/pt-BR.json"),+ include_str!("../locales/fr.json"),+ include_str!("../locales/de.json"),+ include_str!("../locales/it.json"),+ include_str!("../locales/ru.json"),+ include_str!("../locales/zh-CN.json"),+ include_str!("../locales/zh-TW.json"),+ include_str!("../locales/ja.json"),+ include_str!("../locales/ko.json"),+ include_str!("../locales/hi.json"),+ include_str!("../locales/vi.json"),+];+thread_local! { static ACTIVE: Cell<usize> = const { Cell::new(0) }; }+static MESSAGES: OnceLock<Vec<HashMap<String, String>>> = OnceLock::new();++fn catalogs() -> &'static Vec<HashMap<String, String>> {+ MESSAGES.get_or_init(|| {+ CATALOGS+ .iter()+ .map(|json| serde_json::from_str(json).expect("validated embedded locale catalog"))+ .collect()+ })+}++fn resolve(locale: &str) -> usize {+ let tag = locale.replace('_', "-").to_ascii_lowercase();+ let code = if tag == "zh" || tag.starts_with("zh-") {+ if tag.contains("hant") || tag.contains("-tw") || tag.contains("-hk") || tag.contains("-mo")+ {+ "zh-TW"+ } else {+ "zh-CN"+ }+ } else if tag == "pt" || tag.starts_with("pt-") {+ "pt-BR"+ } else {+ tag.split('-').next().unwrap_or("en")+ };+ LANGUAGES+ .iter()+ .skip(1)+ .position(|(key, _)| *key == code)+ .unwrap_or(0)+}++fn system_language() -> &'static str {+ static SYSTEM: OnceLock<String> = OnceLock::new();+ SYSTEM.get_or_init(|| {+ #[cfg(windows)]+ {+ // UI language, rather than the user's number/date regional format.+ #[link(name = "kernel32")]+ unsafe extern "system" {+ fn GetUserDefaultUILanguage() -> u16;+ fn LCIDToLocaleName(locale: u32, name: *mut u16, count: i32, flags: u32) -> i32;+ }+ let mut name = [0u16; 85];+ let count = unsafe {+ LCIDToLocaleName(+ GetUserDefaultUILanguage() as u32,+ name.as_mut_ptr(),+ name.len() as i32,+ 0,+ )+ };+ if count > 1 {+ return String::from_utf16_lossy(&name[..count as usize - 1]);+ }+ }+ for key in ["LC_ALL", "LC_MESSAGES", "LANG"] {+ if let Ok(value) = std::env::var(key) {+ if !value.is_empty() {+ return value.split('.').next().unwrap_or("en").into();+ }+ }+ }+ "en".into()+ })+}++pub fn set_language(code: &str) {+ ACTIVE.set(resolve(if code == "system" {+ system_language()+ } else {+ code+ }));+}++/// Only UI display strings pass through here; never translate persisted identifiers.+/// Untranslated messages and unsupported locales fall back to English.+pub fn t(message: &str) -> &str {+ catalogs()[ACTIVE.get()]+ .get(message)+ .map(String::as_str)+ .unwrap_or(message)+}++pub fn language_name(code: &str) -> &'static str {+ if code == "system" {+ return t("Use system language");+ }+ LANGUAGES[resolve(code) + 1].1+}++#[cfg(test)]+mod tests {+ use super::*;+ #[test]+ fn catalogs_have_complete_core_keys_and_nonempty_values() {+ let english = &catalogs()[0];+ assert_eq!(CATALOGS.len(), LANGUAGES.len() - 1);+ for catalog in catalogs() {+ assert_eq!(catalog.len(), english.len());+ for key in english.keys() {+ assert!(!catalog[key].trim().is_empty(), "missing {key}");+ }+ }+ }+ #[test]+ fn regional_locales_and_unknown_languages_resolve_safely() {+ for (tag, code) in [+ ("es-MX", "es"),+ ("pt_PT", "pt-BR"),+ ("zh-Hant-HK", "zh-TW"),+ ("zh-SG", "zh-CN"),+ ("ko-KR", "ko"),+ ("ar-SA", "en"),+ ] {+ assert_eq!(LANGUAGES[resolve(tag) + 1].0, code);+ }+ }+ #[test]+ fn language_preview_switch_and_english_fallback() {+ set_language("vi");+ assert_eq!(t("Search"), "Tìm kiếm");+ assert_eq!(+ t("Untranslated technical detail"),+ "Untranslated technical detail"+ );+ set_language("ja");+ assert_eq!(t("Search"), "検索");+ set_language("unknown");+ assert_eq!(t("Search"), "Search");+ }+ #[test]+ fn settings_preserve_language_and_canonical_search_values() {+ let old: crate::config::Settings = serde_json::from_str("{}").unwrap();+ assert_eq!(old.language, "system");+ let signature = crate::engine::source_signature(&old);+ let mut settings = old;+ settings.language = "de".into();+ let restored: crate::config::Settings =+ serde_json::from_str(&serde_json::to_string(&settings).unwrap()).unwrap();+ assert_eq!(restored.language, "de");+ assert_eq!(crate::engine::source_signature(&restored), signature);+ assert_eq!(restored.default_search_mode, "Both");+ assert_eq!(restored.search_tools()[0], "Search");+ }+}++/// Font files are read once per actual locale change, never on each repaint.+pub fn apply(ctx: &eframe::egui::Context, code: &str) {+ use eframe::egui;+ set_language(code);+ let key = egui::Id::new("interface-font-language");+ let changed = ctx.data_mut(|d| {+ let changed = d.get_temp::<usize>(key) != Some(ACTIVE.get());+ if changed {+ d.insert_temp(key, ACTIVE.get());+ }+ changed+ });+ if !changed {+ return;+ }+ let mut fonts = egui::FontDefinitions::default();+ let system = std::path::PathBuf::from(+ std::env::var("SystemRoot").unwrap_or_else(|_| "C:\\Windows".into()),+ )+ .join("Fonts");+ let mut names = vec![+ "segoeui.ttf",+ "seguiemj.ttf",+ "Nirmala.ttc",+ "Nirmala.ttf",+ "msyh.ttc",+ "malgun.ttf",+ ];+ // Prefer regional CJK glyph shapes only when that interface language is active.+ if ACTIVE.get() == resolve("ja") {+ names.insert(2, "YuGothR.ttc");+ }+ if ACTIVE.get() == resolve("zh-TW") {+ names.insert(2, "msjh.ttc");+ }+ for name in names {+ if let Ok(bytes) = std::fs::read(system.join(name)) {+ fonts+ .font_data+ .insert(name.into(), egui::FontData::from_owned(bytes).into());+ for family in [egui::FontFamily::Proportional, egui::FontFamily::Monospace] {+ fonts.families.entry(family).or_default().push(name.into());+ }+ }+ }+ if let Ok(bytes) = std::fs::read(system.join("segoeuib.ttf")) {+ fonts+ .font_data+ .insert("bold".into(), egui::FontData::from_owned(bytes).into());+ fonts+ .families+ .insert(egui::FontFamily::Name("bold".into()), vec!["bold".into()]);+ }+ if fonts.font_data.contains_key("segoeui.ttf") {+ if let Some(family) = fonts.families.get_mut(&egui::FontFamily::Proportional) {+ family.retain(|name| name != "segoeui.ttf");+ family.insert(0, "segoeui.ttf".into());+ }+ }+ let fallback = fonts.families[&egui::FontFamily::Proportional].clone();+ fonts+ .families+ .entry(egui::FontFamily::Name("bold".into()))+ .or_default()+ .extend(fallback);+ ctx.set_fonts(fonts);+}++#[cfg(all(test, windows))]+mod font_tests {+ use super::*;+ #[test]+ fn installed_windows_fonts_cover_all_core_translations() {+ use eframe::egui;+ let system = std::path::PathBuf::from(+ std::env::var("SystemRoot").unwrap_or_else(|_| "C:\\Windows".into()),+ )+ .join("Fonts");+ if ["Nirmala.ttc", "msyh.ttc", "malgun.ttf"]+ .iter()+ .any(|name| !system.join(name).is_file())+ {+ eprintln!(+ "Optional Windows language fonts are missing; full glyph coverage must be checked on a machine with those font features installed"+ );+ return;+ }+ let ctx = egui::Context::default();+ apply(&ctx, "en");+ let _ = ctx.run(Default::default(), |ctx| {+ ctx.fonts_mut(|fonts| {+ let id = egui::FontId::proportional(14.0);+ for (code, catalog) in LANGUAGES.iter().skip(1).zip(catalogs()) {+ for text in catalog.values() {+ for c in text.chars().filter(|c| !c.is_whitespace()) {+ assert!(fonts.has_glyph(&id, c), "missing glyph {c} in {}", code.0);+ }+ }+ }+ });+ });+ }+}diff --git a/native/src/main.rs b/native/src/main.rsindex 2715739..739cc6f 100644--- a/native/src/main.rs+++ b/native/src/main.rs@@ -14,6 +14,7 @@ mod dictation;mod engine;#[cfg(test)]mod feature_tests;+mod i18n;mod icons;mod index_costs;mod journal;