diff --git a/calliope-web/src/lib/components/LanguageSwitcher.svelte b/calliope-web/src/lib/components/LanguageSwitcher.svelte index 909576bf..39c35b22 100644 --- a/calliope-web/src/lib/components/LanguageSwitcher.svelte +++ b/calliope-web/src/lib/components/LanguageSwitcher.svelte @@ -1,11 +1,12 @@ setLanguage(e.currentTarget.value as Language)} > English diff --git a/calliope-web/src/lib/components/QueueStage.svelte b/calliope-web/src/lib/components/QueueStage.svelte index 0943037e..76cc4cf7 100644 --- a/calliope-web/src/lib/components/QueueStage.svelte +++ b/calliope-web/src/lib/components/QueueStage.svelte @@ -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', diff --git a/calliope-web/src/lib/components/StoryStage.svelte b/calliope-web/src/lib/components/StoryStage.svelte index de57b38c..22e881bf 100644 --- a/calliope-web/src/lib/components/StoryStage.svelte +++ b/calliope-web/src/lib/components/StoryStage.svelte @@ -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: '', }), }); diff --git a/calliope-web/src/lib/components/video/JobInputsDrawer.svelte b/calliope-web/src/lib/components/video/JobInputsDrawer.svelte index 43cf94ce..1ac02c06 100644 --- a/calliope-web/src/lib/components/video/JobInputsDrawer.svelte +++ b/calliope-web/src/lib/components/video/JobInputsDrawer.svelte @@ -215,7 +215,7 @@ function applyToScene() { {/if} - Job #{activeJob.id} + {t('queue.jobLabel', { n: activeJob.id })} · {activeJob.status} {#if activeJob.completed_at} diff --git a/calliope-web/src/lib/i18n/en.ts b/calliope-web/src/lib/i18n/en.ts index 5b749fab..0124b7f0 100644 --- a/calliope-web/src/lib/i18n/en.ts +++ b/calliope-web/src/lib/i18n/en.ts @@ -24,6 +24,7 @@ export const en = { 'common.send': 'Send', 'common.stop': 'Stop', 'common.title': 'Title', + 'common.language': 'Language', // --- App shell / nav --- 'nav.canvas': 'AI Canvas', @@ -248,6 +249,8 @@ export const en = { 'canvas.sessionDeleted': 'Session deleted', 'canvas.chatUnlinked': 'Chat unlinked — moved to Sandbox', 'canvas.unlinkFailed': 'Unlink failed', + 'canvas.unlinkButton': 'Unlink', + 'canvas.resizePanel': 'Resize chat panel (drag or arrow keys), currently {width} pixels', 'canvas.sendFailed': 'Failed to send', 'canvas.runCancelled': 'Run cancelled', 'canvas.cancelFailed': 'Cancel failed', @@ -416,6 +419,7 @@ export const en = { 'story.saveSettingsFailed': 'Could not save settings', 'story.settingsTitle': 'Story settings', 'story.llmBanner': 'The story stage uses the active LLM to draft and refine beats.', + 'story.newBeat': 'New beat {n}', // --- Assets stage --- 'assets.title': 'Assets', @@ -610,6 +614,8 @@ export const en = { // --- Queue stage --- 'queue.sceneLabel': 'Scene', + 'queue.clipLabel': 'Clip #{n}', + 'queue.jobLabel': 'Job #{n}', 'queue.scene': 'Scene {n}', 'queue.sceneRef': 'Scene reference', 'queue.clipRef': 'Clip reference', diff --git a/calliope-web/src/lib/i18n/zh.ts b/calliope-web/src/lib/i18n/zh.ts index 51da3e66..343dd77d 100644 --- a/calliope-web/src/lib/i18n/zh.ts +++ b/calliope-web/src/lib/i18n/zh.ts @@ -26,6 +26,7 @@ export const zh: Dict = { 'common.send': '发送', 'common.stop': '停止', 'common.title': '标题', + 'common.language': '语言', // --- App shell / nav --- 'nav.canvas': 'AI 画布', @@ -248,6 +249,8 @@ export const zh: Dict = { 'canvas.sessionDeleted': '对话已删除', 'canvas.chatUnlinked': '对话已取消关联——已移至沙盒', 'canvas.unlinkFailed': '取消关联失败', + 'canvas.unlinkButton': '解除关联', + 'canvas.resizePanel': '调整对话面板大小(拖拽或方向键),当前 {width} 像素', 'canvas.sendFailed': '发送失败', 'canvas.runCancelled': '运行已取消', 'canvas.cancelFailed': '取消失败', @@ -416,6 +419,7 @@ export const zh: Dict = { 'story.saveSettingsFailed': '无法保存设置', 'story.settingsTitle': '故事设置', 'story.llmBanner': '故事阶段使用当前激活的大语言模型来起草和润色节拍。', + 'story.newBeat': '新节拍 {n}', // --- Assets stage --- 'assets.title': '素材', @@ -610,6 +614,8 @@ export const zh: Dict = { // --- Queue stage --- 'queue.sceneLabel': '场景', + 'queue.clipLabel': '片段 #{n}', + 'queue.jobLabel': '任务 #{n}', 'queue.scene': '场景 {n}', 'queue.sceneRef': '场景参考', 'queue.clipRef': '片段参考', diff --git a/calliope-web/src/routes/canvas/[id]/+page.svelte b/calliope-web/src/routes/canvas/[id]/+page.svelte index 64fca027..0b818d4a 100644 --- a/calliope-web/src/routes/canvas/[id]/+page.svelte +++ b/calliope-web/src/routes/canvas/[id]/+page.svelte @@ -1035,10 +1035,10 @@ title={running : activeSession ? t('canvas.unlinkFrom', { title: canvas.project.title }) : t('canvas.noChatYet')} - aria-label={`Unlink this chat from ${canvas.project.title}`} + aria-label={t('canvas.unlinkFrom', { title: canvas.project.title })} > - Unlink + {t('canvas.unlinkButton')} {:else} @@ -1097,7 +1097,7 @@ title={running type="button" class="chat-splitter" class:dragging - aria-label={`Resize chat panel (drag or arrow keys), currently ${Math.round(chatWidth)} pixels`} + aria-label={t('canvas.resizePanel', { width: Math.round(chatWidth) })} onmousedown={startDrag} onkeydown={(e) => { if (e.key === 'ArrowLeft') {