feat: transTag && transOnly

This commit is contained in:
Gabe Yuan
2024-03-13 16:35:40 +08:00
parent 47f9635b10
commit 9d9c0633f0
5 changed files with 172 additions and 58 deletions

View File

@@ -188,7 +188,7 @@ export const I18N = {
en: `Translate Timing`,
},
mk_disable: {
zh: `滚动加载(建议`,
zh: `滚动加载(推荐`,
en: `Rolling Loading (Suggested)`,
},
mk_pageopen: {
@@ -743,6 +743,18 @@ export const I18N = {
zh: `支持用换行或英文逗号“,”分隔多个KEY轮询调用。`,
en: `Supports multiple KEY polling calls separated by newlines or English commas ",".`,
},
translation_element_tag: {
zh: `译文元素标签`,
en: `Translation Element Tag`,
},
show_only_translations: {
zh: `仅显示译文`,
en: `Show Only Translations`,
},
show_only_translations_help: {
zh: `非完美实现,某些页面可能有样式等问题。`,
en: `It is not a perfect implementation and some pages may have style issues.`,
},
translate_page_title: {
zh: `是否同时翻译页面标题`,
en: `Translate Page Title`,

View File

@@ -437,7 +437,7 @@ export const DEFAULT_BLACKLIST = [
"https://translate.google.com",
"https://www.deepl.com/translator",
"oapi.dingtalk.com",
"login.dingtalk.com"
"login.dingtalk.com",
]; // 禁用翻译名单
export const DEFAULT_SETTING = {
@@ -454,6 +454,8 @@ export const DEFAULT_SETTING = {
detectRemote: false, // 是否使用远程语言检测
contextMenus: true, // 是否添加右键菜单(作废)
contextMenuType: 1, // 右键菜单类型(0不显示1简单菜单2多级菜单)
transTag: "span", // 译文元素标签
transOnly: false, // 是否仅显示译文
transTitle: false, // 是否同时翻译页面标题
subrulesList: DEFAULT_SUBRULES_LIST, // 订阅列表
owSubrule: DEFAULT_OW_RULE, // 覆写订阅规则