Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

fix(studio): match the A-roll template category translation key

罗高a744b931726d
diff --git a/studio/src/i18n/ConnectionI18n.test.ts b/studio/src/i18n/ConnectionI18n.test.ts
index 86510444..d5cd769a 100644
--- a/studio/src/i18n/ConnectionI18n.test.ts
+++ b/studio/src/i18n/ConnectionI18n.test.ts
@@ -2,7 +2,7 @@
import { afterEach, expect, it, vi } from 'vitest';
import page from '../../../web/connect.html?raw';
import { mountConnection } from '../../../web/connect';
-import { translate, type Locale } from './messages';
+import { dictionaries, languages, translate, type Locale } from './messages';
let controller: ReturnType<typeof mountConnection> | undefined;
afterEach(() => { controller?.destroy(); controller = undefined; document.body.replaceChildren(); vi.restoreAllMocks(); vi.unstubAllGlobals(); });
@@ -14,7 +14,7 @@ it('updates live dialog labels while preserving the chosen client, search, previ
vi.spyOn(HTMLMediaElement.prototype, 'load').mockImplementation(() => {});
vi.spyOn(navigator.clipboard, 'writeText').mockResolvedValue();
const info = { name: 'OpenMotion', version: '0.6.2', previewUrl: 'http://localhost:4173', dataDirectory: '/test/workspace', transport: { type: 'stdio', command: 'node', args: ['mcp.ts'], env: { MOTION_DATA_DIR: '/test/workspace' } }, tools: [{ name: 'motion_import_assets', description: 'Import assets' }, { name: 'motion_list_templates', description: 'List templates' }, { name: 'motion_get_template', description: 'Template details' }] };
- const template = { id: 'reference', title: 'Preview', author: 'Creator', description: 'Original template description', tags: [], collection: 'moment', kind: 'reference' };
+ const template = { id: 'reference', title: 'Preview', author: 'Creator', description: 'Original template description', tags: [], role: 'a-roll', collection: 'moment', kind: 'reference' };
const warning = '模板更新失败,使用已缓存目录:HTTP 503';
vi.stubGlobal('fetch', vi.fn(async (url: string) => new Response(JSON.stringify(url.endsWith('/integration') ? info : { items: [template], total: 1, entryTotal: 1, catalogTotal: 1, offset: 0, next: null, warning }))));
const root = document.createElement('div');
@@ -24,13 +24,19 @@ it('updates live dialog labels while preserving the chosen client, search, previ
controller = mountConnection(root, { locale: 'zh-CN', t: t('zh-CN'), close() {}, useTemplate() {} });
controller.resume();
await vi.waitFor(() => expect(root.querySelectorAll('[data-template-id]')).toHaveLength(1));
+ expect(root.querySelector('.connect-template-category')?.textContent).toBe('口播剪辑');
+ root.querySelector<HTMLButtonElement>('.connect-template-cover')!.click();
root.querySelector<HTMLButtonElement>('#host-claude')!.click();
const search = root.querySelector<HTMLInputElement>('#template-search')!;
search.value = 'keep this query';
const card = root.querySelector('[data-template-id]'), video = root.querySelector('video');
const instruction = root.querySelector('#setup-prompt')!.textContent;
- for (const locale of ['ja', 'de', 'ru', 'pt-BR', 'en'] as const) {
+ for (const { locale } of languages) {
controller.setLanguage(locale, t(locale));
+ const category = locale === 'en' ? 'A-roll Cuts' : dictionaries[locale]['A-roll Cuts'];
+ expect(root.querySelector('.connect-template-category')?.textContent).toBe(category);
+ expect(root.querySelector('.connect-template-category')?.getAttribute('title')).toBe(category);
+ expect(root.querySelector('#preview-detail')?.textContent).toBe(category);
expect(root.querySelector('#host-claude')?.getAttribute('aria-selected')).toBe('true');
expect(root.querySelector('#config-description')?.textContent).toBe(translate(locale, 'Use this configuration to connect, keeping your existing services.'));
expect(root.querySelector('#service-status')?.textContent).toBe(translate(locale, 'Workspace reachable · v{version}', { version: '0.6.2' }));
diff --git a/studio/src/i18n/de.json b/studio/src/i18n/de.json
index 3604eb3d..bc80dbdb 100644
--- a/studio/src/i18n/de.json
+++ b/studio/src/i18n/de.json
@@ -1460,7 +1460,7 @@
"Original video": "Originalvideo",
"Reference video": "Referenzvideo",
"Occurs every frame.": "tritt in jedem Frame auf.",
- "A-roll cuts": "Mündlicher Sendeausschnitt",
+ "A-roll Cuts": "Mündlicher Sendeausschnitt",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Ja. Die Vorlage wird zu einem bearbeitbaren Projekt. Sie können die Linse, den Text, die Farbe und den Rhythmus anpassen oder die Änderungen weiterhin dem Agenten überlassen. Nachdem Sie die Projektdatei gespeichert haben, können Sie mit den Materialien weiterarbeiten.",
"Reproducible template": "Reproduzierbare Vorlage",
"Editable layers": "Bearbeitbare Ebenen",
diff --git a/studio/src/i18n/es.json b/studio/src/i18n/es.json
index 88723fdc..22f16b51 100644
--- a/studio/src/i18n/es.json
+++ b/studio/src/i18n/es.json
@@ -1460,7 +1460,7 @@
"Original video": "Vídeo original",
"Reference video": "Vídeo de referencia",
"Occurs every frame.": "ocurre en cada cuadro.",
- "A-roll cuts": "Clip de transmisión oral",
+ "A-roll Cuts": "Clip de transmisión oral",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Sí. La plantilla se convertirá en un proyecto editable. Puedes ajustar la lente, el texto, el color y el ritmo, o puedes continuar dejando que el Agente lo modifique. Después de guardar el archivo del proyecto, puedes continuar creando con los materiales.",
"Reproducible template": "Plantilla reproducible",
"Editable layers": "Capas editables",
diff --git a/studio/src/i18n/fr.json b/studio/src/i18n/fr.json
index d4f3a421..c752a113 100644
--- a/studio/src/i18n/fr.json
+++ b/studio/src/i18n/fr.json
@@ -1460,7 +1460,7 @@
"Original video": "Vidéo originale",
"Reference video": "Vidéo de référence",
"Occurs every frame.": "se produit à chaque image.",
- "A-roll cuts": "Extrait de diffusion orale",
+ "A-roll Cuts": "Extrait de diffusion orale",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Oui. Le modèle deviendra un projet modifiable. Vous pouvez ajuster l'objectif, le texte, la couleur et le rythme, ou vous pouvez continuer à laisser l'agent les modifier. Après avoir enregistré le fichier de projet, vous pouvez continuer à créer avec les matériaux.",
"Reproducible template": "Modèle reproductible",
"Editable layers": "Calques modifiables",
diff --git a/studio/src/i18n/it.json b/studio/src/i18n/it.json
index 5edf8246..840b729f 100644
--- a/studio/src/i18n/it.json
+++ b/studio/src/i18n/it.json
@@ -1460,7 +1460,7 @@
"Original video": "Video originale",
"Reference video": "Video di riferimento",
"Occurs every frame.": "si verifica in ogni fotogramma.",
- "A-roll cuts": "Clip della trasmissione orale",
+ "A-roll Cuts": "Clip della trasmissione orale",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Sì. Il modello diventerà un progetto modificabile. Puoi regolare la lente, il testo, il colore e il ritmo oppure puoi continuare a lasciare che sia l'Agente a modificarlo. Dopo aver salvato il file di progetto, puoi continuare a creare con i materiali.",
"Reproducible template": "Modello riproducibile",
"Editable layers": "Livelli modificabili",
diff --git a/studio/src/i18n/ja.json b/studio/src/i18n/ja.json
index a9993609..7d3478eb 100644
--- a/studio/src/i18n/ja.json
+++ b/studio/src/i18n/ja.json
@@ -1427,7 +1427,7 @@
"Original video": "オリジナルビデオ",
"Reference video": "参考動画",
"Occurs every frame.": "はフレームごとに発生します。",
- "A-roll cuts": "口頭放送クリップ",
+ "A-roll Cuts": "口頭放送クリップ",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "はい。テンプレートは編集可能なプロジェクトになります。レンズ、テキスト、色、リズムを調整することも、エージェントに変更を継続させることもできます。プロジェクトファイルを保存したら、その素材を使って引き続き作成できます。",
"Reproducible template": "再現可能なテンプレート",
"Editable layers": "編集可能なレイヤー",
diff --git a/studio/src/i18n/ko.json b/studio/src/i18n/ko.json
index 643085a7..094da4e1 100644
--- a/studio/src/i18n/ko.json
+++ b/studio/src/i18n/ko.json
@@ -1427,7 +1427,7 @@
"Original video": "河始视频",
"Reference video": "참고영상",
"Occurs every frame.": "发生은 每一帧입니다.",
- "A-roll cuts": "구술 방송 영상",
+ "A-roll Cuts": "구술 방송 영상",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "그렇습니다. 템플릿은 편집 가능한 프로젝트가 됩니다. 렌즈, 텍스트, 색상 및 리듬을 조정하거나 에이전트가 계속 수정하도록 할 수 있습니다. 프로젝트 파일을 저장한 후 계속해서 재료를 사용하여 생성할 수 있습니다.",
"Reproducible template": "재현 가능한 템플릿",
"Editable layers": "편집 가능한 레이어",
diff --git a/studio/src/i18n/pt-BR.json b/studio/src/i18n/pt-BR.json
index 01e90aed..788f6363 100644
--- a/studio/src/i18n/pt-BR.json
+++ b/studio/src/i18n/pt-BR.json
@@ -1460,7 +1460,7 @@
"Original video": "Vídeo original",
"Reference video": "Vídeo de referência",
"Occurs every frame.": "ocorre a cada quadro.",
- "A-roll cuts": "Clipe de transmissão oral",
+ "A-roll Cuts": "Clipe de transmissão oral",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Sim. O modelo se tornará um projeto editável. Você pode ajustar a lente, o texto, a cor e o ritmo ou pode continuar permitindo que o Agente os modifique. Após salvar o arquivo do projeto, você pode continuar criando com os materiais.",
"Reproducible template": "Modelo reproduzível",
"Editable layers": "Camadas editáveis",
diff --git a/studio/src/i18n/ru.json b/studio/src/i18n/ru.json
index a8ec8b9f..6718a9d3 100644
--- a/studio/src/i18n/ru.json
+++ b/studio/src/i18n/ru.json
@@ -1482,7 +1482,7 @@
"Original video": "Оригинальное видео",
"Reference video": "Справочное видео",
"Occurs every frame.": "происходит в каждом кадре.",
- "A-roll cuts": "Ролик из устной трансляции",
+ "A-roll Cuts": "Ролик из устной трансляции",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Да. Шаблон станет редактируемым проектом. Вы можете настроить линзу, текст, цвет и ритм или позволить агенту изменять их. После сохранения файла проекта вы можете продолжить работу с материалами.",
"Reproducible template": "Воспроизводимый шаблон",
"Editable layers": "Редактируемые слои",
diff --git a/studio/src/i18n/tr.json b/studio/src/i18n/tr.json
index 2fbd0868..73235810 100644
--- a/studio/src/i18n/tr.json
+++ b/studio/src/i18n/tr.json
@@ -1427,7 +1427,7 @@
"Original video": "Orijinal video",
"Reference video": "Referans videosu",
"Occurs every frame.": "her karede ortaya çıkar.",
- "A-roll cuts": "Sözlü yayın klibi",
+ "A-roll Cuts": "Sözlü yayın klibi",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "Evet. Şablon düzenlenebilir bir proje haline gelecektir. Merceği, metni, rengi ve ritmi ayarlayabilir veya Temsilcinin bunları değiştirmesine izin vermeye devam edebilirsiniz. Proje dosyasını kaydettikten sonra malzemelerle oluşturmaya devam edebilirsiniz.",
"Reproducible template": "Tekrarlanabilir şablon",
"Editable layers": "Düzenlenebilir katmanlar",
diff --git a/studio/src/i18n/zh-CN.json b/studio/src/i18n/zh-CN.json
index b94f32f6..e7d55bd4 100644
--- a/studio/src/i18n/zh-CN.json
+++ b/studio/src/i18n/zh-CN.json
@@ -1427,7 +1427,7 @@
"Original video": "原始视频",
"Reference video": "参考视频",
"Occurs every frame.": "发生在每一帧。",
- "A-roll cuts": "口播剪辑",
+ "A-roll Cuts": "口播剪辑",
"Yes. The template will become an editable project. You can adjust the lens, text, color and rhythm, or you can continue to let the Agent modify it. After saving the project file, you can continue creating with the materials.": "可以。模板会成为可编辑工程,你可以调整镜头、文字、颜色与节奏,也可以继续让 Agent 修改。保存工程文件后,可带着素材继续创作。",
"Reproducible template": "可复刻模板",
"Editable layers": "可编辑图层",