feat: add playground

This commit is contained in:
Gabe
2025-10-02 21:59:31 +08:00
parent 389f0b6f82
commit 65e8fabe7d
14 changed files with 468 additions and 282 deletions

View File

@@ -63,6 +63,9 @@ export const OPT_LANGDETECTOR_ALL = [
OPT_TRANS_TENCENT,
];
export const OPT_DICT_ALL = [OPT_TRANS_BAIDU];
export const OPT_DICT_MAP = new Set(OPT_DICT_ALL);
// 翻译引擎特殊集合
export const API_SPE_TYPES = {
// 内置翻译

View File

@@ -1513,4 +1513,14 @@ export const I18N = {
en: `Placeholder tags`,
zh_TW: `佔位標`,
},
detected_lang: {
zh: `语言检测`,
en: `Language detection`,
zh_TW: `語言偵測`,
},
detected_result: {
zh: `检测结果`,
en: `Detect result`,
zh_TW: `檢測結果`,
},
};

View File

@@ -88,7 +88,7 @@ export const DEFAULT_TRANBOX_SETTING = {
simpleStyle: false, // 是否简洁界面
followSelection: false, // 翻译框是否跟随选中文本
triggerMode: OPT_TRANBOX_TRIGGER_CLICK, // 触发翻译方式
extStyles: "", // 附加样式
// extStyles: "", // 附加样式
enDict: OPT_DICT_BAIDU, // 英文词典
};