chore: rename package to chinese2english

This commit is contained in:
katR 2026-10-11 18:33:25 +05:30
parent f27175d752
commit 53f3639814
10 changed files with 22 additions and 22 deletions

View file

@ -1,4 +1,4 @@
# dsh-plugin-english # chinese2english
> Universal English translation patch for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) third-party plugins. > Universal English translation patch for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) third-party plugins.
@ -10,7 +10,7 @@ Automatically intercepts and translates Chinese UI strings, buttons, dialogs, an
Most DeepSeek Harness community plugins are authored in Chinese with either missing English dictionaries or hardcoded Chinese strings inside their React components. Even when your DSH interface is set to English, those plugins remain in Chinese. Most DeepSeek Harness community plugins are authored in Chinese with either missing English dictionaries or hardcoded Chinese strings inside their React components. Even when your DSH interface is set to English, those plugins remain in Chinese.
**`dsh-plugin-english`** fixes this globally across all your installed plugins using an intelligent real-time translation observer and comprehensive technical DSH dictionary. **`chinese2english`** fixes this globally across all your installed plugins using an intelligent real-time translation observer and comprehensive technical DSH dictionary.
--- ---
@ -28,10 +28,10 @@ Most DeepSeek Harness community plugins are authored in Chinese with either miss
Install directly with the official DSH CLI: Install directly with the official DSH CLI:
```bash ```bash
dsh plugin --profile web add dsh-plugin-english dsh plugin --profile web add chinese2english
``` ```
*(To remove later: `dsh plugin --profile web remove dsh-plugin-english`)* *(To remove later: `dsh plugin --profile web remove chinese2english`)*
--- ---

View file

@ -1,4 +1,4 @@
# dsh-plugin-english bundle patch # chinese2english bundle patch
- insert: - insert:
- id: english-translator - id: chinese2english
name: 'dsh-plugin-english' name: 'chinese2english'

View file

@ -1,4 +1,4 @@
window.__ModuleLoader__.load({ id: "dsh-plugin-english", factory: (require) => { var module = { exports: {} }; var exports = module.exports; window.__ModuleLoader__.load({ id: "chinese2english", factory: (require) => { var module = { exports: {} }; var exports = module.exports;
var __defProp = Object.defineProperty; var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropNames = Object.getOwnPropertyNames;
@ -243,7 +243,7 @@ var DYNAMIC_PATTERNS = [
]; ];
// src/client/index.ts // src/client/index.ts
var name = "dsh-plugin-english-client"; var name = "chinese2english-client";
var inject = ["locale"]; var inject = ["locale"];
var CHINESE_REGEX = /[\u4e00-\u9fa5]/; var CHINESE_REGEX = /[\u4e00-\u9fa5]/;
function translateText(text) { function translateText(text) {
@ -382,7 +382,7 @@ function enforceEnglishStorage() {
} }
} }
function apply(ctx) { function apply(ctx) {
console.log("[dsh-plugin-english] Activating English locale & translation engine..."); console.log("[chinese2english] Activating English locale & translation engine...");
enforceEnglishStorage(); enforceEnglishStorage();
if (ctx.locale) { if (ctx.locale) {
try { try {

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
const name = "dsh-plugin-english"; const name = "chinese2english";
const inject = []; const inject = [];
function apply(ctx) { function apply(ctx) {
} }

View file

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"sources": ["../src/index.ts"], "sources": ["../src/index.ts"],
"sourcesContent": ["export const name = \"dsh-plugin-english\";\nexport const inject = [];\n\nexport function apply(ctx: any) {\n // Backend service hook - client bundle handles DOM & Locale translations\n}\n"], "sourcesContent": ["export const name = \"chinese2english\";\nexport const inject = [];\n\nexport function apply(ctx: any) {\n // Backend service hook - client bundle handles DOM & Locale translations\n}\n"],
"mappings": "AAAO,MAAM,OAAO;AACb,MAAM,SAAS,CAAC;AAEhB,SAAS,MAAM,KAAU;AAEhC;", "mappings": "AAAO,MAAM,OAAO;AACb,MAAM,SAAS,CAAC;AAEhB,SAAS,MAAM,KAAU;AAEhC;",
"names": [] "names": []
} }

View file

@ -1,5 +1,5 @@
{ {
"name": "dsh-plugin-english", "name": "chinese2english",
"version": "0.1.0", "version": "0.1.0",
"description": "Universal English translation patch for DeepSeek Harness third-party plugins", "description": "Universal English translation patch for DeepSeek Harness third-party plugins",
"type": "module", "type": "module",
@ -46,10 +46,10 @@
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.oiupoyt.space/oiupoyt/dsh-plugin-english.git" "url": "https://git.oiupoyt.space/oiupoyt/chinese2english.git"
}, },
"bugs": { "bugs": {
"url": "https://git.oiupoyt.space/oiupoyt/dsh-plugin-english/issues" "url": "https://git.oiupoyt.space/oiupoyt/chinese2english/issues"
}, },
"homepage": "https://git.oiupoyt.space/oiupoyt/dsh-plugin-english#readme" "homepage": "https://git.oiupoyt.space/oiupoyt/chinese2english#readme"
} }

View file

@ -4,7 +4,7 @@ console.log("Building server backend...");
execSync("npx esbuild src/index.ts --outfile=lib/index.js --platform=node --format=esm --target=node20 --sourcemap", { stdio: "inherit" }); execSync("npx esbuild src/index.ts --outfile=lib/index.js --platform=node --format=esm --target=node20 --sourcemap", { stdio: "inherit" });
console.log("Building client frontend bundle..."); console.log("Building client frontend bundle...");
const banner = 'window.__ModuleLoader__.load({ id: "dsh-plugin-english", factory: (require) => { var module = { exports: {} }; var exports = module.exports;'; const banner = 'window.__ModuleLoader__.load({ id: "chinese2english", factory: (require) => { var module = { exports: {} }; var exports = module.exports;';
const footer = 'return module.exports; } });'; const footer = 'return module.exports; } });';
execSync(`npx esbuild src/client/index.ts --outfile=lib/client.js --platform=browser --format=cjs --target=es2022 --bundle --banner:js='${banner}' --footer:js='${footer}' --sourcemap`, { stdio: "inherit" }); execSync(`npx esbuild src/client/index.ts --outfile=lib/client.js --platform=browser --format=cjs --target=es2022 --bundle --banner:js='${banner}' --footer:js='${footer}' --sourcemap`, { stdio: "inherit" });

View file

@ -1,6 +1,6 @@
import { DICTIONARY, SORTED_PAIRS, DYNAMIC_PATTERNS } from "./dictionary.js"; import { DICTIONARY, SORTED_PAIRS, DYNAMIC_PATTERNS } from "./dictionary.js";
export const name = "dsh-plugin-english-client"; export const name = "chinese2english-client";
export const inject = ["locale"]; export const inject = ["locale"];
const CHINESE_REGEX = /[\u4e00-\u9fa5]/; const CHINESE_REGEX = /[\u4e00-\u9fa5]/;
@ -179,7 +179,7 @@ function enforceEnglishStorage() {
} }
export function apply(ctx: any) { export function apply(ctx: any) {
console.log("[dsh-plugin-english] Activating English locale & translation engine..."); console.log("[chinese2english] Activating English locale & translation engine...");
enforceEnglishStorage(); enforceEnglishStorage();

View file

@ -1,4 +1,4 @@
export const name = "dsh-plugin-english"; export const name = "chinese2english";
export const inject = []; export const inject = [];
export function apply(ctx: any) { export function apply(ctx: any) {