diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a15a8a7..f262f589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,4 @@ -### 🛠️ Bug Fixes - * 修复 `$argument` 和 `$persistentStore` 载入顺序颠倒的问题 - * 正确顺序为先读取 `$argument` 再读取 `$persistentStore (BoxJs)` - * 即,有相同键名时,`$persistentStore (BoxJs)` 的值会覆盖 `$argument` 的值 - -### 🔄 Other Changes - * util 由 `submodule` 更改为 `package` +### 🆕 New Features + * `翻译器`允许通过`参数面板`传入任意`语言代码` + * 传入的`语言代码`如不受`翻译API`支持,则可能导致翻译失败,请先查阅各`翻译API`的`支持语言列表`进行确认 + * 例如:当使用`微软翻译`时,在`参数面板`的`Language[1]`填入`lzh`,可以将翻译语言设置为`中文(文言文)` diff --git a/arguments-builder.config.ts b/arguments-builder.config.ts index 3ffa82a6..cc5e3fe5 100644 --- a/arguments-builder.config.ts +++ b/arguments-builder.config.ts @@ -62,6 +62,120 @@ export default defineConfig({ description: "请选择要添加的字幕选项,如果为标准播放器,则会在字幕选项中新增勾选字幕选项。", }, + { + key: "Languages[0]", + name: "[字幕]主语言(源语言)", + defaultValue: "AUTO", + type: "string", + boxJsType: "selects", + description: + "当“主语言”字幕存在时,将生成“主语言/副语言(翻译)”与“主语言(外挂)”的字幕或字幕选项。", + options: [ + { + key: "AUTO", + label: "自动 - Automatic", + }, + { + key: "ZH", + label: "中文(自动)", + }, + { + key: "ZH-HANS", + label: "中文(简体)", + }, + { + key: "ZH-HK", + label: "中文(香港)", + }, + { + key: "ZH-HANT", + label: "中文(繁体)", + }, + { + key: "EN", + label: "English - 英语(自动)", + }, + { + key: "ES", + label: "Español - 西班牙语(自动)", + }, + { + key: "JA", + label: "日本語 - 日语", + }, + { + key: "KO", + label: "한국어 - 韩语", + }, + { + key: "DE", + label: "Deutsch - 德语", + }, + { + key: "FR", + label: "Français - 法语", + }, + { + key: "TR", + label: "Türkçe - 土耳其语", + }, + ], + }, + { + key: "Languages[1]", + name: "[字幕]副语言(目标语言)", + defaultValue: "ZH", + type: "string", + boxJsType: "selects", + description: + "当“副语言”字幕存在时,将生成“副语言/主语言(官方)”的字幕或字幕选项。", + options: [ + { + key: "ZH", + label: "中文(自动)", + }, + { + key: "ZH-HANS", + label: "中文(简体)", + }, + { + key: "ZH-HK", + label: "中文(香港)", + }, + { + key: "ZH-HANT", + label: "中文(繁体)", + }, + { + key: "EN", + label: "English - 英语(自动)", + }, + { + key: "ES", + label: "Español - 西班牙语(自动)", + }, + { + key: "JA", + label: "日本語 - 日语", + }, + { + key: "KO", + label: "한국어 - 韩语", + }, + { + key: "DE", + label: "Deutsch - 德语", + }, + { + key: "FR", + label: "Français - 法语", + }, + { + key: "TR", + label: "Türkçe - 土耳其语", + }, + ], + }, { key: "ShowOnly", name: "[翻译字幕]只显示翻译后字幕", diff --git a/package.json b/package.json index 70021917..768dd100 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dualsubs/universal", - "version": "1.5.6", + "version": "1.5.7", "organizationName": "🍿️ DualSubs", "displayName": "🍿️ DualSubs: 🔣 Universal", "description": "流媒体平台字幕增强及双语模块\n如需恢复TV完整支持\n请配合“ iRingo: 📺 TV”使用", diff --git a/template/boxjs.settings.json b/template/boxjs.settings.json index f2f5eee7..5e23cff2 100644 --- a/template/boxjs.settings.json +++ b/template/boxjs.settings.json @@ -1 +1 @@ -[{"id":"@DualSubs.YouTube.Settings.Switch","name":"总功能开关","type":"boolean","val":true,"desc":"是否启用此APP修改"},{"id":"@DualSubs.YouTube.Settings.Types","name":"[字幕]启用类型","type":"checkboxes","val":["Official","Translate"],"items":[{"key":"Official","label":"官方字幕(合成器)"},{"key":"Translate","label":"翻译字幕(翻译器)"}],"desc":"请选择要添加的字幕选项,如果为标准播放器,则会在字幕选项中新增勾选字幕选项。"},{"id":"@DualSubs.YouTube.Settings.ShowOnly","name":"[翻译字幕]只显示翻译后字幕","type":"boolean","val":false,"desc":"开启后仅显示翻译字幕,不做字幕合并操作。"}] \ No newline at end of file +[{"id":"@DualSubs.YouTube.Settings.Switch","name":"总功能开关","type":"boolean","val":true,"desc":"是否启用此APP修改"},{"id":"@DualSubs.YouTube.Settings.Types","name":"[字幕]启用类型","type":"checkboxes","val":["Official","Translate"],"items":[{"key":"Official","label":"官方字幕(合成器)"},{"key":"Translate","label":"翻译字幕(翻译器)"}],"desc":"请选择要添加的字幕选项,如果为标准播放器,则会在字幕选项中新增勾选字幕选项。"},{"id":"@DualSubs.YouTube.Settings.Languages[0]","name":"[字幕]主语言(源语言)","type":"selects","val":"AUTO","items":[{"key":"AUTO","label":"自动 - Automatic"},{"key":"ZH","label":"中文(自动)"},{"key":"ZH-HANS","label":"中文(简体)"},{"key":"ZH-HK","label":"中文(香港)"},{"key":"ZH-HANT","label":"中文(繁体)"},{"key":"EN","label":"English - 英语(自动)"},{"key":"ES","label":"Español - 西班牙语(自动)"},{"key":"JA","label":"日本語 - 日语"},{"key":"KO","label":"한국어 - 韩语"},{"key":"DE","label":"Deutsch - 德语"},{"key":"FR","label":"Français - 法语"},{"key":"TR","label":"Türkçe - 土耳其语"}],"desc":"当“主语言”字幕存在时,将生成“主语言/副语言(翻译)”与“主语言(外挂)”的字幕或字幕选项。"},{"id":"@DualSubs.YouTube.Settings.Languages[1]","name":"[字幕]副语言(目标语言)","type":"selects","val":"ZH","items":[{"key":"ZH","label":"中文(自动)"},{"key":"ZH-HANS","label":"中文(简体)"},{"key":"ZH-HK","label":"中文(香港)"},{"key":"ZH-HANT","label":"中文(繁体)"},{"key":"EN","label":"English - 英语(自动)"},{"key":"ES","label":"Español - 西班牙语(自动)"},{"key":"JA","label":"日本語 - 日语"},{"key":"KO","label":"한국어 - 韩语"},{"key":"DE","label":"Deutsch - 德语"},{"key":"FR","label":"Français - 法语"},{"key":"TR","label":"Türkçe - 土耳其语"}],"desc":"当“副语言”字幕存在时,将生成“副语言/主语言(官方)”的字幕或字幕选项。"},{"id":"@DualSubs.YouTube.Settings.ShowOnly","name":"[翻译字幕]只显示翻译后字幕","type":"boolean","val":false,"desc":"开启后仅显示翻译字幕,不做字幕合并操作。"}] \ No newline at end of file