Skip to content

feat: add configurable translation target language - #290

Open
huangyunan822 wants to merge 9 commits into
sw33tLie:mainfrom
huangyunan822:codex/translation-target-language-pr
Open

feat: add configurable translation target language#290
huangyunan822 wants to merge 9 commits into
sw33tLie:mainfrom
huangyunan822:codex/translation-target-language-pr

Conversation

@huangyunan822

Copy link
Copy Markdown

背景

截图翻译目标语言此前无法在设置中统一配置。本 PR 默认跟随 macOS 系统首选语言,同时允许用户固定选择目标语言。

主要改动

  • 在 Capture 设置的 Translation 区域增加 Target language 与 Follow System。
  • 新增 locale 解析和偏好管理:中文简繁映射、无效语言回退英语、显式选择持久化。
  • OCR 结果窗口和截图原位翻译统一使用解析后的目标语言。
  • 补齐 40 个本地化表的新增文案。

Review 结论

验证

  • 独立语言解析测试:通过。
  • 40 个 Localizable.strings 的新增 key 与 plutil 格式校验:通过。
  • Debug 与 Release xcodebuild:通过。

已知问题

  • 暂无 AppKit popup 自动化 UI 测试;建议后续覆盖 macOS 12-14 与 15+ 的可见性和 Follow System 切换。
  • 暂无 provider 参数转交的端到端测试。

Reviewer 关注点

  • TranslationTargetLanguage 的 locale 映射和 fallback 规则。
  • SettingsWindowController 重开时对显式语言选择的刷新。

@sw33tLie

Copy link
Copy Markdown
Owner

Thanks! Will check soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants