Compare commits

...

6 Commits

Author SHA1 Message Date
Gabe Yuan
b25cbeb5c1 v1.4.3 2023-08-15 14:29:55 +08:00
Gabe Yuan
9b038ad303 fix useI18nMd bug 2023-08-15 13:34:09 +08:00
Gabe Yuan
01a27e5b14 fix reamde 2023-08-15 13:25:40 +08:00
Gabe Yuan
ec962740b3 change default ui lang to en 2023-08-15 12:30:32 +08:00
Gabe Yuan
70b2531878 add userscript connect 2023-08-15 12:19:48 +08:00
Gabe Yuan
6ef7edada0 add userscript connect 2023-08-15 12:02:45 +08:00
9 changed files with 12 additions and 10 deletions

2
.env
View File

@@ -2,7 +2,7 @@ GENERATE_SOURCEMAP=false
REACT_APP_NAME=KISS Translator
REACT_APP_NAME_CN=简约翻译
REACT_APP_VERSION=1.4.2
REACT_APP_VERSION=1.4.3
REACT_APP_HOMEPAGE=https://github.com/fishjar/kiss-translator
REACT_APP_OPTIONSPAGE=https://kiss-translator.rayjar.com/options
REACT_APP_OPTIONSPAGE2=https://fishjar.github.io/kiss-translator/options.html

View File

@@ -1,6 +1,6 @@
## KISS Translator
A minimalist [bilingual translation Extension & Greasemonkey Script](https://github.com/fishjar/kiss-translator)
A minimalist [bilingual translation Extension & Greasemonkey Script](https://github.com/fishjar/kiss-translator).
[kiss-translator.webm](https://github.com/fishjar/kiss-translator/assets/1157624/f7ba8a5c-e4a8-4d5a-823a-5c5c67a0a47f)

View File

@@ -96,6 +96,8 @@ const userscriptWebpack = (config, env) => {
// @connect api-edge.cognitive.microsofttranslator.com
// @connect edge.microsoft.com
// @connect api.openai.com
// @connect openai.azure.com
// @connect workers.dev
// @run-at document-end
// ==/UserScript==

View File

@@ -1,7 +1,7 @@
{
"name": "kiss-translator",
"description": "A minimalist bilingual translation Extension & Greasemonkey Script",
"version": "1.4.2",
"version": "1.4.3",
"author": "Gabe<yugang2002@gmail.com>",
"private": true,
"dependencies": {

View File

@@ -2,8 +2,8 @@
"manifest_version": 2,
"name": "__MSG_app_name__",
"description": "__MSG_app_description__",
"version": "1.4.2",
"default_locale": "zh_CN",
"version": "1.4.3",
"default_locale": "en",
"author": "Gabe<yugang2002@gmail.com>",
"homepage_url": "https://github.com/fishjar/kiss-translator",
"background": {

View File

@@ -2,8 +2,8 @@
"manifest_version": 3,
"name": "__MSG_app_name__",
"description": "__MSG_app_description__",
"version": "1.4.2",
"default_locale": "zh_CN",
"version": "1.4.3",
"default_locale": "en",
"author": "Gabe<yugang2002@gmail.com>",
"homepage_url": "https://github.com/fishjar/kiss-translator",
"background": {

View File

@@ -1,6 +1,6 @@
export const UI_LANGS = [
["zh", "中文"],
["en", "English"],
["zh", "中文"],
];
export const I18N = {

View File

@@ -156,7 +156,7 @@ export const DEFAULT_RULE = {
export const DEFAULT_SETTING = {
darkMode: false, // 深色模式
uiLang: "zh", // 界面语言
uiLang: "en", // 界面语言
fetchLimit: DEFAULT_FETCH_LIMIT, // 最大任务数量
fetchInterval: DEFAULT_FETCH_INTERVAL, // 任务间隔时间
clearCache: false, // 是否在浏览器下次启动时清除缓存

View File

@@ -14,6 +14,6 @@ export const useI18n = () => {
export const useI18nMd = (key) => {
const i18n = useI18n();
const fileName = i18n(key);
const url = fileName ?? `${URL_RAW_PREFIX}/${fileName}`;
const url = fileName ? `${URL_RAW_PREFIX}/${fileName}` : "";
return useFetch(url);
};