Skip to content

feat(mobile): localize app interface - #11446

Closed
brennanb2025 wants to merge 60 commits into
mainfrom
brennanb2025/mobile-i18n-audit
Closed

brennanb2025 wants to merge 60 commits into
mainfrom
brennanb2025/mobile-i18n-audit

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • initialize mobile i18n from the device or per-app locale and ship English, Spanish, Japanese, Korean, and Simplified Chinese catalogs
  • localize mobile UI copy plus native app metadata and permission prompts, with unsupported and Traditional Chinese locales falling back to English
  • enforce sparse target catalogs with runtime English fallback, remove obsolete whole-catalog/hash-ID bootstrap tooling, and document runtime JSON as a temporary bridge to the shared PO contract
  • strengthen mobile coverage for rendered variables and fixed English translators, correct Git checkout/pull terminology, and retain independent terminal RPC timeouts
  • wire repeatable mobile string coverage, catalog, interpolation, and workflow-parity checks into repository lint and PR CI

Relationship to the shared PO localization contract

This PR is intentionally aligned with the canonical gettext PO architecture documented in #11478, rather than establishing a second mobile-specific translation pipeline:

  • Mobile keeps its own catalog tree, but follows the same stable-ID, sparse-target, and English-fallback contract as desktop. Mobile strings are not folded into the desktop catalogs.
  • An overlap audit found 706 English source strings shared by desktop and mobile. Reviewed values can be reused when the English source, placeholders, and context match, but context-sensitive target differences make blind catalog sharing unsafe. Canonical deduplication therefore belongs in shared PO reconciliation/translation memory and compiler ownership—not desktop runtime JSON imports into mobile.
  • Missing target entries are valid and fall back to current English at runtime. Verification still rejects extra keys and placeholder mismatches for every translation that is present, so sparse catalogs do not weaken correctness checks.
  • The whole-catalog bootstrap/parity-filling workflow was removed. Feature work changes English only; translation reconciliation belongs to post-merge localization automation.
  • The checked-in mobile JSON plus Expo/native metadata projections are a bridge, not a new canonical format. The PO rollout should compile mobile-owned PO files into both the JavaScript runtime bundle and the native projections from one canonical bilingual source.
  • The one-time bridge migration removed all 2,175 opaque m.* IDs: 2,149 referenced entries now use intent-named IDs, five genuine duplicates were consolidated, 26 orphan keys were removed, and 288 positional placeholders were renamed semantically. Verification now owns orphan, copied-English, terminology, protected-literal, binding, and placeholder checks without reviving generated-catalog ownership.

Validation

  • exact pushed head 9629bc55851f2478af827380216e40bc10632cca, tree 2c298a3152a0ecd20ca0f26bd1dc673be36c90a7 (fresh same-model/same-reasoning exact-head review: CLEAN)
  • pnpm exec oxlint
  • pnpm run audit:code-quality:native
  • pnpm run audit:code-quality:type-aware
  • pnpm run typecheck
  • pnpm run check:reliability-gates
  • pnpm run check:max-lines-ratchet
  • pnpm run check:code-quality:changed -- b04c695750e9859e0d8bf79f503279bc4d656925 (0 findings across 312 changed files, including type-aware and React Doctor checks)
  • touched-file root format check passed; a whole-repository format sweep reports 14 unrelated pre-existing current-main files, which this PR leaves unchanged
  • final merged head with Node 26 direct mobile binaries: typecheck, lint, and full-tree format check passed without rewriting mobile/pnpm-lock.yaml
  • final merged head mobile Vitest: 3,415 passed, 3 skipped across 434 files
  • focused native-chat integration tests after the latest-main repair: 57 passed across 3 files
  • focused localization regression tests: 93 passed across 9 root test files
  • non-vacuous review regression proof: direct JSX wrappers, object-rebinding snapshots, later closure writes, and ambiguous member writes each failed under a targeted reversion; the old ambiguous self-assignment behavior admitted Raw ambiguous write, and removing the companion member-cycle guard reproduced the exact stack overflow before production was restored
  • preserved 1cedf2d7aa same-model review result: not clean with seven findings; snapshot-site resolution, allocation identity, loop back-edges, logical/member rendered writes, destructuring patterns/defaults, selector constants, and namespace spreads were fixed, and one grouped control reversion made exactly 7/7 new regression tests fail before production was restored
  • pnpm run verify:localization-catalog (11,003 references)
  • pnpm run verify:localization-extraction (9,768 keys)
  • pnpm run verify:mobile-localization-catalog (2,700 calls and 2,242 catalog keys across 5 locales)
  • pnpm run verify:localization-coverage
  • git merge-tree --write-tree 9629bc55851f2478af827380216e40bc10632cca 79896cb9a609a7371ccdb6bdccd76853034da38f (clean; tree 2c298a3152a0ecd20ca0f26bd1dc673be36c90a7 equals the exact head tree)
  • full root suite on the prior repaired head before these analyzer-only review fixes: 42,847 passed and 80 skipped; seven unrelated local-environment/current-main failures remained in the macOS Bash 3.2 root-entry fixture, inherited Git-config expectations, and deleted-cwd PTY timeout cases
  • cd mobile && expo config --type public --json

Simulator validation

Earlier exact-head A/B: PASS on PR 8647 QA iPhone (8BF243A1-DBBF-40F8-A8D3-7A64FF90C2DF) with the device locale held in Spanish. The installed app, simulator data, and device settings were unchanged; only the Metro bundle moved between the exact comparison commits.

  • Parent / merge-base 8c5371ebadc95eb47a86ff7289a7fa06e3cdb9ee: the mobile home screen remained in English.
  • Compared head 66bbf07d0a10d5b6a5e419e8e9d504d6c1a2d595: the home screen rendered in Spanish, and the longer Nuevo espacio de trabajo label wrapped cleanly inside its card.

Before — Spanish device locale still renders the English UI

After — Spanish localized UI at the compared head

Fresh multilingual screenshots

A fresh native build with ExpoLocalization was exercised on committed localization head d88a577ac9a9e153a9ff19fa30413b536c264ab3 in Spanish and Japanese. Accessibility inspection confirmed translated interface text and Spanish quick-action wrapping. These screenshots are stale by Git SHA relative to final pushed head 9629bc55851f2478af827380216e40bc10632cca; the later commits merged current main and split a type-only native-chat controller contract, while the mobile home UI and locale catalogs remained byte-for-byte unchanged.

Spanish — localized home UI and wrapped quick action

Japanese — localized home UI

What the user sees before and after

Before: Mobile users whose device is set to a supported non-English language still see English interface text, and longer translated quick actions can clip inside their cards.

After: The mobile interface follows the supported device language, and longer localized quick-action labels wrap cleanly inside their cards.

@greptile-apps

greptile-apps Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Too many files changed for review (344 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces a mobile i18n system built on i18next, adding locale catalogs for English, Spanish, Japanese, Korean, and Simplified Chinese under mobile/src/i18n/locales, plus iOS/Android app metadata locales. It adds tooling scripts (audit, bootstrap-translate, localize, and verify) to detect unlocalized strings, classify mobile-specific localization candidates, generate translated catalogs, and validate translation-call/catalog consistency, wired into lint and CI. Nearly all mobile app screens, shared components, and feature modules (session, terminal, transport, source control, tasks, storage) are converted from hardcoded English strings to t() translation-key lookups, including accessibility labels, error messages, and pluralized/interpolated text. Supporting changes include Expo locale configuration, new dependencies, vitest config updates, a locale-reload hook, a refactored session refresh-timer utility, and expanded test coverage for i18n behavior across several modules.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.49% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers the summary, screenshots, and extensive validation, but it omits required AI Review Report, Security Audit, and Notes sections. Add explicit AI Review Report, Security Audit, and Notes sections; document macOS, Linux, and Windows compatibility checks and security review findings.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: localizing the mobile app interface.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
mobile/src/tasks/mobile-work-items.ts (1)

7-22: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not use localized UI text as the SSH-remote error sentinel.

isGitHubWorkItemsSshRemoteRequiredError drives the GitHub-remote setup path, but t('m.oBMMuM8') will not match the canonical English error from the upstream provider on non-English locales. Match a stable error code/type instead; otherwise keep the canonical detection string and localize only when displaying it.

mobile/app/h/[hostId]/session/[worktreeId].tsx (1)

3921-3925: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

errorToast is still hardcoded English.

label is localized on line 3921, but the surrounding toast template isn't, so non-English users see Couldn't run <label>. Route it through a key with the label as a parameter.

🌐 Proposed fix
     const label = command.label.trim() || t('m.sgQvHe0')
     void handleCreateTerminal(launch.agent, {
       ...launch.options,
-      errorToast: `Couldn't run ${label}`
+      errorToast: t('<quick_command_run_failed_key>', { value0: label })
     })
🟡 Minor comments (21)
config/scripts/localize-mobile-strings.mjs-13-17 (1)

13-17: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Truncated hash keys can collide silently and overwrite catalog copy.

The key is only 40 bits of SHA-1, and setCatalogValue blindly overwrites, so a collision between two distinct strings silently assigns one file's copy to the other's call site — invisible to verify-mobile-localization-catalog.mjs, which only checks key presence and placeholder parity. Add a collision guard when writing:

🛡️ Proposed guard
   for (const { candidate, translation } of replacements) {
     const key = keyForCandidate(candidate, translation.fallback)
+    const existing = key.split('.').reduce((node, part) => node?.[part], catalog)
+    if (typeof existing === 'string' && existing !== translation.fallback) {
+      throw new Error(`Key collision for ${key}: "${existing}" vs "${translation.fallback}"`)
+    }
     setCatalogValue(catalog, key, translation.fallback)

Also applies to: 265-274

config/scripts/mobile-localization-candidate-rules.mjs-473-493 (1)

473-493: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Negative operator allowlist conflates assignment with comparison in both binary-ancestor checks. Both helpers reject any BinaryExpression whose operator isn't +, &&, ||, or ??; since TypeScript represents =, +=, and , as binary expressions, assignment right-hand sides are silently excluded from mobile localization candidates. Extract one shared predicate that matches only comparison/equality/bitwise/logical-assignment operators you actually want to exclude.

  • config/scripts/mobile-localization-candidate-rules.mjs#L473-L493: in isComparisonOperand, test the operator against an explicit comparison-token set instead of negating the display-operator list.
  • config/scripts/mobile-localization-candidate-rules.mjs#L451-L471: in hasDisqualifyingBinaryAncestor, reuse that same predicate so assignment ancestors no longer disqualify candidates.
mobile/src/i18n/mobile-i18n.ts-28-30 (1)

28-30: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Select the first supported preferred locale, not only the first device locale.

getLocales() returns the user’s preferred locales in preference order, but normalizeMobileUiLocale() still maps unsupported tags such as fr-FR to en, so a supported later locale like es-ES is skipped. Iterate through the locale list and select the first supported tag; only fall back to the default when none match.

Source: MCP tools

mobile/src/i18n/locales/en.json-541-541 (1)

541-541: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace HTML entities with literal characters.

React Native will render &apos; and &amp; verbatim in these strings. Use ' and & directly.

Also applies to: 887-888, 894-894

mobile/src/source-control/MobileSourceControlPrChip.tsx-115-124 (1)

115-124: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize and pluralize the unresolved-comments suffix.

Line 117 constructs an English fragment and always uses “comments,” so accessibility labels become partially untranslated and read “1 unresolved comments.” Let a translation key own the wording and singular/plural choice, passing the count as an interpolation value.

mobile/src/transport/host-endpoint.ts-183-187 (1)

183-187: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize validateHostname errors too.

When validateHostname returns an error, Lines 189-191 and 272-274 pass through its hardcoded English strings from Lines 298-327. Localize the shared validator, or translate structured error codes at both boundaries, so invalid-hostname failures respect the selected locale.

mobile/src/transport/mobile-relay-rpc-streams.ts-66-67 (1)

66-67: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the send-failure fallback as well.

The new catch fallback uses t(), but the adjacent sendFrame failure still passes hardcoded 'Connection interrupted' at Line 62. Use the same translation key there so both connection-failure paths follow the active locale.

mobile/src/worktree/workspace-list-sections.ts-138-141 (1)

138-141: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the localized fallback out of the grouping key.

byRepo uses the translated fallback as an identity key, so a real repository with the same localized name can be merged with worktrees whose repository is missing. Use a stable sentinel for the map key and translate only the section title.

mobile/src/session/mobile-session-route-helpers.ts-3-11 (1)

3-11: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Resolve module-level translation keys at the call sites.

t() returns the current translation instantly on module load here, so these constants record the initial locale instead of updating when the language changes.

  • mobile/src/session/mobile-session-route-helpers.ts#L5-L12: resolve labels when constructing status display values.
  • mobile/src/session/mobile-tab-close-selection.ts#L5-L8: resolve labels when constructing the bulk-close action sheet.
mobile/app/h/[hostId]/session/[worktreeId].tsx-5326-5333 (1)

5326-5333: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Rename modal default value keeps the literal 'Terminal'.

Every other fallback for a terminal title in this file uses t('m.1ELofI0') (lines 4451, 5136, 5206), so this one prefills the rename field with English while the modal title and placeholder are localized.

🌐 Proposed fix
-        defaultValue={renameTarget?.title || 'Terminal'}
+        defaultValue={renameTarget?.title || t('m.1ELofI0')}
mobile/app/h/[hostId]/index.tsx-871-873 (1)

871-873: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Untranslated English leaks into this accessibility label.

The interpolated fragment , ${activeFilterCount} active stays English regardless of locale, so the label reads e.g. Filtros, 2 active for Spanish users. Move the whole active-count phrase into a translation key that takes the count as a parameter.

🌐 Suggested shape
-                accessibilityLabel={t('m.kz_Kdkw', {
-                  value0: activeFilterCount > 0 ? `, ${activeFilterCount} active` : ''
-                })}
+                accessibilityLabel={
+                  activeFilterCount > 0
+                    ? t('<filters_with_active_count_key>', { value0: activeFilterCount })
+                    : t('<filters_key>')
+                }
mobile/app/mobile-onboarding.tsx-149-153 (1)

149-153: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the progress value too.

The progressbar still exposes hardcoded English on Line 154 (Step … of …) to screen readers. Put that value in a catalog key with current/total interpolation.

mobile/src/components/pr-sidebar/markdown-blocks.ts-71-71 (1)

71-71: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize empty <summary> fallbacks too.

Line 71 only handles a missing tag; whitespace-only summaries still fall through to the hardcoded English fallback at Line 73. Normalize the extracted summary with || t('m.B0fOGkI').

mobile/src/components/use-codex-reset-credit-action.ts-15-21 (1)

15-21: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the missing-account identity.

Line 17 passes English text into otherwise translated scope copy when the account is absent. Replace it with a translated fallback before interpolating it.

mobile/src/components/MobileDiffReviewHeader.tsx-108-111 (1)

108-111: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate every filter value.

Only all uses t(...); values such as reviewed and unreviewed remain English in both visible and accessibility text. Map each MobileDiffReviewQueueFilter value to a localized label before rendering.

mobile/src/components/codex-reset-credit.ts-82-82 (1)

82-82: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not interpolate English plural nouns.

value1 is always "reset" or "resets", so non-English catalogs that include it still render an English noun. Select localized singular/plural catalog entries based on count and interpolate only the number.

mobile/src/components/pr-sidebar/PRCommentCard.tsx-143-143 (1)

143-143: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the external-link label provider-neutral.

This generic comment card uses a translation described as “Open comment on GitHub,” but it also supports non-GitHub hosts. GitLab comments would therefore be announced as GitHub. Use neutral wording such as “Open comment in browser,” or select the label from explicit provider state.

As per coding guidelines, source-control and review changes must support GitLab and other supported providers and avoid GitHub-only names for generic review concepts.

Source: Coding guidelines

mobile/src/components/MobileRichMarkdownEditor.tsx-94-108 (1)

94-108: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Resolve toolbar labels at render time.

These labels are fixed when the module loads, so an in-app locale change leaves the toolbar in the prior language. Store translation keys and call t() while rendering each item.

mobile/src/components/pr-sidebar/PRCommentsSection.tsx-199-202 (1)

199-202: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep complete user-facing sentences in locale catalogs. Both sites compose English grammar outside t(), which prevents non-English locales from translating or reordering the message.

  • mobile/src/components/pr-sidebar/PRCommentsSection.tsx#L199-L202: pass counts as interpolation values; move the “of remaining” wording into a translation key.
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx#L76-L108: replace hardcoded notice branches and manual plural suffixes with keyed, count-aware translations.
mobile/src/components/VoiceModelList.tsx-104-108 (1)

104-108: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the complete accessibility labels.

The catalog entries are standalone "Delete" and "Download" strings, but direct concatenation with model.label produces labels like DeleteModel and prevents locale-specific word order. Add dedicated interpolated catalog entries for the full labels instead of concatenating translated fragments.

Also applies to: 120-124

mobile/src/components/WorktreeListRow.tsx-187-187 (1)

187-187: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the complete child-count phrase.

The count is concatenated with standalone singular/plural nouns, which assumes English word order and pluralization. Use a locale-specific message with count interpolation so supported locales can format the entire phrase correctly.

🧹 Nitpick comments (11)
config/scripts/audit-localization-coverage.mjs (2)

115-117: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Snake_case exclusion applies to the desktop renderer audit too.

hasHumanLanguageText is shared by all source roots, so this new rule also silently drops any renderer candidate that is entirely lower_snake_case (e.g. a legitimate lowercase message such as save_failed used as UI copy). Consider gating it to the mobile path if the intent is mobile identifier noise reduction.


401-407: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Hardcoded mobile subdirectory allowlist will silently drift.

userVisibleErrorSource omits mobile/src/{terminal,transport,worktree,storage,diagnostics,onboarding}, so user-facing new Error(...)/Error(...) copy there is never reported, and any new feature directory defaults to "not user-visible" without a signal. Consider inverting to an explicit non-UI denylist, or hoisting the directory list next to classifyMobileStringNode in config/scripts/mobile-localization-candidate-rules.mjs so the classifier and its scope stay together.

config/scripts/bootstrap-mobile-locale-catalog.mjs (3)

173-187: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low value

Concurrent saveCache writes to the same path can interleave.

Three workers share completed, so multiple completed % 25 === 0 checkpoints can't overlap, but a checkpoint write can still overlap a later one from another worker since saveCache is awaited per-worker, not serialized. Non-atomic fs.writeFile to the same file can leave truncated JSON (recoverable only because loadCache swallows parse errors). Simplest fix: write to ${cachePath}.tmp then fs.rename, or guard checkpoints with a single in-flight promise.


35-44: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Placeholder restoration is case- and spacing-sensitive.

The four hardcoded patterns won't catch other manglings the endpoint produces (e.g. lowercased __ph0__, or _ _PH0_ _), and a lost token becomes a placeholder-parity failure in config/scripts/verify-mobile-localization-catalog.mjs. A single case-insensitive regex per index is more robust:

♻️ Suggested refactor
-    const patterns = [`__PH${index}__`, `__ PH ${index} __`, `__PH ${index}__`, `__ PH${index}__`]
-    for (const pattern of patterns) {
-      result = result.replaceAll(pattern, tokens[index])
-    }
+    result = result.replace(
+      new RegExp(`_\\s*_\\s*PH\\s*${index}\\s*_\\s*_`, 'gi'),
+      () => tokens[index]
+    )

108-136: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Desktop catalog seeding hard-fails when a desktop locale file is absent.

seedFromDesktopCatalog throws if src/renderer/src/i18n/locales/<locale>.json doesn't exist, aborting the whole bootstrap even though seeding is only an optimization. Wrapping the reads and warning would keep the script usable for locales the desktop app doesn't ship.

config/scripts/localize-mobile-strings.mjs (1)

233-282: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a --dry-run flag for this in-place codemod.

localizeFile rewrites sources unconditionally with no preview or clean-tree check; a dry-run that prints planned edits and catalog additions would make reruns safer.

config/scripts/mobile-localization-candidate-rules.mjs (1)

106-151: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Hardcoded product function names couple the tooling to app internals.

~45 app-specific formatter names live in a generic audit script; renames in mobile/src silently degrade classification with no failure signal. Consider sourcing this list from a data file next to the mobile code, or at least asserting the names still resolve during verification.

config/scripts/verify-mobile-localization-catalog.mjs (1)

149-166: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Only a bare t callee is verified.

t accessed via alias (import { t as translate }) or namespace (i18n.t(...)) bypasses key/placeholder verification entirely, so the gate can silently pass unverified call sites. Consider also resolving the imported binding name from @/i18n/mobile-i18n.

config/scripts/verify-mobile-localization-catalog.test.mjs (1)

15-28: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Temp directories are never cleaned up.

Each makeProject call leaves a directory in tmpdir(). Track the roots and remove them in an afterEach/afterAll with rmSync(root, { recursive: true, force: true }).

config/localization-audit.md (1)

56-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reconcile the mobile catalog refresh section with the whole-catalog overwrite policy.

The documented bootstrap:mobile:*-catalog scripts are valid package entry points, but they also clone the English catalog and write back the target locale file; move this into the “legacy free-endpoint bootstrap/whole-catalog repair” policy wording or explain the intended cache-backed exception.

mobile/src/components/CustomKeyModal.tsx (1)

36-37: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Shorten this comment.

Keep the rationale to one concise line. As per coding guidelines, “Comments must be concise, limited to non-obvious information, and preferably one line.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db5dbc1e-a29c-4809-87a6-54b7be064c04

📥 Commits

Reviewing files that changed from the base of the PR and between 5e00a30 and 1c63cc9.

⛔ Files ignored due to path filters (1)
  • mobile/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (263)
  • .gitignore
  • config/localization-audit.md
  • config/mobile-localization-coverage-allowlist.json
  • config/scripts/audit-localization-coverage.mjs
  • config/scripts/bootstrap-mobile-locale-catalog.mjs
  • config/scripts/localize-mobile-strings.mjs
  • config/scripts/mobile-localization-candidate-rules.mjs
  • config/scripts/verify-mobile-localization-catalog.mjs
  • config/scripts/verify-mobile-localization-catalog.test.mjs
  • mobile/app.json
  • mobile/app/about.tsx
  • mobile/app/browser-settings.tsx
  • mobile/app/connection-log.tsx
  • mobile/app/h/[hostId]/accounts.tsx
  • mobile/app/h/[hostId]/edit.tsx
  • mobile/app/h/[hostId]/index.tsx
  • mobile/app/h/[hostId]/session/QuickCommandsTabButton.tsx
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/app/h/[hostId]/tasks.tsx
  • mobile/app/h/_layout.tsx
  • mobile/app/index.tsx
  • mobile/app/mobile-onboarding.tsx
  • mobile/app/native-chat-settings.tsx
  • mobile/app/notifications.tsx
  • mobile/app/pair-confirm.tsx
  • mobile/app/pair-scan.tsx
  • mobile/app/pair.tsx
  • mobile/app/settings.tsx
  • mobile/app/terminal-settings.tsx
  • mobile/app/troubleshoot.tsx
  • mobile/app/voice-settings.tsx
  • mobile/locales/en.json
  • mobile/locales/es.json
  • mobile/locales/ja.json
  • mobile/locales/ko.json
  • mobile/locales/zh-Hans.json
  • mobile/package.json
  • mobile/src/agent-history/MobileAgentSessionHistoryList.tsx
  • mobile/src/agent-history/MobileAgentSessionHistoryPanel.tsx
  • mobile/src/agent-history/agent-history-resume-target.ts
  • mobile/src/agent-history/agent-history-session-card.ts
  • mobile/src/agent-history/use-mobile-agent-history-state.ts
  • mobile/src/agent-history/worktree-navigation-actions.ts
  • mobile/src/browser/MobileBrowserKeyRow.tsx
  • mobile/src/browser/MobileBrowserPane.tsx
  • mobile/src/browser/MobileBrowserPointerModifiers.tsx
  • mobile/src/browser/MobileBrowserViewModeSwitch.tsx
  • mobile/src/components/AuthFailedBanner.tsx
  • mobile/src/components/CodexResetCreditAction.tsx
  • mobile/src/components/ConfirmModal.tsx
  • mobile/src/components/CustomKeyModal.tsx
  • mobile/src/components/DragReorderList.tsx
  • mobile/src/components/HostProtocolGate.tsx
  • mobile/src/components/MobileDictationSetupSheet.tsx
  • mobile/src/components/MobileDiffReviewBody.tsx
  • mobile/src/components/MobileDiffReviewDrawers.tsx
  • mobile/src/components/MobileDiffReviewFileSummary.tsx
  • mobile/src/components/MobileDiffReviewFooter.tsx
  • mobile/src/components/MobileDiffReviewHeader.tsx
  • mobile/src/components/MobileDiffReviewLine.tsx
  • mobile/src/components/MobileHostCard.tsx
  • mobile/src/components/MobileHtmlPreview.tsx
  • mobile/src/components/MobileMarkdown.tsx
  • mobile/src/components/MobilePRSidebar.tsx
  • mobile/src/components/MobilePrBasePicker.tsx
  • mobile/src/components/MobileRichMarkdownEditor.tsx
  • mobile/src/components/MobileSearchField.tsx
  • mobile/src/components/MobileWorkspaceNameInput.tsx
  • mobile/src/components/NewWorkspaceFab.tsx
  • mobile/src/components/NewWorktreeModal.tsx
  • mobile/src/components/ProtocolBlockScreen.tsx
  • mobile/src/components/SetupHookTrustDrawer.tsx
  • mobile/src/components/SmartWorkspaceAdvancedFields.tsx
  • mobile/src/components/SmartWorkspaceSourceDrawer.tsx
  • mobile/src/components/SmartWorkspaceSourceField.tsx
  • mobile/src/components/SmartWorkspaceSourceRow.tsx
  • mobile/src/components/TerminalShortcutSettings.tsx
  • mobile/src/components/TextInputModal.tsx
  • mobile/src/components/VoiceModelList.tsx
  • mobile/src/components/WorkspaceDetailPlaceholder.tsx
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/components/accounts-snapshot.ts
  • mobile/src/components/codex-reset-credit.ts
  • mobile/src/components/mounted-bottom-drawer.tsx
  • mobile/src/components/new-worktree-agent-selection.ts
  • mobile/src/components/pr-sidebar/MermaidDiagram.tsx
  • mobile/src/components/pr-sidebar/MobileLinkPrForm.tsx
  • mobile/src/components/pr-sidebar/MobilePrComposeForm.tsx
  • mobile/src/components/pr-sidebar/MobilePrViewPanel.tsx
  • mobile/src/components/pr-sidebar/PRActionsSection.tsx
  • mobile/src/components/pr-sidebar/PRCheckDetail.tsx
  • mobile/src/components/pr-sidebar/PRChecksSection.tsx
  • mobile/src/components/pr-sidebar/PRCommentCard.tsx
  • mobile/src/components/pr-sidebar/PRCommentComposer.tsx
  • mobile/src/components/pr-sidebar/PRCommentsSection.tsx
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx
  • mobile/src/components/pr-sidebar/PRReviewersSection.tsx
  • mobile/src/components/pr-sidebar/PRSidebarHeader.tsx
  • mobile/src/components/pr-sidebar/PrSidebarCreateEmptyState.tsx
  • mobile/src/components/pr-sidebar/ReviewerPickerDrawer.tsx
  • mobile/src/components/pr-sidebar/markdown-blocks.ts
  • mobile/src/components/pr-sidebar/pr-check-detail-content.ts
  • mobile/src/components/pr-sidebar/pr-checks-presentation.ts
  • mobile/src/components/pr-sidebar/pr-comment-audience.ts
  • mobile/src/components/pr-sidebar/pr-comment-time.ts
  • mobile/src/components/use-codex-reset-credit-action.ts
  • mobile/src/diagnostics/troubleshoot-common-issues.tsx
  • mobile/src/dictation/mobile-dictation-setup.ts
  • mobile/src/files/MobileFileExplorerPanel.tsx
  • mobile/src/files/MobileFileMarkdownPreview.tsx
  • mobile/src/files/MobileFilePreviewBody.tsx
  • mobile/src/files/MobileFilePreviewEditableSource.tsx
  • mobile/src/files/MobileFilePreviewScreen.tsx
  • mobile/src/files/MobileFilePreviewSourceText.tsx
  • mobile/src/files/mobile-file-explorer-row.tsx
  • mobile/src/files/mobile-file-mutation-ownership.ts
  • mobile/src/files/mobile-file-preview-request.ts
  • mobile/src/files/mobile-file-preview-response.ts
  • mobile/src/files/mobile-file-preview-route.ts
  • mobile/src/hooks/mobile-dictation-desktop-start.ts
  • mobile/src/hooks/mobile-dictation-keep-awake.ts
  • mobile/src/hooks/mobile-dictation-pending-audio-budget.ts
  • mobile/src/hooks/use-mobile-dictation.ts
  • mobile/src/i18n/expo-localization-vitest-stub.ts
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/i18n/mobile-i18n.test.ts
  • mobile/src/i18n/mobile-i18n.ts
  • mobile/src/onboarding/MobileOnboardingPage.tsx
  • mobile/src/session/MobileAgentWorkingIndicator.tsx
  • mobile/src/session/MobileBrowserTabActionSheet.tsx
  • mobile/src/session/MobileNativeChatAsk.tsx
  • mobile/src/session/MobileNativeChatComposer.tsx
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatQuestion.tsx
  • mobile/src/session/MobileNativeChatView.tsx
  • mobile/src/session/MobileSessionHeaderMoreActionsSheet.tsx
  • mobile/src/session/MobileTerminalInputActions.tsx
  • mobile/src/session/MobileTerminalLiveInputStatus.tsx
  • mobile/src/session/QuickCommandEditorForm.tsx
  • mobile/src/session/QuickCommandsList.tsx
  • mobile/src/session/QuickCommandsSheet.tsx
  • mobile/src/session/ai-vault-resume-launch.ts
  • mobile/src/session/ai-vault-resume-preparation.ts
  • mobile/src/session/floating-workspace.ts
  • mobile/src/session/github-pr-mutations.ts
  • mobile/src/session/github-pr-rpc.ts
  • mobile/src/session/mobile-bulk-close-sheet-actions.ts
  • mobile/src/session/mobile-clipboard-image.ts
  • mobile/src/session/mobile-diff-comments.ts
  • mobile/src/session/mobile-diff-review-loaders.ts
  • mobile/src/session/mobile-diff-review-queue.ts
  • mobile/src/session/mobile-diff-review-rpc.ts
  • mobile/src/session/mobile-diff-review-screen-model.ts
  • mobile/src/session/mobile-native-chat-permission-send.ts
  • mobile/src/session/mobile-native-chat-permission.ts
  • mobile/src/session/mobile-native-chat-question.ts
  • mobile/src/session/mobile-native-chat-render-data.ts
  • mobile/src/session/mobile-native-chat-stream-frame.ts
  • mobile/src/session/mobile-native-chat-toggle-action.ts
  • mobile/src/session/mobile-pr-sidebar-state.ts
  • mobile/src/session/mobile-session-route-helpers.ts
  • mobile/src/session/mobile-session-startup-source.test.ts
  • mobile/src/session/mobile-tab-close-selection.ts
  • mobile/src/session/mobile-terminal-action-sheet-actions.ts
  • mobile/src/session/mobile-terminal-records.ts
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/session/pr-actions-engine.ts
  • mobile/src/session/pr-ai-triage-launch.ts
  • mobile/src/session/quick-commands-tab-stability-source.test.ts
  • mobile/src/session/use-mobile-attachment-input-lease-gate.ts
  • mobile/src/session/use-mobile-diff-review-comment-actions.ts
  • mobile/src/session/use-mobile-diff-review-controller.ts
  • mobile/src/session/use-mobile-diff-review-git-actions.ts
  • mobile/src/session/use-mobile-diff-review-interactions.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.ts
  • mobile/src/session/use-mobile-image-attachment.ts
  • mobile/src/session/use-mobile-native-chat-answer-send.ts
  • mobile/src/session/use-mobile-native-chat-cancel-ask.ts
  • mobile/src/session/use-mobile-native-chat-image-attachments.ts
  • mobile/src/session/use-mobile-native-chat-message-send.ts
  • mobile/src/session/use-mobile-native-chat-stop.ts
  • mobile/src/session/use-mobile-pr-actions.ts
  • mobile/src/session/use-mobile-pr-ai-triage.ts
  • mobile/src/session/use-mobile-pr-comment-actions.ts
  • mobile/src/session/use-mobile-pr-title-action.ts
  • mobile/src/session/use-mobile-terminal-paste.ts
  • mobile/src/session/use-quick-commands.ts
  • mobile/src/session/worktree-label.ts
  • mobile/src/source-control/MobileBranchDiffPreviewDrawer.tsx
  • mobile/src/source-control/MobileCommitFailurePanel.tsx
  • mobile/src/source-control/MobileGitHistoryList.tsx
  • mobile/src/source-control/MobileSourceControlBranchCard.tsx
  • mobile/src/source-control/MobileSourceControlContent.tsx
  • mobile/src/source-control/MobileSourceControlFileRows.tsx
  • mobile/src/source-control/MobileSourceControlHeader.tsx
  • mobile/src/source-control/MobileSourceControlModals.tsx
  • mobile/src/source-control/MobileSourceControlPanel.tsx
  • mobile/src/source-control/MobileSourceControlPrChip.tsx
  • mobile/src/source-control/hosted-review-copy.ts
  • mobile/src/source-control/mobile-branch-base-ref.ts
  • mobile/src/source-control/mobile-branch-compare.ts
  • mobile/src/source-control/mobile-commit-message-ai.ts
  • mobile/src/source-control/mobile-create-pr-action.ts
  • mobile/src/source-control/mobile-git-history.ts
  • mobile/src/source-control/mobile-git-status.ts
  • mobile/src/source-control/mobile-hosted-review-create-intent.ts
  • mobile/src/source-control/mobile-hosted-review-git-preparation.ts
  • mobile/src/source-control/mobile-hosted-review-remote-prerequisite.ts
  • mobile/src/source-control/mobile-hosted-review-service.ts
  • mobile/src/source-control/mobile-pr-create.ts
  • mobile/src/source-control/mobile-pr-link.ts
  • mobile/src/source-control/mobile-source-control-actions.ts
  • mobile/src/source-control/mobile-source-control-conflict-abort.ts
  • mobile/src/source-control/mobile-source-control-hub-tab.ts
  • mobile/src/source-control/mobile-source-control-primary-action.ts
  • mobile/src/source-control/mobile-source-control-screen-state.ts
  • mobile/src/source-control/pr-compose-validation.ts
  • mobile/src/source-control/use-mobile-commit-failure-recovery.ts
  • mobile/src/source-control/use-mobile-commit-message-generation.ts
  • mobile/src/source-control/use-mobile-create-pr-runner.ts
  • mobile/src/source-control/use-mobile-git-requests.ts
  • mobile/src/source-control/use-mobile-source-control-action-sheet-runners.ts
  • mobile/src/source-control/use-mobile-source-control-commit-runners.ts
  • mobile/src/source-control/use-mobile-source-control-loaders.ts
  • mobile/src/source-control/use-mobile-source-control-openers.ts
  • mobile/src/source-control/use-mobile-source-control-runners.ts
  • mobile/src/source-control/use-mobile-source-control-state.ts
  • mobile/src/storage/codex-reset-attempt-journal.ts
  • mobile/src/tasks/linear-mobile-issue-read.ts
  • mobile/src/tasks/mobile-github-project-group-sort.ts
  • mobile/src/tasks/mobile-smart-source-modes.ts
  • mobile/src/tasks/mobile-tui-agents.ts
  • mobile/src/tasks/mobile-work-items.ts
  • mobile/src/tasks/sparse-preset-draft.ts
  • mobile/src/tasks/use-mobile-composer-source.ts
  • mobile/src/tasks/workspace-agent-selection.ts
  • mobile/src/tasks/workspace-ssh-gate.ts
  • mobile/src/tasks/worktree-create-retry.ts
  • mobile/src/terminal/TerminalWebView.tsx
  • mobile/src/terminal/terminal-accessory-key-catalog.ts
  • mobile/src/terminal/terminal-accessory-keys.ts
  • mobile/src/terminal/terminal-live-input-affordance.test.ts
  • mobile/src/terminal/terminal-webview-engine-error-state.tsx
  • mobile/src/terminal/terminal-webview-notification-dispatch.ts
  • mobile/src/terminal/terminal-webview-ready-watchdog.ts
  • mobile/src/transport/connection-health.ts
  • mobile/src/transport/host-endpoint.ts
  • mobile/src/transport/mobile-connection-path-label.ts
  • mobile/src/transport/mobile-endpoint-supervisor.ts
  • mobile/src/transport/mobile-relay-host-overlay.ts
  • mobile/src/transport/mobile-relay-rpc-streams.ts
  • mobile/src/transport/pair-confirm-state.ts
  • mobile/src/worktree/agent-row-display.ts
  • mobile/src/worktree/mobile-workspace-statuses.ts
  • mobile/src/worktree/workspace-list-picker-options.ts
  • mobile/src/worktree/workspace-list-sections.ts
  • mobile/src/worktree/workspace-pr-status-groups.ts
  • mobile/vitest.config.ts
  • package.json

Comment thread mobile/app.json Resolved
Comment thread mobile/app/browser-settings.tsx Resolved
Comment thread mobile/app/h/[hostId]/tasks.tsx Resolved
Comment thread mobile/app/h/[hostId]/tasks.tsx Resolved
Comment thread mobile/src/i18n/locales/es.json Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
mobile/app/h/[hostId]/session/[worktreeId].tsx (1)

3919-3922: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the quick-command failure template.

A localized label is interpolated into hardcoded "Couldn't run ...", producing mixed-language errors. Use an interpolated t(...) entry for the whole message.

mobile/app/h/[hostId]/index.tsx (1)

883-892: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Inconsistent formatting for the same translation key m.2hirWvg.

This embedded filter chip interpolates ` ${activeFilterCount}` (leading space, no parens) into t('m.2hirWvg', ...), while the non-embedded toolbar (line 1022) interpolates ` (${activeFilterCount})` (parens) into the same key. Since the surrounding punctuation is baked into the interpolated value rather than the translation template, the label renders as "Filters 3" here vs "Filters (3)" there for identical semantics — likely an unintentional divergence from the hardcoded-string refactor.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f7c9e88f-9a9d-4c91-9c16-dc396ff1e466

📥 Commits

Reviewing files that changed from the base of the PR and between 1c63cc9 and 300f9d4.

📒 Files selected for processing (33)
  • .github/workflows/pr.yml
  • config/scripts/bootstrap-mobile-locale-catalog.mjs
  • config/scripts/bootstrap-mobile-locale-catalog.test.mjs
  • config/scripts/localize-mobile-strings.mjs
  • config/scripts/mobile-localization-candidate-rules.mjs
  • config/scripts/mobile-localization-candidate-rules.test.mjs
  • config/scripts/verify-mobile-localization-catalog.mjs
  • config/scripts/verify-mobile-localization-catalog.test.mjs
  • mobile/app/_layout.tsx
  • mobile/app/h/[hostId]/index.tsx
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/app/h/[hostId]/tasks.tsx
  • mobile/src/components/MobileDiffReviewFileSummary.tsx
  • mobile/src/components/MobileDiffReviewHeader.tsx
  • mobile/src/components/codex-reset-credit.test.ts
  • mobile/src/components/codex-reset-credit.ts
  • mobile/src/components/pr-sidebar/PRCommentsSection.test.ts
  • mobile/src/components/pr-sidebar/PRCommentsSection.tsx
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/i18n/mobile-i18n.test.ts
  • mobile/src/i18n/mobile-i18n.ts
  • mobile/src/i18n/use-mobile-locale-reload.ts
  • mobile/src/session/mobile-diff-review-screen-model.test.ts
  • mobile/src/session/mobile-diff-review-screen-model.ts
  • mobile/src/session/mobile-session-startup-source.test.ts
  • mobile/src/session/session-refresh-timer.ts
  • mobile/src/source-control/mobile-source-control-conflict-abort.test.ts
  • mobile/src/source-control/mobile-source-control-conflict-abort.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • mobile/src/components/pr-sidebar/PRCommentsSection.tsx
  • mobile/src/components/MobileDiffReviewFileSummary.tsx
  • mobile/src/i18n/locales/ja.json
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/zh.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
mobile/app/h/[hostId]/edit.tsx (1)

58-60: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep all user-facing errors translatable.

The Error.message branches and endpointEdit.error render raw strings instead of catalog keys. Normal failures and invalid endpoint feedback can therefore remain English on non-English locales. Map known errors to stable i18n keys, with a localized generic fallback for unknown errors.

Also applies to: 93-95, 116-120, 237-242

mobile/app/h/[hostId]/session/[worktreeId].tsx (1)

3917-3921: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove the remaining hard-coded English from this localized session flow.

  • mobile/app/h/[hostId]/session/[worktreeId].tsx#L3917-L3921: replace Couldn't run ${label} with an interpolated translation key.
  • mobile/app/h/[hostId]/session/[worktreeId].tsx#L5206-L5371: replace the rename modal’s 'Terminal' fallback with the translated terminal-title key.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3ff1fc7f-7216-40ac-89ed-8678f8b8b8af

📥 Commits

Reviewing files that changed from the base of the PR and between 300f9d4 and 9dc3264.

📒 Files selected for processing (4)
  • mobile/app/h/[hostId]/edit.tsx
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/app/index.tsx
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • mobile/app/index.tsx

@Gyarados4157

Copy link
Copy Markdown

I opened #11587 as a focused stacked follow-up for the mobile i18n blockers discussed here. It fixes the locale-dependent SSH sentinel, missing-repository grouping identity/key collisions, confirmed Simplified Chinese catalog pollution/mistranslations, translation-request timeout/response validation, and the iOS mixed-localization flag. It targets this PR branch directly and relates to #9536.

@Gyarados4157

Copy link
Copy Markdown

Follow-up update on #11587: it now includes mocked fetch + fake-timer coverage for the 10-second translation abort, retry with a fresh AbortSignal, and per-attempt timer cleanup before backoff. An isolated Expo iOS prebuild also generated and registered zh-Hans.lproj/InfoPlist.strings with the expected mixed-localization plist entries. A runtime Simulator smoke remains unverified on this host because full Xcode Simulator tools are unavailable. This PR is still DIRTY against main, so the upstream rebase/conflict resolution remains separate.

@Gyarados4157

Copy link
Copy Markdown

I do not have write access to this PR's source branch, so I resolved the latest main conflict in #11587 and retargeted that PR directly to main. #11587 now supersedes this PR and GitHub reports it as MERGEABLE. It preserves the full mobile i18n change set, includes the follow-up fixes, and resolves DaemonPtyRouter with upstream's subscription-fanout architecture.

…11446-i18n-ctx-a963

# Conflicts:
#	mobile/src/session/use-mobile-native-chat-message-send.ts
#	src/main/daemon/daemon-pty-router.ts
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Resolved the two conflicts against origin/main at 676ef7fab8 and pushed merge commit 6c756de094. The mobile resolution preserves main’s launch-draft clearing while localizing its new error path; the daemon router keeps main’s subscription-fanout refactor.

Validation is green: pnpm lint; mobile Vitest via mobile/vitest.config.ts (359 files, 2,667 passed / 2 skipped; current-main baseline 358 files, 2,653 passed / 2 skipped); mobile typecheck, oxlint, and format check; catalog/coverage gates; catalog-tool and daemon fanout tests. Unsupported locales and Traditional Chinese are covered by the passing fallback tests and resolve to English.

Architecture verdict: compatible only as an explicit migration bridge, not as the steady-state PO design. This PR enforces strict-parity JSON target catalogs and includes a whole-catalog target bootstrap, while #11478 explicitly calls in-flight mobile JSON a bridge and requires mobile-owned PO sources plus a read-only compiler/reconciler; I did not expand this conflict resolution into that migration.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
mobile/app/h/[hostId]/session/[worktreeId].tsx (2)

3779-3792: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add end-to-end deadlines for terminal creation and initial-prompt delivery.

These RPCs have no explicit timeout. A reconnect can leave terminal creation locked indefinitely, while the detached prompt send can remain unresolved without user feedback. Use bounded request deadlines that span reconnect and handle timeout as a retryable failure.

Also applies to: 3836-3866

Source: Learnings


3921-3921: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the remaining terminal fallbacks.

The quick-command failure and untitled-terminal rename default remain English. Route both through catalog keys, with interpolation for the command label.

Also applies to: 5321-5325


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 95c2e77e-c0fc-4839-a85d-9c6ba106de34

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc3264 and 6c756de.

📒 Files selected for processing (4)
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/session/mobile-terminal-records.ts
  • mobile/src/session/use-mobile-native-chat-image-attachments.ts
  • mobile/src/session/use-mobile-native-chat-message-send.ts

…18n-audit

# Conflicts:
#	mobile/app/h/[hostId]/session/[worktreeId].tsx
#	mobile/app/h/[hostId]/tasks.tsx
#	mobile/src/transport/connection-health.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
mobile/app/h/[hostId]/session/[worktreeId].tsx (1)

3928-3928: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep user-facing fallbacks in the translation catalog.

The quick-command failure toast and rename-modal fallback still bypass i18next. Non-English users will see English in these paths; use a translated interpolation key for the former and t('m.1ELofI0') for the "Terminal" fallback.

Also applies to: 5324-5324

mobile/app/h/[hostId]/tasks.tsx (1)

9354-9370: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Unresolved from a prior review: literal 'Empty' string comparisons break for non-English locales.

isEmpty = value === 'Empty' (project field pill styling) and currentLabel === 'Empty' (Clear-button disabled state) still compare against the raw English literal, but projectFieldValueLabel/projectFieldDisplayLabel now return a localized empty-value string (per this PR's localization of project-field helpers, 985-2040). In es/ja/ko/zh locales this means the muted empty styling never applies and the Clear button stays enabled for already-empty fields. A prior review on this exact file flagged this and it does not appear to have been addressed in the code shown here.

Expose emptiness as data (e.g., a boolean isProjectFieldEmpty(row, field) alongside the label) rather than string-matching the display text, and use it at both call sites.

Also applies to: 11893-11906

mobile/src/session/mobile-terminal-action-sheet-actions.ts (1)

76-80: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Prune the local terminal record when closing a session tab.

This new branch calls onCloseSessionTab, but handleCloseSessionTab in mobile/app/h/[hostId]/session/[worktreeId].tsx only unsubscribes and clears refs at Lines 4137-4143. It does not remove the terminal from terminals/terminalsRef, so the closed pane can remain rendered until a later snapshot. Prune it immediately in the session-tab close path.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 99afef63-0339-4384-b58b-623bdb952750

📥 Commits

Reviewing files that changed from the base of the PR and between 6c756de and 56177f3.

📒 Files selected for processing (14)
  • .gitignore
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/app/h/[hostId]/tasks.tsx
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/session/mobile-session-route-helpers.ts
  • mobile/src/session/mobile-session-startup-source.test.ts
  • mobile/src/session/mobile-terminal-action-sheet-actions.ts
  • mobile/src/tasks/mobile-hosted-check-status.ts
  • mobile/src/transport/connection-health.ts
  • package.json
🚧 Files skipped from review as they are similar to previous changes (4)
  • mobile/src/i18n/locales/zh.json
  • package.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/en.json

…18n-audit

# Conflicts:
#	mobile/app/h/[hostId]/index.tsx
#	mobile/app/index.tsx
#	mobile/pnpm-lock.yaml
#	mobile/src/components/MobileHostCard.tsx
#	mobile/src/components/MobileMarkdown.tsx
#	mobile/src/components/pr-sidebar/MermaidDiagram.tsx
#	mobile/src/session/MobileNativeChatComposer.tsx
#	mobile/src/session/MobileNativeChatMessage.tsx
#	mobile/src/session/mobile-native-chat-permission-send.ts
#	mobile/src/session/mobile-native-chat-render-data.ts
#	mobile/src/session/use-mobile-diff-review-controller.ts
#	mobile/src/session/use-mobile-native-chat-answer-send.ts
#	mobile/src/session/use-mobile-native-chat-image-attachments.ts
#	mobile/src/session/use-mobile-native-chat-message-send.ts
#	mobile/src/terminal/terminal-webview-notification-dispatch.ts
#	mobile/src/transport/mobile-endpoint-supervisor.ts
…18n-audit

# Conflicts:
#	mobile/src/session/MobileTerminalLiveInputStatus.tsx
#	mobile/src/terminal/terminal-live-input-affordance.test.ts
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Close this older whole-app localization patch after creating a GitHub issue for translating the current phone screens and native shell. Rebuild it from the code now on main.

The remaining problem is tracked in #27647.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants