fix(i18n): keep saved language on font failure, tighten CJK font matching
- Web: a failed CJK font fetch shows English for this session only; the saved language preference is kept (CjkFontLoader, persisted on save). - Web fetches the CJK font only when a CJK language (ja) is selected. - fonts.rs: directory scans match CJK-specific names only (no "noto" or "gothic"); CJK stays the last fallback after the Latin UI font. - Revert unrelated clippy rewrites in component_clone.rs, coplanar.rs, canvas.rs and issue_report.rs to match main. - Tests: default English, fallback order, CJK-only matching, fetch only for CJK, failed fetch keeps the saved language. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT
This commit is contained in:
1 parent
4fbf19f2f9
commit
0a526c6f85
7 files changed
+275
-82
No files matched your search
@@ -39,8 +39,8 @@ In the browser, `solvecraft-web` bundles a self-hosted Japanese font (`BIZUDPGot
|
||||
under SIL OFL 1.1) within the web distribution artifacts only. The font is loaded asynchronously from the same
|
||||
origin (`./fonts/BIZUDPGothic-Regular.ttf`) on-demand when the interface language is set to Japanese, without
|
||||
contacting any external CDNs or third-party servers. For users with an English interface, no font download
|
||||
occurs. If font loading fails, the web interface gracefully falls back to English to prevent missing glyphs
|
||||
(tofu). This bundled font specifically targets Japanese; Korean (Hangul) and Chinese scripts are not covered.
|
||||
occurs. If font loading fails, the web interface shows English for that session only to prevent missing
|
||||
glyphs (tofu); the saved language preference is kept, so the next visit tries again. This bundled font specifically targets Japanese; Korean (Hangul) and Chinese scripts are not covered.
|
||||
|
||||
The current messages support named substitution, not locale-specific plural selection,
|
||||
number/date formatting, or right-to-left layout and shaping. Add those capabilities when
|
||||
|
||||
Reference in new issue
Block a user