Skip to content

#886 Finish localisation extraction, locale formats and RTL layout - #1129

Merged
ivanfenenko merged 56 commits into
mainfrom
feature/886-l10n-finish-extraction
Nov 28, 2026
Merged

ivanfenenko merged 56 commits into
mainfrom
feature/886-l10n-finish-extraction

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Finishes #886 extraction and layout prep on both apps. English is unchanged except where noted.

  • No hardcoded UI text left. The 15 check findings, plus text the check can't see (status labels, error fallbacks, server error explanations, accessibility phrases, durations, "Match theme"), now come from the string files. The hardcoded-text check is now --strict in CI.
  • Status is typed, not English. iOS compared status labels to "Working" / "Idle"; both apps now carry typed values.
  • Counts read right for 1. "1 agent", "1 addition" and other real plurals.
  • Dates and numbers use the reader's locale. Dates, times, numbers, percentages and sizes were pinned to US formats.
  • Right-to-left and long text. Directional icons mirror from one mirrors_in_rtl flag in the icon manifest; signed diff counts stay "+12 −5"; card rows and onboarding details wrap instead of truncating.
  • App Lock wording uses each platform's terms (Face ID / Touch ID / passcode on iOS, fingerprint / face / screen lock on Android).

English that changes: the App Lock text, singular counts, the screen-reader message time following the device's 12/24-hour setting, cache sizes of 1 TB or more read "x.x TB", and long card-row titles wrap.

Fixes #886. The translation service, the first language, Server Health duration units and a few strings that need a decision (titles sent to the server such as "New Session", pasted image file names, kit defaults) continue in #1130.

Checks

  • iOS and Android both covered
  • Screenshots for UI changes (scenario harness, v2; English, iOS right-to-left / double-length, Android ar-XB / en-XA), in a comment below
  • Tests run
    • Android :app:testDebugUnitTest :app:assembleDebug :opencode-kit:testDebugUnitTest :hexcode:assembleDebug: pass, 3,588 app tests.
    • iOS OpenCode MobileTests: 3,803 of 3,804 passed. sendPrompt_postSendReloadMatchingUser_dropsOptimistic failed once and passed its suite 3 of 3 on rerun; it asserts before the echo reload lands and this branch doesn't touch that path. Hex Code builds.
    • check-string-keys, check-hardcoded-text --strict, icons:check, themes:check: pass. gitleaks: no leaks.
    • Not run: ktlint, lintDebug, iOS UI tests.

Risks / Follow-ups

  • Wide change (321 files). Most of it swaps literals for keys; behaviour changes are the typed status and error paths.
  • iOS's -NSDoubleLocalizedStrings pseudo-language renders catalog plurals as #@value@; that's the debug flag, not the app (English renders correctly).

Android builds the Files error detail from the HTTP status; it is now the
files_error_server_status format. iOS shows no status detail, so its catalog
only carries the matching key for parity.
Session Chat's /new placeholder title and the Compacting turn status still
travel as plain strings (navigation routes, the status label pipeline). They
now resolve to session_new_title and session_chat_compact_status where they
are shown; any other title stays server content. iOS /new uses the already
keyed placeholder title instead of a literal.
Clears the last Session Chat .unlocalized findings on iOS and keys the
Android counterparts, which were hardcoded too. State now carries
localisable text (LocalizedStringResource / OpenCodeText on iOS, UiText on
Android), resolved in the view; server content stays verbatim.

- Move to worktree: menu entry, sheet title, disabled reasons (reusing
  worktree.needs_v2 / worktree.turn_on), the "Moves to … after this turn."
  notice and the "Couldn't move the session: …" error. Rows keep the branch
  or folder verbatim; "main checkout" uses home.main_checkout on Android too.
- Composer model notices (load failed, none usable, model and variant
  unavailable); model names stay arguments.
- /btw notices: unsupported, unavailable, copied, failed.
- Variant chip and picker: the app's "Default" is session_chat.variant_default;
  server variant names stay verbatim.
- Attachment drop card titles and subtitles, with plurals for the counts.
  Skip reasons are still English routing text and stay marked unlocalized.
- Rename errors use the Home session_error keys; server text stays verbatim.
- Activity card agent count reads "1 agent".
- tool.count.named (an unknown tool's name with its count) is a plural, so
  translators get every quantity; known tools already have their own plurals.
- "N saved · X active" and the MCP "N of M connected" headline are plurals,
  the headline on the configured count.
- Diff summaries count additions and deletions with the existing plurals
  ("1 addition, 1 deletion").
- The Review Changes pill's file count, title and spoken counts come from
  the string files.
The running / waiting for input / done / failed / stopped words that
VoiceOver and TalkBack read on OpenCodeTaskRow and OpenCodeChildSessionRow
(and that the child session row shows) come from component.subagent_state.*.
The shell row's spoken "Shell" and Android's "running" use the existing
tool.title.shell and component.activity_status.running keys.
Todo items and the todos pill, the reasoning row ("Thinking",
"Thought · 4s" and its hint), diff row labels, floating pill state words
and "Dismiss …", tree row and timeline notice Expanded / Collapsed (and
their hints on iOS), and attachment labels now come from the string files
with positional placeholders, so translators control word order. English is
unchanged.
# Conflicts:
#	ios/OpenCode Mobile/OpenCode Mobile/Localizable.xcstrings
Android chat errors now reach the UI as UiText: the server's words stay verbatim and the
app's own fallbacks (Request failed, Unable to reach the server, Unable to read server
response, Something went wrong) use the existing keys. The message adapters on both
platforms return no message instead of English, and iOS maps kit MessageError to text in
the app. Worktree create and remove key "Request failed (HTTP N)" as
worktree.request_failed_http. The busy-session retry matches the server text, not app copy.
Home rows read SessionBusyStatus (running, retrying(attempt)) instead of parsing
"Working" / "Retrying · N", and the turn pill carries SessionTurnLabel (working,
idle, or text already in the reader's language) instead of the internal "Idle" marker
and a comparison with the localised Working. Matches Android's SessionBusyStatus and
typed turn labels; no displayed English changes.
"6.4s" is now component.reasoning_row.duration_seconds ("%@s" / "%1$ss") with the
locale-formatted number as its argument on both platforms. UiText.Number loses its suffix
field, which only this used. The thought-duration label resolves through a UiTextLookup
on Android (rememberUiTextLookup in Compose). English is unchanged. Also restores the
javax/java import order the previous commit moved.
Nothing calls it on either platform; Settings writes the window with the keyed
settings.recent_window_hours plural.
Mark back/forward arrows, left/right chevrons, sidebar, indent arrow and
undo/redo with mirrors_in_rtl in icons/manifest.yaml. sync-icons emits
ImageVector autoMirror on Android and flipsForRightToLeftLayoutDirection in
OpenCodeIconImage on iOS. Drop the manual top-bar and search back flips so
they do not double-flip, point the scheme picker with chevron-down, turn
the tree disclosure the other way in RTL, and keep the terminal cursor-key
cluster left-to-right.
"Timeline: <style>. Change it any time in Settings." is now
session_chat.timeline_style_notice with the keyed Settings style name as its argument,
and "Branch name copied" is session_chat.branch_copied, on both platforms. The
unused English title and subtitle on SessionChatTimelineStyle are gone; the UI already
keys them (settings.timeline_style.*). English is unchanged.
Diff Stat wraps its inline run in a left-to-right isolate and lays split
counts out left to right on both platforms; the step rail, activity sheet,
permission file line and tool result counts use the same path. Android
floating pill labels resolve direction from content with an LTR fallback,
as iOS does, so the branch chip shows +12 −5 instead of 5− 12+.
Card-style list items name a setting or destination, so their title and
plain subtitle now wrap instead of ending in an ellipsis on both
platforms; plain rows (sessions, folders, files) stay single-line.
Onboarding feature rows use the wrapped text flow so details show whole.
The Match theme syntax preset's name and description, and the built-in syntax and theme
presets' descriptions, are app text: the UI now resolves them by preset id
(appearance.syntax_name.match, appearance.syntax_blurb.*, appearance.theme_blurb.*) on
both platforms. Before, the theme picker cards showed the manifest's English blurb
because it is never empty. Proper preset names (Porcelain, Nocturne, …) stay verbatim,
and a preset the app does not know keeps its file's text. The manifests and generator
are unchanged. The name · name and name · description subtitles use format keys
(settings.appearance.subtitle, appearance.theme.subtitle). English is unchanged.
session_chat.send_stalled is iOS-only (Android has no stalled-upload watch yet), so it is
listed in IOS_ONLY in check-string-keys.mjs rather than added as an unused Android string.
ServerErrorMessage now reads a typed ServerErrorReason (pairing expired, not found with
the server's path, session busy, or the server's own message with its ref). The app maps
it to keyed server_error.* text; the server's words stay verbatim. On Android the error
types carry no English for these cases: MessageError.Http gains the reason, SessionError.Http
keeps the body, and the screens that show them read ServerErrorMessage.text first. The
busy retry now matches the typed reason. The permission and question reply errors that
wrap these reasons are keyed too (session_chat.reply_error.*, *_unavailable,
*_tree_failed), and Android carries them as UiText. English is unchanged.
Android WorktreeCreateCopy.NOT_GIT / UNSUPPORTED and the "Unknown error" fallback become
keyed WorktreeCreateError / WorktreeRemoveError text (worktree.not_git, worktree.unsupported,
worktree.unknown_error); their message is a log-only description. iOS noCommitError and
unsupportedError resolve the same worktree.no_commit / worktree.unsupported keys as the
New worktree rows. English is unchanged.
"438ms", "2m 7s" and "1h 5m" are now component.reasoning_row.duration_ms,
duration_minutes_seconds and duration_hours_minutes on both platforms, next to the
existing duration_seconds. The numbers are integers written by the format string in the
reader's locale; English is unchanged.
Session Chat: archive / delete failed, MCP servers load failed, Unable to create session
(and the new-session draft's transport fallbacks), the send timeout (Android) and offline
send (iOS), shell commands can't be queued, the server changed before a send (iOS), the
follow-up Steer/Queue snackbar, the "Try again in N s / min" countdown, and a
session.error without a reason (now the existing timeline.failure.session_work_failed).
Android dictation recognizer errors flow as UiText. Components: the steering Pending
caption, the Tab keyboard hint, Scroll to end, the session status bar context ring and
the Session Branch Pill (file counts as plurals, accessibility labels). App Lock prompt
title and Cancel, the iOS feedback send failure, and the iOS Session Chat dictation
status line reuse or add keys. Home probe failures map the kit's typed ServerProbeError
to keyed text on both platforms. Platform-only keys are listed in
check-string-keys.mjs. English is unchanged.
The "This turn moved folders…" snackbar and notice reuse changes.error.turn_moved_folders
on both platforms (Android's TurnDiffUnavailable now only matches the server's marker),
and the plain-text fallback row's role (You, Assistant, Command, Tool, Notice, Message) is
keyed as timeline.role.*. English is unchanged.
@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

Evidence

Scenario harness, v2 server. iOS right-to-left uses -AppleTextDirection YES -NSForceRightToLeftWritingDirection YES; Android uses the ar-XB and en-XA pseudo-locales.

iOS Android
Session Chat, English
Settings, English
Session Chat, right-to-left, before: chevrons point right; Android chip reads "5− 12+"
Session Chat, right-to-left, after
Settings: iOS right-to-left; Android en-XA, titles wrap and "Match theme" is translated
Servers, right-to-left: Details chevron

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated review: no finding that 2+ of 1 passes agreed on.

opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.158 · 2 pass(es) failed

@ivanfenenko
ivanfenenko added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 44eae99 Nov 28, 2026
18 checks passed
@ivanfenenko
ivanfenenko deleted the feature/886-l10n-finish-extraction branch November 28, 2026 08:59
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.

Localisation

1 participant