diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 869c389b5..76963f364 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,117 +1,103 @@ -[English Contribution Guidelines](./docs/CONTRIBUTING_EN.md) [Руководство на русском](./docs/CONTRIBUTING_RU.md) +[中文贡献指南](./docs/CONTRIBUTING_ZH.md) / [Руководство на русском](./docs/CONTRIBUTING_RU.md) -# ScriptCat 贡献指南 +# ScriptCat Contributing Guide -我们非常感谢你为 ScriptCat 做出贡献!本指南旨在帮助你以更规范的方式向 ScriptCat 提交贡献,因此请务必认真阅读。 +We greatly appreciate your contributions to ScriptCat! This guide aims to help you contribute to ScriptCat in a more standardized way, so please read it carefully. -## 提交 Issue +## Submitting Issues -在提交 Issue 前,我们建议你先查看 [已有的 Issues](https://github.com/scriptscat/scriptcat/issues),以避免重复提交。 +Before submitting an issue, we recommend that you first check the [existing Issues](https://github.com/scriptscat/scriptcat/issues) to avoid duplicate submissions. -### 报告问题、故障与漏洞 +### Reporting Problems, Bugs & Vulnerabilities -ScriptCat 是一个不断发展的项目。如果你在使用过程中发现问题,并且确信这些问题是由 ScriptCat 引起的,欢迎提交 Issue。在提交时,请附带详细的复现步骤和运行环境信息。 +ScriptCat is an evolving project. If you encounter problems during use and are confident that these issues are caused by ScriptCat, we welcome you to submit an Issue. When submitting, please include detailed reproduction steps and runtime environment information. -### 提出新功能 +### Proposing New Features -我们欢迎你在 Issue 中提出新的功能建议。为了让我们更好地理解你的需求,建议你尽可能详细地描述这个功能,并提供你认为可能的解决方案。 +We welcome you to propose new feature suggestions in Issues. To help us better understand your needs, we recommend that you describe the feature in as much detail as possible and provide what you think might be a possible solution. ## Pull Request -ScriptCat 使用 [pnpm](https://pnpm.io/) 来管理项目依赖。如果你已经安装了npm,以下的命令可以帮助你快速配置开发环境: +ScriptCat uses [pnpm](https://pnpm.io/) to manage project dependencies. If you already have npm installed, the following commands can help you quickly set up the development environment: ```bash -# 安装 node.js 依赖 +# Install node.js dependencies pnpm install ``` -我们推荐使用[代理](https://pnpm.io/npmrc#https-proxy)来解决 pnpm 的网络问题,而不是使用镜像。 +We recommend using a [proxy](https://pnpm.io/npmrc#https-proxy) to solve pnpm network issues rather than using mirrors. ```bash pnpm config set proxy http://127.0.0.1:7890 pnpm config set https-proxy https://127.0.0.1:7890 ``` -### Commit 规范 +### Commit Guidelines -我们希望每一个 commit 都能清晰地描述其目的,每个 commit 应尽可能只包含一个修改。我们的 commit message 格式遵循 -[gitmoji](https://gitmoji.dev/) 规范。例如: +We hope that each commit can clearly describe its purpose, and each commit should ideally contain only one modification. Our commit message format follows the [gitmoji](https://gitmoji.dev/) specification. For example: ```bash git commit -m "✨ add login feature" ``` -这个示例表示添加了新的功能:登录功能。 +This example indicates that a new feature has been added: login functionality. -### 工作流概述 +### Workflow Overview -`main` 分支是 ScriptCat 的主分支。为了保持代码的完整性,请不要直接修改 `main` -分支。你应该创建一个新的分支,并在这个分支上进行修改,然后发起一个目标分支为 -`main` 的 Pull Request。Pull Request -的标题请尽量使用中文,以便于自动生成更新日志。 +The `main` branch is ScriptCat's primary branch. To maintain code integrity, please do not directly modify the `main` branch. You should create a new branch and make modifications on this branch, then initiate a Pull Request targeting the `main` branch. Please try to use Chinese for Pull Request titles to facilitate automatic changelog generation. -如果你不是 ScriptCat 团队的成员,你可以先 fork 本仓库,然后向本仓库的 `main` -分支发起 Pull Request。在创建 commit 时,请按照上述 commit message -规范进行。我们将在 code review 完成后将你的贡献合并到主分支。 +If you are not a member of the ScriptCat team, you can first fork this repository and then initiate a Pull Request to the `main` branch of this repository. When creating commits, please follow the commit message guidelines mentioned above. We will merge your contributions to the main branch after code review is completed. -## 撰写文档 +## Writing Documentation -ScriptCat的文档在另外的仓库中:[scriptcat.org](https://docs.scriptcat.org),使用 -[docusaurus](https://docusaurus.io/)进行撰写,这有一些 [Markdown](https://docusaurus.io/zh-CN/docs/markdown-features) -特性可以帮助你。如果你需要在本地预览修改后的文档,可以使用以下命令安装文档依赖并启动dev server: +ScriptCat's documentation is in a separate repository: [scriptcat.org](https://docs.scriptcat.org), written using [docusaurus](https://docusaurus.io/). There are some [Markdown](https://docusaurus.io/zh-CN/docs/markdown-features) features that can help you. If you need to preview the modified documentation locally, you can use the following commands to install documentation dependencies and start the dev server: ```bash pnpm install pnpm start ``` -### 帮助我们翻译 +### Help Us Translate -[Crowdin](https://crowdin.com/project/scriptcat) -是一个在线的多语言翻译平台。如果您有兴趣帮助我们翻译 ScriptCat 的相关内容,您可以在 Crowdin 上找到 ScriptCat 项目,并开始进行翻译工作。 +ScriptCat's translation files are hosted on GitHub. Contributions via Pull Request are welcome. -- `src/locales`为[扩展](https://github.com/scriptscat/scriptcat)翻译文件目录 +- Translation files live in [`src/locales`](https://github.com/scriptscat/scriptcat/tree/main/src/locales); each language has its own `/translation.json` +- **Improve an existing translation**: edit the corresponding `translation.json` directly +- **Add a new language**: create a new directory under `src/locales/` (e.g. `fr-FR`), copy `en-US/translation.json` as a template and translate the strings, then register the locale in `src/locales/locales.ts` +- Open a Pull Request against the `main` branch when you are done -#### 扩展开启所见即所得模式 +## Participating in Development -> 新版本暂未补充 - -#### 脚本站开启所见即所得模式 - -脚本站访问:[https://scriptcat.org/ach-UG](https://scriptcat.org/ach-UG) 即可开启所见即所得模式 - -## 参与开发 - -ScriptCat 使用 ESLint 来规范代码风格,使用 Vitest 来进行单元测试。你可以使用以下命令来运行: +ScriptCat uses ESLint to standardize code style and Vitest for unit testing. You can use the following commands to run them: ```bash pnpm test pnpm run lint ``` -ScriptCat 的页面开发使用了以下技术: +ScriptCat's page development uses the following technologies: - [React](https://reactjs.org/) -- UI 框架 [arco](https://arco.design) -- CSS 框架 [unocss](https://unocss.dev/interactive/) -- RsPack 打包工具 [rspack](https://rspack.dev/) +- UI framework [arco](https://arco.design) +- CSS framework [unocss](https://unocss.dev/interactive/) +- RsPack bundling tool [rspack](https://rspack.dev/) -如果你想在本地运行 ScriptCat,可以使用以下命令: +If you want to run ScriptCat locally, you can use the following commands: ```bash pnpm run dev -# 请注意,由于未知原因,如果你需要使用隐身窗口,你需要使用下面的命令进行开发 +# Please note that for unknown reasons, if you need to use incognito windows, you need to use the following command for development pnpm run dev:noMap ``` -如果你想打包扩展,可以使用以下命令: +If you want to package the extension, you can use the following command: ```bash pnpm run pack ``` -在打包前,请确保在`dist`目录下生成了`scriptcat.pem`文件。 +Before packaging, please ensure that the `scriptcat.pem` file is generated in the `dist` directory. -## 注意问题 +## Important Notes -- `pnpm run dev`之后需要把`dist/ext`目录里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的,但是涉及到`manifest.json`、`service_worker`、`offscreen`、`sandbox`的改动需要重新加载。 +- After running `pnpm run dev`, you need to import and load the contents of the `dist/ext` directory into the browser extension, then start editing code and save. The browser updates in real-time, but changes involving `manifest.json`, `service_worker`, `offscreen`, and `sandbox` require reloading. diff --git a/README.md b/README.md index 773b76a29..3d02bcec9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-中文 English 繁體中文 日本語 Русский +中文 English 繁體中文 日本語 Русский

@@ -22,7 +22,6 @@ ScriptCat [![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf) [![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh) [![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/en/firefox/addon/scriptcat/) -[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat) ## About ScriptCat @@ -103,7 +102,7 @@ documentation page to make modifications. ## 🤝 Contributing -We welcome all forms of contributions! Please check the [Contributing Guide](./docs/CONTRIBUTING_EN.md) to learn how to +We welcome all forms of contributions! Please check the [Contributing Guide](./CONTRIBUTING.md) to learn how to get started. ### 💬 Community diff --git a/crowdin.yml b/crowdin.yml deleted file mode 100644 index d63bfc5b4..000000000 --- a/crowdin.yml +++ /dev/null @@ -1,8 +0,0 @@ -project_id: "620320" -api_token_env: CROWDIN_PERSONAL_TOKEN -preserve_hierarchy: true - -files: - # JSON 翻译文件 - - source: /src/locales/zh-CN/**/* - translation: /src/locales/%locale%/**/%original_file_name% diff --git a/docs/CONTRIBUTING_EN.md b/docs/CONTRIBUTING_EN.md deleted file mode 100644 index 385f3b439..000000000 --- a/docs/CONTRIBUTING_EN.md +++ /dev/null @@ -1,108 +0,0 @@ -[中文贡献指南](../CONTRIBUTING.md) - -# ScriptCat Contributing Guide - -We greatly appreciate your contributions to ScriptCat! This guide aims to help you contribute to ScriptCat in a more standardized way, so please read it carefully. - -## Submitting Issues - -Before submitting an issue, we recommend that you first check the [existing Issues](https://github.com/scriptscat/scriptcat/issues) to avoid duplicate submissions. - -### Reporting Problems, Bugs & Vulnerabilities - -ScriptCat is an evolving project. If you encounter problems during use and are confident that these issues are caused by ScriptCat, we welcome you to submit an Issue. When submitting, please include detailed reproduction steps and runtime environment information. - -### Proposing New Features - -We welcome you to propose new feature suggestions in Issues. To help us better understand your needs, we recommend that you describe the feature in as much detail as possible and provide what you think might be a possible solution. - -## Pull Request - -ScriptCat uses [pnpm](https://pnpm.io/) to manage project dependencies. If you already have npm installed, the following commands can help you quickly set up the development environment: - -```bash -# Install node.js dependencies -pnpm install -``` - -We recommend using a [proxy](https://pnpm.io/npmrc#https-proxy) to solve pnpm network issues rather than using mirrors. - -```bash -pnpm config set proxy http://127.0.0.1:7890 -pnpm config set https-proxy https://127.0.0.1:7890 -``` - -### Commit Guidelines - -We hope that each commit can clearly describe its purpose, and each commit should ideally contain only one modification. Our commit message format follows the [gitmoji](https://gitmoji.dev/) specification. For example: - -```bash -git commit -m "✨ add login feature" -``` - -This example indicates that a new feature has been added: login functionality. - -### Workflow Overview - -The `main` branch is ScriptCat's primary branch. To maintain code integrity, please do not directly modify the `main` branch. You should create a new branch and make modifications on this branch, then initiate a Pull Request targeting the `main` branch. Please try to use Chinese for Pull Request titles to facilitate automatic changelog generation. - -If you are not a member of the ScriptCat team, you can first fork this repository and then initiate a Pull Request to the `main` branch of this repository. When creating commits, please follow the commit message guidelines mentioned above. We will merge your contributions to the main branch after code review is completed. - -## Writing Documentation - -ScriptCat's documentation is in a separate repository: [scriptcat.org](https://docs.scriptcat.org), written using [docusaurus](https://docusaurus.io/). There are some [Markdown](https://docusaurus.io/zh-CN/docs/markdown-features) features that can help you. If you need to preview the modified documentation locally, you can use the following commands to install documentation dependencies and start the dev server: - -```bash -pnpm install -pnpm start -``` - -### Help Us Translate - -[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. - -- `src/locales` is the translation file directory for the [extension](https://github.com/scriptscat/scriptcat) - -#### Enable WYSIWYG Mode for Extension - -> New version not yet supplemented - -#### Enable WYSIWYG Mode for Script Site - -Visit the script site at: [https://scriptcat.org/ach-UG](https://scriptcat.org/ach-UG) to enable WYSIWYG mode - -## Participating in Development - -ScriptCat uses ESLint to standardize code style and Vitest for unit testing. You can use the following commands to run them: - -```bash -pnpm test -pnpm run lint -``` - -ScriptCat's page development uses the following technologies: - -- [React](https://reactjs.org/) -- UI framework [arco](https://arco.design) -- CSS framework [unocss](https://unocss.dev/interactive/) -- RsPack bundling tool [rspack](https://rspack.dev/) - -If you want to run ScriptCat locally, you can use the following commands: - -```bash -pnpm run dev -# Please note that for unknown reasons, if you need to use incognito windows, you need to use the following command for development -pnpm run dev:noMap -``` - -If you want to package the extension, you can use the following command: - -```bash -pnpm run pack -``` - -Before packaging, please ensure that the `scriptcat.pem` file is generated in the `dist` directory. - -## Important Notes - -- After running `pnpm run dev`, you need to import and load the contents of the `dist/ext` directory into the browser extension, then start editing code and save. The browser updates in real-time, but changes involving `manifest.json`, `service_worker`, `offscreen`, and `sandbox` require reloading. diff --git a/docs/CONTRIBUTING_RU.md b/docs/CONTRIBUTING_RU.md index bc8a54a20..95463560c 100644 --- a/docs/CONTRIBUTING_RU.md +++ b/docs/CONTRIBUTING_RU.md @@ -1,4 +1,4 @@ -[中文](CONTRIBUTING.md) / [English](./docs/CONTRIBUTING_EN.md) / Русский +[English](../CONTRIBUTING.md) / [中文](./CONTRIBUTING_ZH.md) / Русский # Руководство по внесению вклада в ScriptCat @@ -65,18 +65,12 @@ pnpm start ### Помощь с переводом -[Crowdin](https://crowdin.com/project/scriptcat) — это онлайн-платформа для многозначного перевода. Если вы заинтересованы помочь нам -с переводом контента, связанного с ScriptCat, вы можете найти проект ScriptCat на Crowdin и начать работу по переводу. +Файлы перевода ScriptCat размещены на GitHub. Мы приветствуем вклад через Pull Request. -- `src/locales` — каталог файлов перевода для [расширения](https://github.com/scriptscat/scriptcat) - -#### Включение режима WYSIWYG для расширения - -> В новой версии еще не добавлено - -#### Включение режима WYSIWYG для хранилища скриптов - -Перейдите на страницу хранилища скриптов: [https://scriptcat.org/ach-UG](https://scriptcat.org/ach-UG) чтобы включить режим WYSIWYG (What You See Is What You Get). +- Файлы перевода находятся в каталоге [`src/locales`](https://github.com/scriptscat/scriptcat/tree/main/src/locales); для каждого языка есть отдельный файл `<язык>/translation.json` +- **Улучшение существующего перевода**: отредактируйте соответствующий `translation.json` напрямую +- **Добавление нового языка**: создайте каталог в `src/locales/` (например, `fr-FR`), скопируйте `en-US/translation.json` в качестве шаблона и переведите строки, затем зарегистрируйте локаль в `src/locales/locales.ts` +- По завершении создайте Pull Request в ветку `main` ## Участие в разработке diff --git a/docs/CONTRIBUTING_ZH.md b/docs/CONTRIBUTING_ZH.md new file mode 100644 index 000000000..a6da68735 --- /dev/null +++ b/docs/CONTRIBUTING_ZH.md @@ -0,0 +1,111 @@ +[English Contribution Guidelines](../CONTRIBUTING.md) / [Руководство на русском](./CONTRIBUTING_RU.md) + +# ScriptCat 贡献指南 + +我们非常感谢你为 ScriptCat 做出贡献!本指南旨在帮助你以更规范的方式向 ScriptCat 提交贡献,因此请务必认真阅读。 + +## 提交 Issue + +在提交 Issue 前,我们建议你先查看 [已有的 Issues](https://github.com/scriptscat/scriptcat/issues),以避免重复提交。 + +### 报告问题、故障与漏洞 + +ScriptCat 是一个不断发展的项目。如果你在使用过程中发现问题,并且确信这些问题是由 ScriptCat 引起的,欢迎提交 Issue。在提交时,请附带详细的复现步骤和运行环境信息。 + +### 提出新功能 + +我们欢迎你在 Issue 中提出新的功能建议。为了让我们更好地理解你的需求,建议你尽可能详细地描述这个功能,并提供你认为可能的解决方案。 + +## Pull Request + +ScriptCat 使用 [pnpm](https://pnpm.io/) 来管理项目依赖。如果你已经安装了npm,以下的命令可以帮助你快速配置开发环境: + +```bash +# 安装 node.js 依赖 +pnpm install +``` + +我们推荐使用[代理](https://pnpm.io/npmrc#https-proxy)来解决 pnpm 的网络问题,而不是使用镜像。 + +```bash +pnpm config set proxy http://127.0.0.1:7890 +pnpm config set https-proxy https://127.0.0.1:7890 +``` + +### Commit 规范 + +我们希望每一个 commit 都能清晰地描述其目的,每个 commit 应尽可能只包含一个修改。我们的 commit message 格式遵循 +[gitmoji](https://gitmoji.dev/) 规范。例如: + +```bash +git commit -m "✨ add login feature" +``` + +这个示例表示添加了新的功能:登录功能。 + +### 工作流概述 + +`main` 分支是 ScriptCat 的主分支。为了保持代码的完整性,请不要直接修改 `main` +分支。你应该创建一个新的分支,并在这个分支上进行修改,然后发起一个目标分支为 +`main` 的 Pull Request。Pull Request +的标题请尽量使用中文,以便于自动生成更新日志。 + +如果你不是 ScriptCat 团队的成员,你可以先 fork 本仓库,然后向本仓库的 `main` +分支发起 Pull Request。在创建 commit 时,请按照上述 commit message +规范进行。我们将在 code review 完成后将你的贡献合并到主分支。 + +## 撰写文档 + +ScriptCat的文档在另外的仓库中:[scriptcat.org](https://docs.scriptcat.org),使用 +[docusaurus](https://docusaurus.io/)进行撰写,这有一些 [Markdown](https://docusaurus.io/zh-CN/docs/markdown-features) +特性可以帮助你。如果你需要在本地预览修改后的文档,可以使用以下命令安装文档依赖并启动dev server: + +```bash +pnpm install +pnpm start +``` + +### 帮助我们翻译 + +ScriptCat 的翻译文件托管在 GitHub 上,欢迎通过 Pull Request 贡献翻译。 + +- 翻译文件位于 [`src/locales`](https://github.com/scriptscat/scriptcat/tree/main/src/locales),每种语言对应一个 `<语言代码>/translation.json` +- **改进已有翻译**:直接编辑对应语言的 `translation.json` +- **新增语言**:在 `src/locales/` 下新建对应语言代码目录(如 `fr-FR`),复制 `en-US/translation.json` 作为模板进行翻译,并在 `src/locales/locales.ts` 中注册 +- 完成后向 `main` 分支提交 Pull Request 即可 + +## 参与开发 + +ScriptCat 使用 ESLint 来规范代码风格,使用 Vitest 来进行单元测试。你可以使用以下命令来运行: + +```bash +pnpm test +pnpm run lint +``` + +ScriptCat 的页面开发使用了以下技术: + +- [React](https://reactjs.org/) +- UI 框架 [arco](https://arco.design) +- CSS 框架 [unocss](https://unocss.dev/interactive/) +- RsPack 打包工具 [rspack](https://rspack.dev/) + +如果你想在本地运行 ScriptCat,可以使用以下命令: + +```bash +pnpm run dev +# 请注意,由于未知原因,如果你需要使用隐身窗口,你需要使用下面的命令进行开发 +pnpm run dev:noMap +``` + +如果你想打包扩展,可以使用以下命令: + +```bash +pnpm run pack +``` + +在打包前,请确保在`dist`目录下生成了`scriptcat.pem`文件。 + +## 注意问题 + +- `pnpm run dev`之后需要把`dist/ext`目录里面内容在浏览器扩展里面导入加载,然后开始改代码保存即可,浏览器是实时更新的,但是涉及到`manifest.json`、`service_worker`、`offscreen`、`sandbox`的改动需要重新加载。 diff --git a/README_RU.md b/docs/README_RU.md similarity index 94% rename from README_RU.md rename to docs/README_RU.md index cb21e0f00..7ab2d2fd1 100644 --- a/README_RU.md +++ b/docs/README_RU.md @@ -1,8 +1,8 @@

- 中文 English 繁體中文 日本語 Русский + 中文 English 繁體中文 日本語 Русский

-
+
ScriptCat

ScriptCat — это браузерное расширение, которое выполняет пользовательские скрипты.
Всё можно автоматизировать с помощью скриптов, позволяя вашему браузеру делать больше!

@@ -19,7 +19,6 @@ [![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf) [![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh) [![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/firefox/addon/scriptcat/) -[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat) ## О проекте @@ -103,7 +102,7 @@ ScriptCat — это мощный менеджер пользовательск ## 🤝 Участие в разработке -Мы приветствуем любой вклад! Ознакомьтесь с [руководством по внесению вклада](./docs/CONTRIBUTING_RU.md), чтобы узнать, +Мы приветствуем любой вклад! Ознакомьтесь с [руководством по внесению вклада](./CONTRIBUTING_RU.md), чтобы узнать, как начать. ### 💬 Общение в сообществе @@ -123,6 +122,6 @@ ScriptCat — это мощный менеджер пользовательск ## 📄 Лицензия -Этот проект имеет открытый исходный код по лицензии [GPLv3](./LICENSE). Пожалуйста, соблюдайте условия лицензии. +Этот проект имеет открытый исходный код по лицензии [GPLv3](../LICENSE). Пожалуйста, соблюдайте условия лицензии. [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat?ref=badge_large) diff --git a/README_ja.md b/docs/README_ja.md similarity index 93% rename from README_ja.md rename to docs/README_ja.md index 467b42fe2..1204aaeda 100644 --- a/README_ja.md +++ b/docs/README_ja.md @@ -1,9 +1,9 @@

-中文 English 繁體中文 日本語 Русский +中文 English 繁體中文 日本語 Русский

-
+
ScriptCat

@@ -22,7 +22,6 @@ ScriptCat [![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf) [![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh) [![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/ja/firefox/addon/scriptcat/) -[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat) ## ScriptCat について @@ -98,7 +97,7 @@ ScriptCat は、Tampermonkey の設計思想に基づく強力なユーザース ## 🤝 コントリビューション あらゆる形式の貢献を歓迎します! -まずは [Contributing Guide](./docs/CONTRIBUTING_EN.md) をご覧ください。 +まずは [Contributing Guide](../CONTRIBUTING.md) をご覧ください。 ### 💬 コミュニティ @@ -118,7 +117,7 @@ ScriptCat に貢献してくださった開発者の皆様に感謝します。 ## 📄 オープンソースライセンス -このプロジェクトは [GPLv3](./LICENSE) ライセンスのもとで公開されています。 +このプロジェクトは [GPLv3](../LICENSE) ライセンスのもとで公開されています。 関連するライセンス条項を遵守してください。 [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat?ref=badge_large) diff --git a/README_zh-CN.md b/docs/README_zh-CN.md similarity index 92% rename from README_zh-CN.md rename to docs/README_zh-CN.md index f37c45328..e3046ea87 100644 --- a/README_zh-CN.md +++ b/docs/README_zh-CN.md @@ -1,9 +1,9 @@

-中文 English 繁體中文 日本語 Русский +中文 English 繁體中文 日本語 Русский

-
+
ScriptCat

@@ -22,7 +22,6 @@ ScriptCat [![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf) [![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh) [![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/zh-CN/firefox/addon/scriptcat/) -[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat) ## 关于 @@ -94,7 +93,7 @@ ScriptCat(脚本猫)是一个功能强大的用户脚本管理器,基于 ## 🤝 参与贡献 -我们欢迎所有形式的贡献!请查看 [贡献指南](./CONTRIBUTING.md) 了解如何开始。 +我们欢迎所有形式的贡献!请查看 [贡献指南](./CONTRIBUTING_ZH.md) 了解如何开始。 ### 💬 社区交流 @@ -114,6 +113,6 @@ ScriptCat(脚本猫)是一个功能强大的用户脚本管理器,基于 ## 📄 开源许可 -本项目基于 [GPLv3](./LICENSE) 协议开源,请遵守相关协议条款。 +本项目基于 [GPLv3](../LICENSE) 协议开源,请遵守相关协议条款。 [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat?ref=badge_large) diff --git a/README_zh-TW.md b/docs/README_zh-TW.md similarity index 92% rename from README_zh-TW.md rename to docs/README_zh-TW.md index 5f8bb3138..f55ede8d0 100644 --- a/README_zh-TW.md +++ b/docs/README_zh-TW.md @@ -1,9 +1,9 @@

-中文 English 繁體中文 日本語 Русский +中文 English 繁體中文 日本語 Русский

-
+
ScriptCat

@@ -22,7 +22,6 @@ ScriptCat [![Chrome](https://img.shields.io/badge/chrome-success-brightgreen?logo=google%20chrome)](https://chromewebstore.google.com/detail/scriptcat/ndcooeababalnlpkfedmmbbbgkljhpjf) [![Edge](https://img.shields.io/badge/edge-success-brightgreen?logo=microsoft%20edge)](https://microsoftedge.microsoft.com/addons/detail/scriptcat/liilgpjgabokdklappibcjfablkpcekh) [![FireFox](https://img.shields.io/badge/firefox-success-brightgreen?logo=firefox)](https://addons.mozilla.org/zh-TW/firefox/addon/scriptcat/) -[![Crowdin](https://badges.crowdin.net/scriptcat/localized.svg)](https://crowdin.com/project/scriptcat) ## 關於 ScriptCat @@ -98,7 +97,7 @@ ScriptCat 是一款基於 Tampermonkey 設計理念的強大使用者腳本管 ## 🤝 參與貢獻 我們歡迎各種形式的貢獻! -請參考 [貢獻指南](./docs/CONTRIBUTING_EN.md) 了解如何開始。 +請參考 [貢獻指南](../CONTRIBUTING.md) 了解如何開始。 ### 💬 社群 @@ -118,6 +117,6 @@ ScriptCat 是一款基於 Tampermonkey 設計理念的強大使用者腳本管 ## 📄 開源授權 -本專案以 [GPLv3](./LICENSE) 授權開源。請遵循相關授權條款。 +本專案以 [GPLv3](../LICENSE) 授權開源。請遵循相關授權條款。 [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fscriptscat%2Fscriptcat?ref=badge_large) diff --git a/package.json b/package.json index d5b899043..d47981eb8 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,6 @@ "lint:ci": "tsc --noEmit && eslint . --cache --cache-location .eslintcache", "lint-fix": "tsc --noEmit && eslint --fix .", "changlog": "node ./scripts/changlog.js", - "crowdin": "crowdin", - "crowdin:download": "node ./scripts/crowdin-download.js", "test:e2e": "npx playwright test", "test:e2e:ui": "npx playwright test --ui" }, diff --git a/scripts/crowdin-download.js b/scripts/crowdin-download.js deleted file mode 100644 index c5333dc8c..000000000 --- a/scripts/crowdin-download.js +++ /dev/null @@ -1,38 +0,0 @@ -import { execSync } from "child_process"; -import { readdirSync, statSync, readFileSync, writeFileSync } from "fs"; -import { join } from "path"; - -console.log("Downloading translations from Crowdin..."); -// 执行 crowdin download --skip-untranslated-strings -execSync("crowdin download --skip-untranslated-strings", { stdio: "inherit" }); - -// 将所有语言中的""删除 -// 语言文件在 src/locales/*/*.json 排除zh-CN -const localesPath = "./src/locales"; -console.log("Removing empty strings from locale files..."); -function removeEmptyStrings(obj) { - for (const key in obj) { - if (typeof obj[key] === "object" && obj[key] !== null) { - removeEmptyStrings(obj[key]); - if (Object.keys(obj[key]).length === 0) { - delete obj[key]; - } - } else if (obj[key] === "") { - delete obj[key]; - } - } -} -function removeEmptyStringsFromLocaleFiles(dir) { - const files = readdirSync(dir); - for (const file of files) { - const filePath = join(dir, file); - if (statSync(filePath).isDirectory() && !filePath.includes("zh-CN")) { - removeEmptyStringsFromLocaleFiles(filePath); - } else if (file.endsWith(".json")) { - const content = JSON.parse(readFileSync(filePath, "utf-8")); - removeEmptyStrings(content); - writeFileSync(filePath, JSON.stringify(content, null, 2)); - } - } -} -removeEmptyStringsFromLocaleFiles(localesPath); diff --git a/src/locales/README.md b/src/locales/README.md index de687d95b..72ecc375a 100644 --- a/src/locales/README.md +++ b/src/locales/README.md @@ -23,12 +23,14 @@ for example: } ``` -### Help Us Translate +## Help Us Translate -[Crowdin](https://crowdin.com/project/scriptcat) -is an online localization platform that helps us manage translations. If you're interested in helping us translate ScriptCat, you can find the project on Crowdin and start contributing. +ScriptCat's translation files are hosted on GitHub — contributions via Pull Request are welcome. -- `src/locales` is the translation file directory for the [extension](https://github.com/scriptscat/scriptcat) +- Translation files live in [`src/locales`](https://github.com/scriptscat/scriptcat/tree/main/src/locales); each language has its own `/translation.json` +- **Improve an existing translation**: edit the corresponding `translation.json` directly +- **Add a new language**: create a new directory under `src/locales/` (e.g. `fr-FR`), copy `en-US/translation.json` as a template and translate the strings, then register the locale in `src/locales/locales.ts` +- Open a Pull Request against the `main` branch when you are done # i18n 方案 @@ -51,9 +53,11 @@ i18n 使用[i8next](https://www.i18next.com/)实现,之所以不是用`chrome. } ``` -### 帮助我们翻译 +## 帮助我们翻译 -[Crowdin](https://crowdin.com/project/scriptcat) -是一个在线的多语言翻译平台。如果您有兴趣帮助我们翻译 ScriptCat 的相关内容,您可以在 Crowdin 上找到 ScriptCat 项目,并开始进行翻译工作。 +ScriptCat 的翻译文件托管在 GitHub 上,欢迎通过 Pull Request 贡献翻译。 -- `src/locales`为[扩展](https://github.com/scriptscat/scriptcat)翻译文件目录 +- 翻译文件位于 [`src/locales`](https://github.com/scriptscat/scriptcat/tree/main/src/locales),每种语言对应一个 `<语言代码>/translation.json` +- **改进已有翻译**:直接编辑对应语言的 `translation.json` +- **新增语言**:在 `src/locales/` 下新建对应语言代码目录(如 `fr-FR`),复制 `en-US/translation.json` 作为模板进行翻译,并在 `src/locales/locales.ts` 中注册 +- 完成后向 `main` 分支提交 Pull Request 即可 diff --git a/src/locales/ach-UG/translation.json b/src/locales/ach-UG/translation.json deleted file mode 100644 index e72aa1844..000000000 --- a/src/locales/ach-UG/translation.json +++ /dev/null @@ -1,562 +0,0 @@ -{ - "import_link": "crwdns7882:0crwdne7882:0", - "import_link_failure": "crwdns7884:0crwdne7884:0", - "create_user_script": "crwdns7886:0crwdne7886:0", - "create_background_script": "crwdns7888:0crwdne7888:0", - "create_scheduled_script": "crwdns7890:0crwdne7890:0", - "import_by_local": "crwdns7892:0crwdne7892:0", - "import_local_failure": "crwdns7894:0crwdne7894:0", - "import_local_success": "crwdns7896:0crwdne7896:0", - "create_script": "crwdns7898:0crwdne7898:0", - "user_guide": "crwdns7900:0crwdne7900:0", - "api_docs": "crwdns7902:0crwdne7902:0", - "development_guide": "crwdns7904:0crwdne7904:0", - "script_gallery": "crwdns7906:0crwdne7906:0", - "community_forum": "crwdns7908:0crwdne7908:0", - "external_links": "crwdns7910:0crwdne7910:0", - "system_follow": "crwdns7912:0crwdne7912:0", - "no_data": "crwdns7914:0crwdne7914:0", - "installed_scripts": "crwdns7916:0crwdne7916:0", - "subscribe": "crwdns7918:0crwdne7918:0", - "logs": "crwdns7920:0crwdne7920:0", - "tools": "crwdns7922:0crwdne7922:0", - "settings": "crwdns7924:0crwdne7924:0", - "hide_main_sidebar": "Collapse sidebar", - "show_main_sidebar": "Expand sidebar", - "guide": "crwdns7928:0crwdne7928:0", - "helpcenter": "crwdns7930:0crwdne7930:0", - "general": "crwdns7932:0crwdne7932:0", - "language": "crwdns7934:0crwdne7934:0", - "help_translate": "crwdns7936:0crwdne7936:0", - "script_sync": "crwdns7938:0crwdne7938:0", - "sync_delete": "crwdns7940:0crwdne7940:0", - "enable_script_sync_to": "crwdns7942:0crwdne7942:0", - "save": "crwdns7944:0crwdne7944:0", - "save_as": "crwdns7946:0crwdne7946:0", - "file": "crwdns7948:0crwdne7948:0", - "run": "crwdns7950:0crwdne7950:0", - "debug": "crwdns7952:0crwdne7952:0", - "cloud_sync_account_verification": "crwdns7954:0crwdne7954:0", - "cloud_sync_verification_failed": "crwdns7956:0crwdne7956:0", - "save_success": "crwdns7958:0crwdne7958:0", - "reset_success": "Reset successfully", - "update": "crwdns7960:0crwdne7960:0", - "check_update": "crwdns7962:0crwdne7962:0", - "script_subscription_check_interval": "crwdns7964:0crwdne7964:0", - "never": "crwdns7966:0crwdne7966:0", - "6_hours": "crwdns7968:0crwdne7968:0", - "12_hours": "crwdns7970:0crwdne7970:0", - "every_day": "crwdns7972:0crwdne7972:0", - "every_week": "crwdns7974:0crwdne7974:0", - "update_disabled_scripts": "crwdns7976:0crwdne7976:0", - "silent_update_non_critical_changes": "crwdns7978:0crwdne7978:0", - "enable_eslint": "crwdns7980:0crwdne7980:0", - "eslint_rules": "crwdns7982:0crwdne7982:0", - "enter_eslint_rules": "crwdns7984:0crwdne7984:0", - "language_change_tip": "crwdns7986:0crwdne7986:0", - "backup": "crwdns7988:0crwdne7988:0", - "local": "crwdns7990:0crwdne7990:0", - "export_file": "crwdns7992:0crwdne7992:0", - "import_file": "crwdns7994:0crwdne7994:0", - "cloud": "crwdns7996:0crwdne7996:0", - "backup_to": "crwdns7998:0crwdne7998:0", - "preparing_backup": "crwdns8000:0crwdne8000:0", - "backup_success": "crwdns8002:0crwdne8002:0", - "backup_failed": "crwdns8004:0crwdne8004:0", - "no_backup_files": "crwdns8006:0crwdne8006:0", - "backup_list": "crwdns8008:0crwdne8008:0", - "open_backup_dir": "crwdns8010:0crwdne8010:0", - "confirm_delete": "crwdns8012:0crwdne8012:0", - "confirm_delete_backup_file": "crwdns8014:0crwdne8014:0", - "confirm_update": "crwdns8016:0crwdne8016:0", - "delete_success": "crwdns8018:0crwdne8018:0", - "deleting": "crwdns8020:0crwdne8020:0", - "backup_strategy": "crwdns8022:0crwdne8022:0", - "under_construction": "crwdns8024:0crwdne8024:0", - "development_tool": "crwdns8026:0crwdne8026:0", - "vscode_url": "crwdns8028:0crwdne8028:0", - "auto_connect_vscode_service": "crwdns8030:0crwdne8030:0", - "connect": "crwdns8032:0crwdne8032:0", - "connection_success": "crwdns8034:0crwdne8034:0", - "connection_failed": "crwdns8036:0crwdne8036:0", - "select_import_script": "crwdns8038:0crwdne8038:0", - "import_error": "crwdns8040:0crwdne8040:0", - "pulling_data_from_cloud": "crwdns8042:0crwdne8042:0", - "pull_failed": "crwdns8044:0crwdne8044:0", - "restore": "crwdns8046:0crwdne8046:0", - "log_title": "crwdns8048:0crwdne8048:0", - "last_5_minutes": "crwdns8050:0crwdne8050:0", - "last_15_minutes": "crwdns8052:0crwdne8052:0", - "last_30_minutes": "crwdns8054:0crwdne8054:0", - "last_1_hour": "crwdns8056:0crwdne8056:0", - "last_3_hours": "crwdns8058:0crwdne8058:0", - "last_6_hours": "crwdns8060:0crwdne8060:0", - "last_12_hours": "crwdns8062:0crwdne8062:0", - "last_24_hours": "crwdns8064:0crwdne8064:0", - "last_7_days": "crwdns8066:0crwdne8066:0", - "query": "crwdns8068:0crwdne8068:0", - "labels": "crwdns8070:0crwdne8070:0", - "search_regex": "crwdns8072:0crwdne8072:0", - "clean_schedule": "crwdns8074:0crwdne8074:0", - "days_ago_logs": "crwdns8076:0crwdne8076:0", - "delete_completed": "crwdns8078:0crwdne8078:0", - "delete_current_logs": "crwdns8080:0crwdne8080:0", - "clear_completed": "crwdns8082:0crwdne8082:0", - "clear_logs": "crwdns8084:0crwdne8084:0", - "total_logs": "crwdns8086:0{{length}}crwdne8086:0", - "filtered_logs": "crwdns8088:0{{length}}crwdne8088:0", - "enter_filter_conditions": "crwdns8090:0crwdne8090:0", - "permission": "crwdns8092:0crwdne8092:0", - "enter_subscribe_name": "crwdns8094:0crwdne8094:0", - "subscribe_url": "crwdns8096:0crwdne8096:0", - "confirm_delete_subscription": "crwdns8098:0crwdne8098:0", - "list": { - "confirm_delete": "crwdns8100:0crwdne8100:0", - "confirm_update": "crwdns8102:0crwdne8102:0" - }, - "enable": "crwdns8104:0crwdne8104:0", - "script_list_enable_width": 0, - "script_list_last_updated_width": 0, - "script_list_apply_to_run_status_width": 0, - "subscribe_list_enable_width": 0, - "disable": "crwdns8114:0crwdne8114:0", - "name": "crwdns8116:0crwdne8116:0", - "version": "crwdns8118:0crwdne8118:0", - "apply_to_run_status": "crwdns8120:0crwdne8120:0", - "source": "crwdns8122:0crwdne8122:0", - "home": "crwdns8124:0crwdne8124:0", - "sorting": "crwdns8126:0crwdne8126:0", - "last_updated": "crwdns8128:0crwdne8128:0", - "action": "crwdns8130:0crwdne8130:0", - "foreground_page_script_tooltip": "crwdns8132:0crwdne8132:0", - "background_script_tooltip": "crwdns8134:0crwdne8134:0", - "scheduled_script_tooltip": "crwdns8136:0crwdne8136:0", - "running": "crwdns8138:0crwdne8138:0", - "completed": "crwdns8140:0crwdne8140:0", - "source_subscribe_link": "crwdns12786:0crwdne12786:0", - "source_local_script": "crwdns12788:0crwdne12788:0", - "source_script_link": "crwdns12790:0crwdne12790:0", - "by_manual_creation": "crwdns12792:0crwdne12792:0", - "confirm_delete_script": "crwdns8152:0crwdne8152:0", - "confirm_delete_script_content": "crwdns8154:0{{name}}crwdne8154:0", - "delete_failed": "crwdns8156:0crwdne8156:0", - "enter_script_name": "crwdns8158:0crwdne8158:0", - "update_not_supported": "crwdns8160:0crwdne8160:0", - "checking_for_updates": "crwdns8162:0crwdne8162:0", - "new_version_available": "crwdns8164:0crwdne8164:0", - "latest_version": "crwdns8166:0crwdne8166:0", - "checked_for_all_selected": "crwdns8168:0crwdne8168:0", - "update_check_failed": "crwdns8170:0crwdne8170:0", - "stopping_script": "crwdns8172:0crwdne8172:0", - "script_stopped": "crwdns8174:0crwdne8174:0", - "starting_script": "crwdns8176:0crwdne8176:0", - "starting_updates": "crwdns8178:0crwdne8178:0", - "script_started": "crwdns8180:0crwdne8180:0", - "operation_failed": "Operation failed", - "batch_operations": "crwdns8182:0crwdne8182:0", - "export": "crwdns8184:0crwdne8184:0", - "delete": "crwdns8186:0crwdne8186:0", - "pin_to_top": "crwdns8188:0crwdne8188:0", - "scripts_pinned_to_top": "crwdns8190:0crwdne8190:0", - "unknown_operation": "crwdns8192:0crwdne8192:0", - "confirm": "crwdns8194:0crwdne8194:0", - "close": "crwdns8196:0crwdne8196:0", - "page_script": "crwdns8198:0crwdne8198:0", - "homepage": "crwdns8200:0crwdne8200:0", - "script_website": "crwdns8202:0crwdne8202:0", - "script_source": "crwdns8204:0crwdne8204:0", - "bug_feedback_script_support": "crwdns8206:0crwdne8206:0", - "config": "crwdns8208:0crwdne8208:0", - "key": "crwdns8210:0crwdne8210:0", - "value": "crwdns8212:0crwdne8212:0", - "add": "crwdns8214:0crwdne8214:0", - "type": "crwdns8216:0crwdne8216:0", - "edit_value": "crwdns8218:0crwdne8218:0", - "add_value": "crwdns8220:0crwdne8220:0", - "update_success": "crwdns8222:0crwdne8222:0", - "add_success": "crwdns8224:0crwdne8224:0", - "script_storage": "crwdns8226:0crwdne8226:0", - "enter_key": "crwdns8228:0crwdne8228:0", - "key_placeholder": "crwdns8230:0crwdne8230:0", - "value_placeholder": "crwdns8232:0crwdne8232:0", - "clear": "crwdns8234:0crwdne8234:0", - "clear_success": "crwdns8236:0crwdne8236:0", - "confirm_clear": "crwdns8238:0crwdne8238:0", - "type_string": "crwdns8240:0crwdne8240:0", - "type_number": "crwdns8242:0crwdne8242:0", - "type_boolean": "crwdns8244:0crwdne8244:0", - "type_object": "crwdns8246:0crwdne8246:0", - "confirm_delete_resource": "crwdns8248:0crwdne8248:0", - "confirm_clear_resource": "crwdns8250:0crwdne8250:0", - "script_resource": "crwdns8252:0crwdne8252:0", - "permission_value": "crwdns8254:0crwdne8254:0", - "allow": "crwdns8256:0crwdne8256:0", - "yes": "crwdns8258:0crwdne8258:0", - "no": "crwdns8260:0crwdne8260:0", - "confirm_delete_permission": "crwdns8262:0crwdne8262:0", - "basic_info": "crwdns8266:0crwdne8266:0", - "update_url": "crwdns8268:0crwdne8268:0", - "permission_management": "crwdns8270:0crwdne8270:0", - "add_permission": "crwdns8272:0crwdne8272:0", - "permission_cors": "crwdns8274:0crwdne8274:0", - "permission_cookie": "crwdns8276:0crwdne8276:0", - "match": "crwdns8278:0crwdne8278:0", - "user_setting": "crwdns8280:0crwdne8280:0", - "confirm_delete_exclude": "crwdns8282:0crwdne8282:0", - "after_deleting_match_item": "crwdns8284:0crwdne8284:0", - "confirm_delete_match": "crwdns8286:0crwdne8286:0", - "after_deleting_exclude_item": "crwdns8288:0crwdne8288:0", - "add_match": "crwdns8290:0crwdne8290:0", - "add_exclude": "crwdns8292:0crwdne8292:0", - "website_match": "crwdns8294:0crwdne8294:0", - "reset": "crwdns8296:0crwdne8296:0", - "website_exclude": "crwdns8298:0crwdne8298:0", - "confirm_reset": "crwdns8300:0crwdne8300:0", - "script_total_runs": "crwdns8302:0{{runNum}}crwdnd8302:0{{runNumByIframe}}crwdne8302:0", - "script_total_runs_single": "crwdns8304:0{{runNum}}crwdne8304:0", - "script_disabled": "crwdns8306:0crwdne8306:0", - "run_once": "crwdns8308:0crwdne8308:0", - "stop": "crwdns8310:0crwdne8310:0", - "edit": "crwdns8312:0crwdne8312:0", - "exclude_on": "crwdns8922:0crwdne8922:0", - "exclude_off": "crwdns8924:0crwdne8924:0", - "user_config": "crwdns8320:0crwdne8320:0", - "gm_api": "crwdns8322:0crwdne8322:0", - "storage_api": "crwdns8324:0crwdne8324:0", - "use_file_system": "crwdns8326:0crwdne8326:0", - "open_directory": "crwdns8328:0crwdne8328:0", - "account_validation_failed": "crwdns8330:0crwdne8330:0", - "not_set": "crwdns8332:0crwdne8332:0", - "in_use": "crwdns8334:0crwdne8334:0", - "storage_error": "crwdns8336:0crwdne8336:0", - "upload_to_cloud": "crwdns8338:0crwdne8338:0", - "save_failed": "crwdns8340:0crwdne8340:0", - "exporting": "crwdns8342:0crwdne8342:0", - "upload_to": "crwdns8344:0crwdne8344:0", - "value_export_expression": "crwdns8346:0crwdne8346:0", - "overwrite_original_value_on_import": "crwdns8348:0crwdne8348:0", - "cookie_export_expression": "crwdns8350:0crwdne8350:0", - "overwrite_original_cookie_on_import": "crwdns8352:0crwdne8352:0", - "restore_default_values": "crwdns8354:0crwdne8354:0", - "get_confirm_error": "crwdns8356:0crwdne8356:0", - "confirm_error": "crwdns8358:0crwdne8358:0", - "ignore": "crwdns8360:0crwdne8360:0", - "allow_once": "crwdns8362:0crwdne8362:0", - "temporary_allow": "crwdns8364:0{{permissionContent}}crwdne8364:0", - "temporary_allow_all": "crwdns8366:0{{permissionContent}}crwdne8366:0", - "permanent_allow": "crwdns8368:0{{permissionContent}}crwdne8368:0", - "permanent_allow_all": "crwdns8370:0{{permissionContent}}crwdne8370:0", - "deny_once": "crwdns8372:0crwdne8372:0", - "temporary_deny": "crwdns8374:0{{permissionContent}}crwdne8374:0", - "temporary_deny_all": "crwdns8376:0{{permissionContent}}crwdne8376:0", - "permanent_deny": "crwdns8378:0{{permissionContent}}crwdne8378:0", - "permanent_deny_all": "crwdns8380:0{{permissionContent}}crwdne8380:0", - "data_import": "crwdns8382:0crwdne8382:0", - "import": "crwdns8384:0crwdne8384:0", - "select_scripts_to_import": "crwdns8386:0crwdne8386:0", - "select_all": "crwdns8388:0crwdne8388:0", - "script_import_progress": "crwdns8390:0crwdne8390:0", - "select_subscribes_to_import": "crwdns8392:0crwdne8392:0", - "subscribe_import_progress": "crwdns8394:0crwdne8394:0", - "author": "crwdns8396:0crwdne8396:0", - "description": "crwdns8398:0crwdne8398:0", - "operation": "crwdns8400:0crwdne8400:0", - "error": "crwdns8402:0crwdne8402:0", - "unknown": "crwdns8404:0crwdne8404:0", - "add_new": "crwdns8406:0crwdne8406:0", - "no_operation": "crwdns8408:0crwdne8408:0", - "enable_script": "crwdns8410:0crwdne8410:0", - "local_creation": "crwdns8412:0crwdne8412:0", - "import_success": "crwdns8414:0crwdne8414:0", - "install_script": "crwdns8416:0crwdne8416:0", - "update_script": "crwdns8418:0crwdne8418:0", - "install_subscribe": "crwdns8420:0crwdne8420:0", - "update_subscribe": "crwdns8422:0crwdne8422:0", - "update_script_no_close": "crwdns8424:0crwdne8424:0", - "install_script_no_close": "crwdns8426:0crwdne8426:0", - "update_script_no_more_update": "crwdns8428:0crwdne8428:0", - "close_update_script_no_more_update": "crwdns8850:0crwdne8850:0", - "install_script_no_more_update": "crwdns8430:0crwdne8430:0", - "invalid_link": "crwdns8432:0crwdne8432:0", - "subscribe_install_label": "crwdns8434:0crwdne8434:0", - "script_runs_in": "crwdns8436:0crwdne8436:0", - "script_has_full_access_to": "crwdns8438:0crwdne8438:0", - "script_requires": "crwdns8440:0crwdne8440:0", - "cookie_warning": "crwdns8442:0crwdne8442:0", - "scheduled_script_description_title": "crwdns8706:0crwdne8706:0", - "scheduled_script_description_description_expr": "crwdns8708:0", - "scheduled_script_description_description_next": "crwdns8708:0", - "background_script_description": "crwdns8444:0crwdne8444:0", - "install_success": "crwdns8446:0crwdne8446:0", - "install": { - "update_success": "crwdns8448:0crwdne8448:0" - }, - "install_failed": "crwdns8450:0crwdne8450:0", - "subscribe_success": "crwdns8452:0crwdne8452:0", - "subscribe_failed": "crwdns8454:0crwdne8454:0", - "current_version": "crwdns8456:0crwdne8456:0", - "update_version": "crwdns8458:0crwdne8458:0", - "updatepage": { - "main_header": "crwdns12726:0crwdne12726:0", - "header_site_specific": "crwdns12728:0crwdne12728:0", - "header_site_all": "crwdns12730:0crwdne12730:0", - "header_ignored": "crwdns12734:0crwdne12734:0", - "update_all": "crwdns12736:0crwdne12736:0", - "ignore_all": "crwdns12738:0crwdne12738:0", - "update": "crwdns12740:0crwdne12740:0", - "ignore": "crwdns12742:0crwdne12742:0", - "old_version_": "crwdns12744:0crwdne12744:0", - "new_version_": "crwdns12746:0crwdne12746:0", - "enabled": "crwdns12748:0crwdne12748:0", - "tooltip_enabled": "crwdns12750:0crwdne12750:0", - "disabled": "crwdns12752:0crwdne12752:0", - "tooltip_disabled": "crwdns12754:0crwdne12754:0", - "similarity_": "crwdns12756:0crwdne12756:0", - "codechange_major": "crwdns12758:0crwdne12758:0", - "codechange_noticeable": "crwdns12760:0crwdne12760:0", - "codechange_tiny": "crwdns12762:0crwdne12762:0", - "new_connects_": "crwdns12764:0crwdne12764:0", - "tag_new_connect": "crwdns12766:0crwdne12766:0", - "status_last_check": "crwdns12768:0crwdne12768:0", - "status_checking_updates": "crwdns12770:0crwdne12770:0", - "status_no_update": "crwdns12772:0crwdne12772:0", - "status_n_update": "crwdns12774:0crwdne12774:0", - "status_n_ignored": "crwdns12776:0crwdne12776:0", - "status_autoclose": "crwdns12778:0crwdne12778:0", - "header_other_update": "crwdns12784:0crwdne12784:0" - }, - "downloading_status_text": "Downloading. Received {{bytes}}.", - "install_page_please_wait": "Please wait", - "install_page_loading": "Loading Installation Page", - "install_page_load_failed": "Failed to Load Installation Page", - "invalid_page": "Invalid Page", - "background_script_tag": "crwdns8460:0crwdne8460:0", - "scheduled_script_tag": "crwdns8462:0crwdne8462:0", - "background_script": "crwdns8464:0crwdne8464:0", - "scheduled_script": "crwdns8466:0crwdne8466:0", - "install_from_legitimate_sources_warning": "crwdns8468:0crwdne8468:0", - "antifeature_referral_link_title": "crwdns8470:0crwdne8470:0", - "antifeature_referral_link_description": "crwdns8472:0crwdne8472:0", - "antifeature_ads_title": "crwdns8474:0crwdne8474:0", - "antifeature_ads_description": "crwdns8476:0crwdne8476:0", - "antifeature_payment_title": "crwdns8478:0crwdne8478:0", - "antifeature_payment_description": "crwdns8480:0crwdne8480:0", - "antifeature_miner_title": "crwdns8482:0crwdne8482:0", - "antifeature_miner_description": "crwdns8484:0crwdne8484:0", - "antifeature_membership_title": "crwdns8486:0crwdne8486:0", - "antifeature_membership_description": "crwdns8488:0crwdne8488:0", - "antifeature_tracking_title": "crwdns8490:0crwdne8490:0", - "antifeature_tracking_description": "crwdns8492:0crwdne8492:0", - "script_info_load_failed": "crwdns8494:0crwdne8494:0", - "script_status_tooltip": "crwdns8496:0crwdne8496:0", - "subscribe_source_tooltip": "crwdns12828:0crwdne12828:0", - "get_script": "crwdns8498:0crwdne8498:0", - "report_issue": "crwdns8500:0crwdne8500:0", - "project_docs": "crwdns8502:0crwdne8502:0", - "community": "crwdns8504:0crwdne8504:0", - "popup": { - "new_version_available": "crwdns8506:0crwdne8506:0" - }, - "current_page_scripts": "crwdns8508:0crwdne8508:0", - "enabled_background_scripts": "crwdns8510:0crwdne8510:0", - "script_accessing_cross_origin_resource": "crwdns8512:0crwdne8512:0", - "confirm_operation_description": "crwdns8514:0crwdne8514:0", - "domain": "crwdns8516:0crwdne8516:0", - "script_name": "crwdns8518:0crwdne8518:0", - "request_domain": "crwdns8520:0crwdne8520:0", - "request_url": "crwdns8522:0crwdne8522:0", - "access_cookie_content": "crwdns8524:0crwdne8524:0", - "confirm_script_operation": "crwdns8526:0crwdne8526:0", - "cookie_domain": "crwdns8528:0crwdne8528:0", - "script_operation_title": "crwdns8530:0crwdne8530:0", - "script_operation_description": "crwdns8532:0${dir}crwdne8532:0", - "script_permission_content": "crwdns8534:0crwdne8534:0", - "sync_system_connect_failed": "crwdns8536:0crwdne8536:0", - "sync_system_closed": "crwdns8538:0crwdne8538:0", - "sync_system_closed_description": "crwdns8540:0crwdne8540:0", - "auth_type": "crwdns8542:0crwdne8542:0", - "url": "crwdns8544:0crwdne8544:0", - "username": "crwdns8546:0crwdne8546:0", - "password": "crwdns8548:0crwdne8548:0", - "access_token_bearer": "Access Token (Bearer)", - "s3_bucket_name": "Bucket Name", - "s3_region": "Region", - "s3_access_key_id": "Access Key ID", - "s3_secret_access_key": "Secret Access Key", - "s3_custom_endpoint": "Custom Endpoint (Optional)", - "skip": "crwdns8550:0crwdne8550:0", - "next": "crwdns8552:0crwdne8552:0", - "next_with_progress": "crwdns8920:0{step}crwdnd8920:0{steps}crwdne8920:0", - "back": "crwdns8554:0crwdne8554:0", - "last": "crwdns8556:0crwdne8556:0", - "start_guide_title": "crwdns8558:0crwdne8558:0", - "start_guide_content": "crwdns8560:0crwdne8560:0", - "guide_installed_scripts": "crwdns8562:0crwdne8562:0", - "guide_script_list_title": "crwdns8564:0crwdne8564:0", - "guide_script_list_content": "crwdns10802:0crwdne10802:0", - "guide_script_list_enable_title": "crwdns8568:0crwdne8568:0", - "guide_script_list_enable_content": "crwdns8570:0crwdne8570:0", - "guide_script_list_apply_to_run_status_title": "crwdns8572:0crwdne8572:0", - "guide_script_list_apply_to_run_status_content": "crwdns8574:0crwdne8574:0", - "guide_script_list_sort_title": "crwdns12878:0crwdne12878:0", - "guide_script_list_sort_content": "crwdns12880:0crwdne12880:0", - "guide_script_list_update_title": "crwdns12882:0crwdne12882:0", - "guide_script_list_update_content": "crwdns12884:0crwdne12884:0", - "guide_script_list_action_title": "crwdns12886:0crwdne12886:0", - "guide_script_list_action_content": "crwdns12888:0crwdne12888:0", - "guide_tools_title": "crwdns8580:0crwdne8580:0", - "guide_tools_content": "crwdns8582:0crwdne8582:0", - "guide_tools_backup_title": "crwdns8584:0crwdne8584:0", - "guide_tools_backup_content": "crwdns8586:0crwdne8586:0", - "guide_setting_title": "crwdns8588:0crwdne8588:0", - "guide_setting_content": "crwdns8590:0crwdne8590:0", - "guide_setting_sync_title": "crwdns8592:0crwdne8592:0", - "guide_setting_sync_content": "crwdns8594:0crwdne8594:0", - "auto": "crwdns8596:0crwdne8596:0", - "hide": "crwdns8598:0crwdne8598:0", - "custom": "crwdns8600:0crwdne8600:0", - "resize_column_width": "crwdns8602:0crwdne8602:0", - "collapse": "crwdns8604:0crwdne8604:0", - "expand": "crwdns8606:0crwdne8606:0", - "menu_expand_num_before": "crwdns8608:0crwdne8608:0", - "menu_expand_num_after": "crwdns8610:0crwdne8610:0", - "script_name_cannot_be_set_to_empty": "crwdns8612:0crwdne8612:0", - "eslint_config_format_error": "crwdns8614:0crwdne8614:0", - "export_success": "crwdns8616:0crwdne8616:0", - "get_backup_dir_url_failed": "crwdns8618:0crwdne8618:0", - "get_backup_files_failed": "crwdns8620:0crwdne8620:0", - "request_permission": "crwdns8622:0crwdne8622:0", - "develop_mode_guide": "crwdns8624:0crwdne8624:0", - "allow_user_script_guide": "crwdns8626:0crwdne8626:0", - "lower_version_browser_guide": "crwdns8628:0crwdne8628:0", - "confirm_leave_page": "crwdns8634:0crwdne8634:0", - "page_in_blacklist": "crwdns8636:0crwdne8636:0", - "baidu_netdisk": "crwdns8638:0crwdne8638:0", - "save_only_current_group": "crwdns8640:0crwdne8640:0", - "script_import_result": "crwdns8642:0crwdne8642:0", - "failure_info": "crwdns8644:0crwdne8644:0", - "security": "crwdns8646:0crwdne8646:0", - "blacklist_pages": "crwdns8648:0crwdne8648:0", - "blacklist_placeholder": "crwdns8650:0crwdne8650:0", - "expression_format_error": "crwdns8652:0crwdne8652:0", - "migration_confirm_message": "crwdns8654:0crwdne8654:0", - "retry_migration": "crwdns8656:0crwdne8656:0", - "script_modified_leave_confirm": "crwdns8658:0crwdne8658:0", - "create_success_note": "crwdns8660:0crwdne8660:0", - "save_as_failed": "crwdns8662:0crwdne8662:0", - "save_as_success": "crwdns8664:0crwdne8664:0", - "only_background_scheduled_can_run": "crwdns8666:0crwdne8666:0", - "preparing_script_resources": "crwdns8668:0crwdne8668:0", - "build_success_message": "crwdns8670:0crwdne8670:0", - "script_storage_tooltip": "crwdns8672:0crwdne8672:0", - "script_resource_tooltip": "crwdns8674:0crwdne8674:0", - "script_setting_tooltip": "crwdns8676:0crwdne8676:0", - "script_modified_close_confirm": "crwdns8678:0crwdne8678:0", - "close_current_tab": "crwdns8680:0crwdne8680:0", - "close_other_tabs": "crwdns8682:0crwdne8682:0", - "close_left_tabs": "crwdns8684:0crwdne8684:0", - "close_right_tabs": "crwdns8686:0crwdne8686:0", - "import_script_placeholder": "crwdns8688:0crwdne8688:0", - "invalid_script_code": "crwdns8690:0crwdne8690:0", - "build_failed": "crwdns8692:0crwdne8692:0", - "drag_script_here_to_upload": "crwdns8694:0crwdne8694:0", - "sync_status": "crwdns8696:0crwdne8696:0", - "search_scripts": "crwdns8698:0crwdne8698:0", - "ext_update_notification": "crwdns8700:0crwdne8700:0", - "ext_update_notification_desc": "crwdns8702:0{{version}}crwdne8702:0", - "watch_file_description": "crwdns8852:0crwdne8852:0", - "watch_file": "crwdns8854:0crwdne8854:0", - "stop_watch_file": "crwdns8856:0crwdne8856:0", - "script_menu_display": "crwdns8858:0crwdne8858:0", - "badge_type_none": "crwdns8860:0crwdne8860:0", - "badge_type_run_count": "crwdns8862:0crwdne8862:0", - "badge_type_script_count": "crwdns8864:0crwdne8864:0", - "interface_settings": "crwdns8872:0crwdne8872:0", - "select_interface_language": "crwdns8874:0crwdne8874:0", - "extension_icon_badge": "crwdns8876:0crwdne8876:0", - "display_type": "crwdns8878:0crwdne8878:0", - "extension_icon_badge_type": "crwdns8880:0crwdne8880:0", - "background_color": "crwdns8882:0crwdne8882:0", - "badge_background_color_desc": "crwdns8884:0crwdne8884:0", - "text_color": "crwdns8886:0crwdne8886:0", - "badge_text_color_desc": "crwdns8888:0crwdne8888:0", - "script_menu": "crwdns8890:0crwdne8890:0", - "display_right_click_menu": "crwdns8916:0crwdne8916:0", - "display_right_click_menu_desc": "crwdns8918:0crwdne8918:0", - "expand_count": "crwdns8896:0crwdne8896:0", - "auto_collapse_when_exceeds": "crwdns8898:0crwdne8898:0", - "script_update_check_frequency": "crwdns8900:0crwdne8900:0", - "script_auto_update_frequency": "crwdns8902:0crwdne8902:0", - "update_options": "crwdns8904:0crwdne8904:0", - "control_script_update_behavior": "crwdns8906:0crwdne8906:0", - "blacklist_pages_desc": "crwdns8908:0crwdne8908:0", - "development_tools": "crwdns8910:0crwdne8910:0", - "check_script_code_quality": "crwdns8912:0crwdne8912:0", - "custom_eslint_rules_config": "crwdns8914:0crwdne8914:0", - "light": "crwdns10794:0crwdne10794:0", - "dark": "crwdns10796:0crwdne10796:0", - "individual_edit": "crwdns10798:0crwdne10798:0", - "batch_edit": "crwdns10800:0crwdne10800:0", - "script_code": "crwdns10804:0crwdne10804:0", - "enter_search_value": "crwdns10806:0{{search}}crwdne10806:0", - "script_run_env": { - "title": "crwdns10808:0crwdne10808:0", - "all": "crwdns10812:0crwdne10812:0", - "normal-tabs": "crwdns10814:0crwdne10814:0", - "incognito-tabs": "crwdns10816:0crwdne10816:0" - }, - "script_run_at": { - "title": "crwdns12876:0crwdne12876:0" - }, - "script_setting": { - "title": "crwdns12890:0crwdne12890:0", - "default": "crwdns12892:0crwdne12892:0" - }, - "editor_config": "crwdns10818:0crwdne10818:0", - "editor_config_description": "crwdns10820:0crwdne10820:0", - "editor_type_definition": "crwdns10822:0crwdne10822:0", - "editor_type_definition_description": "crwdns10824:0crwdne10824:0", - "eslint_rules_reset": "crwdns10826:0crwdne10826:0", - "eslint_rules_saved": "crwdns10828:0crwdne10828:0", - "editor_config_reset": "crwdns10830:0crwdne10830:0", - "editor_config_saved": "crwdns10832:0crwdne10832:0", - "editor_config_format_error": "crwdns10834:0crwdne10834:0", - "editor_type_definition_reset": "crwdns10836:0crwdne10836:0", - "editor_type_definition_saved": "crwdns10838:0crwdne10838:0", - "script_list": { - "sidebar": { - "stopped": "crwdns12794:0crwdne12794:0", - "all": "crwdns12796:0crwdne12796:0", - "normal_script": "crwdns12798:0crwdne12798:0", - "status": "crwdns12800:0crwdne12800:0" - } - }, - "tags": "crwdns12802:0crwdne12802:0", - "install_source": "crwdns12804:0crwdne12804:0", - "input_tags_placeholder": "crwdns12806:0crwdne12806:0", - "switch_to_card_mode": "crwdns12808:0crwdne12808:0", - "switch_to_table_mode": "crwdns12810:0crwdne12810:0", - "open_sidebar": "crwdns12812:0crwdne12812:0", - "close_sidebar": "crwdns12814:0crwdne12814:0", - "no_message_content": "crwdns12830:0crwdne12830:0", - "error_metadata_invalid": "crwdns12832:0crwdne12832:0", - "error_script_name_required": "crwdns12834:0crwdne12834:0", - "error_script_version_required": "crwdns12836:0crwdne12836:0", - "error_script_namespace_required": "crwdns12838:0crwdne12838:0", - "error_cron_invalid": "crwdns12840:0{{expr}}crwdne12840:0", - "error_script_type_mismatch": "crwdns12842:0crwdne12842:0", - "error_old_script_code_missing": "crwdns12844:0crwdne12844:0", - "error_subscribe_name_required": "crwdns12846:0crwdne12846:0", - "error_grant_conflict": "crwdns12848:0crwdne12848:0", - "notification": { - "script_sync_delete": "crwdns12850:0crwdne12850:0", - "script_sync_delete_desc": "crwdns12852:0{{scriptName}}crwdne12852:0", - "subscribe_update": "crwdns12854:0{{subscribeName}}crwdne12854:0", - "subscribe_update_desc": "crwdns12856:0{{newScripts}}crwdnd12856:0{{deletedScripts}}crwdne12856:0" - }, - "loading": "crwdns12870:0crwdne12870:0", - "editor": { - "show_script_list": "Show Script List", - "hide_script_list": "Hide Script List" - } -} \ No newline at end of file diff --git a/src/locales/locales.ts b/src/locales/locales.ts index 4c9edccca..57d2359ed 100644 --- a/src/locales/locales.ts +++ b/src/locales/locales.ts @@ -9,7 +9,6 @@ import enUS from "./en-US/translation.json"; import viVN from "./vi-VN/translation.json"; import zhCN from "./zh-CN/translation.json"; import zhTW from "./zh-TW/translation.json"; -import achUG from "./ach-UG/translation.json"; import jaJP from "./ja-JP/translation.json"; import deDE from "./de-DE/translation.json"; import ruRU from "./ru-RU/translation.json"; @@ -52,7 +51,6 @@ export function initLanguage(lng: string = "en-US"): void { "de-DE": { title: "Deutsch", translation: deDE }, "vi-VN": { title: "Tiếng Việt", translation: viVN }, "ru-RU": { title: "Русский", translation: ruRU }, - "ach-UG": { title: "伪语言", translation: achUG }, }, }); diff --git a/src/pages/components/layout/MainLayout.tsx b/src/pages/components/layout/MainLayout.tsx index 072f082f0..6b8e499f4 100644 --- a/src/pages/components/layout/MainLayout.tsx +++ b/src/pages/components/layout/MainLayout.tsx @@ -274,12 +274,10 @@ const MainLayout: React.FC<{ // 使用 useMemo 缓存语言列表,避免每次重绘都执行循环,然后生成新的参考 const languageList = useMemo(() => { - const list = Object.keys(i18n.store.data) - .filter((key) => key !== "ach-UG") - .map((key) => ({ - key, - title: i18n.store.data[key].title as string, - })); + const list = Object.keys(i18n.store.data).map((key) => ({ + key, + title: i18n.store.data[key].title as string, + })); return [...list, { key: "help", title: t("help_translate") }]; }, [t]); @@ -469,7 +467,7 @@ const MainLayout: React.FC<{ key={value.key} onClick={() => { if (value.key === "help") { - window.open("https://crowdin.com/project/scriptcat", "_blank"); + window.open("https://github.com/scriptscat/scriptcat/tree/main/src/locales", "_blank"); return; } systemConfig.setLanguage(value.key); diff --git a/src/pages/options/routes/Setting.tsx b/src/pages/options/routes/Setting.tsx index 7e348e769..793ef8eb0 100644 --- a/src/pages/options/routes/Setting.tsx +++ b/src/pages/options/routes/Setting.tsx @@ -50,9 +50,6 @@ function Setting() { const languageList: { key: string; title: string }[] = []; const i18nStoreData = i18n.store.data; for (const key of Object.keys(i18nStoreData)) { - if (key === "ach-UG") { - continue; - } languageList.push({ key, title: `${i18nStoreData[key].title}`, @@ -120,7 +117,7 @@ function Setting() { className="tw-w-50 tw-max-w-75" onChange={(value) => { if (value === "help") { - window.open("https://crowdin.com/project/scriptcat", "_blank"); + window.open("https://github.com/scriptscat/scriptcat/tree/main/src/locales", "_blank"); return; } submitLanguage(value);