[Proposal]: Offline Document & E-book Translation via Local Ollama
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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 toollama.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
HttpClientwith 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.
- Follows the Tesseract and Whisper pattern as
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
Translatepreset on the donut (no nested fan-out rings or extra clutter). Dropping files ontoTranslateconverts 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 (
ApplyToLibrarydoes not inject new slices into existing user setups). - Fresh installs place
translateon the back face (BackPresetIds) of Document, Text, and E-books profiles.
- Settings schema remains unchanged (stays at 58 as in
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!
- 主要语言
- C#
- 星标
- 3.6k
- 派生
- 192
- 平均合并
- 7 小时 12 分钟
- 30 天内合并 PR
- 353
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
KnifeLemon/Filee 的其他 Issue
-
[Format]: .exe未关闭formats not planned
难度 4/5 3-5 天 新手友好度 35/100
KnifeLemon/Filee#906 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
KnifeLemon/Filee#905 ·
维护者通常 1 天内回复
-
[Format]: .kra未关闭formats
难度 5/5 一周以上 新手友好度 38/100
KnifeLemon/Filee#903 ·
维护者通常 1 天内回复
-
[Format]: .caj未关闭formats not planned
难度 4/5 3-5 天 新手友好度 52/100
KnifeLemon/Filee#902 · 1 条评论 ·
维护者通常 1 天内回复
-
formats
难度 3/5 1-2 天 新手友好度 60/100
KnifeLemon/Filee#898 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
bug effort:S P3
难度 2/5 1-3 小时 新手友好度 72/100
nightscout/nocturne#3219 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug P2
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复