Localize tab context menu and alert strings#1998
Localize tab context menu and alert strings#1998anthhub wants to merge 4 commits intomanaflow-ai:mainfrom
Conversation
|
@anthhub is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThe pull request localizes UI strings in the rename and move alert dialogs in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Sources/Workspace.swift (1)
9222-9224:⚠️ Potential issue | 🟠 MajorLocalize the move-failure alert strings in this same flow.
Line 9222–Line 9224 still use hardcoded UI literals, so this path remains partially unlocalized.
🌐 Suggested fix
- failure.messageText = "Move Failed" - failure.informativeText = "cmux could not move this tab to the selected destination." - failure.addButton(withTitle: "OK") + failure.messageText = String( + localized: "alert.moveTab.failed.title", + defaultValue: "Move Failed" + ) + failure.informativeText = String( + localized: "alert.moveTab.failed.message", + defaultValue: "cmux could not move this tab to the selected destination." + ) + failure.addButton(withTitle: String( + localized: "alert.moveTab.failed.ok", + defaultValue: "OK" + ))As per coding guidelines: “All user-facing strings must be localized using
String(localized: "key.name", defaultValue: "English text")for every string shown in the UI.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Sources/Workspace.swift` around lines 9222 - 9224, The alert uses hardcoded UI strings; replace them with localized forms using String(localized:defaultValue:). Update the assignments to failure.messageText and failure.informativeText to use String(localized: "move.failed.title", defaultValue: "Move Failed") and String(localized: "move.failed.message", defaultValue: "cmux could not move this tab to the selected destination."), and change failure.addButton(withTitle:) to use String(localized: "ok.button", defaultValue: "OK"); keep the same unique symbols (failure.messageText, failure.informativeText, failure.addButton(withTitle:)) so the strings are localized per guidelines.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Sources/Workspace.swift`:
- Around line 9222-9224: The alert uses hardcoded UI strings; replace them with
localized forms using String(localized:defaultValue:). Update the assignments to
failure.messageText and failure.informativeText to use String(localized:
"move.failed.title", defaultValue: "Move Failed") and String(localized:
"move.failed.message", defaultValue: "cmux could not move this tab to the
selected destination."), and change failure.addButton(withTitle:) to use
String(localized: "ok.button", defaultValue: "OK"); keep the same unique symbols
(failure.messageText, failure.informativeText, failure.addButton(withTitle:)) so
the strings are localized per guidelines.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: db95cc02-9bab-463e-9b4a-94c9605b24e7
📒 Files selected for processing (2)
Resources/Localizable.xcstringsSources/Workspace.swift
Greptile SummaryThis PR localizes previously hardcoded English strings in the tab rename and move alert dialogs in
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
actor User
participant TabBar as Tab Context Menu
participant Workspace as Workspace.swift
participant L10n as Localizable.xcstrings
User->>TabBar: Right-click tab → Rename
TabBar->>Workspace: splitTabBar(_:didRequestTabContextAction:rename)
Workspace->>L10n: String(localized: "alert.renameTab.title")
Workspace->>L10n: String(localized: "alert.renameTab.message")
Workspace->>L10n: String(localized: "alert.renameTab.placeholder")
Workspace->>L10n: String(localized: "alert.renameTab.rename")
Workspace->>L10n: String(localized: "alert.cancel")
Workspace->>User: NSAlert (localized)
User-->>Workspace: Confirm rename
User->>TabBar: Right-click tab → Move
TabBar->>Workspace: splitTabBar(_:didRequestTabContextAction:move)
Workspace->>L10n: String(localized: "alert.moveTab.title")
Workspace->>L10n: String(localized: "alert.moveTab.message")
Workspace->>L10n: String(localized: "alert.moveTab.newWorkspaceInCurrentWindow")
Workspace->>L10n: String(localized: "alert.moveTab.selectedWorkspaceInNewWindow")
Workspace->>L10n: String(localized: "alert.moveTab.move")
Workspace->>L10n: String(localized: "alert.cancel")
Workspace->>User: NSAlert with NSPopUpButton (localized)
User-->>Workspace: Confirm move destination
Reviews (1): Last reviewed commit: "Localize tab context menu and alert stri..." | Re-trigger Greptile |
|
Hi, all review feedback has been addressed and CI is passing. All 18 language localizations are covered for the tab context menu and alert strings. Could you please take a look and merge when you get a chance? Thanks! |
XCUIApplication.launch() blocks ~60s then fails on headless WarpBuild runners because foreground activation requires a GUI login session. Apply the same pre-launch strategy used for the display resolution test: - CI shell launches the app with env vars before running xcodebuild - Test detects pre-launched app via manifest, uses activate() instead of launch() to avoid killing and relaunching the app - Falls back to clicking the window for focus via accessibility framework Co-Authored-By: Claude Opus 4.6 <[email protected]>
This reverts commit a540e2f.
Replace hardcoded English strings in tab rename/move alert dialogs with String(localized:defaultValue:) calls. Add 10 new localization keys to Localizable.xcstrings with translations for all 18 supported languages. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Address CodeRabbit review: localize remaining hardcoded strings in the move-failure alert dialog (Move Failed, error message, OK button). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
146f908 to
1613eeb
Compare
Summary
Workspace.swiftLocalizable.xcstringscovering 18 languagesTest plan
🤖 Generated with Claude Code
Summary by cubic
Localized the tab rename and move dialogs and the move-failure alert in
Workspace.swift. Users now see translated titles, messages, placeholders, options, and buttons across 18 languages.alert.*keys inLocalizable.xcstrings.alert.canceland addedalert.okacross dialogs.Written for commit 1613eeb. Summary will update on new commits.
Summary by CodeRabbit