Merge branch 'feature/intelligent-polish-and-personal-dict' into main

Resolved real conflicts introduced by translation-polish-2 (#3) and
docs refresh (#4) being merged to main during development:

- OSGKeyboardShared/Models/ProviderConfig.swift
  Add polishIntensity field alongside translationTargetLocaleId /
  polishScenarioId / handednessPreference. Both new fields coexist.

- OSGKeyboardShared/Services/AppGroupStore.swift
  Keep main's translation setters; add polishIntensity setter,
  detectedAppContext setter, and personalDictionary getter/setter.

- OSGKeyboardShared/Services/PolishingService.swift
  Merge v0.2.1 translate-and-polish path with v0.3.0 context-aware
  intelligent prompt. New polish() entry point accepts both modes;
  translation mode still uses TranslationPrompt, polish mode now
  uses buildPrompt(for:context:).

- OSGKeyboard/Views/SettingsView.swift
  Compose localEngineSettingsSection (main) with polishIntensitySection,
  languageAndModelsSection, systemPromptLinkSection, personalDictionaryLinkSection (feature).

- OSGKeyboardShared/{en,zh-Hans}.lproj/Shared.strings
  Concat scenario keys + polish intensity / app context / dictionary keys.

Auto-merged without conflict:
- AppGroupStore new methods (localASRBackend, etc.)
- FlowSessionManager, KeyboardViewController (auto-merged)
- MaterialIcon, HistoryView (auto-merged, my icons added on top)

Co-authored-by: Mavis <Mavis@hkgood.dev>
This commit is contained in:
Mavis
2026-07-03 07:34:17 +00:00
19 changed files with 1777 additions and 49 deletions
@@ -48,3 +48,33 @@
"polishScenario.chip.document" = "文档";
"polishScenario.chip.todo" = "TODO";
"polishScenario.chip.custom" = "自定义";
/* v0.3.0: 润色档位 */
"polish.intensity.off" = "关闭";
"polish.intensity.light" = "轻度";
"polish.intensity.medium" = "中度";
"polish.intensity.heavy" = "深度";
"polish.intensity.off.desc" = "不调用 LLM,直接插入识别原文。";
"polish.intensity.light.desc" = "仅清除孤立语气词和重复口误。";
"polish.intensity.medium.desc" = "纠正识别错误、清除语气词、润色语句。推荐默认。";
"polish.intensity.heavy.desc" = "可重组段落、拆长句、自动编号。适合会议纪要与报告。";
/* v0.3.0: 输入场景标签 */
"appContext.code" = "代码";
"appContext.email" = "邮件";
"appContext.chat" = "聊天";
"appContext.document" = "长文";
"appContext.unknown" = "通用";
/* v0.3.0: 词库类别 */
"dict.category.properNoun" = "人名地名";
"dict.category.technical" = "技术名词";
"dict.category.acronym" = "缩写";
"dict.category.productName" = "产品名";
"dict.category.custom" = "自定义";
/* v0.3.0: 词库来源 */
"dict.source.manual" = "手动添加";
"dict.source.history" = "自动学习";
"dict.source.contacts" = "来自通讯录";
"dict.source.recentEdit" = "来自最近编辑";