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.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
fix(studio): localize project lint dialog subtitle
罗高ff65d3a587f0
diff --git a/studio/src/components/LintModal.tsx b/studio/src/components/LintModal.tsxindex bab59308..5df4b8a3 100644--- a/studio/src/components/LintModal.tsx+++ b/studio/src/components/LintModal.tsx@@ -15,7 +15,7 @@ export function LintModal({findings,projectId,projectDir,- title = "HyperFrame Lint Results",+ title,promptIntro = "Fix these HyperFrames lint issues",onClose,}: {@@ -30,6 +30,7 @@ export function LintModal({onClose: () => void;}) {const { t } = useI18n();+ const dialogTitle = title ?? t("HyperFrame Lint Results");const errors = findings.filter((f) => f.severity === "error");const warnings = findings.filter((f) => f.severity === "warning");const hasIssues = findings.length > 0;@@ -67,7 +68,7 @@ export function LintModal({ref={containerRef}role="dialog"aria-modal="true"- aria-label={title}+ aria-label={dialogTitle}tabIndex={-1}className="bg-neutral-950 border border-neutral-800 rounded-xl shadow-2xl w-full max-w-xl max-h-[80vh] flex flex-col overflow-hidden outline-hidden"onClick={(e) => e.stopPropagation()}@@ -90,7 +91,7 @@ export function LintModal({? t("{errors}, {warnings}", { errors: t("{count} errors", { count: errors.length }), warnings: t("{count} warnings", { count: warnings.length }) }): t("All checks passed")}</h2>- <p className="text-xs text-neutral-500">{title}</p>+ <p className="text-xs text-neutral-500">{dialogTitle}</p></div></div><buttondiff --git a/studio/src/i18n/I18n.test.tsx b/studio/src/i18n/I18n.test.tsxindex 535cfbf5..d4d1eea5 100644--- a/studio/src/i18n/I18n.test.tsx+++ b/studio/src/i18n/I18n.test.tsx@@ -9,6 +9,7 @@ const zhCN = { ...baseZhCN, ...mvpZhCN };import { FlatSelectRow } from '../components/editor/propertyPanelFlatSelectRow';import { Section } from '../components/editor/propertyPanelPrimitives';import { StudioToast } from '../components/StudioToast';+import { LintModal } from '../components/LintModal';import { systemMessage } from './systemMessages';import { HF_COLOR_GRADING_PRESETS, HF_COLOR_GRADING_PALETTES } from '@hyperframes/core/color-grading';import { FlatColorGradingAccessory } from '../components/editor/propertyPanelFlatColorGradingAccessory';@@ -171,6 +172,37 @@ it('updates an already visible toast when the interface language changes', () =>expect(host.querySelector('[role="status"]')?.textContent).toContain('Undid: Edit layer style');});+it('localizes the complete lint success dialog and updates it when the language changes', () => {+ function Results() {+ const { setLocale } = useI18n();+ return <><button onClick={() => setLocale('en')}>Switch</button><LintModal findings={[]} projectId="demo" onClose={vi.fn()} /></>;+ }+ act(() => root.render(<I18nProvider initialLocale="zh-CN"><Results /></I18nProvider>));+ const dialog = host.querySelector('[role="dialog"]')!;+ expect(dialog.getAttribute('aria-label')).toBe('HyperFrame 检查结果');+ expect(dialog.querySelector('h2')?.textContent).toBe('所有检查均通过');+ expect(dialog.querySelector('p')?.textContent).toBe('HyperFrame 检查结果');+ expect(dialog.textContent).toContain('未发现错误或警告,合成检查通过。');+ act(() => host.querySelector('button')!.click());+ expect(host.querySelector('[role="dialog"]')).toBe(dialog);+ expect(dialog.getAttribute('aria-label')).toBe('HyperFrame Lint Results');+ expect(dialog.querySelector('h2')?.textContent).toBe('All checks passed');+ expect(dialog.querySelector('p')?.textContent).toBe('HyperFrame Lint Results');+ expect(dialog.textContent).toContain('No errors or warnings found. Your composition looks good!');+});++it('preserves custom console-error titles and original diagnostics in the shared lint dialog', () => {+ const message = 'ReferenceError: Preview is not defined';+ act(() => root.render(<I18nProvider initialLocale="zh-CN">+ <LintModal findings={[{ severity: 'error', message }]} projectId="demo" title="预览控制台错误" onClose={vi.fn()} />+ </I18nProvider>));+ const dialog = host.querySelector('[role="dialog"]')!;+ expect(dialog.getAttribute('aria-label')).toBe('预览控制台错误');+ expect(dialog.querySelector('p')?.textContent).toBe('预览控制台错误');+ expect(dialog.textContent).toContain(message);+ expect(dialog.textContent).not.toContain('HyperFrame');+});+it('updates runtime grading feedback without rebuilding the grading controls', () => {function GradingFeedback() {const { setLocale } = useI18n();diff --git a/studio/src/i18n/de.json b/studio/src/i18n/de.jsonindex 0fb9e11c..d6e8b2c5 100644--- a/studio/src/i18n/de.json+++ b/studio/src/i18n/de.json@@ -304,6 +304,7 @@"Hue": "Farbton","Hue range": "Farbtonbereich","Hue softness": "Farbtonweichheit",+ "HyperFrame Lint Results": "HyperFrame-Prüfergebnisse","Import": "Importieren","Import .cube LUT": ".cube LUT importieren","Import local font files": "Lokale Schriftarten importieren",diff --git a/studio/src/i18n/es.json b/studio/src/i18n/es.jsonindex 534a90df..b6766fb6 100644--- a/studio/src/i18n/es.json+++ b/studio/src/i18n/es.json@@ -304,6 +304,7 @@"Hue": "Tono","Hue range": "Rango de tono","Hue softness": "Suavidad del tono",+ "HyperFrame Lint Results": "Resultados de comprobación de HyperFrame","Import": "Importar","Import .cube LUT": "Importar LUT .cube","Import local font files": "Importar fuentes locales",diff --git a/studio/src/i18n/fr.json b/studio/src/i18n/fr.jsonindex cab8cb95..94133a16 100644--- a/studio/src/i18n/fr.json+++ b/studio/src/i18n/fr.json@@ -304,6 +304,7 @@"Hue": "Teinte","Hue range": "Plage de teintes","Hue softness": "Teinte douceur",+ "HyperFrame Lint Results": "Résultats de vérification HyperFrame","Import": "Importer","Import .cube LUT": "Importer une LUT .cube","Import local font files": "Importer des polices locales",diff --git a/studio/src/i18n/it.json b/studio/src/i18n/it.jsonindex 97e70383..e16f9ce7 100644--- a/studio/src/i18n/it.json+++ b/studio/src/i18n/it.json@@ -304,6 +304,7 @@"Hue": "Tonalità","Hue range": "Gamma di tonalità","Hue softness": "Tonalità morbida",+ "HyperFrame Lint Results": "Risultati della verifica HyperFrame","Import": "Importazione","Import .cube LUT": "Importa .cube LUT","Import local font files": "Importa caratteri locali",diff --git a/studio/src/i18n/ja.json b/studio/src/i18n/ja.jsonindex 3f4dff90..2a5aa7d0 100644--- a/studio/src/i18n/ja.json+++ b/studio/src/i18n/ja.json@@ -304,6 +304,7 @@"Hue": "色相","Hue range": "色相範囲","Hue softness": "色合いの柔らかさ",+ "HyperFrame Lint Results": "HyperFrame チェック結果","Import": "インポート","Import .cube LUT": ".cube LUTのインポート","Import local font files": "ローカルフォントをインポートする",diff --git a/studio/src/i18n/ko.json b/studio/src/i18n/ko.jsonindex 31274649..a4329844 100644--- a/studio/src/i18n/ko.json+++ b/studio/src/i18n/ko.json@@ -304,6 +304,7 @@"Hue": "색조","Hue range": "색조 범위","Hue softness": "색조 부드러움",+ "HyperFrame Lint Results": "HyperFrame 검사 결과","Import": "가져오기","Import .cube LUT": ".cube LUT 가져오기","Import local font files": "로컬 글꼴 가져오기",diff --git a/studio/src/i18n/pt-BR.json b/studio/src/i18n/pt-BR.jsonindex ad5cb397..360dcfcf 100644--- a/studio/src/i18n/pt-BR.json+++ b/studio/src/i18n/pt-BR.json@@ -304,6 +304,7 @@"Hue": "Matiz","Hue range": "Faixa de matiz","Hue softness": "Suavidade de matiz",+ "HyperFrame Lint Results": "Resultados da verificação do HyperFrame","Import": "Importar","Import .cube LUT": "Importar .cube LUT","Import local font files": "Importar fontes locais",diff --git a/studio/src/i18n/ru.json b/studio/src/i18n/ru.jsonindex dbb6bd03..2b102be5 100644--- a/studio/src/i18n/ru.json+++ b/studio/src/i18n/ru.json@@ -304,6 +304,7 @@"Hue": "Хюэ","Hue range": "Диапазон оттенков","Hue softness": "Мягкость оттенка",+ "HyperFrame Lint Results": "Результаты проверки HyperFrame","Import": "Импорт","Import .cube LUT": "Импорт .cube LUT","Import local font files": "Импортировать локальные шрифты",diff --git a/studio/src/i18n/tr.json b/studio/src/i18n/tr.jsonindex 6a24961f..e68225f6 100644--- a/studio/src/i18n/tr.json+++ b/studio/src/i18n/tr.json@@ -304,6 +304,7 @@"Hue": "Renk tonu","Hue range": "Ton aralığı","Hue softness": "Ton yumuşaklığı",+ "HyperFrame Lint Results": "HyperFrame denetim sonuçları","Import": "İçe Aktarma","Import .cube LUT": ".cube LUT'u içe aktar","Import local font files": "Yerel yazı tiplerini içe aktar",diff --git a/studio/src/i18n/zh-CN.json b/studio/src/i18n/zh-CN.jsonindex df5c8fe1..b45a8583 100644--- a/studio/src/i18n/zh-CN.json+++ b/studio/src/i18n/zh-CN.json@@ -304,6 +304,7 @@"Hue": "色相","Hue range": "色相范围","Hue softness": "色相柔和度",+ "HyperFrame Lint Results": "HyperFrame 检查结果","Import": "导入","Import .cube LUT": "导入 .cube LUT","Import local font files": "导入本地字体",