Repository navigation
SDK 0.6.3: translate the client catalog into 51 locales - #58
Conversation
…many Android's Locale still reports Hebrew and Indonesian as iw and in, so values-he and values-id never matched; a bare no did not reach nb; and older Android ICU and lint still select Hebrew many. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
messages(locale) maps iw/in/tl/no, infers zh-Hant for TW/HK/MO, sends Portuguese outside Brazil to pt-PT and ignores extensions, without Intl.Locale (Hermes). The web widget falls back to the browser language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReceiptGenie's shipped set; every key, plural branches per CLDR. Regenerated SwiftPM, Compose, web and React Native resources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Empty state, subtitle and attach menu on SwiftUI resources, Compose, the web widget and the React Native screen, plus device-locale fallback tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every package at 0.6.3 (Android reads VERSION, SwiftPM uses v0.6.3); docs/releases/0.6.3.md and the RK-3 worklog. Not published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simon-langoustine
left a comment
There was a problem hiding this comment.
Changes requested at head b3525044f314c2efae68695efab39fa2fd924487. Verification verdict: verifier-failed.
Three act-on items are attached as review threads:
- Browser locale detection causes an SSR hydration mismatch when the widget starts open without an explicit locale.
- The new Swift localization test breaks iOS Simulator package test compilation because
Processis unavailable. - The native tests do not cover the requested localized SwiftUI screen and actual Compose attach-menu rendering.
Local verification: pnpm ready passed with 445 package tests, localization:check passed, release version validation passed, macOS swift test passed 26 tests, Android core passed 24 tests and Compose instrumentation passed 9. I also reproduced the full iOS package test-build failure and the React hydration error. CI, including verify-npm, is green.
I drove Japanese and Simplified Chinese empty states and menus in the SwiftUI and Compose examples, and browser empty/error/retry, send/reopen and resize flows. These passed. SwiftUI required the documented host-language declaration, applied only to the temporary built host artifact. Arabic/Hebrew spotchecks were legible at tested sizes. React Native component tests and Android builds passed; emulator storage exhaustion blocked installation, so no live RN pass is claimed.
Catalog checks found all 51 added locales with 64 keys each and resources for all clients. No clear meaning-changing mistakes were found in the requested language spotchecks. This is not native-speaker certification. Only a version bump changed under apps/api; no server code changed. Release 0.6.3 remains prepared, with no GitHub release found.
Consider: declare test languages in the iOS example so its UI tests exercise the documented host setup. Existing English literals outside this catalog change are out of scope.
Full review and limitations, command logs and reproductions, screenshots on RK-4. These evidence links are local to the office board. Two independent interrogate reviewers agreed on the findings. The project verify skill/feature map were absent; checked-in examples and browser/device adapters were used. Product code was not edited.
The server has no navigator, so the first client render must match the server's locale; useSyncExternalStore switches to the browser language right after hydration and follows languagechange. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An XCUITest launches the example in ja and zh-Hans, checks the subtitle and empty state, and opens the attach Menu. The example declares the catalog's languages. The xcstringstool fallback table stays macOS-only, so the iOS package test build compiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test activity applies the language to its base context, as per-app locales do, so the dropdown popup is localized too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simon-langoustine
left a comment
There was a problem hiding this comment.
Approved at 930d6ccd8778113c2181fbc41121a5d716410963. Verification verdict: live-ui-verified for this follow-up.
Re-reviewed only the fixes since b3525044f314c2efae68695efab39fa2fd924487. All three previous findings are resolved:
- The browser locale uses a stable server/hydration snapshot. The original independent reproduction now produces identical initial markup, zero recoverable hydration errors, and Japanese after hydration. All 87 web tests pass, including the new regression test. In a real browser I also confirmed the fallback and a live languagechange from Japanese to Simplified Chinese.
- The host-only catalog test is guarded for macOS. The previously failing iOS package command now builds and runs successfully: 24 tests pass on the iOS Simulator.
- The new SwiftUI XCUITest runs the real screen and opens the actual attachment menu in both Japanese and Simplified Chinese. I reran it successfully against this head. All 9 Compose instrumentation tests pass, including the new localized activity tests that open the actual dropdown. The example iOS host now declares its languages; no temporary binary metadata patch was needed.
Act-on: none. Both independent consistency reviewers found no remaining issues in the follow-up diff.
Consider: run the iOS example UI test in CI with its local demo server. It currently runs locally, which is sufficient for this re-review but leaves that regression check outside CI.
localization:check passes, relevant PR CI is green, and the worktree remains clean. Unchanged catalog/release-preparation conclusions carry forward from the first review. This focused re-review did not repeat the full locale audit or React Native live installation; the previously reported RN emulator-storage limitation remains. No merge or publication was performed.
Evidence: command logs, hydration reproduction and Compose test XML, SwiftUI screen, SwiftUI menu, browser fallback, browser languagechange. Links are local to the office board. Native results are also recorded in the local Xcode result bundles under /tmp/rk-4-package-tests/Logs/Test and /tmp/rk-4-ios-rereview/Logs/Test.
Why
In 0.6.2 the empty state, the "Ask us anything" subtitle and the attach menu read from
localization/messages, but the catalog shipped English only. Simon tests ReceiptGenie in a non-English device language next, so these strings must be translated on iOS, Android, web and React Native (RK-3).What changed
localization/messages/{locale}.jsonfor 51 locales (ReceiptGenie's shipped set). All 64 keys are translated, with plural branches per CLDR category. All four generated outputs now include every locale.compileJavaScriptMessages): mapsiw/in/tl/no, reads Traditional Chinese forTW/HK/MO, sends Portuguese outside Brazil topt-PT, ignores-u-extensions, reduces regions to the base language, and falls back to English. It does not useIntl.Locale, because Hermes lacks it.context.localeis unset. It reads it after hydration (useSyncExternalStore), so server and client markup match.values-heand a barenoresolving to English. Hebrew and Indonesian are now written tovalues-iwandvalues-in, Bokmål is also written tovalues-no, and Hebrew keeps amanyquantity, which older Android ICU and lint require.version:set 0.6.3,docs/releases/0.6.3.md, the localization README, and the worklog. Not published.Scope
Catalog, generators, the web locale default, tests and release prep. No
apps/apichanges and no GitHub release. The views that still use English literals are unchanged.Tradeoffs
history_failed). No native speaker has reviewed them.native/examples/ios. It needsdemo_server.pyand isn't in CI (CI only builds RespondKitUI for iOS). The macOS fallback-table test stays inswift test.RespondKitScreenwithreact-dom/serverand shimmed RN primitives. Adding jsdom or testing-library would have re-resolved rolldown across the lockfile, so the lockfile change is 3 lines (react-domdev dependency).Blast radius
values-iworvalues-in(noted in the release notes).context.localenow get the browser language instead of English for these strings and the transcript dates.Verification
pnpm ready: passed (vp check, release tests,localization:check, 445 package tests, builds).swift test: 26 tests passed, includingLocalizationTests(ja and zh-Hans, plus 23 fallbacks viaBundle.preferredLocalizationson the compiled catalog).native/android/gradlew -p native/android :core:test :compose:assembleDebug :compose:lintRelease :example:assembleDebug: passed, lint 0 errors.:compose:connectedDebugAndroidTeston an API 36 emulator: 9/9 passed, includingLocalizedScreenTest, which opens the real attach dropdown in ja and zh-Hans.xcodebuild -scheme RespondKit-Packagetest build on the simulator succeeded, and 24 tests passed. The example app's XCUITest (ja and zh-Hans screen plus attach Menu) passed on an iPhone 17 simulator.verify-npmruns on this PR becauseVERSIONchanged.🤖 Generated with Claude Code