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 ピア範囲
^4.0.2
バージョン
0.1.0
ライセンス
NOASSERTION
最終更新
2026/09/20

インストール

検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗

ドキュメント

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.