@goodandready/dsh-russian-lang 0.1.20 → 0.1.22
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.
|
Binary file
|
|
Binary file
|
package/lib/client.js
CHANGED
|
@@ -3508,16 +3508,12 @@ window.__ModuleLoader__.load({
|
|
|
3508
3508
|
const native = runtime.getLocale().locales.some((l) => l.id === 'ru')
|
|
3509
3509
|
|
|
3510
3510
|
if (!native) {
|
|
3511
|
-
// Ядро не знает ru:
|
|
3512
|
-
// Language берёт меню из snapshot.locales,
|
|
3513
|
-
// валидирует выбор — «Русский» появляется в
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
locales: s0.locales.concat([{ id: 'ru', label: 'Русский' }]),
|
|
3518
|
-
revision: s0.revision + 1
|
|
3519
|
-
})
|
|
3520
|
-
ctx.emit('locale/change', runtime.snapshot)
|
|
3511
|
+
// Ядро не знает ru: регистрируем его через addLanguage (реальный API
|
|
3512
|
+
// LocaleRuntime). Родная строка Language берёт меню из snapshot.locales,
|
|
3513
|
+
// setLocale() по нему же валидирует выбор — «Русский» появляется в
|
|
3514
|
+
// родном списке. (Старый код писал runtime.snapshot/publish напрямую —
|
|
3515
|
+
// этих методов в DSH 0.1.2-alpha нет, переключение молча не работало.)
|
|
3516
|
+
runtime.addLanguage({ id: 'ru', label: 'Русский', fallback: 'en' })
|
|
3521
3517
|
syncLang()
|
|
3522
3518
|
|
|
3523
3519
|
// Хост-схема namespace "locale" знает только zh/en, запись preference
|
|
@@ -3573,8 +3569,7 @@ window.__ModuleLoader__.load({
|
|
|
3573
3569
|
const activate = () => {
|
|
3574
3570
|
try {
|
|
3575
3571
|
if (runtime.getLocale().active === 'ru') return
|
|
3576
|
-
|
|
3577
|
-
else runtime.publish('ru', true)
|
|
3572
|
+
runtime.setLocale('ru')
|
|
3578
3573
|
} catch (err) { console.warn('dsh-russian-lang: activate failed', err) }
|
|
3579
3574
|
}
|
|
3580
3575
|
let booted = false
|
|
@@ -3940,8 +3935,7 @@ window.__ModuleLoader__.load({
|
|
|
3940
3935
|
const toggleRu = (wantRu) => {
|
|
3941
3936
|
try {
|
|
3942
3937
|
if (runtime.getLocale().active === wantRu) return
|
|
3943
|
-
|
|
3944
|
-
else runtime.publish(wantRu ? 'ru' : 'en', true)
|
|
3938
|
+
runtime.setLocale(wantRu ? 'ru' : 'en')
|
|
3945
3939
|
} catch (err) { console.warn('dsh-russian-lang: toggle failed', err) }
|
|
3946
3940
|
}
|
|
3947
3941
|
// Регистрируем карточку через inject: так слот объявляется родителю,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-russian-lang",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
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
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|