fix(i18n): 清除剩余硬编码英文文案并接入字典

消除 canvas 页 2 处 aria-label 与 Unlink 按钮、LanguageSwitcher aria、QueueStage "Clip #"、StoryStage "New beat"、JobInputsDrawer "Job #" 等硬编码英文;en/zh 字典同步新增 6 组 key 保持对齐。npm run check 0 errors。
This commit is contained in:
happymy
2026-09-13 08:19:24 +08:00
parent ba99cb4929
commit 389b4c0db7
7 changed files with 20 additions and 7 deletions
@@ -1,11 +1,12 @@
<script lang="ts">
import { language, setLanguage, type Language } from '$lib/i18n.svelte';
import { t } from '$lib/i18n.svelte';
</script>
<select
class="lang-switcher"
value={language.current}
aria-label="Language"
aria-label={t('common.language')}
onchange={(e) => setLanguage(e.currentTarget.value as Language)}
>
<option value="en">English</option>
@@ -166,7 +166,7 @@
for (const sc of scenes) {
if (sc.video_path) {
opts.push({
label: `Clip #${sc.order_index} · ${sc.heading || t('queue.sceneLabel')}`,
label: `${t('queue.clipLabel', { n: sc.order_index })} · ${sc.heading || t('queue.sceneLabel')}`,
path: sc.video_path,
kind: 'video',
group: 'clip',
@@ -216,7 +216,7 @@
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
order_index: nextIndex,
title: `New beat ${nextIndex}`,
title: t('story.newBeat', { n: nextIndex }),
description: '',
}),
});
@@ -215,7 +215,7 @@ function applyToScene() {
{/if}
<div class="job-head">
<span class="job-meta">Job #{activeJob.id}</span>
<span class="job-meta">{t('queue.jobLabel', { n: activeJob.id })}</span>
<span class="job-meta">·</span>
<span class="job-meta">{activeJob.status}</span>
{#if activeJob.completed_at}