fix(languages): disable lazy mode for chinese simplified (@EnormousMush)#8271
Open
EnormousMush wants to merge 1 commit into
Open
fix(languages): disable lazy mode for chinese simplified (@EnormousMush)#8271EnormousMush wants to merge 1 commit into
EnormousMush wants to merge 1 commit into
Conversation
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.
Chinese Simplified is the only CJK language missing
noLazyMode.Lazy mode strips diacritics — the accent table in
lazy-mode.tscovers Latin,Arabic, Cyrillic and Greek only, so it can never transform a Han character.
Every other CJK language already accounts for this:
chinese_traditional(all 5 variants),
japanese_*(4) andkorean_*(3) setnoLazyMode: true.The 5
chinese_simplified*files don't.The project already draws this distinction correctly elsewhere: #1866 added
tone-mark accents to
pinyin*, where lazy mode is meaningful because thescript is romanized (wǒ → wo, ü → v). Han-script languages take the other
branch. Simplified Chinese currently takes neither.
This isn't only cosmetic. Personal bests are bucketed by
lazyModeindb.ts:getLocalPB(), so a Simplified Chinese user with lazy mode on keeps aseparate PB set from one with it off, for identical tests. Traditional Chinese
avoids this because
noLazyModeforces the setting off.Scoped deliberately: several other languages have no accented characters in
their current wordlists, but their scripts do support diacritics (e.g. Cyrillic
ё), so
noLazyModewould be wrong for them. Han script is the categorical case.Verified locally with
pnpm dev-fe: on Chinese Simplified, enabling lazy modeand restarting the test now shows the "does not support lazy mode" notice and
forces the setting off, matching Chinese Traditional. Without the change, the
setting stays enabled.