- Home
- Plugins
- Dev & Plugin Tools
- dsh-market-ru
dsh-market-ru
aizgeme/dsh-market-ru
Serves Russian descriptions, category names and installed-plugin text for dsh-market by wiring the market's routes to DSH's translator with an on-disk cache, then reloading the market in place so a page refresh is enough.
Install
dsh plugin --profile web add github:aizgeme/dsh-market-ruREADME
dsh-market-ru
Russian descriptions for every plugin card in dsh-market (the DSH plugin market).
The market draws a plugin's text as description[lang] || description.en, where its own lang is "zh" for a Chinese interface and "en" otherwise. This plugin puts the Russian text into the served catalog — description.en and description.ru — so cards, the detail page, the installed list and description search all read in Russian, without touching the market's browser bundle.
Requirements
- dsh-market installed in the same profile (any 1.8x release; the wiring is verified against 1.85.1).
- No restart, normally: after the wiring is written the plugin asks the host to swap the market's modules in place through DSH's HMR service, so a browser refresh is enough — for the first install and for every dsh-market update after it.
A host without that service (DSH older than 0.2.1, or a deployment that cannot evict modules) needs one restart after the first install and after each market update. The log says which case it took:
market reloaded in place — refresh the pageorrestart DSH once.
Install
dsh plugin --profile web add github:Aizgeme/dsh-market-ru
# or, published to npm:
dsh plugin --profile web add dsh-market-ru
The market's plugin manager mounts it immediately; refresh the page and the cards come back in Russian.
What it writes, and why
The plugin is a small, transparent overlay — it edits two files inside the installed dshmarket package and nothing else:
| File | Change |
|---|---|
lib/desc-i18n.js | added: the translation module (cache, batching, translator call) |
lib/routes.js | four insertions: an import, and one enrichment call in GET /dsh-market/registry (paged and unpaged) and one in GET /dsh-market/installed |
On every boot it checks whether those insertions are still there and puts them back if a market update removed them, then reloads the market in place. When the anchors have moved (a release that rewrote those lines), it writes nothing and says so in the log:
[dsh-market-ru] dsh-market 1.86.0 has an unknown shape — no anchor for: paged catalog. Nothing was written.
That is the intended failure: a patched market that still works beats a half-patched one.
How translation works
- What is translated. Plugin descriptions in the catalog, descriptions of installed plugins, and the catalog's category names (
UI Enhancements→Улучшения интерфейса), which the market renders from the same{ en, zh }shape. - Cache first. Translations live in
<DSH_HOME>/dsh-market/desc-i18n.ru.json, keyed by a hash of the source text. One text costs one request for the life of the installation. - DSH's own translator (
ctx.translator, anonymous Google/Bing routes — no API key, no model tokens) translates what the cache does not hold; a direct request to Google's public translate endpoint is the fallback when that service is unavailable. A429starts a five-minute cooldown instead of hammering. - Lazily, per page. The first visit to a catalog page translates up to 256 descriptions inside a 4.5 s budget and serves whatever finished; the rest lands in the cache for the next request. A page after the first visit is a pure cache hit.
- Prewarm on a cold cache. When the cache holds fewer than 2 000 texts, the plugin fetches the public catalog eight seconds after boot and translates it in the background — so the first market page of a fresh install is already Russian. Disable with
warm: falseunder the plugin'sconfig:. - Product name kept out of it.
DeepSeek Harnessand a bareharnessbecomeDSHbefore translating, otherwise the engine returns "safety harness"; known bad renderings are repaired on read, so the fix also applies to translations cached earlier.
To skip the lazy first visit, pre-translate the whole catalog once:
node scripts/warm-descriptions.mjs # ~14 000 descriptions, ~4 minutes
node scripts/warm-descriptions.mjs --limit 200 # try a slice first
Limitations
- Machine translation: meaning survives, style does not.
- Search matches the Russian text, so English keyword searches over descriptions may miss (name, owner and category search are unaffected).
- The market's "terminal-only plugin" heuristic reads the description; it falls back to the plugin name, which is checked first.
- A Chinese market interface keeps its Chinese descriptions (
zhis left untouched). - The anonymous Google endpoint rate-limits bulk traffic; after a full prewarm it may answer
429for a while. Cached cards are unaffected, and a new plugin is translated on a later visit.
Uninstall
dsh plugin --profile web remove dsh-market-ru
Then reinstall dsh-market (or restore its lib/routes.js from the release tarball) so the wiring goes away, and restart the host. The cache file may be kept or deleted.
License
MIT.
По-русски
Плагин добавляет русские описания в маркет плагинов DSH. Он не трогает браузерный бандл маркета: правятся два файла внутри установленного dshmarket (lib/routes.js — четыре вставки, и новый lib/desc-i18n.js), поэтому описания приходят уже переведёнными в каталоге, в списке установленных и в поиске.
- Кэш переводов:
<DSH_HOME>/dsh-market/desc-i18n.ru.json; переводятся только новые тексты. - Перевод идёт через штатный
translatorDSH (анонимные маршруты Google/Bing), без ключей и без расхода токенов модели. - Перезапуск не нужен: после установки и после каждого обновления
dshmarketплагин восстанавливает правку и просит хост заменить модули маркета на месте (ctx.hmr.reconcileProfile()), поэтому достаточно обновить страницу. Хосту без этой службы (DSH старше 0.2.1) нужен один перезапуск — плагин пишет об этом в лог. - Если новая версия маркета переписала нужные строки, плагин ничего не меняет и пишет предупреждение в лог.
Related plugins
deepseek-harness
deepseek-ai/deepseek-harness
dsh-market
dsh-market/dsh-market
dsh-web (dsh-plugin-manager)
zhu1090093659/dsh-web
dsh-web
zhu1090093659/dsh-web