@goodandready/dsh-russian-lang 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/lib/client.js +36 -5
- package/package.json +70 -70
package/README.md
CHANGED
|
@@ -6,11 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@goodandready/dsh-russian-lang"><img src="https://img.shields.io/npm/v/@goodandready/dsh-russian-lang.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
|
9
|
-
<a href="LICENSE"><img src="https://img.shields.io/
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-10b981.svg?style=for-the-badge&color=10b981&labelColor=064e3b" alt="license"></a>
|
|
10
10
|
<a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/DSH-Plugin-8b5cf6.svg?style=for-the-badge&labelColor=2e1065" alt="DSH Plugin"></a>
|
|
11
11
|
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-20%2B-f59e0b.svg?style=for-the-badge&labelColor=451a03" alt="Node version"></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://goodandready.app/"><img src="https://img.shields.io/badge/Все_проекты_автора-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="Все проекты автора"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
14
18
|
</div>
|
|
15
19
|
|
|
16
20
|
---
|
package/lib/client.js
CHANGED
|
@@ -3792,12 +3792,23 @@ window.__ModuleLoader__.load({
|
|
|
3792
3792
|
|
|
3793
3793
|
// 3. Флаг russianLang.enabled всегда повторяет активный язык: выбор
|
|
3794
3794
|
// английского или китайского в родном меню выключает русский и наоборот.
|
|
3795
|
+
// scope.set возвращает Promise<void> в v0.1.2-alpha.2, ошибка приходит
|
|
3796
|
+
// через rejection и try/catch её не ловит — обрабатываем оба канала.
|
|
3795
3797
|
const syncFlag = () => {
|
|
3796
3798
|
try {
|
|
3797
3799
|
const wantRu = runtime.getLocale().active === 'ru'
|
|
3798
3800
|
const value = scope.getSnapshot().value || {}
|
|
3799
|
-
if (!!value.enabled !== wantRu)
|
|
3800
|
-
|
|
3801
|
+
if (!!value.enabled !== wantRu) {
|
|
3802
|
+
const r = scope.set('enabled', wantRu)
|
|
3803
|
+
if (r && typeof r.catch === 'function') {
|
|
3804
|
+
r.catch((err) => {
|
|
3805
|
+
console.warn('dsh-russian-lang: scope.set enabled failed', err && err.message || err)
|
|
3806
|
+
})
|
|
3807
|
+
}
|
|
3808
|
+
}
|
|
3809
|
+
} catch (err) {
|
|
3810
|
+
/* snapshot ещё не готов, либо scope.set синхронно бросил */
|
|
3811
|
+
}
|
|
3801
3812
|
}
|
|
3802
3813
|
ctx.effect(() => {
|
|
3803
3814
|
try { return runtime.subscribe(syncFlag) }
|
|
@@ -4240,7 +4251,17 @@ window.__ModuleLoader__.load({
|
|
|
4240
4251
|
const setTypo = (patch) => {
|
|
4241
4252
|
const next = Object.assign({}, typo, patch)
|
|
4242
4253
|
setTypoState(next) // мгновенно
|
|
4243
|
-
|
|
4254
|
+
// v0.1.2-alpha.2: scope.set returns Promise<void>, ошибка приходит через
|
|
4255
|
+
// promise rejection. catch на promise не обработает sync throw, поэтому
|
|
4256
|
+
// принимаем оба и логируем только реальные.
|
|
4257
|
+
try {
|
|
4258
|
+
const r = scope.set('typography', next)
|
|
4259
|
+
if (r && typeof r.catch === 'function') r.catch((err) => {
|
|
4260
|
+
console.warn('dsh-russian-lang: scope.set typography failed', err && err.message || err)
|
|
4261
|
+
})
|
|
4262
|
+
} catch (err) {
|
|
4263
|
+
console.warn('dsh-russian-lang: scope.set typography sync threw', err && err.message || err)
|
|
4264
|
+
}
|
|
4244
4265
|
}
|
|
4245
4266
|
const onEnabled = (ev) => { if (toggleRu) toggleRu(ev.target.checked) }
|
|
4246
4267
|
|
|
@@ -4292,8 +4313,18 @@ window.__ModuleLoader__.load({
|
|
|
4292
4313
|
(ev) => setTypo({ enabled: ev.target.checked }), !ruActive), t('typographyDesc')),
|
|
4293
4314
|
row(t('yo'), checkbox(typography.yo === true,
|
|
4294
4315
|
(ev) => setTypo({ yo: ev.target.checked }), !ruActive), t('yoDesc')),
|
|
4295
|
-
row(t('agentPrompt'), checkbox(value.agentPrompt === true,
|
|
4296
|
-
(ev) => {
|
|
4316
|
+
row(t('agentPrompt'), checkbox(value.overrides && value.overrides.agentPrompt === true,
|
|
4317
|
+
(ev) => {
|
|
4318
|
+
const next = Object.assign({}, value.overrides || {}, { agentPrompt: ev.target.checked })
|
|
4319
|
+
try {
|
|
4320
|
+
const r = scope.set('overrides', next)
|
|
4321
|
+
if (r && typeof r.catch === 'function') r.catch((err) => {
|
|
4322
|
+
console.warn('dsh-russian-lang: scope.set overrides failed', err && err.message || err)
|
|
4323
|
+
})
|
|
4324
|
+
} catch (err) {
|
|
4325
|
+
console.warn('dsh-russian-lang: scope.set overrides sync threw', err && err.message || err)
|
|
4326
|
+
}
|
|
4327
|
+
}, false), t('agentPromptDesc')),
|
|
4297
4328
|
React.createElement('div', { className: 'rl-note' },
|
|
4298
4329
|
t('overridesCount') + ': ' + overridesCount),
|
|
4299
4330
|
React.createElement('div', { className: 'rl-hint' }, t('altL')),
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@goodandready/dsh-russian-lang",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Russian localization for the DeepSeek Harness web UI: adds Русский as the third option in the native Settings - General - Language menu. Translates the full core surface (100% coverage of DSH 0.1.1-rc.2) plus 16 community plugin namespaces - 52 namespaces, 2795 strings (many machine-drafted, queued for manual review), with Russian plural forms, count-key plurals, a typography pass (guillemets, em dash, nbsp), a wrong-layout input hint and browser spellcheck. The locale runtime snapshot is extended at runtime on unpatched cores; no files in the DSH installation are modified. The choice is persisted through the plugin-owned russian-lang namespace.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./lib/index.js",
|
|
9
|
-
"./client": "./lib/client.js",
|
|
10
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
11
|
-
"./package.json": "./package.json"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"lib",
|
|
15
|
-
"ru",
|
|
16
|
-
"ru-plugins",
|
|
17
|
-
"cordis.patch.yml",
|
|
18
|
-
"README.md",
|
|
19
|
-
"LICENSE",
|
|
20
|
-
"docs/media"
|
|
21
|
-
],
|
|
22
|
-
"dsh": {
|
|
23
|
-
"bundle": {
|
|
24
|
-
"patch": "./cordis.patch.yml"
|
|
25
|
-
},
|
|
26
|
-
"client": {
|
|
27
|
-
"platform": "web",
|
|
28
|
-
"inject": [
|
|
29
|
-
"@deepseek-ai/dsh-client-locale",
|
|
30
|
-
"@deepseek-ai/dsh-client-ui-settings"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"deepseek-harness",
|
|
36
|
-
"dsh",
|
|
37
|
-
"dsh-plugin",
|
|
38
|
-
"i18n",
|
|
39
|
-
"locale",
|
|
40
|
-
"russian"
|
|
41
|
-
],
|
|
42
|
-
"license": "MIT",
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": ">=20"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "python3 build.py",
|
|
48
|
-
"check": "python3 check-coverage.py",
|
|
49
|
-
"test": "python3 test/test_extract.py",
|
|
50
|
-
"smoke": "python3 test/smoke.py"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"websocket-client": "^1.7.0"
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@deepseek-ai/schemastery": "^3.18.1"
|
|
57
|
-
},
|
|
58
|
-
"peerDependencies": {
|
|
59
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
60
|
-
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.2"
|
|
61
|
-
},
|
|
62
|
-
"repository": {
|
|
63
|
-
"type": "git",
|
|
64
|
-
"url": "git+https://github.com/GooDAnDReaDY/dsh-russian-lang.git"
|
|
65
|
-
},
|
|
66
|
-
"homepage": "https://github.com/GooDAnDReaDY/dsh-russian-lang#readme",
|
|
67
|
-
"bugs": {
|
|
68
|
-
"url": "https://github.com/GooDAnDReaDY/dsh-russian-lang/issues"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@goodandready/dsh-russian-lang",
|
|
3
|
+
"version": "0.1.27",
|
|
4
|
+
"description": "Russian localization for the DeepSeek Harness web UI: adds Русский as the third option in the native Settings - General - Language menu. Translates the full core surface (100% coverage of DSH 0.1.1-rc.2) plus 16 community plugin namespaces - 52 namespaces, 2795 strings (many machine-drafted, queued for manual review), with Russian plural forms, count-key plurals, a typography pass (guillemets, em dash, nbsp), a wrong-layout input hint and browser spellcheck. The locale runtime snapshot is extended at runtime on unpatched cores; no files in the DSH installation are modified. The choice is persisted through the plugin-owned russian-lang namespace.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./lib/index.js",
|
|
9
|
+
"./client": "./lib/client.js",
|
|
10
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"lib",
|
|
15
|
+
"ru",
|
|
16
|
+
"ru-plugins",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"docs/media"
|
|
21
|
+
],
|
|
22
|
+
"dsh": {
|
|
23
|
+
"bundle": {
|
|
24
|
+
"patch": "./cordis.patch.yml"
|
|
25
|
+
},
|
|
26
|
+
"client": {
|
|
27
|
+
"platform": "web",
|
|
28
|
+
"inject": [
|
|
29
|
+
"@deepseek-ai/dsh-client-locale",
|
|
30
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"deepseek-harness",
|
|
36
|
+
"dsh",
|
|
37
|
+
"dsh-plugin",
|
|
38
|
+
"i18n",
|
|
39
|
+
"locale",
|
|
40
|
+
"russian"
|
|
41
|
+
],
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "python3 build.py",
|
|
48
|
+
"check": "python3 check-coverage.py",
|
|
49
|
+
"test": "python3 test/test_extract.py",
|
|
50
|
+
"smoke": "python3 test/smoke.py"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"websocket-client": "^1.7.0"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
60
|
+
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.2"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/GooDAnDReaDY/dsh-russian-lang.git"
|
|
65
|
+
},
|
|
66
|
+
"homepage": "https://github.com/GooDAnDReaDY/dsh-russian-lang#readme",
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/GooDAnDReaDY/dsh-russian-lang/issues"
|
|
69
|
+
}
|
|
70
|
+
}
|