DSH Right-Sidebar Immersive Bilingual Webpage Translation

Introduction

When reading English documentation, GitHub READMEs, or technical blogs in the right sidebar browser of DeepSeek Harness (DSH), traditional browser translations either break the page layout or lose navigation and links. The DSH plugin ecosystem emphasizes “everything is a plugin,” and the community-maintained vacum972/dsh-page-translate plugin focuses on solving this specific problem: it turns web pages into a bilingual side-by-side view within the DSH right sidebar, preserving the original text while inserting the translation below each corresponding paragraph.

Plugin Scope

This is a DSH plugin independently developed and maintained by community member vacum972, with no affiliation to DeepSeek’s official team. It provides an immersive bilingual web page translation experience: the original text remains on the page, and the translation is inserted beneath it. It supports site-wide auto-translation, scroll-to-continue translation, and multi-engine switching. It is ideal for reading English pages with long body text and rich navigation, especially technical documentation, GitHub READMEs/Issues, news sites, and technical blogs.

Core Features

Immersive Bilingual Side-by-Side

After opening any web page in the DSH right sidebar, click the “Translate” button in the title bar (located next to the split-screen / fullscreen / collapse buttons), and the page will display translations paragraph by paragraph. Short titles or label rows get an inline appended translation, while longer paragraphs get a new line prefixed with a red vertical bar. Translations are inserted as child nodes without modifying inline styles or moving the original text, so the site’s original layout remains intact.

Site-wide Auto-translation and Scroll-to-Continue

Once a page on a given site has been translated, that site is marked as “auto-translate.” Subsequent links, new tabs, and in-site navigations on that domain will be automatically translated upon load completion—no need to click the translate button again. The tab “…” menu contains a “Site Auto-translate: On/Off” toggle, saved locally per domain. When you scroll down, load new cards, or click “Load More,” newly appearing content is automatically translated within 1–2 seconds, and already-translated sections are not duplicated.

Multi-Engine Switching

The “Translation Engine” option in the tab “…” menu cycles through: Theme-aware (DeepSeek model), Google Web Translate, and Bing Direct.

  • Theme-aware (default): The client sends the text to be translated along with the page title, opening body text (and term placeholders) to the plugin’s Host route /page-translate/model, where the Host uses DSH’s current default model to perform the translation. The model handles polysemous words based on page context. This consumes your account’s model quota; on failure, it automatically falls back to Google.
  • Google Web Translate: Routed through the Host proxy to the Google Web Translate API. Free, no API key required, and also serves as the fallback when the model fails.
  • Bing Direct: Connects directly to Microsoft Edge’s anonymous endpoint. No Host route needed, serving as the last-resort fallback.

Both the Google and Bing routes are free and require no API key. After switching engines, the plugin automatically clears previous translations and re-translates the current page with the new engine.

Glossary

The glossary ensures consistent translation of proper nouns. A set of common technical documentation terms is built in. Each line follows the format source = translation and can be added to, removed from, or edited. Under the hood, terms are first replaced with machine-translation-proof placeholders like ⟦G0⟧, and after translation they are restored to the specified translation. This way, the engine neither sees nor mistranslates these terms. The glossary is stored per browser profile in localStorage under the key dsh.page-translate.glossary, and it participates in the translation cache key—changes take effect upon the next re-translation.

Selection Translation

On an already-translated page, select 2–600 characters, and a red “Translate” button appears next to the selection. Clicking it opens a card displaying both the original and translated text. Dismiss it by clicking ×, pressing Esc, or making the next selection. Selection translation does not modify page content—it only shows a floating overlay.

Installation and Setup

Install via the command line:

# npm install (recommended)
dsh plugin --profile web add @vacum972/dsh-page-translate

# Or install directly from GitHub source
dsh plugin --profile web add github:vacum972/dsh-page-translate

Desktop users can also search for @vacum972/dsh-page-translate in DSH’s “Plugin Center” for one-click installation; during local development, you can install via a directory path in the plugin manager. After installation, simply refresh the page—no API key required, no configuration needed, no account binding.

Typical Usage

  1. Open any web page in the right sidebar.
  2. Click the “Translate” button in the title bar, or use the tab’s “…” menu → “Translate this page.”
  3. The page begins displaying translations paragraph by paragraph; progress is shown in the bottom-right corner (e.g., “Translating 88/131”).
  4. Click the same button again to show the original text (removes translations).
  5. On an already-translated page, select text and click the “Translate” button that appears to view the translation.

Use Cases and Caveats

Ideal for reading English technical documentation, GitHub READMEs/Issues, news sites, and technical blogs—especially pages with long body text and rich navigation.

Caveats:

  • Desktop only: The right sidebar browser uses Electron <webview> on desktop, while the Web profile uses a cross-origin <iframe>. The plugin cannot inject into it, and the menu will display “Current page cannot be translated.”
  • Only top-level blocks of the current document are translated: cross-origin iframes, canvas/PDF content, and text within images are not processed.
  • Selection translation and scroll-to-continue require the page to have been translated already.
  • Free anonymous endpoints have no service guarantee and may be rate-limited or go offline; when one fails, the other engine automatically takes over.
  • Site structures vary widely; conservative rules intentionally skip certain content (multi-link cards, buttons, dropdown menus, etc.) to ensure “no content loss, no layout breakage.”
  • The plugin runs with the current DSH process’s permissions. Review the source code and license before installing.

Conclusion

This plugin combines a conservative insertion strategy with multiple translation engines to deliver an immersive bilingual reading experience while preserving the page layout. If you frequently read English technical content in the DSH right sidebar, feel free to install and try it out.

  • Directory page: https://www.skillhub.cn/plugins/vacum972/dsh-page-translate
  • GitHub: https://github.com/vacum972/dsh-page-translate
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye