Skip to content

#886 Localisation: Changes text - #959

Closed
ivanfenenko wants to merge 1 commit into
feature/886-l10n-settingsfrom
feature/886-l10n-changes
Closed

ivanfenenko wants to merge 1 commit into
feature/886-l10n-settingsfrom
feature/886-l10n-changes

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stage 2 of #886 (Localisation): the Changes screen text now comes from the string files on both platforms. This is part of the unmerged localisation stack (#933 → … → #957 → this pull request) and is based on feature/886-l10n-settings (#957).

  • Scope: the Changes file list, the source menu (Git changes / Last turn changes), the loading, empty, no-turn, error and refresh-failed states, the filter field and "No matching files", the split-pane "Select a file" placeholder, the file viewer's "Preview unavailable", and the accessibility labels for the summary and each file row.
  • Keys: 35 new changes.* keys with matching names on both platforms (iOS changes.no_turn.title ⇔ Android changes_no_turn_title), including 3 plurals: changes.summary.changed_files, changes.count.additions and changes.count.deletions. Retry reuses common.retry. No new common.* keys.
  • English is unchanged. The catalog values match the old literals.
  • Accessibility labels use positional format keys (changes.accessibility.summary, changes.accessibility.file) filled with plural counts, so translators can reorder them. The file status words (Added, Deleted, Modified) are keys too. Before, they came from the enum name.
  • Android Screen Model: ChangeSource.displayName / emptyTitle / emptyDetail, ChangesContentState.summary and the accessibility labels, ChangesPhase.Error.message and refreshError are now UiText. Server errors stay UiText.Verbatim. The ViewModel never calls getString.
  • iOS Screen Model: ChangeSource text is OpenCodeText. The summary and accessibility labels stay String and are built with String(localized:defaultValue:). All .unlocalized(...) calls in these files are gone.
  • Moved-folders error: when Changes shows "This turn moved folders…", it now uses changes.error.turn_moved_folders. TurnDiffUnavailable itself is not changed, because Session Chat also uses it.
  • One iOS behaviour fix: a 404 from the Git diff on a server without last-turn diffs used to show the made-up message "missing". It now shows the server's own message, as Android already does.

Checks

  • node scripts/check-string-keys.mjs: pass (756 shared keys).
  • node scripts/check-hardcoded-text.mjs --list: no findings left in ui/changes/* or UI/Changes/*.
  • xmllint --noout on strings.xml and python3 -m json.tool on the catalog: pass. The catalog is sorted and formatted as Xcode writes it.
  • xcrun swiftc -parse on the changed Swift files: pass.
  • Not compiled yet. Android and iOS builds and tests run once for the whole stack after it is combined.
  • Tests updated to compare the resolved English (.english() on Android, .resolved / String on iOS). A new test on each platform checks both accessibility labels, including singular and plural counts.

Evidence

None yet. Screenshots come once, for the whole stack, when it is built and verified.

Issue

#886

Risks / Follow-ups

  • changes.error.request_failed is used only on Android. Android falls back to "Request failed" when an error has no message. iOS uses the error's localizedDescription, so the iOS catalog has the key but no code reads it.
  • Moved-folders text exists twice for now: once as changes.error.turn_moved_folders and once as the TurnDiffUnavailable constant (Android MESSAGE, iOS message). Session Chat still shows the constant. The Session Chat slice should switch to this key.
  • Draft Changes: point to the other source when one is empty, and wait for Git info to settle #958 (fix/changes-source-fallback) changes the same files. It needs a rebase onto this pull request, and its "other source" hint needs keys.
  • Compile risks:
    • Android: stringResource / resolve() calls inside the inline map and ifBlank lambdas.
    • Android: ChangeSource is still @Serializable, but its properties are now computed instead of constructor parameters.
    • iOS: string literals inferred as OpenCodeText in ChangeSource switch expressions.

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

@ivanfenenko ivanfenenko mentioned this pull request Nov 3, 2026
14 tasks done
@ivanfenenko
ivanfenenko marked this pull request as ready for review November 3, 2026 15:59
@ivanfenenko ivanfenenko mentioned this pull request Nov 3, 2026
@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 2 passes agreed on.

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

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