Skip to content

#886 Localisation: Settings, Diagnostics, Appearance and Feedback text - #957

Closed
ivanfenenko wants to merge 2 commits into
feature/886-l10n-sheetsfrom
feature/886-l10n-settings
Closed

ivanfenenko wants to merge 2 commits into
feature/886-l10n-sheetsfrom
feature/886-l10n-settings

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stage 2 extraction slice for #886 (Localisation): Settings, Diagnostic Logs, Appearance, Feature Flags, the Feedback sheet and keyboard shortcut titles now take their text from the string files on both platforms. Part of an unmerged stack: #933 → #952 → this. Not compiled yet; verification happens once for the whole stack.

  • Scope:
    • Android: ui/settings/* (not Servers), ui/feedback/*, ui/keyboard/*.
    • iOS: UI/Settings/* (not Servers), UI/Feedback/*, UI/KeyboardShortcuts/OpenCodeKeyboardShortcut.swift.
  • Keys: 166 new keys with matching names (iOS settings.recent_window.hours ⇔ Android settings_recent_window_hours) under settings.*, diagnostics.*, appearance.*, feature_flags.*, feedback.* and keyboard_shortcuts.*. Reused common.cancel, servers.title and top_bar.back. One block per prefix: strings.xml gets one appended block; the catalog stays sorted, so its keys land in per-prefix runs.
  • English is unchanged. Plurals keep today's text in the one form where today's text never changed for 1 ("1 redacted lines", "Screenshot, 1 areas hidden"), so a later copy pass can fix them.
  • Plurals and placeholders: counts use plurals (hours, minutes, entries, hidden areas, rate-limit seconds, saved servers). Placeholders are positional. Follow-up send subtitles are two full keys instead of "Steer"/"Queue" plus a sentence.
  • Android Screen Models:
    • ServersSummary.subtitle, SettingsViewModel.sessionCacheSizeLabel (via SessionCacheSizeFormatter), DiagnosticLogsUiState.shareError/saveMessage, FeedbackUiState.placeholder/sheetTitle and KeyboardShortcutAction.title are UiText. The active server name stays UiText.Verbatim.
    • KeyboardShortcutHost.shortcutGroup takes a UiTextLookup; MainActivity passes ResourcesUiTextLookup(resources) (one-line change outside the area).
  • iOS:
    • All .unlocalized(...) in scope are gone.
    • Feedback error, action, page and sheet titles are OpenCodeText. Component parameters that still take String (attachment chip, dictation status, cache size) use String(localized:defaultValue:).
    • Keyboard shortcut titles are LocalizedStringResource.
    • Diagnostic log preview lines now use Text(verbatim:), so log content is never looked up.
  • Kept verbatim: Developer Tools rows and the Feature Flags state line (On · remote · key), theme and syntax preset names, syntax preset blurbs, diagnostic log area names and log lines, the feedback reference id, the dictation language label.
  • Same key, platform wording: a few keys carry each platform's existing English: settings.app_lock.subtitle_* (fingerprint/PIN vs Face ID/passcode), feedback.send ("Send" vs "Send report") and feedback.sending ("Sending" vs "Sending report"). Keys used on only one platform are still in both files so key parity passes.

Checks

  • node scripts/check-string-keys.mjs: pass, 279 shared keys (280 Android names including the allowlisted app_name).
  • node scripts/check-hardcoded-text.mjs: total 928 → 627. Zero findings in the files in scope, including every .unlocalized there.
  • xmllint --noout on strings.xml and python3 -m json.tool on the catalog: pass. The catalog diff is insertions only.
  • xcrun swiftc -parse on every changed Swift file: pass.
  • Not built or run: no Gradle, Xcode, simulator, emulator or harness run for this slice. Tests were updated and added but not run:
    • Android: new SettingsTextTest; updated SessionCacheSizeFormatterTest, FeedbackViewModelTest, KeyboardShortcutRulesTest.
    • iOS: new SettingsTextTests; updated FeedbackViewModelTests, OpenCodeKeyboardShortcutTests.

Evidence

Verified once for the whole stack.

Issue

#886

Risks / Follow-ups

  • Compile risk: nothing here has been compiled.
    • Android: @Composable errorNotice/themeBlurb/displayBlurb/lastMinutesLabel helpers, stringResource inside sheet slot lambdas, and the enum constructor's @param:StringRes.
    • iOS: OpenCodeText equality in tests, Button(LocalizedStringResource) in the shortcut commands, and the LocalizedStringKey label on MiniThemePane.
  • Domain text left English (outside this area):
    • Android DiagnosticLogsViewModel share intent subject "OpenCode diagnostic logs" and chooser title "Share diagnostic logs". The chooser title is not shown on Android 10+; moving them needs a Navigation.kt change.
    • The theme load error from ThemeManager (now .verbatim on iOS).
    • The feedback share payload subject that uses FeedbackKind.label.
  • Now unused domain copy: SessionChatTimelineStyle.title/subtitle and HomeSessionRowStyle titles are now keyed under settings.timeline_style.* / settings.session_rows.* for Settings. Session Chat still shows the domain English for timeline styles; that slice can reuse these keys. Also unused now: iOS FeedbackKind.placeholder/sentBody, DiagnosticLogExportWindow.label and HomeSessionLadder.formatWindowHoursLabel. They are left in place because they sit outside this area.
  • Multi-argument counts are not plurals: settings.servers_summary.saved_active ("%1$d saved · %2$s active") and diagnostics.soft_cap.dropped. A catalog plural with two arguments needs substitutions, which check-string-keys.mjs does not read yet.
  • Component limits (iOS): OpenCodeAttachmentPresentation (filename, detail) and OpenCodeDictationCard.status still take String, so their text is resolved when the view renders rather than carried as a localisable value. Unchanged here; a design-system follow-up.
  • gitleaks is not installed locally; the Secret Scan workflow covers it.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

Superseded by #975, which combines the whole #886 localisation stack into one pull request against main. Review and merge happen there.

@ivanfenenko ivanfenenko closed this Nov 3, 2026

@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 3 passes agreed on.

1 finding(s) from a single pass, not posted
  • android/app/src/main/java/dev/opencode/mobile/ui/settings/AppearanceSettingsScreen.kt:366 high: Composable called inside non-composable ifBlank lambda (muse-spark-1.3-contributor)

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

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.

1 participant