Repository navigation
Description
Both apps can be translated, and stay translatable as features land, without a separate pass afterwards.
Today neither app is localisable. Android's res/values/strings.xml holds 2 strings while Compose code has roughly 430 hardcoded Text("…") calls. iOS has String Catalogs enabled in build settings (LOCALIZATION_PREFERS_STRING_CATALOGS, SWIFT_EMIT_LOC_STRINGS) but no .xcstrings file, and most design-system components take title: String, which SwiftUI renders verbatim, so text passed through them would stay English even with a catalog. knownRegions is en and Base only.
Approach
- Native formats. iOS: one
Localizable.xcstringsString Catalog. Android:res/values/strings.xmlwith<plurals>. No shared source file that generates both; it would fight Xcode extraction, Android lint, and previews. - Matching keys. Use the same key names on both platforms (for example
session_chat.sendon iOS andsession_chat_sendon Android) so a script inscripts/can check key parity in CI. - App text vs. server content. Design-system components take localisable text by default (
LocalizedStringResourceon iOS; callers passstringResource()on Android). Keep an explicit verbatim path (Text(verbatim:)) for content that must never be translated: session titles, file names, model and provider names, server errors, and transcripts. - Screen Models. UI state carries product enums or a small
UiTexttype, resolved to strings in the view. Android ViewModels do not callgetString, so a language change does not leave stale text. iOSLocalizedStringResourcein state is fine because it resolves at display time. - Formatting. Plurals or catalog plural variations for counts, platform formatters for dates and relative times, positional placeholders (
%1$s) instead of string concatenation. - Per-app language.
generateLocaleConfig = trueon Android so the system per-app language setting lists the app; iOS offers it automatically once a second language ships. - Translation workflow. Crowdin through its free open-source license: it reads Android XML and Xcode String Catalogs, its GitHub app opens translation pull requests, and it includes machine translation. The license needs an application; check its "active community" and "no commercial products related to the project" conditions. Fallback: Tolgee (open source, self-hostable, supports
.xcstrings, free plan for open-source projects on request), synced by its CLI in CI. Not Weblate for now: it cannot read String Catalogs (WeblateOrg/weblate#10848), so iOS would need anxcodebuild -exportLocalizationsXLIFF round trip or legacy.stringsfiles; revisit if that issue lands. Lokalise, Phrase, and POEditor have no usable free tier for this. Until a service is connected, first languages can be drafted by a script that opens a pull request for native-speaker review; the native string files keep that swap code-free. Seed the service glossary fromCONTEXT.mdso product terms such as Connection Profile and Session translate consistently. Publish a contributor path for translations early: requests for languages tend to come before the infrastructure, and without a path they become forks.
Acceptance
- English UI text on both platforms comes from the string files; feature code has no hardcoded user-facing literals.
- Server and session content still renders verbatim and is never looked up as a key.
- English UI is unchanged.
- Pseudo-locale runs (Android
en-XA/ar-XBviapseudoLocalesEnabledon debug; iOS double-length and right-to-left pseudo-languages) show no untranslated text, clipped labels, or broken right-to-left layouts on the main screens. - CI fails on new hardcoded
Text("…")in feature code and on keys present on one platform but not the other.
Status: done in two pull requests. Stage 1 (foundation) and stage 2 (extraction) merged on 2026-11-03 in #975, which replaced the stacked pull requests #933, #952–#957, #959, #960, #968 and #969. #1129 finishes extraction (0 hardcoded-text findings, check strict in CI), moves dates and numbers to the reader's locale, and fixes the right-to-left and long-text layout found in a pseudo-locale pass. About 1,500 keys match across platforms. Key convention: iOS area.name ⇔ Android area_name.
The translation service, the first language and the last few strings continue in #1130.
Remaining:
- Add the iOS String Catalog and switch design-system component text parameters to localisable types, with a verbatim option for server content (#886 Localisation foundation: string catalog, UiText, CI checks #933)
- Add the key-parity script and a hardcoded-text check to CI (#886 Localisation foundation: string catalog, UiText, CI checks #933; component scanning in #886 Localisation: component and shared text #968)
- Enable
generateLocaleConfigon Android (#886 Localisation foundation: string catalog, UiText, CI checks #933) - Extract existing English text to the string files (#886 Localisation #975, #886 Finish localisation extraction, locale formats and RTL layout #1129)
- The last check findings: attachment drop, composer model notice, side-question notice, rename error, Move to worktree, variant chip (#886 Finish localisation extraction, locale formats and RTL layout #1129)
- Text the check can't detect: "New Session" placeholder title, "Compacting…", "main checkout", "The server responded with N.", accessibility phrases and row state words, status labels, error fallbacks, server error explanations, timeline style notice, "Match theme" and preset descriptions (#886 Finish localisation extraction, locale formats and RTL layout #1129)
- Count grammar: real plurals, singular forms read correctly (#886 Finish localisation extraction, locale formats and RTL layout #1129)
- Dates, times, numbers, percentages and sizes in the reader's locale through platform formatters (#886 Finish localisation extraction, locale formats and RTL layout #1129)
- Make the hardcoded-text check strict (#886 Finish localisation extraction, locale formats and RTL layout #1129)
- Review the wording choices from #886 Localisation: one wording on both platforms, count grammar #960; App Lock now uses each platform's terms (#886 Finish localisation extraction, locale formats and RTL layout #1129)
- Pseudo-locale pass on Home, Session Chat and Settings: chevrons mirror, signed diff counts stay left to right, card rows and onboarding details wrap (#886 Finish localisation extraction, locale formats and RTL layout #1129). Pseudo-locale snapshot runs moved to Localisation: translation service and first language #1130.
- Merge the stack (#886 Localisation #975)
- Key the hint text from Changes: point to the other source when one is empty, and wait for Git info to settle #958 (#886 Localisation #975)
- Translation service, contributor note, first language,
MissingTranslationas an error, localised store listings: moved to Localisation: translation service and first language #1130
Activity
#886 Android: key Active and Back, mirror Back in RTL, uncap lone top…
#886 iOS: key Active and Back, mirror Back in RTL
#886 Localisation foundation: string catalog, UiText, CI checks
#886 Android: key Active and Back, mirror Back in RTL, uncap lone top…
#886 iOS: key Active and Back, mirror Back in RTL
#886 iOS: verbatim text in the Playground scenario sheet
#886 Localisation: Files and Terminal text
#886 Localisation: Session Chat screen and timeline text
#886 Localisation: Session Chat sheets and Session Context text
#886 Localisation: Settings, Diagnostics, Appearance and Feedback text
#886 Compare resolved English in tests after combining the stack
#886 Localisation: Session Chat timeline and tool text
#886 Localisation: component and shared text
#886 Localisation: one wording on both platforms, count grammar
#886 Fix gallery label and tests after stacking the final slices
#886 Merge main: key the Changes other-source hint and the Recent hint
#886 Localisation (#975)
Merge main into #869: localisation (#975)
#886 Link the new text sources into the screenshot module
#886 Expect the thought duration in the runner's locale
opencode-mobile#886 Finish localisation extraction, locale formats an…