diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bdfcb2..f262f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,4 @@ -### 🔄 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 3cc537e..cea9ece 100644 --- a/arguments-builder.config.ts +++ b/arguments-builder.config.ts @@ -42,7 +42,7 @@ export default defineConfig({ }, { key: "Types", - name: "[歌词]启用类型(多选)", + name: "[歌词] 启用类型(多选)", defaultValue: ["Translate", "External"], type: "array", options: [ @@ -58,9 +58,143 @@ 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": "KM", + "label": "ភាសាខ្មែរ - 高棉语" + } + ], + }, + { + 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": "EN-US", + "label": "英语(美国)" + }, + { + "key": "ES", + "label": "Español - 西班牙语(自动)" + }, + { + "key": "ES-ES", + "label": "Español - 西班牙语" + }, + { + "key": "ES-419", + "label": "西班牙语(拉丁美洲)" + }, + { + "key": "JA", + "label": "日本語 - 日语" + }, + { + "key": "KO", + "label": "한국어 - 韩语" + }, + { + "key": "DE", + "label": "Deutsch - 德语" + }, + { + "key": "FR", + "label": "Français - 法语" + }, + { + "key": "TR", + "label": "Türkçe - 土耳其语" + }, + { + "key": "KM", + "label": "ភាសាខ្មែរ - 高棉语" + } + ], + }, { key: "Vendor", - name: "[翻译器]服务商API", + name: "[翻译器] 服务商API", defaultValue: "Google", type: "string", options: [ @@ -77,7 +211,7 @@ export default defineConfig({ }, { key: "LrcVendor", - name: "[歌词]服务商API", + name: "[歌词] 服务商API", defaultValue: "NeteaseMusic", type: "string", options: [ diff --git a/package.json b/package.json index dcce197..3a0acd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dualsubs/spotify", - "version": "1.9.2", + "version": "1.9.3", "organizationName": "🍿️ DualSubs", "displayName": "🍿️ DualSubs: 🎵 Spotify", "description": "Spotify 增强及双语歌词", diff --git a/template/boxjs.settings.json b/template/boxjs.settings.json index 1dd1ffa..76c2b9b 100644 --- a/template/boxjs.settings.json +++ b/template/boxjs.settings.json @@ -1 +1 @@ -[{"id":"@DualSubs.Spotify.Settings.Switch","name":"总功能开关","type":"boolean","val":true,"desc":"是否启用此APP修改"},{"id":"@DualSubs.Spotify.Settings.Types","name":"[歌词]启用类型(多选)","type":"checkboxes","val":["Translate","External"],"items":[{"key":"Translate","label":"翻译歌词(翻译器)"},{"key":"External","label":"外部歌词(外部源)"}],"desc":"请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。"},{"id":"@DualSubs.Spotify.Settings.Vendor","name":"[翻译器]服务商API","type":"selects","val":"Google","items":[{"key":"Google","label":"Google Translate"},{"key":"Microsoft","label":"Microsoft Translator(需填写API)"}],"desc":"请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。"},{"id":"@DualSubs.Spotify.Settings.LrcVendor","name":"[歌词]服务商API","type":"selects","val":"NeteaseMusic","items":[{"key":"NeteaseMusic","label":"网易云音乐(官方)"},{"key":"QQMusic","label":"QQ音乐(官方)"},{"key":"NeteaseMusicNodeJS","label":"网易云音乐 NodeJS API"}],"desc":"请选择外部源所使用的服务商API。"}] \ No newline at end of file +[{"id":"@DualSubs.Spotify.Settings.Switch","name":"总功能开关","type":"boolean","val":true,"desc":"是否启用此APP修改"},{"id":"@DualSubs.Spotify.Settings.Types","name":"[歌词] 启用类型(多选)","type":"checkboxes","val":["Translate","External"],"items":[{"key":"Translate","label":"翻译歌词(翻译器)"},{"key":"External","label":"外部歌词(外部源)"}],"desc":"请选择要添加的歌词选项,如果为多选,则会自动决定提供的歌词类型。"},{"id":"@DualSubs.Spotify.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 - 土耳其语"},{"key":"KM","label":"ភាសាខ្មែរ - 高棉语"}],"desc":"仅当源语言识别不准确时更改此选项。"},{"id":"@DualSubs.Spotify.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":"EN-US","label":"英语(美国)"},{"key":"ES","label":"Español - 西班牙语(自动)"},{"key":"ES-ES","label":"Español - 西班牙语"},{"key":"ES-419","label":"西班牙语(拉丁美洲)"},{"key":"JA","label":"日本語 - 日语"},{"key":"KO","label":"한국어 - 韩语"},{"key":"DE","label":"Deutsch - 德语"},{"key":"FR","label":"Français - 法语"},{"key":"TR","label":"Türkçe - 土耳其语"},{"key":"KM","label":"ភាសាខ្មែរ - 高棉语"}],"desc":"请指定翻译歌词的目标语言。"},{"id":"@DualSubs.Spotify.Settings.Vendor","name":"[翻译器] 服务商API","type":"selects","val":"Google","items":[{"key":"Google","label":"Google Translate"},{"key":"Microsoft","label":"Microsoft Translator(需填写API)"}],"desc":"请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。"},{"id":"@DualSubs.Spotify.Settings.LrcVendor","name":"[歌词] 服务商API","type":"selects","val":"NeteaseMusic","items":[{"key":"NeteaseMusic","label":"网易云音乐(官方)"},{"key":"QQMusic","label":"QQ音乐(官方)"},{"key":"NeteaseMusicNodeJS","label":"网易云音乐 NodeJS API"}],"desc":"请选择外部源所使用的服务商API。"}] \ No newline at end of file