ubik-dsh/deepseek-mods--packages-locale-ru ↗★ 0

@local/dsh-locale-ru

Russian language pack for the DSH Web GUI: registers the ru locale and Russian dictionaries for every shipped client namespace 适合需要为DSH Web界面及内置命名空间提供俄语翻译支持的用户。

패키지
@local/dsh-locale-ru
호환성
미검증
Cordis peer 범위
^4.0.2
버전
0.1.0
라이선스
NOASSERTION
최근 업데이트
2026. 9. 20.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

@local/dsh-locale-ru

Russian localization for the DSH Web GUI. DSH ships English and Chinese only; this plugin adds a third language through the locale registry's public language-pack API.

Русская версия: README.ru.md.

Language selection in Russian

Coverage

MetricValue
Namespaces42
Translated strings1257
Of them containing Cyrillic1195
Bundle size~88 KiB

The remaining ~60 values are intentionally untranslated: OK, HTML, PDF, JSON, model ids, application names, and strings that are nothing but placeholders ({name}, {value}K).

How it works

ctx.locale.addLanguage({ id: 'ru', label: 'Русский', fallback: 'en' })
ctx.locale.register(namespace, 'ru', dictionary)

The fallback chain ends at en, so a namespace or key without a translation keeps showing English: the pack degrades per key rather than breaking the UI.

Choosing the language

Settings → General → Language → Русский. The switch is instant, without a reload, and the choice is persisted in $DSH_HOME/settings.yaml.

A browser asking for Russian (Accept-Language: ru) gets the Russian UI right away — DSH derives the locale from the browser until an explicit preference is stored.

Editing translations

lib/client.js is generated. Edit the sources and rebuild:

i18n/en/.json    the English source, extracted from a DSH install
i18n/ru/.json    the Russian translation
node tools/build-locale.mjs

The builder refuses to write the bundle if a translation has a different key set or different placeholders than its English source, so a typo cannot ship silently. It also refuses empty values.

Refreshing for a new DSH version

node tools/extract-locale.mjs     # re-read the shipped dictionaries
node tools/build-locale.mjs       # rebuild, keeping existing translations

New namespaces and new keys appear in English until they are translated in i18n/ru/.

Limitations

  • DSH provides no plural rules to language packs, so forms were chosen for the .one/.other categories the interface selects between.
  • Copy that plugins read once at registration time (slash-command descriptions and the like) keeps the language it was registered under until the page is reloaded — a DSH constraint, not this pack's.
  • The directory-browser namespace (13 strings) was translated by hand: its dictionary is registered in a loop, which the automated extractor cannot follow.