Skip to content

feat(i18n): add native app locale inventory#97110

Merged
vincentkoc merged 28 commits into
mainfrom
codex/i18n-native-pipeline
Jul 1, 2026
Merged

feat(i18n): add native app locale inventory#97110
vincentkoc merged 28 commits into
mainfrom
codex/i18n-native-pipeline

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jun 26, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

Native Android and Apple strings were outside the Control UI translation checks, so adding a language could leave app surfaces silently untranslated.

Why This Change Was Made

Add a deterministic inventory for Android Compose/resources and Apple SwiftUI/UIKit sources across iOS, macOS, and shared OpenClawKit. The shared matrix covers 21 target locales and feeds the existing provider-backed translation process.

The extractor covers direct UI calls, named UI arguments, multiline and concatenated Swift text, conditional branches, Swift switch string properties, Kotlin when string helpers, Android resource collections, and user-visible state text. It excludes tests/generated paths, build substitutions, persistence/config identifiers, protocol payloads, and other machine literals.

User Impact

CI detects native-app i18n drift across 2,318 source entries for 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 src/scripts/ci-changed-scope.test.ts test/scripts/native-app-i18n.test.ts test/scripts/plugin-prerelease-test-plan.test.ts (40 tests)
  • node --import tsx scripts/native-app-i18n.ts check (2,318 entries)
  • git diff --check
  • Fresh autoreview: no accepted/actionable findings

This is the foundation PR for the stacked Android, Apple, and refresh branches.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Jun 26, 2026
@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed July 1, 2026, 5:57 AM ET / 09:57 UTC.

Summary
The PR adds a native Android/Apple i18n inventory generator, checked inventory artifact, package scripts, CI routing, prompt guidance, and focused tests.

PR surface: Tests +146, Config +29, Other +19461. Total +19636 across 11 files.

Reproducibility: yes. for the review finding: source inspection of the PR head artifact shows non-UI DebugHandler, NodePresenceAliveBeacon, and OpenClawMacCLI conditionals still included in apps/.i18n/native-source.json.

Review metrics: 2 noteworthy metrics.

  • Native Inventory Contract: 2,318 entries; 803 conditional-branch entries. This artifact feeds stacked native localization work, so over-collected conditionals become downstream translation inputs.
  • Native CI Automation: 1 Blacksmith job added. The new native-i18n lane spends an additional runner registration whenever its preflight scope is true.

Stored data model
Persistent data-model change detected: serialized state: scripts/native-app-i18n.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #97110
Summary: This PR is the foundation native i18n inventory branch; the related Android, Apple, and refresh PRs are stacked consumers rather than replacements.

Members:

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

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🌊 off-meta tidepool
Patch quality: 🦪 silver shellfish
Result: blocked by patch quality or review findings.

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

Rank-up moves:

  • Restrict conditional extraction so non-UI diagnostics, CLI text, and metadata are not included, then regenerate apps/.i18n/native-source.json.
  • Confirm maintainer acceptance of the separate Blacksmith native-i18n job or move the check into an existing/hosted lane.

Risk before merge

  • [P1] The generated inventory still includes non-UI diagnostics and metadata, so stacked translation refresh branches could translate or preserve machine/debug strings as native locale inputs.
  • [P1] The PR adds a separate Blacksmith-backed native-i18n CI job; maintainers should explicitly accept that runner-registration cost or move the check into an existing lane before merge.

Maintainer options:

  1. Fix The Inventory Boundary First (recommended)
    Restrict broad conditional extraction to UI/view/helper contexts or exclude diagnostics, CLI, and presence payload sources, then regenerate the checked inventory.
  2. Accept The Separate Native CI Job
    Keep the dedicated Blacksmith native-i18n lane if maintainers intentionally want native inventory drift checked independently of the build-artifacts job.
  3. Reduce Runner Registration Cost
    Move the native inventory check onto an existing job or hosted runner if maintainers want this validation without another Blacksmith registration.

Next step before merge

  • [P2] This maintainer-labeled member PR needs the author or maintainers to fix the inventory boundary and decide whether the separate Blacksmith CI job is worth the automation cost.

Security
Cleared: The diff adds repo-local scripts, a generated inventory, package scripts, and a read-only CI job with pinned actions and no new dependencies or permissions.

Review findings

  • [P2] Scope conditional extraction to native UI contexts — scripts/native-app-i18n.ts:549-556
Review details

Best possible solution:

Keep the native inventory pattern, but scope conditional extraction to UI contexts, regenerate the artifact and tests, and land only after maintainers accept the separate native-i18n CI job.

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

Yes for the review finding: source inspection of the PR head artifact shows non-UI DebugHandler, NodePresenceAliveBeacon, and OpenClawMacCLI conditionals still included in apps/.i18n/native-source.json.

Is this the best way to solve the issue?

Not yet; a repo-local generator matches the existing Control UI i18n pattern, but the extractor needs a tighter UI boundary and the separate CI job needs maintainer acceptance.

Full review comments:

  • [P2] Scope conditional extraction to native UI contexts — scripts/native-app-i18n.ts:549-556
    The generator applies CONDITIONAL_BRANCHES across every Android and Apple source file, so the checked inventory still includes non-UI diagnostics and metadata such as DebugHandler.kt line 40, NodePresenceAliveBeacon.kt line 61, and OpenClawMacCLI/DiscoverCommand.swift line 132. Those entries can become translation refresh inputs; please restrict conditional extraction to UI/view/helper contexts or exclude diagnostics, CLI, and presence payload sources before regenerating the artifact.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority maintainer tooling feature with limited runtime blast radius but concrete inventory correctness and CI automation impact.
  • merge-risk: 🚨 automation: The diff adds a new Blacksmith-backed CI job whose runner cost and routing are maintainer-visible automation behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🌊 off-meta tidepool and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Not applicable because this is a member-authored maintainer-labeled tooling/CI PR; the PR body and comments include command proof, but the external-contributor real behavior proof gate does not apply.
Evidence reviewed

PR surface:

Tests +146, Config +29, Other +19461. Total +19636 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 149 3 +146
Docs 0 0 0 0
Config 2 29 0 +29
Generated 0 0 0 0
Other 6 19463 2 +19461
Total 11 19641 5 +19636

What I checked:

  • Repository policy read: Read the full root AGENTS.md plus scoped scripts/test guides; generated-artifact alignment and CI automation-risk guidance affected the review. (AGENTS.md:1, fcb135dfc13e)
  • Current main gap: Current main only has the Control UI i18n package scripts and no native inventory artifact, so this PR is not obsolete on main. (package.json:1956, fcb135dfc13e)
  • PR implementation surface: The PR head adds native:i18n scripts and a generator that scans Android and Apple source roots and renders apps/.i18n/native-source.json. (scripts/native-app-i18n.ts:811, 0a1b553d1780)
  • Remaining inventory overcollection: The checked inventory still contains non-UI diagnostics and metadata from DebugHandler.kt and NodePresenceAliveBeacon.kt, which can flow into downstream translation refresh work. (apps/.i18n/native-source.json:277, 0a1b553d1780)
  • Root cause in extractor: CONDITIONAL_BRANCHES is applied as a broad file-level pattern for both Apple and Android sources, so conditionals inside non-UI diagnostics are admitted. (scripts/native-app-i18n.ts:549, 0a1b553d1780)
  • CI automation surface: The PR adds a dedicated native-i18n job on blacksmith-4vcpu-ubuntu-2404 gated by the new preflight output. (.github/workflows/ci.yml:814, 0a1b553d1780)

Likely related people:

  • vincentkoc: Current history shows repeated work on Control UI localization and CI workflow routing, and this PR extends both areas. (role: recent i18n and CI area contributor; confidence: high; commits: e085fa1a3ffd, ee4fe4fb1e1d, e85e6bc4fbb8; files: scripts/control-ui-i18n.ts, .github/workflows/ci.yml, scripts/ci-changed-scope.mjs)
  • steipete: CONTRIBUTING.md identifies Peter Steinberger as lead maintainer, and git history shows CI and Control UI i18n stabilization in the touched areas. (role: lead maintainer and historical CI/i18n contributor; confidence: medium; commits: f2ea42e8c290, 7dc085890e74, 0ee5baf6c502; files: scripts/control-ui-i18n.ts, .github/workflows/ci.yml, apps/ios)
  • obviyus: CONTRIBUTING.md lists Ayaan Zaidi for the Android app, and history shows repeated Android app fixes in the source tree scanned by this inventory. (role: adjacent Android app owner; confidence: medium; commits: dcf821cfb62b, 1f899f8442af, 6090afa0e5f0; files: apps/android)
  • ngutman: CONTRIBUTING.md lists Nimrod Gutman for iOS and macOS, and history shows related Apple app work in scanned source trees. (role: adjacent Apple app owner; confidence: medium; commits: 6380c872bcc2, 6f566585d84f, 28955a36e7b0; files: apps/ios, apps/macos, apps/shared/OpenClawKit)
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
@clawsweeper clawsweeper Bot added status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 🛠️ actively grinding The PR author has acted after the latest ClawSweeper review and work remains. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. labels Jun 26, 2026
@vincentkoc vincentkoc self-assigned this Jul 1, 2026
@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: 0a1b553d1780e2f132141b44a795e703aef96e18, rebased onto f3ac874fd2154fd8769c1a4e29e57f671f2ecda6.

Exact-head proof:

  • Node 24 and Node 26 native inventory checks: 2,318 entries, no drift
  • 40 focused inventory/CI-routing tests passed
  • script lint and git diff --check passed
  • deterministic cross-platform inventory ordering; current-main line mappings regenerated

@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 requested a review from a team as a code owner July 1, 2026 10:08
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost gateway Gateway runtime agents Agent runtime and tooling extensions: memory-wiki labels Jul 1, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/imessage/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of @openclaw/openclaw-secops.

  • Current SHA: 09e528ebe246d2ff444d0bf5ff1a7ed11522906f
  • Trusted actor: @vincentkoc
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack app: web-ui App: web-ui labels Jul 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added the cli CLI command changes label Jul 1, 2026
@vincentkoc vincentkoc merged commit 740cc5b into main Jul 1, 2026
108 of 109 checks passed
@vincentkoc vincentkoc deleted the codex/i18n-native-pipeline branch July 1, 2026 10:28
@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: web-ui App: web-ui channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack cli CLI command changes dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: memory-wiki 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant