Skip to content

SDK 0.6.4: every SDK string from the catalog - #59

Merged
lhr0909 merged 15 commits into
mainfrom
developer/rk-5
Oct 15, 2026
Merged

lhr0909 merged 15 commits into
mainfrom
developer/rk-5

Conversation

@lhr0909

@lhr0909 lhr0909 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Why

On the 0.6.3 device check in Japanese, the email ask, the composer placeholder, the send and close labels and the "Sent" status stayed English on iOS and Android, although ja.json already had them (RK-5). On iOS, Text("Save email") and similar calls looked the string up in the host's main bundle, not RespondKitUI's. Web and React Native had the same kind of literals.

What changed

  • Catalog: 10 new keys in all 51 locales. They cover the store errors (message too long, closed conversation, logout, history save, unverified identity), the React Native length hint, Done, Unread reply, the web reconnect alert and the history label.

  • SwiftUI: every view string and accessibility label goes through catalog(_:), which reads RespondKit.xcstrings from .module. "N new" uses the plural key. With no title, the screen shows the translated "Support".

  • Compose: close, email ask, composer, statuses, attachment rows and the new-count plural come from string resources. Dates now use the activity locale.

  • Core stores (Swift and Kotlin): new RespondKitStrings, English by default. The screen fills it from the catalog. It covers the attachment-only body and the store's own error text.

  • Web and React Native: every remaining literal reads messages(locale). The web hook receives the locale; the React Native store uses the device locale.

  • Errors (review RK-6): stores and pickers show catalog text for any error the SDK did not localize, and keep the raw text in errorDetail. Fixed a Compose first-open race in which a first-load failure was shown in English.

  • Guard: scripts/native-strings.test.mjs (pnpm test:native-strings, part of ready) scans every file in the SwiftUI and Compose modules, transcript helpers included. It flags UI-call literals, English phrases and interpolated labels, and has fixtures for each case.

  • Tests: ja and zh-Hans checks of the email ask, placeholder, send label, "Sent" and the close label, on every client:

    • Swift catalog test plus the example-app XCUITest
    • Compose LocalizedScreenTest
    • web widget test
    • React Native screen test

    There are also store tests for the injected strings.

  • Release: 0.6.4 prepared (VERSION, every package, docs/releases/0.6.4.md), plus the RK-5 worklog. Not published, and no GitHub release created.

Scope

Only SDK views, the stores, the catalog, tests, the demo server's contact route and release docs. No apps/api server code; apps/api/package.json changes only its version, through version:set.

Tradeoffs

  • Network, HTTP, protocol, storage and server errors show a catalog fallback ("Support request failed.", "Upload failed"), not their own text. A specific server reason, such as a size limit, is no longer shown verbatim. The Swift, Kotlin and React Native stores keep it in errorDetail.
  • The guard is a heuristic. Exception and check {} messages are exempt, and you@example.com is allowed.
  • The new translations have no native-speaker review yet.

Blast radius

  • Attachment-only messages are now sent with the translated body, so operators see it in the customer's language.
  • Native errorMessage and React Native error no longer carry raw diagnostics; read the new errorDetail instead.
  • Swift RespondKitScreen(title:) becomes String?; existing callers compile unchanged.
  • Hosts that call the Compose transcriptRows are unaffected, because it is internal.

Verification

  • At 700deaa: pnpm ready passed (455 package tests). swift test: 29 passed. Example-app XCUITests: 5/5. Android core: 26 passed. :compose:connectedDebugAndroidTest: 11/11, including ja and zh-Hans failed-request banners.
  • At 71a3e48: pnpm ready passed (449 package tests). swift test: 28 passed. xcodebuild -scheme RespondKitUI (iOS simulator): build succeeded.
  • Example-app XCUITest testScreenAndAttachMenuFollowTheAppLanguage on an iPhone 17 simulator with demo_server.py: passed in ja and zh-Hans, including a real send that shows 送信済み / 已发送.
  • gradlew :core:test :compose:assembleDebug :example:assembleDebug: passed (25 core tests). :compose:connectedDebugAndroidTest on emulator-5554 (API 36): 9/9.
  • Screenshot of the iOS ja screen is attached on the RK-5 card.

🤖 Generated with Claude Code

lhr0909 and others added 9 commits October 16, 2026 04:37
Seven keys in all 51 locales: the message length and closed-conversation
errors, the logout and history-save failures, RN's length hint, Done and
Unread reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d identity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RespondKitScreen, TranscriptRow and the email ask looked up English
literals in the host's main bundle. They now read RespondKit.xcstrings
from the package bundle, and the screen hands the store a
RespondKitStrings so the attachment-only body and its errors follow the
app language. Headless stores keep English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Close, email ask, composer, statuses, attachment rows and the new-count
badge come from string resources; the screen sets the core store's
RespondKitStrings each composition, and dates use the activity locale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ans on iOS

The demo server answers the contact lookup with no email so the
example app shows the email ask.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every package at 0.6.4 (Android reads VERSION, SwiftPM uses v0.6.4);
docs/releases/0.6.4.md, the localization README and the RK-5 worklog.
Not published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@simon-langoustine simon-langoustine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Request changes. verifier-failed at head 71a3e483892d23c04ff3a29a2c32800179c355d3.

The Japanese and Simplified Chinese happy paths pass on real iOS and Android builds, but RK-5's all-strings requirement is incomplete.

Act on:

  1. Localize SDK-authored operational errors. On the Japanese Android build, a multipart upload returning HTTP 500 displays File upload failed (500). Try again., and retry repeats it. The actual React Native store also reports Unable to reach RespondKit after a failed fetch under ja-JP, despite a Japanese catalog fallback. These are SDK-authored messages, not server copy. Preserve diagnostics separately and select localized presentation messages for these failure cases. Android screenshot, UI dump, RN execution output.
  2. Close the literal guard's direct regression gaps. Both transcript helpers are skipped because they import neither SwiftUI nor Compose. Restoring their old Sent/Failed literals therefore passes. The detector also accepts Text("retry"), Text("OK"), and the former interpolated new-count label. Add coverage for helper-produced UI text and negative fixtures that demonstrate these regressions fail. Executed probe.

Consider: none.

Verified at this exact head:

  • pnpm ready passed: formatting/type checks, release checks, localization generation check, guard tests, 449 package tests and builds. Log.
  • Swift: 28 tests; iOS example build and all 5 XCUITests, including ja/zh-Hans send/status labels and adjacent persistence, links and read-acknowledgement flows. Unit log, UI log.
  • Android: 25 core tests, Compose/example builds and all 9 instrumented UI tests. Build log, UI log.
  • Manual native checks: ja/zh-Hans email/composer/close labels, local sends, iOS close/reopen and attachment menu, Android attachment failure/retry and resize. No crash observed. iOS Japanese, iOS sent, iOS Chinese, Android Japanese, Android Chinese, resized failure.
  • Ten new keys are present in all 52 catalogs, comprising English plus the 51 shipped locales. Spot checks of ja, zh-Hans, zh-Hant, ko, de, fr, es, ar, he and ru found no concrete translation defect. Host-email no-flash tests pass. Android attachment control remains left of the input. Version 0.6.4 is prepared; apps/api changes only its package version. CI verify-npm passes.

Noted and limits: these two findings are incomplete migration/verification, not newly introduced operational regressions. Web/RN were exercised by tests and source-level probes, not live browser/device sessions. Translation spot checks are not native-speaker certification. The brief's CONTEXT.md, verify skill/feature map and project reviewer rubric are absent; used the card and native validation guide. Interrogate's configured Claude/Grok reviewers are unavailable, so two independent GPT reviewers ran and agreed on both findings. This is an SDK code review, not a store release authorization. No product changes, commits, pushes, merge or publication. Evidence is on the local office board, RK-6.

Comment thread packages/react-native/src/store.ts Outdated
Comment thread scripts/native-strings.test.mjs Outdated
lhr0909 and others added 6 commits October 16, 2026 05:15
…terpolated labels

Transcript helpers were skipped because they import no UI framework, and
Text("retry"), Button("OK") and "\\(unseen) new" passed. Exception
messages stay exempt as diagnostics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The store presents its own localized errors and requestFailed or
historySaveFailed otherwise; uploads show respondkit_upload_failed.
RespondKitLifecycle hands the store its strings before any refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Detail

A ja upload returning HTTP 500 showed "File upload failed (500). Try
again." The new failed-request UI test also caught the screen opening
the conversation before its SideEffect set the strings, so a first-load
failure was English; the strings are now set before openConversation
and by RespondKitLifecycle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@simon-langoustine simon-langoustine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved. live-ui-verified at head 700deaa7334c137fde28cd7f4098873bfde29b2f.

Focused re-review of the fixes since 71a3e483892d23c04ff3a29a2c32800179c355d3. Both blocking findings are addressed. No remaining act-on or consider items.

  • Repeated the original Android multipart HTTP 500 failure on a fresh build. The Japanese screen now shows アップロードに失敗しました, including on retry, instead of English. Screenshot, UI dump. The same failure displays 上传失败 in Simplified Chinese.
  • On the rebuilt iOS example, connection failures and retry display catalog text in Japanese and Simplified Chinese.
  • Re-ran the original actual RN store/network probe in ja-JP and zh-Hans-CN: visible errors are localized and errorDetail retains the diagnostic. Output.
  • The guard now scans transcript helpers. It catches the old Sent/Failed labels and all previously missed examples: lowercase text, uppercase-only text and interpolated new-count text. Executed probe.
  • Re-ran pnpm ready: 455 package tests, type/format checks, localization/guard/release checks and builds passed. Swift: 29 tests and iOS example build passed. Android: 26 core tests, example build and all 11 instrumented UI tests passed, including first-load failed-request banners in ja/zh-Hans. Repository checks, Swift tests, Android checks, iOS build. Current CI, including verify-npm, passes.

Two independent consistency reviewers found no remaining blockers in the delta. The guard remains heuristic; this approval covers the concrete regressions reported in round one. Generic catalog errors deliberately replace raw server explanations, with diagnostics exposed separately by the stores. Web/RN verification used tests/source probes, not live UI. The prior full-flow review remains the baseline; I did not restart it or rerun the iOS XCUITest suite. No product edits, merge or publication. Full evidence is on RK-6.

@lhr0909
lhr0909 merged commit b503cf2 into main Oct 15, 2026
12 checks passed
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.

2 participants