From 78f02978fdcf9d4d4b3d6e18a8eb014dc3fefcea Mon Sep 17 00:00:00 2001 From: nanxun Date: Sun, 17 May 2026 15:57:57 +0800 Subject: [PATCH] fix-settings-i18n-garbled-encoding-and-english-text --- frontend/src/views/SettingsView.vue | 176 ++++++++++++++-------------- 1 file changed, 89 insertions(+), 87 deletions(-) diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index 5658ea5..eb3a95a 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -376,7 +376,7 @@ const eventScriptEnvironmentExamples = [ const eventScriptModeOptions = [ { label: "璺緞", value: "path" }, - { label: "鑴氭湰鏂囨湰", value: "inline" } + { label: "脚本文本", value: "inline" } ]; const uploadTargetOptions = [ @@ -459,12 +459,12 @@ const canSendTestWebhook = computed(() => Boolean(form.webhookUrl.trim())); const segmentedExamplePath = computed(() => { const extension = form.defaultOutputFormat === 1 ? "ts" : "mp4"; - return `Douyin/2026/04/15/涓绘挱鍚?221530_origin_涓绘挱鍚峗鐩存挱鏍囬_123456789_00001.${extension}`; + return `Douyin/2026/04/15/主播名?221530_origin_主播名峗直播标题_123456789_00001.${extension}`; }); const nestedSegmentedExamplePath = computed(() => { const extension = form.defaultOutputFormat === 1 ? "ts" : "mp4"; - return `Douyin/origin/2026/04/15/涓绘挱鍚?221530_origin_涓绘挱鍚峗鐩存挱鏍囬_123456789/221530_origin_涓绘挱鍚峗鐩存挱鏍囬_123456789_00001.${extension}`; + return `Douyin/origin/2026/04/15/主播名?221530_origin_主播名峗直播标题_123456789/221530_origin_主播名峗直播标题_123456789_00001.${extension}`; }); async function loadSettings() { @@ -492,11 +492,11 @@ const pwdForm = reactive({ const pwdRules = { currentPassword: [{ required: true, message: "Please enter the current password", trigger: "blur" }], newPassword: [ - { required: true, message: "璇疯緭鍏ユ柊瀵嗙爜", trigger: "blur" }, + { required: true, message: "请输入新密码", trigger: "blur" }, { min: 6, message: "Password must be at least 6 characters", trigger: "blur" } ], confirmPassword: [ - { required: true, message: "璇峰啀娆¤緭鍏ユ柊瀵嗙爜", trigger: "blur" }, + { required: true, message: "请再次输入新密码", trigger: "blur" }, { validator: (_rule: unknown, value: string, callback: (error?: Error) => void) => { if (value !== pwdForm.newPassword) { @@ -587,7 +587,7 @@ async function testEventScript(eventType: ScriptEventType) { } catch (error) { const result: EventScriptTestResult = { success: false, - message: getApiErrorMessage(error, "浜嬩欢鑴氭湰娴嬭瘯澶辫触") + message: getApiErrorMessage(error, "事件脚本测试失败") }; scriptTestResults[eventType] = result; ElMessage.error(result.message); @@ -611,7 +611,7 @@ async function testWebhook() { } catch (error) { const result: WebhookTestResult = { success: false, - message: getApiErrorMessage(error, "Webhook 娴嬭瘯澶辫触") + message: getApiErrorMessage(error, "Webhook 测试失败") }; webhookTestResult.value = result; ElMessage.error(result.message); @@ -737,7 +737,7 @@ async function exportSettingsBackup() { URL.revokeObjectURL(downloadUrl); ElMessage.success("Settings backup exported."); } catch (error) { - ElMessage.error(getApiErrorMessage(error, "绯荤粺璁剧疆瀵煎嚭澶辫触")); + ElMessage.error(getApiErrorMessage(error, "系统设置导出失败")); } finally { exportingSettings.value = false; } @@ -764,7 +764,7 @@ async function importSettingsBackup(event: Event) { Object.assign(form, data); ElMessage.success("Settings imported from backup."); } catch (error) { - ElMessage.error(getApiErrorMessage(error, "绯荤粺璁剧疆瀵煎叆澶辫触")); + ElMessage.error(getApiErrorMessage(error, "系统设置导入失败")); } finally { importingSettings.value = false; } @@ -963,7 +963,7 @@ watch(

褰曞埗鍩虹

-

Default quality, output format, segmentation, ffmpeg templates, and network tolerance settings are managed here.

+

默认画质、输出格式、分段策略、ffmpeg 模板和网络容错等录制基础参数在此集中管理。

@@ -973,12 +973,12 @@ watch( - + - + - + - + - + - + - + - + - + - + - + @@ -1064,18 +1064,18 @@ watch(
-

瀛樺偍淇濇姢

-

Pause recording and MP4 finalization below the threshold, then resume once free space recovers.

+

存储保护

+

当磁盘空闲空间低于阈值时暂停录制和 MP4 转码,空间恢复后自动继续。

- + - + - +
- 鎭㈠闃堝€煎缓璁珮浜庢殏鍋滈槇鍊硷紝閬垮厤纾佺洏绌洪棿鍦ㄤ复鐣屽€奸檮杩戝弽澶嶆姈鍔ㄣ€侻P4 杞爜浼氶澶栧崰鐢ㄤ腑闂?TS 鏂囦欢绌洪棿銆?
+ 恢复阈值建议高于暂停阈值,避免磁盘空间在临界值附近反复抖动。MP4 转码会额外占用中间 TS 文件空间。 +
-

淇濈暀娓呯悊

-

Clean up inactive sessions, tasks, results, and logs by retention age, with optional file deletion.

+

保留清理

+

按保留天数清理不活跃的会话、任务、结果和日志,可选删除磁盘文件。

- + - + - + - + - - + +
Run now and the daily retention cleanup use the same saved rules. Save this section first if you just changed the filters.
- Run cleanup now + 立即执行清理
-
绀轰緥杈撳嚭
+
示例输出
榛樿鍒嗘锛歿{ segmentedExamplePath }}
鐩綍妯℃澘鍚?{fileStem}锛歿{ nestedSegmentedExamplePath }}
@@ -1267,26 +1268,26 @@ watch( - + -

鍚庡彴宸℃

-

Control scheduled live-status checks and automatic recording starts when a room goes live.

+

后台巡检

+

控制定时直播状态检查和直播间开播时自动开始录制。

- + - + - + @@ -1346,7 +1347,7 @@ watch( - + @@ -1356,12 +1357,12 @@ watch( - + - + @@ -1380,17 +1381,17 @@ watch( - + - + - + @@ -1400,17 +1401,17 @@ watch( - + - + - + @@ -1423,7 +1424,7 @@ watch(
-

骞冲彴浠g悊

+

平台代理

These proxies only affect platform-side status checks and stream requests, not email, webhook, or file uploads.

@@ -1435,7 +1436,7 @@ watch(
- + @@ -1448,7 +1449,7 @@ watch( - + @@ -1461,7 +1462,7 @@ watch( - + @@ -1469,22 +1470,23 @@ watch(
- + -

浜嬩欢鑴氭湰

+

事件脚本

- 寮€鎾€佷笅鎾€佸垎鐗囧畬鎴愭椂閮藉彲浠ユ墽琛岃剼鏈€傝剼鏈敮鎸佽矾寰勬ā寮忓拰鐩存帴濉啓鏂囨湰妯″紡锛涙祴璇曟寜閽細鐩存帴鐢ㄥ綋鍓嶈〃鍗曞€兼墽琛岋紝涓嶈姹傚厛淇濆瓨銆?

+ 开播、下播、分片完成时都可以执行脚本。脚本支持路径模式和直接填写文本模式;测试按钮会直接用当前表单值执行,不要求先保存。 +

- + - + @@ -1495,8 +1497,8 @@ watch(
-

Live started

-

Triggered when the room first enters the online state.

+

开播

+

当直播间首次进入开播状态时触发。

@@ -1516,14 +1518,14 @@ watch( :disabled="!canTestScript('live_started')" @click="testEventScript('live_started')" > - 娴嬭瘯鑴氭湰 + 测试脚本
- +
- 鑷畾涔夋棩蹇楄緭鍑猴細{{ scriptTestResults.live_started?.customLogOutput }} + 自定义日志输出:{{ scriptTestResults.live_started?.customLogOutput }}
@@ -1549,8 +1551,8 @@ watch(
-

涓嬫挱

-

Triggered when the room changes from online back to offline.

+

下播

+

当直播间从开播状态回到离线状态时触发。

@@ -1570,14 +1572,14 @@ watch( :disabled="!canTestScript('live_ended')" @click="testEventScript('live_ended')" > - 娴嬭瘯鑴氭湰 + 测试脚本
- +
-

鍒嗙墖瀹屾垚

-

Triggered after MP4 finalization completes and the segment status becomes completed.

+

分片完成

+

当 MP4 转码最终化完成且分段状态变为已完成时触发。

@@ -1624,14 +1626,14 @@ watch( :disabled="!canTestScript('segment_completed')" @click="testEventScript('segment_completed')" > - 娴嬭瘯鑴氭湰 + 测试脚本
- + - + - + - + @@ -1751,7 +1753,7 @@ watch(
-
Webhook 鍙橀噺
+
Webhook 变量
{{ token }}
@@ -1759,7 +1761,7 @@ watch(
The test sends a sample live_started payload, including sample event script output, using the current URL, headers, and timeout values from this form.
- 娴嬭瘯 Webhook + 测试 Webhook
@@ -1790,7 +1792,7 @@ watch( - + @@ -1817,12 +1819,12 @@ watch( - + - + @@ -1861,7 +1863,7 @@ watch(
-

寮傚父鎻愰啋妯℃澘

+

异常提醒妯℃澘

Exception emails inject source, summary, detail, task context values, and optional event script output into the HTML body.

@@ -1942,7 +1944,7 @@ watch(
- +
-
褰撳墠淇敼涓嶄細鑷姩淇濆瓨
-
You can save the current settings from anywhere on this page.
+
当前修改不会自动保存
+
您可以在此页面任意位置保存当前设置。
- 淇濆瓨璁剧疆 + 保存设置