Dank Translate is a DankMaterialShell widget plugin for:
- opening a translator popout from the bar or a keyboard shortcut
- translating English and Chinese text with automatic direction or a manual target override
- choosing between Google Translate and an OpenAI-compatible model backend
- starting screenshot OCR translation from the bar icon or IPC
- using right click on the bar icon as a quick action panel
- Left click the bar icon: toggle the translator popout
- Right click the bar icon: open a quick action panel
- Translation direction can be
Auto,中文, orEnglish - Translation backend can be
Google Translateor anOpenAI-compatibleAPI - Settings page includes a backend test button for validating the active backend configuration
- OpenAI-compatible backends support custom system prompts and user prompt templates
- Keyboard-accessible IPC targets:
widget toggle dankTranslatewidget openWith dankTranslate screenshotwidget openWith dankTranslate actions
- Screenshot OCR flow:
- run
dms screenshot - OCR with
tesseract - translate OCR output to Chinese or English
- run
- Built-in dependency diagnostics in both the widget and the settings page
Install:
python3tesseract- Tesseract language data for
eng - Tesseract language data for
chi_simif you want Chinese OCR
The helper script supports:
- the Google Translate web endpoint through Python's standard library
- OpenAI-compatible
POST /v1/chat/completionsbackends, including local model servers
For the OpenAI-compatible backend, configure the base URL, model name, optional API key, and custom prompts from the plugin settings page, then use the built-in test button to validate the setup.
Copy or symlink the plugin directory into your DMS plugins folder:
ln -sf /path/to/DankTranslate ~/.config/DankMaterialShell/plugins/DankTranslate
dms ipc call plugins reload dankTranslateThen:
- Open
Settings -> Plugins - Scan for plugins if needed
- Enable
Dank Translate - Add
dankTranslateto the bar widget list
bind = SUPER, T, exec, dms ipc call widget toggle dankTranslate
bind = SUPER SHIFT, T, exec, dms ipc call widget openWith dankTranslate screenshot
bind = SUPER CTRL, T, exec, dms ipc call widget openWith dankTranslate actionsbinds {
Mod+T { spawn "dms" "ipc" "call" "widget" "toggle" "dankTranslate"; }
Mod+Shift+T { spawn "dms" "ipc" "call" "widget" "openWith" "dankTranslate" "screenshot"; }
Mod+Ctrl+T { spawn "dms" "ipc" "call" "widget" "openWith" "dankTranslate" "actions"; }
}plugin.json: plugin manifestDankTranslateWidget.qml: bar widget, popout, and IPC entry pointsDankTranslateSettings.qml: plugin settings pagescripts/translate_helper.py: screenshot OCR and translation helper
MIT. See LICENSE.

