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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-12 10:06:50 -04:00
1 parent 4fbf19f2f9
commit 0a526c6f85
7 files changed
+275 -82

No files matched your search

+12 -8
View File
@@ -515,16 +515,20 @@ pub(super) fn paste(
| L::Body { body }
| L::Vertex { body, .. }
| L::Iso { body, .. }
| L::Spun { body, .. }
if !bodies.contains_key(body) =>
{
notices.push(format!("{} retains external linked body {body}", feature.name));
| L::Spun { body, .. } => {
if !bodies.contains_key(body) {
notices.push(format!("{} retains external linked body {body}", feature.name));
}
}
L::SketchCurve { sketch, .. } | L::SketchPoint { sketch, .. } if !features.contains_key(sketch) => {
notices.push(format!("{} retains external linked sketch {sketch}", feature.name));
L::SketchCurve { sketch, .. } | L::SketchPoint { sketch, .. } => {
if !features.contains_key(sketch) {
notices.push(format!("{} retains external linked sketch {sketch}", feature.name));
}
}
L::OnSurface { sketch, body, .. } if !features.contains_key(sketch) || !bodies.contains_key(body) => {
notices.push(format!("{} retains external surface link", feature.name));
L::OnSurface { sketch, body, .. } => {
if !features.contains_key(sketch) || !bodies.contains_key(body) {
notices.push(format!("{} retains external surface link", feature.name));
}
}
L::Intersection { a, b } => {
pending.push(a);