Skip to content

feat(apple): localize core native app surfaces#97112

Merged
vincentkoc merged 9 commits into
mainfrom
codex/i18n-apple
Jul 1, 2026
Merged

feat(apple): localize core native app surfaces#97112
vincentkoc merged 9 commits into
mainfrom
codex/i18n-apple

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jun 26, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

The Apple apps had partial catalog coverage, while the Share Extension, Activity Widget, Watch app, and packaged macOS app did not share a complete localization path.

Why This Change Was Made

Expand the iOS and macOS String Catalogs to the complete 21-locale native matrix, wire the iOS catalog into the main app and extensions, and route Share Extension actions/status/errors through localization APIs.

For macOS packaging, compile the catalog deterministically into locale-specific .lproj/Localizable.strings directories instead of relying on SwiftPM's raw catalog resource copy behavior.

User Impact

Forty-six Apple catalog keys now cover gateway setup, navigation, chat, settings, watch approvals, activity status, share actions, and macOS controls in Simplified Chinese, Traditional Chinese, Brazilian Portuguese, German, Spanish, Japanese, Korean, French, Hindi, Arabic, Italian, Turkish, Ukrainian, Indonesian, Polish, Thai, Vietnamese, Dutch, Persian, Russian, and Swedish.

Evidence

  • node scripts/run-vitest.mjs test/scripts/apple-app-i18n.test.ts test/scripts/native-app-i18n.test.ts test/scripts/package-mac-app.test.ts (17 tests)
  • node --import tsx scripts/apple-app-i18n.ts check (46 keys, 21 locales)
  • node --import tsx scripts/native-app-i18n.ts check (2,317 entries)
  • swift package dump-package --package-path apps/macos
  • bash -n scripts/package-mac-app.sh
  • git diff --check
  • Fresh autoreview: no accepted/actionable findings

A direct swift build reached the existing preview macro dependency failure in shared OpenClawChatUI after proving SwiftPM copied the raw catalog rather than compiled localization directories. This PR is stacked on #97110.

@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios app: macos App: macos scripts Repository scripts size: M maintainer Maintainer-authored PR labels Jun 26, 2026
@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 1, 2026, 7:16 AM ET / 11:16 UTC.

Summary
The PR adds Apple iOS/macOS string catalogs, wires iOS catalog resources into the app, extensions, widget, and watch targets, localizes selected Share Extension and SwiftUI surfaces, adds an Apple i18n checker/CI script, and compiles macOS localizations into packaged app bundles.

PR surface: Source +117, Tests +596, Docs +14, Config +4, Other +6537. Total +7268 across 46 files.

Reproducibility: not applicable. this is a native app localization feature PR, not a bug report with a current-main failure path. Source inspection, PR proof, and live status checks are the relevant review evidence.

Review metrics: 1 noteworthy metric.

  • Apple automation/package gates: 1 workflow step added, 1 package script added, 1 package-time compiler call added. The PR changes maintainer validation and packaged macOS app output, so exact-head automation proof matters before merge.

Stored data model
Persistent data-model change detected: serialized state: scripts/apple-app-i18n.ts, serialized state: src/commands/sessions-table.ts, serialized state: src/commands/sessions.test.ts, serialized state: test/scripts/apple-app-i18n.test.ts, unknown-data-model-change: src/commands/sessions.test.ts, vector/embedding metadata: src/commands/sessions.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #97112
Summary: This PR is the canonical Apple localization slice in a broader native-i18n stack; related PRs are foundation, Android sibling, or translation-refresh follow-up work rather than replacements.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Re-check native-i18n, ios-build, macos-swift, and package validation if this branch is restacked again.

Mantis proof suggestion
A short visual proof of a packaged native Apple app under a non-English locale would add useful confidence for the visible localization behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: launch the packaged macOS app under Swedish locale and verify Logout/Refresh/Save/Run now labels render from bundled localizations.

Risk before merge

  • [P1] The PR adds a CI native-i18n check and a package-time macOS localization compiler, so maintainers should keep exact-head CI and package proof visible before merge.
  • [P1] The branch base is behind current main, although GitHub reports MERGEABLE/CLEAN; maintainer review should use the actual merge result rather than stale comparison-only file drops.

Maintainer options:

  1. Land With Exact-Head Automation Proof (recommended)
    Accept the automation risk after maintainers verify the current head keeps native-i18n, iOS build, macOS Swift/package, and CI checks green against the merge target.
  2. Restack If Main Moves Under Native Apps
    If the branch is restacked again or native app tooling changes on main, refresh this PR and rerun the Apple i18n/package checks before merge.

Next step before merge

  • [P2] Protected maintainer label and MEMBER-authored feature work should stay in maintainer review; there is no narrow autonomous repair blocker.

Security
Cleared: No concrete security or supply-chain concern was found in the workflow, script, package, and native resource changes.

Review details

Best possible solution:

Keep this Apple localization slice open for maintainer review, then land it once the exact merge head keeps native-i18n, iOS build, macOS Swift/package, and full CI status green.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is a native app localization feature PR, not a bug report with a current-main failure path. Source inspection, PR proof, and live status checks are the relevant review evidence.

Is this the best way to solve the issue?

Yes; this is a maintainable slice because it keeps Apple localization in native resources and a dedicated checker, while macOS packaging compiles deterministic .lproj output instead of adding runtime localization policy to core.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 324193652651.

Label changes

Label justifications:

  • P2: This is a normal-priority native app localization improvement with limited blast radius and green focused validation.
  • merge-risk: 🚨 automation: The diff adds an Apple native-i18n CI step and invokes a repo-local localization compiler during macOS app packaging.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate is not applicable because this is a MEMBER-authored maintainer PR; the body/comments still provide terminal validation and live CI is green.
Evidence reviewed

PR surface:

Source +117, Tests +596, Docs +14, Config +4, Other +6537. Total +7268 across 46 files.

View PR surface stats
Area Files Added Removed Net
Source 12 121 4 +117
Tests 15 615 19 +596
Docs 2 33 19 +14
Config 2 4 0 +4
Generated 0 0 0 0
Other 15 6569 32 +6537
Total 46 7342 74 +7268

What I checked:

  • Repository policy read: Root AGENTS.md and the relevant scoped docs, scripts, agents, outbound, SDK, and test guides were read; the protected maintainer-label rule and automation/config review guidance apply to this PR. (AGENTS.md:1, 324193652651)
  • Protected maintainer signal: Live GitHub metadata shows author vincentkoc has MEMBER association and the PR has the maintainer label, so this cleanup workflow must keep it open for maintainer handling. (78fbcd34f867)
  • Current main lacks the Apple check surface: Current main has native and Android i18n scripts but no apple:i18n:check package script, so the central Apple catalog check is not already implemented on main. (package.json:1959, 324193652651)
  • Apple checker implementation: The PR head defines Apple catalog coverage, wrapper-contract checks, locale completeness, placeholder drift checks, and deterministic macOS .lproj compilation. (scripts/apple-app-i18n.ts:112, 78fbcd34f867)
  • iOS resource wiring: The PR adds the shared Localizable.xcstrings resource to the main iOS app, Share Extension, Activity Widget, and Watch app targets. (apps/ios/project.yml:63, 78fbcd34f867)
  • macOS packaging path: The PR excludes the raw macOS catalog from SwiftPM resources and compiles .lproj Localizable.strings output into Contents/Resources during packaging. (scripts/package-mac-app.sh:288, 78fbcd34f867)

Likely related people:

  • vincentkoc: GitHub and local history show Vincent Koc on the native i18n inventory work and multiple recent macOS packaging commits, and this PR is the Apple slice of that stack. (role: current stack owner and recent macOS/i18n contributor; confidence: high; commits: da6ee4f0dd85, cd7e3df1eac9, 088cab5ee4e6; files: scripts/native-app-i18n.ts, scripts/package-mac-app.sh, apps/macos/Package.swift)
  • joshavant: Recent live path history for the Share Extension and iOS project file shows multiple iOS configuration, signing, and Share Extension changes by joshavant near the touched targets. (role: recent iOS app contributor; confidence: high; commits: f13dc76ba181, c932bf377b54, e77994ed5adf; files: apps/ios/ShareExtension/ShareViewController.swift, apps/ios/project.yml)
  • steipete: Recent Apple app history includes iOS build hygiene, watch migration, and packaging-related work by Peter Steinberger near the changed native app surfaces. (role: adjacent Apple app contributor; confidence: medium; commits: 482c74b72497, b294f7c46763, 8d9eba3f4f0f; files: apps/ios/ShareExtension/ShareViewController.swift, apps/ios/project.yml, scripts/package-mac-app.sh)
  • RomneyDa: Recent workflow history shows Dallin Romney maintaining CI and macOS Swift build logging, relevant because this PR adds a native-i18n CI step. (role: recent CI contributor; confidence: medium; commits: 69af58ba2613, f7cca686f78d, 15de9d881a84; files: .github/workflows/ci.yml, scripts/package-mac-app.sh)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jun 26, 2026
@vincentkoc vincentkoc force-pushed the codex/i18n-native-pipeline branch 2 times, most recently from ab24f11 to 1545198 Compare June 26, 2026 23:55
@vincentkoc vincentkoc changed the title feat(apple): add Russian and Hindi app catalogs feat(apple): localize native app surfaces Jun 26, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 27, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 27, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 27, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Rebased onto the corrected native i18n foundation and refreshed Apple proof.

Validation:

  • node scripts/run-vitest.mjs test/scripts/apple-app-i18n.test.ts test/scripts/native-app-i18n.test.ts test/scripts/package-mac-app.test.ts — 17 tests passed
  • node --import tsx scripts/apple-app-i18n.ts check — 46 keys across 21 locales
  • node --import tsx scripts/native-app-i18n.ts check — 2,317 entries, no drift
  • swift package dump-package --package-path apps/macos
  • bash -n scripts/package-mac-app.sh
  • git diff --check
  • fresh autoreview — no accepted/actionable findings

Static watchOS/quick-setup labels now preserve LocalizedStringKey through wrappers, and the checker enforces those wrapper contracts. The macOS packager compiles deterministic .lproj/Localizable.strings output.

The stack-wide changed gate is blocked only by the same four test type errors reproduced on clean current main; the Apple i18n checks are green.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@vincentkoc vincentkoc force-pushed the codex/i18n-native-pipeline branch from e1c8f00 to 0a1b553 Compare July 1, 2026 09:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Final restack head: b982ed2397329bfabcd4dc2a49b307d6da81e908, based on the current foundation head.

Exact-head proof:

  • Apple checker: 46 keys across 21 locales
  • 17 focused tests passed
  • native inventory: 2,317 entries, no drift
  • swift package dump-package, macOS packaging shell validation, and git diff --check passed

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 1, 2026
@vincentkoc vincentkoc changed the base branch from codex/i18n-native-pipeline to main July 1, 2026 10:07
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling labels Jul 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via rebase.

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

Labels

agents Agent runtime and tooling app: ios App: ios app: macos App: macos cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant