2023-07-20 13:45:41 +08:00
export const UI _LANGS = [
[ "en" , "English" ] ,
2023-08-15 12:30:32 +08:00
[ "zh" , "中文" ] ,
2023-07-20 13:45:41 +08:00
] ;
2023-09-06 14:57:02 +08:00
const customApiLangs = ` ["en", "English - English"],
[ "zh-CN" , "Simplified Chinese - 简体中文" ] ,
[ "zh-TW" , "Traditional Chinese - 繁體中文" ] ,
[ "ar" , "Arabic - العربية" ] ,
[ "bg" , "Bulgarian - Български" ] ,
[ "ca" , "Catalan - Català" ] ,
[ "hr" , "Croatian - Hrvatski" ] ,
[ "cs" , "Czech - Čeština" ] ,
[ "da" , "Danish - Dansk" ] ,
[ "nl" , "Dutch - Nederlands" ] ,
[ "fi" , "Finnish - Suomi" ] ,
[ "fr" , "French - Français" ] ,
[ "de" , "German - Deutsch" ] ,
[ "el" , "Greek - Ελληνικά" ] ,
[ "hi" , "Hindi - हिन्दी" ] ,
[ "hu" , "Hungarian - Magyar" ] ,
[ "id" , "Indonesian - Indonesia" ] ,
[ "it" , "Italian - Italiano" ] ,
[ "ja" , "Japanese - 日本語" ] ,
[ "ko" , "Korean - 한국어" ] ,
[ "ms" , "Malay - Melayu" ] ,
[ "mt" , "Maltese - Malti" ] ,
[ "nb" , "Norwegian - Norsk Bokmål" ] ,
[ "pl" , "Polish - Polski" ] ,
[ "pt" , "Portuguese - Português" ] ,
[ "ro" , "Romanian - Română" ] ,
[ "ru" , "Russian - Русский" ] ,
[ "sk" , "Slovak - Slovenčina" ] ,
[ "sl" , "Slovenian - Slovenščina" ] ,
[ "es" , "Spanish - Español" ] ,
[ "sv" , "Swedish - Svenska" ] ,
[ "ta" , "Tamil - தமிழ்" ] ,
[ "te" , "Telugu - తెలుగు" ] ,
[ "th" , "Thai - ไทย" ] ,
[ "tr" , "Turkish - Türkçe" ] ,
[ "uk" , "Ukrainian - Українська" ] ,
[ "vi" , "Vietnamese - Tiếng Việt" ] ,
` ;
const customApiHelpZH = ` /// 自定义翻译源接口说明
// 请求( Request) 数据将按下面规范发送
{
url : { { YOUR _URL } } ,
method : "POST" ,
headers : {
"Content-type" : "application/json" ,
"Authorization" ] = "Bearer {{YOUR_KEY}}"
} ,
body : {
text , // 需要翻译的文字
from , // 源语言,可能为空,表示需要接口自动识别语言
to , // 目标语言
}
}
// 返回( Response) 数据需符合下面的JSON规范
{
text , // 翻译后的文字
from , // 识别的源语言
to , // 目标语言(可选)
}
// 支持的语言代码如下
$ { customApiLangs }
` ;
const customApiHelpEN = ` /// Custom translation source interface description
// Request data will be sent according to the following specifications
{
url : { { YOUR _URL } } ,
method : "POST" ,
headers : {
"Content-type" : "application/json" ,
"Authorization" ] = "Bearer {{YOUR_KEY}}"
} ,
body : {
text , // text to be translated
from , // Source language, may be empty
to , // Target language
}
}
// The returned data must conform to the following JSON specification
{
text , // translated text
from , // Recognized source language
to , // Target language (optional)
}
// The supported language codes are as follows
$ { customApiLangs }
` ;
2023-07-20 13:45:41 +08:00
export const I18N = {
app _name : {
zh : ` 简约翻译 ` ,
en : ` KISS Translator ` ,
} ,
translate : {
zh : ` 翻译 ` ,
en : ` Translate ` ,
} ,
2023-09-06 14:57:02 +08:00
custom _api _help : {
zh : customApiHelpZH ,
en : customApiHelpEN ,
} ,
2023-08-22 21:14:33 +08:00
translate _alt : {
zh : ` 翻译 (Alt+Q) ` ,
en : ` Translate (Alt+Q) ` ,
} ,
2023-07-20 13:45:41 +08:00
basic _setting : {
zh : ` 基本设置 ` ,
en : ` Basic Setting ` ,
} ,
rules _setting : {
zh : ` 规则设置 ` ,
en : ` Rules Setting ` ,
} ,
2023-09-06 00:25:46 +08:00
apis _setting : {
zh : ` 接口设置 ` ,
en : ` Apis Setting ` ,
} ,
2023-07-31 15:08:51 +08:00
sync _setting : {
zh : ` 同步设置 ` ,
en : ` Sync Setting ` ,
} ,
2023-07-20 13:45:41 +08:00
about : {
zh : ` 关于 ` ,
en : ` About ` ,
} ,
about _md : {
zh : ` README.md ` ,
en : ` README.en.md ` ,
} ,
about _md _local : {
2023-08-05 15:32:51 +08:00
zh : ` 请 [点击这里]( ${ process . env . REACT _APP _HOMEPAGE } ) 查看详情。 ` ,
en : ` Please [click here]( ${ process . env . REACT _APP _HOMEPAGE } ) for details. ` ,
2023-07-20 13:45:41 +08:00
} ,
ui _lang : {
zh : ` 界面语言 ` ,
en : ` Interface Language ` ,
} ,
fetch _limit : {
2023-08-22 21:45:23 +08:00
zh : ` 最大请求数量 (1-100) ` ,
en : ` Maximum Number Of Request (1-100) ` ,
2023-08-04 16:05:14 +08:00
} ,
fetch _interval : {
2023-08-22 21:45:23 +08:00
zh : ` 请求间隔时间 (0-5000ms) ` ,
en : ` Request Interval (0-5000ms) ` ,
} ,
min _translate _length : {
zh : ` 最小翻译长度 (1-100) ` ,
en : ` Min Translate Length (1-100) ` ,
} ,
max _translate _length : {
zh : ` 最大翻译长度 (100-10000) ` ,
en : ` Max Translate Length (100-10000) ` ,
2023-09-01 11:21:06 +08:00
} ,
num _of _newline _characters : {
zh : ` 换行字符数 (1-1000) ` ,
en : ` Number of Newline Characters (1-1000) ` ,
2023-07-20 13:45:41 +08:00
} ,
translate _service : {
zh : ` 翻译服务 ` ,
en : ` Translate Service ` ,
} ,
2023-09-06 18:00:18 +08:00
mouseover _translation : {
zh : ` 鼠标悬停翻译 ` ,
en : ` Mouseover translation ` ,
} ,
mk _disable : {
zh : ` 禁用 ` ,
en : ` Disable ` ,
} ,
2023-09-06 23:44:01 +08:00
mk _mouseover : {
2023-09-06 18:00:18 +08:00
zh : ` 鼠标悬停 ` ,
en : ` Mouseover ` ,
} ,
2023-09-06 23:35:09 +08:00
mk _ctrlKey : {
2023-09-06 18:00:18 +08:00
zh : ` Control + 鼠标悬停 ` ,
en : ` Control + Mouseover ` ,
} ,
2023-09-06 23:35:09 +08:00
mk _shiftKey : {
2023-09-06 18:00:18 +08:00
zh : ` Shift + 鼠标悬停 ` ,
en : ` Shift + Mouseover ` ,
} ,
2023-09-06 23:35:09 +08:00
mk _altKey : {
2023-09-06 18:00:18 +08:00
zh : ` Alt + 鼠标悬停 ` ,
en : ` Alt + Mouseover ` ,
} ,
2023-07-20 13:45:41 +08:00
from _lang : {
zh : ` 原文语言 ` ,
en : ` Source Language ` ,
} ,
to _lang : {
zh : ` 目标语言 ` ,
en : ` Target Language ` ,
} ,
text _style : {
zh : ` 文字样式 ` ,
en : ` Text Style ` ,
} ,
2023-08-22 21:14:33 +08:00
text _style _alt : {
zh : ` 文字样式 (Alt+C) ` ,
en : ` Text Style (Alt+C) ` ,
} ,
2023-08-08 16:41:47 +08:00
bg _color : {
zh : ` 样式颜色 ` ,
en : ` Style Color ` ,
} ,
2023-09-01 22:27:25 +08:00
remain _unchanged : {
zh : ` 保留不变 ` ,
en : ` Remain Unchanged ` ,
} ,
2023-07-20 13:45:41 +08:00
google _api : {
zh : ` 谷歌翻译接口 ` ,
en : ` Google Translate API ` ,
} ,
default _selector : {
zh : ` 默认选择器 ` ,
en : ` Default selector ` ,
} ,
selector _rules : {
zh : ` 选择器规则 ` ,
en : ` Selector Rules ` ,
} ,
save : {
zh : ` 保存 ` ,
en : ` Save ` ,
} ,
edit : {
zh : ` 编辑 ` ,
en : ` Edit ` ,
} ,
cancel : {
zh : ` 取消 ` ,
en : ` Cancel ` ,
} ,
delete : {
zh : ` 删除 ` ,
en : ` Delete ` ,
} ,
reset : {
zh : ` 重置 ` ,
en : ` Reset ` ,
} ,
add : {
zh : ` 添加 ` ,
en : ` Add ` ,
} ,
2023-08-17 15:55:44 +08:00
inject _rules : {
2023-08-20 19:27:29 +08:00
zh : ` 注入订阅规则 ` ,
en : ` Inject Subscribe Rules ` ,
} ,
2023-08-22 10:35:57 +08:00
personal _rules : {
zh : ` 个人规则 ` ,
en : ` Personal Rules ` ,
2023-08-20 19:27:29 +08:00
} ,
subscribe _rules : {
zh : ` 订阅规则 ` ,
en : ` Subscribe Rules ` ,
2023-09-01 22:27:25 +08:00
} ,
overwrite _subscribe _rules : {
zh : ` 覆写订阅规则 ` ,
en : ` Overwrite Subscribe Rules ` ,
2023-08-20 19:27:29 +08:00
} ,
subscribe _url : {
zh : ` 订阅地址 ` ,
en : ` Subscribe URL ` ,
2023-08-17 15:55:44 +08:00
} ,
2023-08-22 10:35:57 +08:00
rules _warn _1 : {
zh : ` 1、“个人规则”一直生效, 选择“注入订阅规则”后, “订阅规则”才会生效。 ` ,
en : ` 1. The "Personal Rules" are always in effect. After selecting "Inject Subscription Rules", the "Subscription Rules" will take effect. ` ,
} ,
rules _warn _2 : {
zh : ` 2、“订阅规则”的注入位置是倒数第二的位置, 因此除全局规则(*)外,“个人规则”优先级比“订阅规则”高,“个人规则”填写同样的网址会覆盖”订阅规则“的条目。 ` ,
en : ` 2. The injection position of "Subscription Rules" is the penultimate position. Therefore, except for the global rules (*), the priority of "Personal Rules" is higher than that of "Subscription Rules". Filling in the same url in "Personal Rules" will overwrite "Subscription Rules" entry. ` ,
} ,
2023-07-31 15:08:51 +08:00
sync _warn : {
2023-08-01 14:40:04 +08:00
zh : ` 如果服务器存在其他客户端同步的数据,第一次同步将直接覆盖本地配置,后面则根据修改时间,新的覆盖旧的。 ` ,
en : ` If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one. ` ,
2023-07-31 15:08:51 +08:00
} ,
about _sync _api : {
zh : ` 查看关于数据同步接口部署 ` ,
en : ` View About Data Synchronization Interface Deployment ` ,
2023-07-20 13:45:41 +08:00
} ,
2023-09-01 11:03:53 +08:00
about _api _proxy : {
zh : ` 查看自建一个翻译接口代理 ` ,
en : ` Check out the self-built translation interface proxy ` ,
} ,
2023-07-21 11:55:30 +08:00
style _none : {
zh : ` 无 ` ,
en : ` None ` ,
} ,
2023-07-20 13:45:41 +08:00
under _line : {
2023-07-21 11:55:30 +08:00
zh : ` 下划直线 ` ,
en : ` Underline ` ,
} ,
dot _line : {
zh : ` 下划点状线 ` ,
en : ` Dotted Underline ` ,
} ,
dash _line : {
2023-07-21 12:31:21 +08:00
zh : ` 下划虚线 ` ,
2023-07-21 11:55:30 +08:00
en : ` Dashed Underline ` ,
} ,
wavy _line : {
2023-07-21 12:31:21 +08:00
zh : ` 下划波浪线 ` ,
2023-07-21 11:55:30 +08:00
en : ` Wavy Underline ` ,
2023-07-20 13:45:41 +08:00
} ,
fuzzy : {
zh : ` 模糊 ` ,
en : ` Fuzzy ` ,
} ,
2023-07-21 11:55:30 +08:00
highlight : {
zh : ` 高亮 ` ,
en : ` Highlight ` ,
} ,
2023-09-01 15:57:05 +08:00
diy _style : {
zh : ` 自定义样式 ` ,
en : ` Custom Style ` ,
} ,
diy _style _helper : {
2023-09-06 15:12:17 +08:00
zh : ` 遵循“CSS”的语法 ` ,
en : ` Follow the syntax of "CSS" ` ,
2023-09-01 15:57:05 +08:00
} ,
2023-07-20 13:45:41 +08:00
setting : {
zh : ` 设置 ` ,
en : ` Setting ` ,
} ,
pattern : {
zh : ` 匹配网址 ` ,
en : ` URL pattern ` ,
} ,
pattern _helper : {
2023-08-18 13:16:17 +08:00
zh : ` 1、支持星号(*)通配符。2、多个URL支持英文逗号“,”分隔。 ` ,
en : ` 1. The asterisk (*) wildcard is supported. 2. Multiple URLs can be separated by English commas ",". ` ,
2023-07-20 13:45:41 +08:00
} ,
selector _helper : {
2023-09-01 15:57:05 +08:00
zh : ` 1、遵循CSS选择器语法。2、留空表示采用全局设置。3、多个CSS选择器之间用“;”隔开。4、“shadow root”选择器和内部选择器用“>>>”隔开。 ` ,
en : ` 1. Follow CSS selector syntax. 2. Leave blank to adopt the global setting. 3. Separate multiple CSS selectors with ";". 4. The "shadow root" selector and the internal selector are separated by ">>>". ` ,
2023-07-20 13:45:41 +08:00
} ,
translate _switch : {
zh : ` 开启翻译 ` ,
en : ` Translate Switch ` ,
} ,
default _enabled : {
zh : ` 默认开启 ` ,
en : ` Enabled ` ,
} ,
default _disabled : {
zh : ` 默认关闭 ` ,
en : ` Disabled ` ,
} ,
selector : {
zh : ` 选择器 ` ,
en : ` Selector ` ,
} ,
import : {
zh : ` 导入 ` ,
en : ` Import ` ,
} ,
export : {
zh : ` 导出 ` ,
en : ` Export ` ,
} ,
error _cant _be _blank : {
zh : ` 不能为空 ` ,
en : ` Can not be blank ` ,
} ,
error _duplicate _values : {
zh : ` 存在重复的值 ` ,
en : ` There are duplicate values ` ,
} ,
error _wrong _file _type : {
zh : ` 错误的文件类型 ` ,
en : ` Wrong file type ` ,
} ,
2023-08-20 19:27:29 +08:00
error _fetch _url : {
zh : ` 请检查url地址是否正确或稍后再试。 ` ,
en : ` Please check if the url address is correct or try again later. ` ,
} ,
2023-09-02 16:57:09 +08:00
deepl _api : {
zh : ` DeepL 接口 ` ,
en : ` DeepL API ` ,
} ,
deepl _key : {
zh : ` DeepL 密钥 ` ,
en : ` DeepL Key ` ,
} ,
2023-07-20 13:45:41 +08:00
openai _api : {
2023-07-28 15:34:05 +08:00
zh : ` OpenAI 接口 ` ,
2023-07-20 13:45:41 +08:00
en : ` OpenAI API ` ,
} ,
openai _key : {
zh : ` OpenAI 密钥 ` ,
en : ` OpenAI Key ` ,
} ,
openai _model : {
zh : ` OpenAI 模型 ` ,
en : ` OpenAI Model ` ,
} ,
openai _prompt : {
zh : ` OpenAI 提示词 ` ,
en : ` OpenAI Prompt ` ,
} ,
2023-09-03 13:11:04 +08:00
if _clear _cache : {
zh : ` 是否清除缓存 (仅用于扩展) ` ,
en : ` Whether clear cache (only for extension) ` ,
2023-07-20 13:45:41 +08:00
} ,
clear _cache _never : {
zh : ` 不清除缓存 ` ,
en : ` Never clear cache ` ,
} ,
clear _cache _restart : {
zh : ` 重启浏览器时清除缓存 ` ,
en : ` Clear cache when restarting browser ` ,
} ,
2023-07-31 03:10:09 +08:00
data _sync _url : {
zh : ` 数据同步接口 ` ,
en : ` Data Sync API ` ,
} ,
data _sync _key : {
zh : ` 数据同步密钥 ` ,
en : ` Data Sync Key ` ,
} ,
2023-08-26 14:31:13 +08:00
data _sync _test : {
zh : ` 数据同步测试 ` ,
en : ` Data Sync Test ` ,
} ,
2023-09-03 13:11:04 +08:00
sync _success : {
zh : ` 同步成功! ` ,
en : ` Sync Success ` ,
2023-08-26 14:31:13 +08:00
} ,
2023-09-03 13:11:04 +08:00
sync _failed : {
zh : ` 同步失败! ` ,
en : ` Sync Error ` ,
2023-08-26 14:31:13 +08:00
} ,
2023-08-20 23:30:08 +08:00
error _got _some _wrong : {
2023-08-29 13:14:12 +08:00
zh : ` 抱歉,出错了! ` ,
en : ` Sorry, something went wrong! ` ,
2023-08-20 23:30:08 +08:00
} ,
error _sync _setting : {
2023-08-29 13:14:12 +08:00
zh : ` 您的同步设置未填写,无法在线分享。 ` ,
en : ` Your sync settings are missing and cannot be shared online. ` ,
2023-08-20 23:30:08 +08:00
} ,
2023-09-03 13:11:04 +08:00
click _test : {
zh : ` 点击测试 ` ,
en : ` Click Test ` ,
} ,
test _success : {
zh : ` 测试成功 ` ,
en : ` Test success ` ,
} ,
test _failed : {
zh : ` 测试失败 ` ,
en : ` Test failed ` ,
} ,
clear _all _cache _now : {
zh : ` 立即清除全部缓存 ` ,
en : ` Clear all cache now ` ,
} ,
clear _cache : {
zh : ` 清除缓存 ` ,
en : ` Clear Cache ` ,
} ,
clear _success : {
zh : ` 清除成功 ` ,
en : ` Clear success ` ,
} ,
clear _failed : {
zh : ` 清除失败 ` ,
en : ` Clear failed ` ,
} ,
2023-09-04 22:29:39 +08:00
share : {
zh : ` 分享 ` ,
en : ` Share ` ,
} ,
help : {
zh : ` 求助 ` ,
en : ` Help ` ,
} ,
2023-09-06 00:25:46 +08:00
restore _default : {
zh : ` 恢复默认 ` ,
en : ` Restore Default ` ,
} ,
2023-07-20 13:45:41 +08:00
} ;