Repository navigation
i18n: multilingual mdbase writer (9 locales) - #35
Merged
Merged
Conversation
# Conflicts: # apps/writer/src/i18n/locales/ko/messages.po
# Conflicts: # apps/writer/src/i18n/locales/es/messages.po
# Conflicts: # apps/writer/src/i18n/locales/zh/messages.po
# Conflicts: # apps/writer/src/i18n/locales/de/messages.po
# Conflicts: # apps/writer/src/i18n/locales/ko/messages.po
# Conflicts: # apps/writer/src/i18n/locales/ru/messages.po
callumalpass
marked this pull request as ready for review
October 26, 2026 09:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status — draft; residual scroll regression fixed, current-head CI green
Head:
b353683b092aae176bd83f703133ab8990c7b784(feat/i18n).Summary
nzHlj8. One real Lingui singleton; strict all-ninecheck --compose, completeness/contracts and source guard in normal checks/builds/CI. No translator mocks or silent duplicate overrides.Residual scroll root cause and fix
This was introduced by i18n, not reproduced on main.
WorkspaceViewuses<Editor key={active}>, so chapter switches remount it. The previous fix cached phrases only in instance refs: every target-language remount reset them to English. Even warm imports then delivered an asynchronous language/chapter/live-preview decoration refresh during CodeMirror's retained-scroll measurement. The previous unit test only rerendered one instance and missed the real lifetime.Resolved dictionaries now live outside the keyed component lifetime. Remounts install cached active phrases synchronously, without a deferred redraw. Actual language changes still reconfigure the view in place; stale callbacks are cancelled. No restore retries, artificial delays, relaxed thresholds, skipped assertions or browser-test edits.
Controlled identical original scroll/history/selection scenario, fresh1500×950 contexts, ten iterations each en/ja/de:
origin/mainworktree at 4c853dc: 30/30 PASS (main UI English, browser locales varied).Verification
rpnpm check: PASS, including final full check after strengthening the exact-name assertion (all-nine composition/contracts, source guard87, typecheck, full tests).rpnpm test: PASS. 689 passes / seven existing skips: core65; Writer321 Vitest +77 Node; root226.rpnpm build:production: PASS.rpnpm --filter @mdbase-writer/app build:editing-test: PASS. Both reach Vite; existing non-fatal chunk/plugin timing warnings.env -u DISPLAY -u WAYLAND_DISPLAY node scripts/i18n-browser-test.mjspasses unchanged, with no GPU errors. Japanese editor/German narrow-settings screenshots inspected.rpnpm test, production build and editing-test build all PASS. Logs/tmp/writer-scroll-head-{test,production,editing}.log.docs/translations.md;/tmp/writer-scroll-{main,feature,fixed}-30.log,fixed-original-30.log,regression-{red,green}.log,{check-final,check-exact-label,test,production,editing,reliability}.log,i18n-browser{,-diagnostic,-headless}.log. Screenshots/video ignored underapps/writer/out/i18n/.GitHub CI
Current head b353683: run39973553313 SUCCESS / 16m11s, exact SHA verified with
gh pr viewandgh pr checks 35. Catalogue validation, full check/build, production editing, baseline/reliability/i18n browser stages and private-feedback stage passed. Package installation accounted for ~10 minutes of the run. No remaining observed scroll blocker.Previous head b9b79e3 PASS7m45s: run39971283306, whose English-only reliability test missed the target-locale stress bug.
Earlier head9c86d59 FAILED scroll retention: run39964546081.
Required before merge
da2ae8145e5744733c29726a5b56f999c19f82bdd9d48c57d67da29cc18dd9b5.e7199463d7f4d282cfd6f5f16e71dc1aa1029330a634f43112ae5b2f63dea7a0.