From 41592e2504e4851609de47009651667135f82aee Mon Sep 17 00:00:00 2001 From: YokiiroBW Date: Sun, 26 Jul 2026 22:31:44 +0800 Subject: [PATCH] fix(ui): restore corrupted localized strings Historical UTF-8 corruption left question-mark runs in user-visible copy and in one accessible name: the sprite load failure message, the canvas context failure message, the pet window's `aria-label`, and the page loading state. A separate spot had the "desktop floating" option label hard-coded as numeric HTML entities. Refs P1-17 / F-09. Co-Authored-By: Claude Opus 5 --- src/App.tsx | 6 ++---- src/features/pet/DesktopPetView.tsx | 12 ++++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 671b962..2f25114 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -449,7 +449,7 @@ function navIcon(page: PageKey) { function PageLoading() { return (

- Loading? + 加载中…

); } @@ -551,9 +551,7 @@ function PetPage({ } > - + { - setSpriteError("????????"); + setSpriteError("桌宠精灵图加载失败。"); }; image.src = AEMEATH_SPRITESHEET; return () => { @@ -170,7 +170,7 @@ export function DesktopPetView({ embedded = false }: { embedded?: boolean }) { if (!canvas || !image || !spriteReady) return; const context = canvas.getContext("2d"); if (!context) { - setSpriteError("???? Canvas ?????"); + setSpriteError("无法获取 Canvas 绘图上下文。"); return; } try { @@ -188,14 +188,18 @@ export function DesktopPetView({ embedded = false }: { embedded?: boolean }) { 208, ); } catch (reason) { - setSpriteError(reason instanceof Error ? reason.message : "??????"); + setSpriteError( + reason instanceof Error + ? reason.message + : "桌宠精灵图绘制失败。", + ); } }, [frameColumn, frameRow, spriteReady]); return (
{ if (embedded || event.button !== 0) return;