Repository navigation
feat(localization): add Urdu localization - #1374
Conversation
context: Urdu is already available as a translation language but is missing from the Easydict interface. change: Translate 566 interface and four metadata entries, register ur, follow the interface language in SwiftUI layout, and use natural query paragraph alignment. Add focused localization regression coverage. impact: Preserve existing locales and provider capabilities. Catalog audits and isolated language checks pass; full builds, hosted tests, app screenshots, copy behavior, and independent fluent Urdu review remain pending. Direction changes use Apple's semantic layout and natural paragraph alignment APIs. References: - Apple LayoutDirection: https://developer.apple.com/documentation/swiftui/layoutdirection - Apple paragraph alignment: https://developer.apple.com/documentation/appkit/nsmutableparagraphstyle/alignment
context: The Urdu localization has been submitted as upstream draft PR tisfeng#1374 with full Xcode and app-level validation still pending. change: Archive the completed execution plan and record the verified fork, PR, initial CI state, validation limitations, and remaining manual checks. impact: Keep the contribution history reproducible without changing application code or claiming pending checks passed. References: - Easydict PR tisfeng#1374: tisfeng#1374
context: PR tisfeng#1374 conflicts with dev because its Urdu catalog still includes the retired GitHub Models entry. change: Remove github_models to match upstream while preserving every remaining locale value. impact: Catalog audits and the isolated language check pass. Full Xcode builds, hosted tests, app runtime checks, screenshots, and independent Urdu review remain unavailable. References: - Easydict PR tisfeng#1374: tisfeng#1374
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
法典审查摘要此评论显示了针对此拉取请求的最新法典审查活动。
ℹ️ 关于 GitHub 中的 Codex您的团队已设置 Codex 来审查此存储库中的拉取请求。 当您
当任何审查正在进行时,Codex 会以 👀 做出反应,如果有建议则进行评论,并在所有审查结束且没有发现结果时以 👍 做出反应。 </详情> |
context: PR tisfeng#1374 is ready for review after the catalog conflict fix was pushed. change: Update the existing history and archive the continued plan with verified PR status, validation evidence, and CI observations. impact: Preserve the original contribution record and explicitly retain unavailable Xcode, runtime, screenshot, and independent Urdu review checks. References: - Easydict PR tisfeng#1374: tisfeng#1374
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d1d9f9911
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
context: Automated review of PR tisfeng#1374 found that the standalone branch still references github_models and that RTL overrides cover only settings and menus. change: Restore the original legacy catalog entry without an Urdu edit and record the actual window-layout scope in the task history and plan. impact: Preserve standalone service labels and a clean dev merge. Full AppKit and hosted-window RTL mirroring remains an explicit limitation requiring implementation and runtime verification. References: - Easydict PR tisfeng#1374: tisfeng#1374 - Legacy catalog review: tisfeng#1374 (comment) - RTL scope review: tisfeng#1374 (comment)
背景:PR tisfeng#1374 的 Urdu 资源与 dev 删除温度设置的改动冲突。 变更:合入最新 dev,删除退役文案,同步可选 Cookie 标签并补齐测试桥接配置。 影响:LocalizationTests 的 5 个测试通过;保留已知 RTL 范围限制,未 push。 ---------------------------------------------------------------------- fix(localization): resolve Urdu branch conflicts with dev context: Urdu resources in PR tisfeng#1374 conflict with temperature removal on dev. change: Merge latest dev, remove retired text, update the optional Cookie label and fix test bridging. impact: All 5 LocalizationTests pass; retain the known RTL scope limitation without pushing. References: - Easydict PR tisfeng#1374: tisfeng#1374
context: Review of PR tisfeng#1374 found that selecting Urdu left AppKit query windows and other hosted roots using the system layout direction. change: Share reactive locale and direction handling across hosting roots and mirror native query controls, toolbars, title bars, and menus. Preserve independent result-content direction and screenshot/OCR coordinates. impact: The shared localization module type-checks for macOS 13, and syntax, project, scope, and whitespace checks pass. Full application builds, hosted tests, GUI checks, screenshots, and independent Urdu review remain unavailable for this update. References: - Easydict PR tisfeng#1374: tisfeng#1374 - RTL propagation review: tisfeng#1374 (comment) - Apple Auto Layout Guide: https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithSimpleConstraints.html
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ea15d8de6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
context: Review of PR tisfeng#1374 found that Urdu popups used the trigger's right edge as the menu's upper-left origin. change: Update RTL menu sizing and subtract the menu width from the trigger's right edge in the shared popup helper. impact: Language, model, and quick-action menus use a right-aligned origin. Focused type-checking passes; full builds, hosted tests, and visual checks remain unavailable. References: - Popup alignment review: tisfeng#1374 (comment) - Apple popup positioning: https://developer.apple.com/documentation/appkit/nsmenu/popup(positioning:at:in:) - Apple menu size: https://developer.apple.com/documentation/appkit/nsmenu/size
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e88f2efe1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
context: PR tisfeng#1374's CodeQL build failed because Swift could not infer the stored hosting controller type after applying the interface language modifier. change: Declare the controller as NSViewController while retaining its hosting implementation and localization modifier. impact: The original error is reproduced and corrected in focused compilation of the actual Apple Translation and localization sources. Module and header emission pass; full build and runtime verification remain pending. References: - Failed CodeQL build: https://github.com/tisfeng/Easydict/actions/runs/40199943735
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdbbc6c9c4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
context: Review of PR tisfeng#1374 found that collapsed result arrows retained their left-pointing image after the button moved to the left in Urdu. change: Mirror the tinted collapsed glyph for RTL and refresh it when the result view's layout direction changes. Retain the expanded arrow and shared assets. impact: Existing rows update their arrow on language changes and preserve appearance refreshes. The extracted drawing expression compiles against AppKit; full builds, hosted tests, and runtime checks remain unavailable locally. References: - Collapsed arrow review: tisfeng#1374 (comment) - Apple dynamic image drawing: https://developer.apple.com/documentation/appkit/nsimage/init(size:flipped:drawinghandler:) - Apple affine scaling: https://developer.apple.com/documentation/foundation/nsaffinetransform/scalex(by:yby:)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b2f772291
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
背景:PR tisfeng#1374 的全界面 RTL 处理改变了既有布局,用户要求仅适配翻译结果。 变更:撤回窗口和设置的方向注入,在 EZWordResultView 的专用文本控件中逐段适配方向,代码块保持 LTR。 影响:保留 Urdu 文案及原操作布局;Debug 构建和现有 28 项测试通过,未进行 GUI 验证。 ---------------------------------------------------------------------- fix(result): restore UI layout and scope text direction to results context: Full-interface RTL handling in PR tisfeng#1374 changed the existing layout; the user requested direction support only for translation results. change: Remove window and settings direction overrides and adapt paragraphs in a dedicated EZWordResultView text control, keeping code blocks LTR. impact: Preserve Urdu strings and the original control layout; the Debug build and 28 existing tests pass, with GUI validation pending. References: - PR tisfeng#1374: tisfeng#1374
背景:用户实测发现上一版自然对齐仍使 Urdu 正文靠左,未达到 PR tisfeng#1374 的结果排版目标。 变更:依据 AppKit 对齐契约,按每段首个强方向字符明确设置方向及左右对齐,代码块保持 LTR。 影响:仅改变结果正文排版,保留其他 UI;Debug 构建和现有 28 项测试通过,GUI 尚未验证。 ---------------------------------------------------------------------- fix(result): explicitly align translation paragraphs by content direction context: User screenshots show that natural alignment still left-aligns Urdu, missing the result layout goal for PR tisfeng#1374. change: Follow the AppKit alignment contract and explicitly set direction and alignment from each paragraph's first strong character, keeping code blocks LTR. impact: Change only result text layout and preserve other UI; the Debug build and 28 existing tests pass, with GUI validation pending. References: - PR tisfeng#1374: tisfeng#1374 - AppKit alignment: https://developer.apple.com/documentation/appkit/nstextalignment/natural
背景:语言修饰器的格式与项目规范不一致。 变更:补充 MARK 分区,并统一闭包返回类型的写法。 影响:仅调整代码格式,不改变运行行为。 ---------------------------------------------------------------------- style(localization): format the interface language modifier context: The language modifier formatting differs from project conventions. change: Add MARK sections and normalize closure return type syntax. impact: Adjust formatting without changing runtime behavior.
|
This change has been released in Easydict 2.26.0 beta. Please update to the latest version. To receive beta updates, open Easydict Settings → General and enable “Include Beta versions”. |
此更改已在 Easydict 2.26.0 beta 中发布。 请更新至最新版本。 要接收测试版更新,请打开 Easydict 设置 → 常规并启用“包括测试版”。 |
背景 / Context
Add an Urdu interface to Easydict through Settings → General → Language →
اردو. Ready for review. The selected language now propagates to AppKit query windows and all SwiftUI hosting roots, including windows that are already open. Full application and visual verification of the new RTL implementation remains outstanding.变更内容 / Changes
%lldentry remains excluded.urin the language selector and Xcode regions. Retain the upstreamdevintegration already present at5708742; the retired GitHub Models service/key and temperature text are absent, and the Bing Cookie label reflects its optional status.关联 Issue / Linked Issues
Review feedback: RTL propagation and obsolete GitHub Models key concern.
验证 / Verification
Collapsed-result arrow follow-up (
4b2f7722912f3f2744dace8bfbb98ecf4e4652f6):Earlier Apple Translation compiler follow-up (
bdbbc6c9c4d975a59a5c0ee9bd0a14c28cc1cacc):1e88f2ef: Swift could not infer the lazyNSHostingController<some View>property inAppleTranslation.swift:130. The failure was reproduced locally using the actual Apple Translation files and localization sources; the earlier focused check had not included this integration.NSViewController, retaining the same hosting object,.interfaceLanguage()modifier, lazy lifetime, and attached/standalone window paths. No workflow or translation-service logic changes.Earlier popup alignment follow-up (
1e88f2efe12456b6eb5db5e9b5f4b5aa37c386b9):arm64-apple-macosx13.0, whitespace checks, and review of the correction and all five callers. No tests were added or expanded.Earlier full-window RTL update (
7ea15d8de6726a4e3e13b358946d82d66291d6b3):arm64-apple-macosx13.0with real application headers. This is a focused compilation check, not a full app build.plutil -lint, project-object scope checks, documentation-link checks, andgit diff --check.Earlier validation:
5708742reports five LocalizationTests passing under Xcode 27.2, including the regional-locale and mixed-text inputs. Those results precede this RTL update and are not claimed for the new head.Unavailable/unverified for this update:
Remaining manual verification:
Easydict.xcworkspacewith the Easydict scheme and runxcodebuild test -workspace Easydict.xcworkspace -scheme Easydict -derivedDataPath <agent-dd> -only-testing:EasydictTests/LocalizationTests.Review threads remain open for reviewer follow-up. The GitHub Models concern no longer applies to the integrated branch. The RTL propagation, popup-origin, and collapsed-arrow concerns have implementation fixes; runtime confirmation remains pending. No thread reply or resolution is claimed.
截图 / Screenshots
No screenshots of the changed application are available.