Files
OSGKeyboard/OSGKeyboardShared/en.lproj/Shared.strings
T
Rocky c2f07bd8d2 feat(macos): add macOS menu-bar app and harden cross-device iCloud sync
Introduce a standalone macOS menu-bar app (OSGKeyboardMac) that reuses the
platform-agnostic OSGKeyboardShared core: record -> cloud/local ASR -> polish
-> insert. Local mode uses Qwen3-ASR via mlx-swift-asr (macOS 15+, Apple
Silicon); iOS targets stay zero-SPM.

Harden iCloud sync for multi-device correctness:
- Per-field settings merge (appSettings.v2) so concurrent edits no longer
  clobber each other's unrelated fields.
- Per-device usage statistics (G-Counter) that sum instead of max().
- Tombstoned dictionary/history merge so deletes propagate and entries can't
  resurrect.
- API keys replicate via iCloud Keychain, never iCloud KVS JSON; pulling a
  legacy blob without key fields no longer wipes local Keychain entries.
- Add a low-risk "Sync Now" action in Settings.

Fix Flow keyboard mic state: stay orange until the host publishes a real ready
contract, share a single MicVoiceAvailability gate, and self-heal stale
cross-process heartbeat jitter instead of getting stuck.

Extract shared storage (SpeechHistoryStore/UsageStatisticsStore,
ConfigurationStore) into OSGKeyboardShared and add tests for the new
sync/merge logic.
2026-07-08 18:13:56 +08:00

204 lines
9.7 KiB
Plaintext

/* Engine status labels */
"engine.summary.local" = "On-device · %@";
"engine.summary.cloud" = "Active: %@";
"engine.summary.cloudWithModel" = "Active: %1$@ · %2$@";
"engine.asr.appleSpeech" = "Apple SpeechAnalyzer";
/* v0.2.0: flow-level warnings surfaced alongside the final transcript. */
"flow.warning.cloudPolishMissingKey" = "Cloud polish needs an API key in Settings. Inserted raw ASR text.";
"flow.warning.localPolishUnavailable" = "Built-in polish is unavailable. Inserted raw ASR text.";
"flow.warning.polishDegraded" = "Weak network — inserted raw ASR text without polish.";
/* LLM providers */
"provider.openai" = "OpenAI";
"provider.deepseek" = "DeepSeek";
"provider.qwen" = "Qwen (DashScope)";
"provider.zhipu" = "Zhipu GLM";
"provider.moonshot" = "Moonshot";
"provider.mimo" = "Xiaomi MiMo";
"provider.custom" = "Custom";
/* LLM errors */
"error.llm.invalidURL" = "Invalid API URL. Check Base URL in Settings.";
"error.llm.noAPIKey" = "API Key is missing.";
"error.llm.http" = "API returned HTTP %lld. Try again later or contact the provider.";
"error.llm.decoding" = "Failed to parse the API response.";
"error.llm.transport" = "Network error. Check your connection and try again.";
"error.llm.rateLimited" = "Too many API requests. Please wait and try again.";
"error.llm.cancelled" = "Request cancelled.";
/* ASR errors */
"error.asr.localeUnsupported" = "Speech language assets are unavailable. Try again later or switch the recognition language.";
"error.asr.assetsNotReady" = "Speech language assets are not ready. Try again later.";
"error.asr.formatUnsupported" = "This device does not support the required audio format.";
"error.asr.noSpeech" = "No speech detected. Please try again.";
"error.asr.chunkFailed" = "Segment %lld failed: %@";
/* Cloud ASR errors */
"error.cloudASR.noAPIKey" = "API Key is missing.";
"error.cloudASR.invalidURL" = "Invalid cloud ASR endpoint.";
"error.cloudASR.http" = "Cloud ASR returned HTTP %lld.";
"error.cloudASR.httpWithMessage" = "Cloud ASR returned HTTP %lld: %@";
"error.cloudASR.decoding" = "Failed to parse cloud ASR response: %@";
"error.cloudASR.transport" = "Cloud ASR network error: %@";
"error.cloudASR.emptyTranscript" = "Cloud ASR returned an empty transcript.";
"error.cloudASR.audioTooLong" = "Audio segment is too long for this cloud ASR provider.";
"error.cloudASR.providerUnsupported" = "This provider does not support cloud speech recognition yet.";
/* Polish scenarios */
"polishScenario.daily_chat" = "Daily Chat";
"polishScenario.social_lifestyle" = "Social Network";
"polishScenario.social_short" = "Instagram";
"polishScenario.goofy" = "Goofy";
"polishScenario.work" = "Work";
"polishScenario.document" = "Document";
"polishScenario.todo" = "TODO";
"polishScenario.custom" = "Custom";
"polishScenario.chip.daily_chat" = "Chat";
"polishScenario.chip.social_lifestyle" = "Social";
"polishScenario.chip.social_short" = "IG";
"polishScenario.chip.goofy" = "Goofy";
"polishScenario.chip.work" = "Work";
"polishScenario.chip.document" = "Doc";
"polishScenario.chip.todo" = "TODO";
"polishScenario.chip.custom" = "Custom";
/* v0.3.0: Polish intensity picker */
"polish.intensity.off" = "Off";
"polish.intensity.light" = "Light";
"polish.intensity.medium" = "Medium";
"polish.intensity.heavy" = "Heavy";
"polish.intensity.off.desc" = "No polish; inserts raw ASR unless your personal dictionary has entries, then runs ASR correction only.";
"polish.intensity.light.desc" = "Drop only isolated filler words and obvious duplications. Punctuation and structure still apply.";
"polish.intensity.medium.desc" = "Correct recognition errors, remove fillers, polish phrasing. Punctuation and structure always apply. Default.";
"polish.intensity.heavy.desc" = "Restructure into lists and paragraphs when needed. Best for meeting notes and reports.";
/* v0.3.0: Detected app context labels */
"appContext.code" = "Code";
"appContext.email" = "Email";
"appContext.chat" = "Chat";
"appContext.document" = "Document";
"appContext.unknown" = "General";
/* v0.3.0: Personal dictionary categories */
"dict.category.properNoun" = "Names & places";
"dict.category.technical" = "Technical terms";
"dict.category.acronym" = "Acronyms";
"dict.category.productName" = "Product names";
"dict.category.custom" = "Custom";
/* v0.3.0: Personal dictionary sources */
"dict.source.manual" = "Manual";
"dict.source.history" = "Auto-learned";
"dict.source.contacts" = "From Contacts";
"dict.source.recentEdit" = "From recent edit";
/* Keyboard UI (shared between extension + preview) */
"keyboard.tapToTalkA11y" = "Tap to talk";
"keyboard.translation.chip" = "Translate";
"keyboard.translation.offMenu" = "Don't translate";
"keyboard.translation.a11y" = "Translation";
"keyboard.translation.a11yHint" = "Toggle translation or change the target language.";
/* macOS app */
"mac.section.dashboard" = "Dashboard";
"mac.section.history" = "History";
"mac.section.dictionary" = "Personal Dictionary";
"mac.section.settings" = "Settings";
"mac.brand.subtitle" = "AI DICTATION";
"mac.devices" = "Devices";
"mac.status.ready" = "Ready to dictate…";
"mac.status.listening" = "Listening…";
"mac.status.transcribing" = "Transcribing…";
"mac.status.copied" = "Copied to clipboard";
"mac.status.pasted" = "Inserted into front app";
"mac.status.copiedAndPasted" = "Copied and inserted";
"mac.stat.dictationTime" = "Dictation Time";
"mac.stat.words" = "Dictation Chars";
"mac.stat.translation" = "Translation Chars";
"mac.stat.dictionary" = "Dictionary";
"mac.stat.cumulativeDuration" = "Total time";
"mac.stat.transcribed" = "Transcribed";
"mac.stat.cumulativeTranslation" = "Translated";
"mac.stat.customTerms" = "Custom terms";
"mac.status.chipReady" = "Ready";
"mac.status.chipProcessing" = "Processing";
"mac.record.start" = "Record";
"mac.record.stop" = "Stop";
"mac.record.pressStop" = "Press Stop";
"mac.copy" = "Copy";
"mac.openWindow" = "Open Window";
"mac.quit" = "Quit";
"mac.mode.cloud" = "Cloud Mode";
"mac.mode.local" = "Local Mode";
"mac.connected" = "Connected";
"mac.offline" = "Offline";
"mac.history.recent" = "Recent";
"mac.history.empty" = "No voice transcripts yet.";
"mac.history.select" = "Select a dictation";
"mac.history.clearTitle" = "Clear all history?";
"mac.history.clearMessage" = "This cannot be undone.";
"mac.history.clearConfirm" = "Clear all";
"mac.dict.health" = "Vocabulary Health";
"mac.dict.healthDesc" = "Custom terms that bias recognition and are never rewritten.";
"mac.dict.search" = "Search words";
"mac.dict.empty" = "No words yet";
"mac.dict.emptyBody" = "Add words on your iPhone or iPad to improve recognition accuracy. They sync here via iCloud.";
"mac.dict.noMatch" = "No matches";
"mac.cancel" = "Cancel";
"mac.delete" = "Delete";
"mac.dict.deleteTitle" = "Delete this word?";
"mac.dict.deleteMessage" = "This cannot be undone.";
"mac.hint.holdOption" = "Hold Option to dictate";
"mac.settings.cloudProvider" = "CLOUD PROVIDER";
"mac.settings.service" = "Service";
"mac.settings.apiKey" = "API Key";
"mac.settings.model" = "Model";
"mac.settings.recognition" = "RECOGNITION METHOD";
"mac.settings.cloudEngine" = "Cloud Engine & AI Refinement";
"mac.settings.cloudEngineDesc" = "Premium transcription via your provider's API, plus AI grammar and style polishing.";
"mac.settings.localEngine" = "Local Recognition (Qwen3-ASR)";
"mac.settings.localEngineDesc" = "On-device ASR with Qwen3-ASR 1.7B (MLX). High privacy, zero latency.";
"mac.settings.localSpeechFallback" = "Local Recognition (Apple Speech)";
"mac.settings.localSpeechFallbackDesc" = "On-device Apple Speech when the Qwen3 model is not installed.";
"mac.settings.about" = "About";
"mac.settings.general" = "General";
"mac.settings.input" = "Input & Shortcuts";
"mac.settings.recognitionLanguage" = "Recognition Language";
"mac.settings.interfaceLanguage" = "Interface Language";
"mac.settings.autoPaste" = "Auto-paste after dictation";
"mac.settings.autoPasteDesc" = "Simulate ⌘V in the front app after transcription (requires Accessibility).";
"mac.settings.hotkey" = "Global shortcut";
"mac.settings.hotkeyDesc" = "Hold Option (⌥) to dictate from any app.";
"mac.settings.qwen3Model" = "Qwen3 model folder";
"mac.settings.qwen3ModelDesc" = "Folder with config.json, model.safetensors, vocab.json, and merges.txt.";
"mac.settings.qwen3Browse" = "Choose folder…";
"mac.settings.qwen3Missing" = "Qwen3 model not found — using Apple Speech for now.";
"mac.settings.accessibility" = "Accessibility";
"mac.settings.accessibilityDesc" = "Required for global shortcut and auto-paste.";
"mac.settings.openAccessibility" = "Open System Settings";
"mac.settings.appearance" = "Appearance";
"mac.settings.appearanceDesc" = "Match the system, or force a light or dark look.";
"mac.appearance.system" = "System";
"mac.appearance.light" = "Light";
"mac.appearance.dark" = "Dark";
"mac.error.noAudio" = "No audio captured";
"mac.error.noCloudASR" = "Selected provider has no cloud ASR";
"mac.error.emptyTranscript" = "No speech recognized";
"mac.error.qwen3ModelMissing" = "Qwen3-ASR model not installed";
"mac.error.qwen3LoadFailed" = "Failed to load Qwen3 model: %@";
"mac.error.qwen3InferenceFailed" = "Qwen3 transcription failed: %@";
"mac.error.accessibilityRequired" = "Enable Accessibility for OSGKeyboard in System Settings";
"mac.foregroundApp" = "Front app: %@";
"mac.sync.settingsTitle" = "iCloud Sync";
"mac.sync.settingsSubtitle" = "Sync settings, usage stats, speech history, and API keys across your devices via iCloud.";
"mac.sync.syncNow" = "Sync Now";
"mac.sync.dictTitle" = "Personal dictionary iCloud sync";
"mac.sync.dictSubtitle" = "Keep your dictionary in sync across all devices.";
"mac.sync.error.generic" = "Could not sync with iCloud. Try again later.";
"mac.sync.error.dictTooLarge" = "Dictionary is too large to sync via iCloud.";
"settings.appLanguage.auto" = "Auto";
"settings.appLanguage.english" = "English";
"settings.appLanguage.chinese" = "Chinese";