[Proposal]: Offline Document & E-book Translation via Local Ollama

Chiusa
#901 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@rohitLovesKrishna ci sta già lavorando.

Dal 1/11/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
desktop

Direzione di ricerca

Start by reading the existing Tesseract and Whisper engine patterns, then inspect Settings → Engines and Settings → Presets, especially the Translate preset and profile placement described here. The proposal also calls for document-format-specific translation and Ollama management, but names no files or tests. Done means implementing the offline-only translation flow and the listed privacy, preset, and formatting requirements.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

translation
Summary

People frequently ask about translating documents, books, and text files. In keeping with Filee's core privacy promise ("Filee converts files on your own computer and never uploads them"), this proposal covers an offline document translation feature powered exclusively by local AI (Ollama running locally on http://127.0.0.1:11434 or local models).

Zero document text ever leaves the computer.


As per need for PR #836

1. Which Engine (Strictly Local Offline Only)
  • Local Loopback Only: Filee connects exclusively to the local Ollama instance at http://127.0.0.1:11434. There are no fallbacks to external web services, undocumented endpoints, or cloud APIs.
  • Privacy Enforcement (Cloud Models Blocked): Ollama also serves models whose tags end in -cloud (e.g. gpt-oss:120b-cloud), which forward requests to ollama.com. To protect sensitive documents, Filee explicitly detects and excludes cloud-forwarded tags (*-cloud) from automatic selection and refuses them with a clear security notice if selected manually.
  • Settings → Engines Card:
    • Follows the Tesseract and Whisper pattern as Translator (Offline AI).
    • Non-blocking async status check using a shared HttpClient with a fast 250 ms timeout, keeping the UI completely responsive when Ollama is not running.
    • Includes a built-in "Manage Ollama" dialog to let users inspect downloaded local models, switch the active model with one click, start/stop the local Ollama background server, and pull offline models with live progress, eliminating the need to use terminal commands manually.

2. Donut Placement & Preset Model (#806 / #832 Alignment)
  • Single Source of Truth in Preset Editor: Target languages (English, Spanish, Hindi, French, German, Chinese, Japanese, etc.) are configured directly in Settings → Presets under the Translate preset.
  • Donut Slice: A single clean Translate preset on the donut (no nested fan-out rings or extra clutter). Dropping files onto Translate converts directly to the target language configured in the Preset Editor.
  • #806 Compliance (New Installs Only):
    • Settings schema remains unchanged (stays at 58 as in main).
    • No migration modifying existing user profiles or donuts (ApplyToLibrary does not inject new slices into existing user setups).
    • Fresh installs place translate on the back face (BackPresetIds) of Document, Text, and E-books profiles.

3. Layout and Formatting Preservation (PDF & DOCX)
  • DOCX / HWPX / EPUB: Parses the document AST/XML structure into headings, paragraphs, runs, and tables. Text formatting (bold, italic, font sizing, line spacing, margins, lists, images, hyperlinks) is preserved; only text runs are translated in place.
  • PDF: Retains the high-fidelity translation pipeline that translates structured text blocks in place, preserving coordinates, font metrics, margins, and page dimensions without clipping or text corruption.
  • Plain Text / Markdown / Subtitles: Code fences, line breaks, tables, and subtitle timing cues (00:01:20,000 --> 00:01:23,000) are maintained cleanly.

Feedback and thoughts on this design are welcome!

Lingua principale
C#
Stelle
3.6k
Fork
192
Merge medio
7h 17m
PR unite (30g)
393

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di KnifeLemon/Filee

Tutte le issue di KnifeLemon/Filee

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.