DeepSeek OmegaT Plugin

DeepSeek OmegaT Plugin adds DeepSeek AI as a machine translation (MT) engine inside OmegaT, the free computer-assisted translation tool. It connects to the OpenAI-compatible DeepSeek Chat Completions API and brings a set of AI-assisted workflow features: glossary awareness, context continuity, auto-mode, and an automated self-review pass.

Version: 1.5.1 · Author: XIA ZIXIN · License: GPL · Source on GitHub

Features

  • DeepSeek MT engine — registers a DeepSeek translation engine in OmegaT’s machine translation settings.
  • Model selectiondeepseek-v4-flash (fast, cheap) or deepseek-v4-pro (more refined), pick from a dropdown.
  • Temperature control — slider 0.0–2.0, plus a Dynamic Temperature toggle that lets the API auto-adjust.
  • Glossary support — reads your OmegaT project glossaries and passes matching entries to the AI as hints (Reference mode) or as strict rules (Strict mode).
  • Context segments — optionally sends surrounding segments (above/below, up to 3) so translations stay consistent in tone and narrative flow.
  • Auto-insert — automatically fills the target segment with the translation, no Ctrl+M needed.
  • Auto-confirm — additionally commits the translation and advances to the next untranslated segment.
  • Auto-glossary — the AI suggests key terminology pairs with optional usage notes; entries are saved to deepseek_auto_glossary.txt.
  • Self-review agent — a second AI pass reviews each translation for tag preservation, glossary consistency, accuracy, and fluency, correcting errors automatically.
  • Hotkey toggleCtrl+Shift+M turns auto-mode on/off from anywhere.
  • ⚡ AUTO indicator — persistent status-bar indicator shows when auto-mode is active.
  • Auto-stop on manual click — clicking a different segment or switching files automatically disengages auto-mode.
  • “DeepSeek Function” menu — quick access to all features from OmegaT’s menu bar, no settings digging required.

Requirements

Installation

Build from source

Clone the repository and build with Gradle:

git clone https://github.com/xiazixin/deepseek-omegat-plugin
cd deepseek-omegat-plugin
./gradlew build   # Windows: gradlew.bat build

The plugin JAR is written to build/libs/.

Install into OmegaT

  1. Copy the generated JAR into OmegaT’s plugin directory (Plugins folder next to the OmegaT installation).
  2. Restart OmegaT.
  3. Open Options → Machine Translation, enable DeepSeek, and configure it (see below).

Configuration

Open Options → Machine Translation → DeepSeek to configure the engine. The API key is stored securely in OmegaT’s credential store.

SettingDefaultDescription
API key(none)Your DeepSeek API key, stored in OmegaT credentials
Modeldeepseek-v4-flashdeepseek-v4-flash (faster, cheaper) or deepseek-v4-pro (slower, more refined)
Temperature0.3Slider 0.0–2.0 in 0.1 steps. Fades (greys out) when Dynamic Temperature is on
Dynamic TemperatureOffLets the API auto-adjust temperature; the slider is ignored
Glossary modeNoneNone — disabled · Reference — entries sent as hints; the AI uses judgment (e.g. keeps 白金色 as “platinum color” even with 金色 → gold color in the glossary) · Strict — entries must be used exactly
Context segments0Number of surrounding segments (above and below) sent as context. 0 = disabled, up to 3
Context char limit400Max characters per context segment before truncation: 200 / 400 / 600 / 800 / 1000 / No limit

System property overrides

Advanced users can override settings with Java system properties (useful for scripting or managed deployments):

  • deepseek.api.key — API key (takes precedence over the stored credential)
  • deepseek.api.model — model name
  • deepseek.api.url — API base URL (default https://api.deepseek.com)

Auto Mode

Auto mode is the plugin’s hands-free translation workflow:

  1. In the settings dialog, tick Auto-insert (and optionally Auto-confirm to also commit and advance).
  2. Press Ctrl+Shift+M — or use the DeepSeek Function → ⚡ Toggle Auto Mode menu item — to switch auto-mode on.
  3. The ⚡ AUTO indicator appears in the status bar while active.

The hotkey is a master toggle: it only switches auto-mode on/off and never changes your settings. The checkboxes define what auto-mode does; the hotkey controls whether it’s active.

Safety rails:

  • Auto-insert never overwrites an existing translation — it only fills empty target segments.
  • Clicking a different segment or changing files disengages auto-mode automatically.
  • Auto-mode state persists across OmegaT restarts (the indicator restores itself).

Glossary Support

With glossary mode set to Reference or Strict, the plugin reads standard OmegaT glossary files (.txt, .csv, .tab, .utf8) from your project’s glossary folder. Each line is tab-separated:

source term → target term → comment (optional)

Only entries whose source term actually appears in the current segment are included in the prompt (up to 20, sorted by specificity — longer matches first). In Reference mode the AI is explicitly instructed to use judgment and not blindly apply partial matches to compound terms; in Strict mode the glossary translations are mandatory.

Auto-glossary

When enabled, the AI appends a [GLOSSARY] block to its response suggesting non-obvious domain terms in source = target ;; usage note format. The plugin parses it, deduplicates against existing entries, and appends them to deepseek_auto_glossary.txt in your project’s glossary folder — ready for OmegaT to pick up as real glossary entries. The glossary block is stripped from the translation text itself.

Context Segments

When set to a value greater than 0, the plugin includes up to N segments above and below the current segment as context in the system prompt. This helps the AI:

  • Maintain consistent tone and style across sentences
  • Understand narrative flow (especially for novel/creative translation)
  • Produce more natural transitions between segments

Segments above include both the source text and the user’s actual stored translation from OmegaT (shown as SRC → TRG). This means if you manually edit a translation, the AI sees your corrected version — not its own raw output. It falls back to the plugin’s cached output if no stored translation exists yet.

Context segments are truncated to the configured character limit (200–1000, or no limit). Adjust based on your typical segment size — higher values for paragraph-level segmentation, lower for sentence-level.

Self-Review Agent

When enabled, each translation goes through a second API pass that checks for:

  1. Tag preservation — all tags, placeholders, and formatting codes must match the source exactly
  2. Glossary consistency — glossary entries must be followed
  3. Accuracy — faithful meaning, no omissions or additions
  4. Fluency — natural reading in the target language

The reviewer runs at a lower temperature (0.2) for precision and is instructed to be conservative — it only fixes what is clearly wrong, never rephrases for style alone. If the review pass fails or returns empty, the original translation is kept.

Known Issues

Context segments + ellipsis segments

When Context segments is set greater than 0 and the current source segment consists only of punctuation/ellipsis (e.g. ......), there is a small chance the API will return translations for the next few segments instead of the current one — the model can misidentify the ellipsis as a scene break or continuation marker.

Workaround: temporarily set Context segments to 0 when translating isolated punctuation segments, or manually correct the output after translation.

Changelog

1.5.1

  • Fixed: commitAndDeactivate() + nextUntranslatedEntry() for correct auto-confirm advancement
  • Fixed: removed double commitAndDeactivate() that caused auto-mode to cancel after advancing
  • Fixed: glossary file encoding switched to UTF-8 to prevent ???? corruption

1.5.0

  • New: Auto-glossary — AI suggests terminology pairs with optional ;; comment usage notes
  • New: Self-review agent — second API pass for quality checking
  • New: ⚡ AUTO status indicator
  • New: Auto-stop on manual navigation (entry-number matching, no time window)
  • New: Glossary deduplication across sessions
  • Changed: Ctrl+Shift+M is now a master toggle that doesn’t change individual settings

1.4.x

  • Configurable context character limit (200–1000 / No limit) instead of hardcoded 200
  • Context segments — surrounding segments sent to the AI for narrative continuity
  • Stored-translation awareness — context above respects user edits
  • Glossary mode selector — None / Reference / Strict, with comments passed to the AI
  • Dynamic temperature toggle, temperature slider (default 0.3), model dropdown

1.0.0

Initial release with DeepSeek API integration.

Documentation page generated from the plugin’s README and source (v1.5.1).

Twenty Twenty-Five

Designed with WordPress