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 <noreply@anthropic.com>
这个提交存在于:
父节点
828f7c586d
当前提交
41592e2504
共有 2 个文件被更改,包括 10 次插入 和 8 次删除
|
|
@ -449,7 +449,7 @@ function navIcon(page: PageKey) {
|
|||
function PageLoading() {
|
||||
return (
|
||||
<p className="loading-state" role="status" aria-live="polite">
|
||||
Loading?
|
||||
加载中…
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
|
@ -551,9 +551,7 @@ function PetPage({
|
|||
}
|
||||
>
|
||||
<option value="app-ui">仅应用 UI 内</option>
|
||||
<option value="desktop-floating">
|
||||
桌面浮动
|
||||
</option>
|
||||
<option value="desktop-floating">桌面浮动</option>
|
||||
</select>
|
||||
</SettingCard>
|
||||
<SettingCard
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ export function DesktopPetView({ embedded = false }: { embedded?: boolean }) {
|
|||
setSpriteReady(true);
|
||||
};
|
||||
image.onerror = () => {
|
||||
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 (
|
||||
<main
|
||||
className={`pet-window pet-window-${state}${gameMode ? " pet-window-game" : ""}${embedded ? " pet-window-embedded" : ""}`}
|
||||
aria-label="AstrBot ??"
|
||||
aria-label="AstrBot 桌宠"
|
||||
data-tauri-drag-region={!embedded ? "true" : undefined}
|
||||
onMouseDown={(event) => {
|
||||
if (embedded || event.button !== 0) return;
|
||||
|
|
|
|||
正在加载…
添加表格
在新工单中引用