fix: 界面文案本地化收口与窗口激活策略修复(v0.8.1) - #4
Merged
Merged
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
新增 AppLocalization 与 AppLanguage.resourceIdentifier,为 SwiftUI 环境之外的 Foundation 文本(toast、NSAlert、NSMenu、AppKit 面板、画布绘制)按应用语言解析 .lproj;替换界面代码中的 NSLocalizedString / String(localized:)。 补齐 en / zh-Hans / ja / ko 四语言键,并新增 scripts/check-localization.sh 校验 键一致、占位符一致、无冲突重复键与源码引用键存在。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
激活策略降级门改为只依赖在途 present:SwiftUI 关闭 Window 后仍保留 NSWindow, register() 可能在 willClose 之后重登记,使 registeredWindowIDs 永久非空而阻塞降级。 降级时在 setActivationPolicy(.accessory) 成功后显式 deactivate(),移除 active 状态下的 Dock 图标;重算合并到单个 runloop tick 并延后执行;didBecomeKey 补齐 晋升 regular 的对称路径;观察面收敛为 willClose / didBecomeKey / didMiniaturize / didDeminiaturize。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
CHANGELOG 将 [Unreleased] 收敛为 [0.8.1] - 2026-09-15,并记录窗口激活策略修复; README 下载徽章更新为 v0.8.1;version.txt 与 project.yml 的 MARKETING_VERSION 同步为 0.8.1(修正此前 0.7.0 的漂移)。 Docs/ARCHITECTURE.md 补充「本地化」与「激活策略生命周期(accessory ↔ regular)」 两节,记录窗口降级门的约束与触发面,避免后人重复踩坑;project.yml 将 AppLanguage/AppLocalization 纳入 EditorInteractionTests 测试 target。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Renderer 的 renderNodes 调用拆行,消除 line_length(123>120);将 CaptureViewModel 的历史持久化(saveToHistory/saveToHistoryAndWait/ scheduleHistorySave)拆分为 CaptureViewModel+History.swift,使 CaptureViewModel+Capture.swift 降到 500 行以内。 这两处违规随 v0.8.0 经 tag 直接发布(release.yml 不做 lint),在开 PR 触发 ci.yml 后才暴露。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
本地化收口 + 窗口激活策略修复,并为 v0.8.1 发布补齐 lint 与版本同步。
AppLocalization与AppLanguage.resourceIdentifier,替换界面代码中的NSLocalizedString/String(localized:);补齐 en / zh-Hans / ja / ko 四语言键,新增scripts/check-localization.sh校验。present(不再被 SwiftUI 保留的NSWindow钉死);降级时显式deactivate();didBecomeKey补齐晋升 regular 的对称路径;观察面收敛为willClose/didBecomeKey/didMiniaturize/didDeminiaturize。Renderer拆行消除 line_length;历史持久化拆分为CaptureViewModel+History.swift,使CaptureViewModel+Capture.swift降到 500 行以内。这两处违规随 v0.8.0 经 tag 直接发布(release.yml 不做 lint)而在开 PR 后才暴露。[0.8.1] - 2026-09-15;version.txt与project.ymlMARKETING_VERSION 同步为 0.8.1;README 徽章更新;ARCHITECTURE 补充本地化与激活策略生命周期说明。变更类型
fixBug 修复feat新功能refactor重构perf性能优化docs文档test测试chore构建/CI/工具release发布检查清单
type(scope): descriptionCHANGELOG.md已更新(如涉及用户可见变更)./scripts/test.shswift-format lint --recursive .+swiftlint lint --strict权限影响
无权限变更。激活策略(
accessory↔regular)仅影响 Dock 图标与应用菜单,不触碰屏幕录制等 TCC 权限、entitlements、Keychain 或网络。测试证据