Add LLM verification and Document translation (EPUB) support#183
Add LLM verification and Document translation (EPUB) support#183Balrog57 wants to merge 21 commits intoXapaJIaMnu:masterfrom
Conversation
- Added AI Refine button and logic. - Implemented LLMInterface for local LLM communication. - Added portable batch script. - Updated CI to build portable release.
…/cache) and update runner OS versions (Windows 2022, macOS 14, Ubuntu 22.04) to resolve deprecation errors.
…out/cache) and verified no v3 actions remain in upload/download artifacts.
…cate Ubuntu matrix, and ensure all actions are v4. This should resolve all build failures shown in recent screenshots.
…a in AppData as requested).
- Fix Gemini error handling: handle API errors (quota, rate limit) gracefully - Update model lists for OpenAI (GPT-4.1, o3), Claude (Sonnet 4), Gemini (2.5, 3.0) - process now stops on critical errors instead of hanging - UX: 'AI Refine' button becomes 'Stop' during processing - Net: Add 30s timeout to LLM requests to prevent indefinite blocking - Fix: Crash on cancel (handle iterator invalidation) - Fix: MacOS build failure (missing includes in Qt6) - Feat: PDF Import (Poppler) and Document Export (DocExporter)
GitHub Actions has deprecated/removed support for macOS 13 (Intel). Switching exclusively to macOS 14 (Apple Silicon) for Apple builds.
Required for PDF import functionality (DocumentProcessor.cpp).
XapaJIaMnu
left a comment
There was a problem hiding this comment.
Hello,
I see you have done a number of improvements, some of which we may like to get into the project (such as the document processor), however the rest is mostly a no-go.
TranslateLocally (emphasis on Locally) was built precisely to avoid sending data to the cloud. There are tons of extremely sensitive usecases where you don't want to expose your data and potentially leak company secrets.
If you wish to use the interface and perform cloud translation, I suggest you keep this to your fork and rename the project to "cloudTranslator" or something more appropriate.
If you submit individual smaller changes (particularly the document translator), we would be keen to review and potentially accept.
| @echo off | ||
| call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" | ||
| cd build | ||
| "C:\Users\Marc\AppData\Roaming\Python\Python314\Scripts\cmake.exe" --build . --config Release -j 4 |
|
|
||
| ### Header Guards | ||
|
|
||
| Use `#ifndef`/`#define` guards or `#pragma once`: |
There was a problem hiding this comment.
That's hardly a guideline, you need to do one or the other.
| @@ -1,83 +1,85 @@ | |||
| # translateLocally | |||
There was a problem hiding this comment.
Not accepting a French translation on the readme.
|
|
||
| - name: Produce DMG and Sign # This overrides the previous dmg # We follow https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions | ||
| working-directory: ${{github.workspace}}/build # it should be secure as those can't leak unless we accept a PR with a bad workflow. | ||
| - name: Produce DMG (Unsigned) |
There was a problem hiding this comment.
Having the CI build and sign a mac executable by itself is the whole point of this process.
|
Hello, I am a beginner and unassuming, I mainly use AI, thank you very much
for looking at my post, I am doing this for myself on my fork, hoping to be
able to use it for retrogaming translations and ebooks that are not
licensed in France, which I read in English scanlation but would appreciate
more in French. The goal is to stay local. I use lmstudio with
qwen3-4b-2507. My goal is to be able to load and export documents in
ebook/pdf/doc format and to have optional local AI review in order to have
a more accurate final translation while maintaining the context. It seems
to be going well, but I'm running into the maximum word limit, so I need to
find a solution to split the document. I only use Windows, so it's
complicated to be compatible with Mac and Linux. I'm new to GitHub, so I
don't know how to share only part of the code, but feel free to take
whatever you can use. Thank you.
Le jeu. 29 janv. 2026, 21:51, Nikolay Bogoychev ***@***.***>
a écrit :
… ***@***.**** requested changes on this pull request.
Hello,
I see you have done a number of improvements, some of which we may like to
get into the project (such as the document processor), however the rest is
mostly a no-go.
TranslateLocally (emphasis on *Locally*) was built precisely to avoid
sending data to the cloud. There are tons of extremely sensitive usecases
where you don't want to expose your data and potentially leak company
secrets.
If you wish to use the interface and perform cloud translation, I suggest
you keep this to your fork and rename the project to "cloudTranslator" or
something more appropriate.
If you submit individual smaller changes (particularly the document
translator), we would be keen to review and potentially accept.
------------------------------
In build_msvc.bat
<#183 (comment)>
:
> @@ -0,0 +1,4 @@
***@***.*** off
+call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
+cd build
+"C:\Users\Marc\AppData\Roaming\Python\Python314\Scripts\cmake.exe" --build . --config Release -j 4
Screenshot_20260129_204416.png (view on web)
<https://github.com/user-attachments/assets/5ca5c977-c3e6-4331-969f-bc8020d1a1e5>
------------------------------
In AGENTS.md
<#183 (comment)>
:
> +## Testing
+
+> [!NOTE]
+> This project does not currently have a formal unit test suite. Validation is done via:
+
+1. **Version check**: `./translateLocally --version`
+2. **CLI translation test**: `echo "Hello world" | ./translateLocally -m <model-name>`
+3. **Model management**: `./translateLocally -l` (list models), `./translateLocally -a` (available models)
+
+---
+
+## Code Style Guidelines
+
+### Header Guards
+
+Use `#ifndef`/`#define` guards or `#pragma once`:
That's hardly a guideline, you need to do one or the other.
------------------------------
In README.md
<#183 (comment)>
:
> @@ -1,83 +1,85 @@
-# translateLocally
Not accepting a French translation on the readme.
------------------------------
In .github/workflows/build.yml
<#183 (comment)>
:
> @@ -151,23 +122,10 @@ jobs:
shell: bash
run: ./translateLocally --version
- - name: Produce DMG and Sign # This overrides the previous dmg # We follow https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions
- working-directory: ${{github.workspace}}/build # it should be secure as those can't leak unless we accept a PR with a bad workflow.
+ - name: Produce DMG (Unsigned)
Having the CI build and sign a mac executable by itself is the whole point
of this process.
------------------------------
On build_log.txt
<#183 (comment)>
:
That shouldn't be in here.
—
Reply to this email directly, view it on GitHub
<#183 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BOBHDC5YBZ7DP4LM4JX6YP34JJXGFAVCNFSM6AAAAACTHMPOD6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTOMRUHE2TIOJSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
No worries at all! I will look into incorporating some of the other changes! Thanks, |
|
Hello, sorry for disturbing, restarting from scratch, app working on windows with txt epub and docx, not with pdf because they need libreoffice ? and local ai with qwen 3 4b and gptoss 20, 32768 context token ok.
#184 now need a real dev who understand what he doing :’) have a nice day.
De : Nikolay Bogoychev ***@***.***>
Envoyé : lundi 2 février 2026 09:34
À : XapaJIaMnu/translateLocally ***@***.***>
Cc : Balrog57 ***@***.***>; Author ***@***.***>
Objet : Re: [XapaJIaMnu/translateLocally] Add LLM verification and Document translation (EPUB) support (PR #183)
<https://avatars.githubusercontent.com/u/2027221?s=20&v=4> XapaJIaMnu left a comment (XapaJIaMnu/translateLocally#183) <#183 (comment)>
No worries at all! I will look into incorporating some of the other changes!
Thanks,
Nick
—
Reply to this email directly, view it on GitHub <#183 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BOBHDC6YWXQEHTLTHQ2VKB34J4DWXAVCNFSM6AAAAACTHMPOD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMZTG4YTQMZTGI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BOBHDC4IOE5HQ2CUHZN42J34J4DWXA5CNFSM6AAAAACTHMPOD6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTXEQHTDY.gif> Message ID: ***@***.*** ***@***.***> >
|

No description provided.