Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Simplify editor stage names, next steps, and shortcut labels

Bowen Xuedbf84894bbda
diff --git a/web/editor.js b/web/editor.js
index 6424320..048f632 100644
--- a/web/editor.js
+++ b/web/editor.js
@@ -44,27 +44,27 @@ export function editorErrorText(value, t = en => en) {
const node = oneLine(detail?.node_type), step = `${value?.phase || ''} ${value?.stage || ''} ${node}`;
const part = Number.isInteger(value?.index) ? value.index + 1 : null;
const generating = part ? t(`Generating part ${part}`, `生成第 ${part} 段`) : t('Generation', '生成');
- const stage = /encod|编码/i.test(step) ? t('Encoding', '编码') : /decod|解码/i.test(step) ? t('Decoding', '解码')
+ const stage = /encod|编码/i.test(step) ? t('Preparing', '准备生成') : /decod|解码/i.test(step) ? t('Making the video', '合成视频')
: /load|model|加载/i.test(step) ? t('Loading the model', '加载模型') : generating;
if (code === 'gpu_memory' || /out of memory|cuda.*memory|显存不足|显存不够/i.test(raw))
- return t(`${stage} ran out of GPU memory`, `${stage}时显存不足`);
+ return t(`${stage}: not enough GPU memory.`, `${stage}时显存不足。`);
const known = {
- chain_part_too_short: t('Each continued part must be at least 10 seconds.', '续接的每一段至少要 10 秒。'),
+ chain_part_too_short: t('Each continued part needs at least 10 seconds.', '接续的每段至少 10 秒。'),
chain_too_long: t('A video can have up to 5 parts.', '一条视频最多 5 段。'),
too_long: t('This part is longer than the maximum length. Shorten it and try again.', '这一段超过了最长时长,请缩短后再试。'),
missing_node: t('Generation is not ready. Restart FreeVideo.', '生成功能没有就绪,请重新启动 FreeVideo。'),
- chain_missing: t('Generation could not be submitted. Choose "Generate" again.', '提交生成时出错,请再点一次“生成”。'),
- result_mismatch: t('Reading the result failed. Choose "Generate" again.', '读取生成结果时出错,请再点一次“生成”。'),
- no_material: t('The media this part uses is missing.', '找不到这一段用到的素材。'),
+ chain_missing: t('Generation could not start. Choose "Generate" again.', '生成没能开始,请再点“生成”。'),
+ result_mismatch: t('Could not read the result. Choose "Generate" again.', '没能读取结果,请再点“生成”。'),
+ no_material: t('The media this part uses is missing. Import it again from the library.', '找不到这一段用到的素材,请在素材库重新导入。'),
};
if (known[code]) return known[code];
if (['model_missing', 'missing_model', 'model_not_found'].includes(code) || /(?:model|checkpoint|模型).*(?:not found|missing|不存在|缺失)/i.test(raw))
return t(`Loading the model failed: ${raw || code}`, `加载模型时出错:${raw || code}`);
if (['timeout', 'timed_out', 'generation_timeout'].includes(code) || /timed?\s*out|timeout|超时/i.test(raw))
- return t(`${stage} timed out`, `${stage}时等待超时`);
+ return t(`${stage} timed out. Try again.`, `${stage}时等待超时,请再试一次。`);
const received = raw || (/^[a-z_]+$/.test(code) ? '' : code);
return received ? t(`${generating} failed: ${received}`, `${generating}时出错:${received}`)
- : t(`${generating} failed`, `${generating}时出错`);
+ : t(`${generating} failed. Try again.`, `${generating}时出错,请再试一次。`);
}
function exportErrorText(value, t) {
const message = [value?.response?.error?.message, value?.response?.error, value?.response?.message, value?.message]
@@ -674,7 +674,7 @@ export function openEditor({api, app, from = null, panel = {}, components: given
});
}
const metadata = store.sources.get(sourceKey(value.source));
- try { state.apply(t('Insert source', '放入素材'), record => model.insertSource(record, {
+ try { state.apply(t('Insert clip', '放入素材'), record => model.insertSource(record, {
...value, width: metadata?.width ?? value.width, height: metadata?.height ?? value.height, text: value.text ?? metadata?.text,
at: value.at ?? model.duration(record)}), {clearRange: state.selection !== initialSelection});
return {ok: true};
@@ -821,7 +821,7 @@ export function openEditor({api, app, from = null, panel = {}, components: given
if (actions.selectionHeld()) return {say: t('Queued', '排队中')};
if (busySelection(selection)) return {say: t('This part is generating.', '这一段正在生成。')};
const flush = flushSpot(selection);
- if (flush) { selection = state.select(flush); said = t('Moved to right after the part before.', '已接在上一段后面。'); genbar?.say(said); }
+ if (flush) { selection = state.select(flush); said = t('Moved right after the previous part.', '已接在上一段后面。'); genbar?.say(said); }
else if (!actions.supportedSelection(selection)) {
const moved = emptySpot(selection);
if (!moved) return {say: t('Choose an empty spot on the timeline.', '请在时间线上选一段空白。')};
@@ -839,7 +839,7 @@ export function openEditor({api, app, from = null, panel = {}, components: given
if (waiting) {
hold(selection, text);
return {text, say: [said, used, waiting === 'ready' ? queuedReady()
- : t('Queued. It starts after the part before it.', '已排队,上一段完成后自动开始。')].filter(Boolean).join(' '), queued: true};
+ : t('Queued. It starts after the previous part finishes.', '已排队,上一段完成后自动开始。')].filter(Boolean).join(' '), queued: true};
}
const busyBefore = jobActive();
await actions.generate({text, selection});
diff --git a/web/editor_adjust_picture.js b/web/editor_adjust_picture.js
index 08ca6d9..64348ac 100644
--- a/web/editor_adjust_picture.js
+++ b/web/editor_adjust_picture.js
@@ -19,7 +19,7 @@ export function createAdjustPicture({state, sources, t, player, notes = null}) {
const submit = event => {
if (control.input.dataset.editClip === clip?.id && (control.input.value === '' || !Number.isFinite(Number(control.input.value))
|| Number(control.input.value) < min || Number(control.input.value) > max)) {
- inputError.textContent = t(`${label}: enter a number from ${min} to ${max}${suffix}.`, `${label}:请输入 ${min} 到 ${max}${suffix} 之间的数值。`);
+ inputError.textContent = t(`${label}: enter a number from ${min} to ${max}${suffix}.`, `${label}:请输入 ${min} 至 ${max}${suffix}。`);
inputError.hidden = false; invalidClip = clip?.id; control.input.setAttribute('aria-invalid', 'true'); return;
}
clearError();
diff --git a/web/editor_audio.js b/web/editor_audio.js
index ec0e232..b5b0fb3 100644
--- a/web/editor_audio.js
+++ b/web/editor_audio.js
@@ -229,7 +229,7 @@ export function attachAudioTracks(element, {state, t = en => en, actions = {}})
controls.replaceChildren();
for (const name of track.kind === 'audio' ? ['muted', 'solo', 'locked'] : ['muted', 'locked']) {
const active = !!track[name], button = el('button', 'fv-ed-audio-track-switch'); button.type = 'button'; button.dataset.flag = name; button.dataset.track = track.id;
- const labels = {muted: active ? t('Unmute', '取消静音') : t('Mute this track', '静音这条轨道'), solo: active ? t('Unsolo', '恢复全部轨道') : t('Solo this track', '只听这条轨道'), locked: active ? t('Unlock', '解除锁定') : t('Lock this track', '锁定这条轨道')};
+ const labels = {muted: active ? t('Unmute', '取消静音') : t('Mute this track', '静音这条轨道'), solo: active ? t('Hear all tracks', '恢复全部轨道') : t('Solo this track', '只听这条轨道'), locked: active ? t('Unlock', '解除锁定') : t('Lock this track', '锁定这条轨道')};
button.title = labels[name]; button.setAttribute('aria-label', button.title); button.setAttribute('aria-pressed', String(active));
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'), path = document.createElementNS(svg.namespaceURI, 'path'); svg.setAttribute('viewBox', '0 0 16 16'); svg.setAttribute('aria-hidden', 'true'); path.setAttribute('d', paths[name]); svg.append(path); button.append(svg);
// Switches are view settings: they change every snapshot alike and never enter the undo history.
diff --git a/web/editor_library.js b/web/editor_library.js
index 3d18540..0a35fdf 100644
--- a/web/editor_library.js
+++ b/web/editor_library.js
@@ -20,7 +20,7 @@ export function createEditorLibrary(host, {store, t, actions, state}) {
let listRead = Promise.resolve(), refreshTask = null, retryTimer = null, finishRetry = null, refreshAgain = false;
const expectedOutputs = new Set();
const uploading = new Map(), recentImports = new Map(), pendingAdds = new Map();
- const preparing = () => t('Preparing this clip. It goes on the timeline when ready.', '素材正在准备,准备好后会自动放到时间线上。');
+ const preparing = () => t('Preparing this clip. It goes on the timeline when ready.', '素材准备好后会自动放到时间线上。');
const cannotOpen = () => t('This file cannot be opened. Supported formats: ', '这个文件打不开。支持的格式:') + FORMATS;
function metadata(row, kind) {
const g = row.geometry || row, cached = store.sources.get(`${kind}:${row.id}`);
diff --git a/web/editor_speed.js b/web/editor_speed.js
index fed1e7e..566d02d 100644
--- a/web/editor_speed.js
+++ b/web/editor_speed.js
@@ -20,7 +20,7 @@ export function handleSpeedKey(event) {
export function speedErrorText(error, t) {
if (error?.code === 'speed_pending') return t('Speed can be adjusted after generation is complete.', '生成完成后可以调整速度。');
if (error?.code === 'speed_locked') return t('This track is locked', '这条轨道已锁定');
- if (error?.code === 'speed') return t('Enter a speed from 0.25 to 4.', '请输入 0.25 至 4 的速度。');
+ if (error?.code === 'speed') return t('Enter a speed from 0.25× to 4×.', '请输入 0.25× 至 4× 的速度。');
return null;
}
export function previewSpeed(media, clip, playing, sound = clip) {
diff --git a/web/editor_store.js b/web/editor_store.js
index 16f5e52..86a804e 100644
--- a/web/editor_store.js
+++ b/web/editor_store.js
@@ -307,7 +307,7 @@ export function createEditorStore(api, {t = en => en, notify = () => {}, onGener
},
onConflict: (record, nameSuffix) => { state.adopt({id: null, revision: 0, nameSuffix}); },
onCopied: () => notice('conflict', 'This edit changed elsewhere. Your changes here were saved as a copy.', '这条剪辑在别处改过,这里的改动已存为副本'),
- onMemory: () => notice('memory', 'Changes are kept in this page. Restart after updating to save them to disk.', '改动暂存在这个页面里,更新后重启即可保存到磁盘。'),
+ onMemory: () => notice('memory', 'Changes are kept in this page for now. Update and restart to save them.', '改动暂存在这个页面里,更新并重启后会保存。'),
// Automatic retries stay quiet; switching away while unsaved warns in editor.js.
onError: () => {}});
const reset = queue.reset;
diff --git a/web/editor_text.js b/web/editor_text.js
index e9baaa9..b43dadd 100644
--- a/web/editor_text.js
+++ b/web/editor_text.js
@@ -84,7 +84,7 @@ export function createEditorText({element,state,t,actions,adjust,player,toolbar,
const ability=done?await actions.speech.ability():null;
if(run!==speech.run)return;
if(ability){speech.available=ability.available;speech.need=ability.need;}
- if(!done||speech.need){speechEnd(t('Could not download','没能下载'));return;}
+ if(!done||speech.need){speechEnd(t('Could not download. Try again.','没能下载,请再试一次。'));return;}
if(!speech.available){speechEnd(speechFailed());return;}
speech.loading=false;
}
@@ -94,7 +94,7 @@ export function createEditorText({element,state,t,actions,adjust,player,toolbar,
if(!job){speechEnd(speechFailed());return;}
speech.job=job.id??null;
if(speechResult(job))speech.stop=actions.speech.watch(job.id,value=>{if(run!==speech.run)return false;if(!value){speechEnd(speechFailed());return false;}return speechResult(value);});
- }catch{if(run===speech.run)speechEnd(speech.loading?t('Could not download','没能下载'):speechFailed());}
+ }catch{if(run===speech.run)speechEnd(speech.loading?t('Could not download. Try again.','没能下载,请再试一次。'):speechFailed());}
}
function commitDraft(){if(draft){const change=draft.change;apply(t('Text','文字'),change);const c=selectedText();if(c?.text_kind==='text')lastStyle={...styleOf(state.record,c)};}}
// Editing a text ended. One left without words is taken away; one that never had any leaves no step behind.
diff --git a/web/editor_text_layout.js b/web/editor_text_layout.js
index 2d5a960..5c9f2c9 100644
--- a/web/editor_text_layout.js
+++ b/web/editor_text_layout.js
@@ -66,4 +66,4 @@ export function drawText(ctx,entry,width,height) {
ctx.restore(); return layout;
}
export const overTwoHint=t=>t('Over two lines','超过两行');
-export const missingHint=(chars,t)=>chars.length ? t(`This font is missing: ${chars.join(' ')}`,`这款字体缺少:${chars.join(' ')}`) : '';
+export const missingHint=(chars,t)=>chars.length ? t(`This font is missing ${chars.join(' ')}. Choose another font.`,`这款字体缺少:${chars.join(' ')},请换一种字体。`) : '';
diff --git a/web/editor_tracks.js b/web/editor_tracks.js
index 46d5f61..f42897a 100644
--- a/web/editor_tracks.js
+++ b/web/editor_tracks.js
@@ -1080,7 +1080,7 @@ export function createTracks(host, {state, sources = {}, t = en => en, actions =
// following clips. The insertion line is an indication, not an edit.
const at = snap(frameAt(event), transportSnapPoints(state, allPoints([]), event), state.zoom).frame;
if (actions.insertSource) Promise.resolve(actions.insertSource({...payload, at}, {loadMetadata: true})).catch(error => actions.editError?.(error));
- else attempt(t('Insert source', '放入素材'), record => model.insertSource(record, {...payload, at}), {clearRange: true});
+ else attempt(t('Insert clip', '放入素材'), record => model.insertSource(record, {...payload, at}), {clearRange: true});
showInsertion(null); showGuide(null); dropPoint = null; dropPreviewKey = ''; draggedSource = null;
}
function zoom(value, anchor = scroll.clientWidth / 2) {
diff --git a/web/editor_transport.js b/web/editor_transport.js
index bd7da4c..a3c5ee8 100644
--- a/web/editor_transport.js
+++ b/web/editor_transport.js
@@ -48,8 +48,8 @@ export function registerEditorShortcuts(audioRows = [], speedRows = []) {
.map(([id, key, en, zh]) => row(id, `Ctrl / Cmd + ${key}`, en, zh, 'edit')),
row('addText', 'T', 'Add text', '添加文字', 'text'),
row('nextSubtitle', 'Enter', 'Next subtitle while editing', '编辑时添加下一条字幕', 'text'),
- row('cancelSelection', 'Esc', 'Cancel selection / gesture / close popup', '取消选择、拖动或关闭弹层', 'edit'),
- row('selectPart', 'Enter', 'Select the focused part', '选中聚焦的段', 'edit'),
+ row('cancelSelection', 'Esc', 'Cancel selection or dragging, or close a popup', '取消选择、拖动或关闭弹窗', 'edit'),
+ row('selectPart', 'Enter', 'Select the highlighted part', '选中高亮的段', 'edit'),
row('toggleSelection', 'Ctrl / Cmd + click', 'Add or remove a part from selection', '添加或移出选择', 'edit'),
row('rangeSelection', 'Shift + click', 'Select parts between two points', '选中两处之间的段', 'edit'),
row('boxSelection', 'Shift + drag', 'Select parts in a box', '框选多段', 'edit'),