Skip to content

Localisation #886

Done
Done

Description

@ivanfenenko

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.xcstrings String Catalog. Android: res/values/strings.xml with <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.send on iOS and session_chat_send on Android) so a script in scripts/ can check key parity in CI.
  • App text vs. server content. Design-system components take localisable text by default (LocalizedStringResource on iOS; callers pass stringResource() 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 UiText type, resolved to strings in the view. Android ViewModels do not call getString, so a language change does not leave stale text. iOS LocalizedStringResource in 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 = true on 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 an xcodebuild -exportLocalizations XLIFF round trip or legacy .strings files; 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 from CONTEXT.md so 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-XB via pseudoLocalesEnabled on 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:

Activity

  1. added
    enhancement
    ios
    android
    backlog
    priority: low
    on Oct 29, 2026
  2. added 18 commits that reference this issue on Nov 2, 2026
  3. added 2 commits that reference this issue on Nov 28, 2026
  4. added a commit that references this issue on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidbacklogenhancementiospriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions