Live Translation

Repartee 2.0 can translate incoming and outgoing IRC traffic independently for each channel or query. Incoming lines are replaced in place while preserving arrival order; outgoing text is translated before it reaches IRC and is restored to the originating composer if no trustworthy result is available.

Quick setup

Put at least one provider key in ~/.repartee/.env:

OPENROUTER_API=your-key
# OLLAMA_API=your-key
# GEMINI_API=your-key
# GROQ_API_KEY=your-key

Enable the production backend and restart Repartee:

/set translate.enabled true
/set translate.backend ai
/translate addin #channel de pl
/translate addout #channel de pl

addin translates the conversation language into your language. addout translates your language into the conversation language. Use /translate list, /translate status, /translate delin, and /translate delout to inspect or remove mappings. Alias: /tr.

Languages and providers

The AI backend accepts English, German, Polish, French, Spanish, and Mandarin Chinese, including ISO 639-1/639-3 and regional codes. Incoming source language may be detected automatically; outgoing language must be explicit.

Repartee routes OpenAI-compatible models in ordered policies. OpenRouter, Ollama Cloud, Gemini, and Groq keys are recognized by default. Missing providers are skipped, responses are bounded and rate limits are honored; Groq models are reserved as terminal fallbacks after preferred models.

Safety, privacy, and ordering

  • URLs, channels, nicks, technical identifiers, and IRC formatting are masked before provider calls and validated on return.
  • Refusals, explanations, malformed placeholders, wrong-language, empty, multi-line, E2E-shaped, or implausibly long answers fall through to the next model.
  • RPE2E traffic is never sent to a translation provider. Enabling E2E releases pending lines untranslated and disables translation for that conversation.
  • Per-conversation queues preserve submission order without blocking unrelated buffers. Timeouts and queue limits prevent a dead provider from stalling the client.
  • Incoming failure is shown explicitly as untranslated. Outgoing failure is fail-closed: nothing is sent and the original text returns to the terminal or browser composer that submitted it.

Configuration

[translate]
enabled = false
backend = "none"             # "none", "ai", or test-only "stub"
my_lang = "en"
show_original_in = true
show_original_out = true
timeout_ms = 15000
max_in_flight = 4
max_queue = 200

[translate.buffers."libera/#german"]
incoming = true
outgoing = true
lang = "de"

The dimmed original can be hidden separately per direction. What is displayed is what SQLite stores, so search finds both the translation and retained original. Provider/model settings and a custom translate.ai.prompt_path are read at startup; /reload refreshes supported live settings.

Warning: The stub backend reverses word order and exists only for end-to-end testing. Never use it for a real conversation.