Skip to content

Commit ce4af69

Browse files
committed
♻️ i18n 命名空间重构、升级 React 19 和清理 Crowdin
- 将 translation.json 拆分为 11 个命名空间(common/agent/script/editor/settings/install/popup/logs/guide/tools/permission) - 升级 React 18→19、i18next 23→26,引入 react-i18next - 还原 SW 层 popup 逻辑至 v1.5(不在 SW 中处理 i18n) - 删除 Crowdin 配置、伪语言 ach-UG 及相关文档引用 - 修复 React 19 类型兼容(useRef、cloneElement)
1 parent 8cd00a8 commit ce4af69

File tree

132 files changed

+7799
-8334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+7799
-8334
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ pnpm start
6767

6868
### 帮助我们翻译
6969

70-
[Crowdin](https://crowdin.com/project/scriptcat)
71-
是一个在线的多语言翻译平台。如果您有兴趣帮助我们翻译 ScriptCat 的相关内容,您可以在 Crowdin 上找到 ScriptCat 项目,并开始进行翻译工作。
72-
73-
- `src/locales`[扩展](https://github.com/scriptscat/scriptcat)翻译文件目录
70+
翻译文件位于 `src/locales` 目录下,按命名空间划分。如果您有兴趣帮助翻译,请直接提交 PR。
7471

7572
#### 扩展开启所见即所得模式
7673

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ScriptCat
2222
[![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf)
2323
[![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh)
2424
[![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/en/firefox/addon/scriptcat/)
25-
[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat)
25+
2626

2727
## About ScriptCat
2828

README_RU.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf)
2020
[![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh)
2121
[![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/firefox/addon/scriptcat/)
22-
[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat)
22+
2323

2424
## О проекте
2525

README_ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ScriptCat
2222
[![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf)
2323
[![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh)
2424
[![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/ja/firefox/addon/scriptcat/)
25-
[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat)
25+
2626

2727
## ScriptCat について
2828

README_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ScriptCat
2222
[![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf)
2323
[![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh)
2424
[![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/zh-CN/firefox/addon/scriptcat/)
25-
[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat)
25+
2626

2727
## 关于
2828

README_zh-TW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ScriptCat
2222
[![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf)
2323
[![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh)
2424
[![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/zh-TW/firefox/addon/scriptcat/)
25-
[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat)
25+
2626

2727
## 關於 ScriptCat
2828

crowdin.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/CONTRIBUTING_EN.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ pnpm start
5959

6060
### Help Us Translate
6161

62-
[Crowdin](https://crowdin.com/project/scriptcat) is an online multilingual translation platform. If you are interested in helping us translate ScriptCat-related content, you can find the ScriptCat project on Crowdin and start translation work.
63-
64-
- `src/locales` is the translation file directory for the [extension](https://github.com/scriptscat/scriptcat)
62+
Translation files are located in `src/locales`, organized by namespace. If you're interested in helping translate, please submit a PR directly.
6563

6664
#### Enable WYSIWYG Mode for Extension
6765

docs/CONTRIBUTING_RU.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ pnpm start
6565

6666
### Помощь с переводом
6767

68-
[Crowdin](https://crowdin.com/project/scriptcat) — это онлайн-платформа для многозначного перевода. Если вы заинтересованы помочь нам
69-
с переводом контента, связанного с ScriptCat, вы можете найти проект ScriptCat на Crowdin и начать работу по переводу.
70-
71-
- `src/locales` — каталог файлов перевода для [расширения](https://github.com/scriptscat/scriptcat)
68+
Файлы перевода находятся в `src/locales`, организованные по пространствам имён. Если вы хотите помочь с переводом, отправьте PR напрямую.
7269

7370
#### Включение режима WYSIWYG для расширения
7471

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
"lint": "tsc --noEmit && eslint .",
2323
"lint:ci": "tsc --noEmit && eslint . --cache --cache-location .eslintcache",
2424
"lint-fix": "tsc --noEmit && eslint --fix .",
25-
"changlog": "node ./scripts/changlog.js",
26-
"crowdin": "crowdin",
27-
"crowdin:download": "node ./scripts/crowdin-download.js"
25+
"changlog": "node ./scripts/changlog.js"
2826
},
2927
"dependencies": {
3028
"@dnd-kit/core": "^6.3.1",
@@ -62,12 +60,13 @@
6260
"eslint-linter-browserify": "9.26.0",
6361
"eventemitter3": "^5.0.1",
6462
"fast-xml-parser": "^5.5.8",
65-
"i18next": "^23.16.4",
63+
"i18next": "^26.0.3",
6664
"lucide-react": "^1.7.0",
6765
"monaco-editor": "^0.52.2",
6866
"radix-ui": "^1.4.3",
69-
"react": "^18.3.1",
70-
"react-dom": "^18.3.1",
67+
"react": "^19.2.4",
68+
"react-dom": "^19.2.4",
69+
"react-i18next": "^17.0.2",
7170
"react-router-dom": "^7.14.0",
7271
"string-similarity-js": "^2.1.4",
7372
"tailwind-merge": "^3.5.0",
@@ -82,12 +81,12 @@
8281
"@rspack/core": "^1.6.8",
8382
"@swc/helpers": "^0.5.17",
8483
"@testing-library/jest-dom": "^6.9.1",
85-
"@testing-library/react": "^16.3.0",
84+
"@testing-library/react": "^16.3.2",
8685
"@types/chrome": "^0.1.39",
8786
"@types/crypto-js": "^4.2.2",
8887
"@types/node": "^22.12.0",
89-
"@types/react": "^18.3.1",
90-
"@types/react-dom": "^18.3.1",
88+
"@types/react": "^19.2.14",
89+
"@types/react-dom": "^19.2.3",
9190
"@types/semver": "^7.7.1",
9291
"@types/serviceworker": "^0.0.120",
9392
"@vitest/coverage-v8": "^4.0.18",

0 commit comments

Comments
 (0)