From a076478e179aa68a2859666b0b5df70113a92c28 Mon Sep 17 00:00:00 2001 From: NTKD-dev <207814812+duyzoz@users.noreply.github.com> Date: Wed, 11 Nov 2026 09:52:10 +0700 Subject: [PATCH 01/54] translation: in-client EN->VI screen OCR translation (vn-translation) 99% upstream v1.0.4 (bec4a0b) + 1% translation: new opennow-qt/src/translation/ module, TranslationOverlay.qml z:6 above StreamVideoItem, full Translation Settings page, screenshotReady frame source, cache-first, updater guard. OCR default Gemini Vision, Tesseract fallback, WuWa DB schema only (0 lines). No changes under native/. --- README.md | 46 ++ docs/vn-translation/CI.md | 192 ++++++++ docs/vn-translation/PROGRESS.md | 348 ++++++++++++++ docs/vn-translation/UPDATER.md | 211 +++++++++ docs/vn-translation/UPSTREAM.md | 75 +++ locales/en.json | 116 +++++ opennow-qt/cmake/QmlModule.cmake | 2 + opennow-qt/cmake/Resources.cmake | 12 + opennow-qt/cmake/Sources.cmake | 18 + opennow-qt/cmake/Tests.cmake | 13 + .../settings/DesktopSettingsScreen.qml | 15 +- .../pages/DesktopSettingsTranslationPage.qml | 365 +++++++++++++++ .../desktop/stream/DesktopStreamScreen.qml | 7 + .../qml/desktop/stream/TranslationOverlay.qml | 198 ++++++++ opennow-qt/qml/state/ShellStore.qml | 13 +- opennow-qt/src/app/ApplicationStartup.cpp | 10 + opennow-qt/src/translation/OcrEngine.cpp | 195 ++++++++ opennow-qt/src/translation/OcrEngine.h | 90 ++++ .../src/translation/TranslationCache.cpp | 141 ++++++ opennow-qt/src/translation/TranslationCache.h | 48 ++ .../src/translation/TranslationEngine.cpp | 434 ++++++++++++++++++ .../src/translation/TranslationEngine.h | 179 ++++++++ .../src/translation/TranslationHttp.cpp | 83 ++++ opennow-qt/src/translation/TranslationHttp.h | 49 ++ .../src/translation/TranslationProvider.cpp | 142 ++++++ .../src/translation/TranslationProvider.h | 63 +++ .../src/translation/TranslationWorker.cpp | 249 ++++++++++ .../src/translation/TranslationWorker.h | 105 +++++ opennow-qt/src/translation/WuWaDialogueDb.cpp | 61 +++ opennow-qt/src/translation/WuWaDialogueDb.h | 40 ++ .../translation/data/wuwa-dialogue-db.json | 1 + opennow-qt/tests/translation_logic_check.py | 137 ++++++ opennow-qt/tests/tst_translation.cpp | 206 +++++++++ 33 files changed, 3860 insertions(+), 4 deletions(-) create mode 100644 docs/vn-translation/CI.md create mode 100644 docs/vn-translation/PROGRESS.md create mode 100644 docs/vn-translation/UPDATER.md create mode 100644 docs/vn-translation/UPSTREAM.md create mode 100644 opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml create mode 100644 opennow-qt/qml/desktop/stream/TranslationOverlay.qml create mode 100644 opennow-qt/src/translation/OcrEngine.cpp create mode 100644 opennow-qt/src/translation/OcrEngine.h create mode 100644 opennow-qt/src/translation/TranslationCache.cpp create mode 100644 opennow-qt/src/translation/TranslationCache.h create mode 100644 opennow-qt/src/translation/TranslationEngine.cpp create mode 100644 opennow-qt/src/translation/TranslationEngine.h create mode 100644 opennow-qt/src/translation/TranslationHttp.cpp create mode 100644 opennow-qt/src/translation/TranslationHttp.h create mode 100644 opennow-qt/src/translation/TranslationProvider.cpp create mode 100644 opennow-qt/src/translation/TranslationProvider.h create mode 100644 opennow-qt/src/translation/TranslationWorker.cpp create mode 100644 opennow-qt/src/translation/TranslationWorker.h create mode 100644 opennow-qt/src/translation/WuWaDialogueDb.cpp create mode 100644 opennow-qt/src/translation/WuWaDialogueDb.h create mode 100644 opennow-qt/src/translation/data/wuwa-dialogue-db.json create mode 100644 opennow-qt/tests/translation_logic_check.py create mode 100644 opennow-qt/tests/tst_translation.cpp diff --git a/README.md b/README.md index 96e6b4239..b2ced9cd9 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,52 @@ or switch to the console layout for a controller. Both layouts run in the same a > streaming and GPU issues. It has no Chromium/WebRTC fallback. Publishing a build > does not mean it has passed every check in the [acceptance checklist](docs/qt-acceptance.md). +## OpenNOW-VN — Translation (`vn-translation` branch) + +> [!NOTE] +> This section describes a fork maintained at +> [duyzoz/OpenNOW-ORC](https://github.com/duyzoz/OpenNOW-ORC), branch +> `vn-translation`, based on upstream v1.0.4. It is not part of upstream +> OpenNOW. Details live in [docs/vn-translation/](docs/vn-translation/). + +This fork adds **in-client EN→VI screen OCR translation for Wuthering +Waves** played through GeForce NOW: it captures the streamed frame, OCRs +the English text, translates it, and draws Vietnamese in place over the +video. It does not touch the Rust streamer, the NVST transport, or the FFI +ABI, and it never modifies game files — it only reads the frames already on +your screen. Base: upstream v1.0.4. + +**The feature is OFF by default.** Enable it in Settings → Translation. + +What works / what is unproven (honest status, 2026-11-11): + +- Translation code has landed on this branch: `opennow-qt/src/translation/` + (engine, worker thread, cache, WuWa DB schema, OCR, providers), + `TranslationOverlay.qml` above the stream video, and a full + Translation Settings page. OCR default is Gemini Vision (Qt Network + only); RapidOCR is a documented stub in this build, Tesseract is the + local fallback. The WuWa dialogue DB ships with 0 datamined lines + (schema only) — it fills from live play + translation memory. +- **Unproven:** no Qt compile / ctest run yet (CI on the PR is the first + build signal), no live GFN login test, no OCR latency measured on real + hardware, no Gemini key tested, no packaged VN build yet. The < 1 s + new-line / < 200 ms cache-hit latency figures are targets, not + measurements, and 0 ms translation is impossible on a streamed frame. +- Updater safety: VN builds must not auto-update to upstream builds. Until + a dedicated VN signing key exists, VN builds ship with no pinned update + key (downloads fail closed) plus a QML guard that disables the automatic + update check — see + [docs/vn-translation/UPDATER.md](docs/vn-translation/UPDATER.md). + +**How Ethan tests it live in the morning:** use his own GeForce NOW login, +set Wuthering Waves to English, play windowed/borderless, start a story +quest, then Settings → Translation → enable. A Gemini API key is optional +(it selects the Gemini Vision OCR engine); without one, only the cache / +stub path is available. + +**The old Electron repo `duyzoz/OpenNow-VN` is abandoned** and is not part +of this fork — do not use it, merge it, or port from it. + ## Get OpenNOW Look for packages starting with `OpenNOW-Qt-` in diff --git a/docs/vn-translation/CI.md b/docs/vn-translation/CI.md new file mode 100644 index 000000000..7ebd78d69 --- /dev/null +++ b/docs/vn-translation/CI.md @@ -0,0 +1,192 @@ +# VN fork — CI (what runs, when, and how to get a new file built) + +Verified against the workflow files at upstream tag v1.0.4 / commit `bec4a0b`. +No workflow file has been changed by this doc. + +## 1. Will pushing `vn-translation` trigger CI automatically? NO + +`.github/workflows/qt-ci.yml` `on.push.branches` is exactly: + +```yaml +push: + branches: + - dev + - main +``` + +`vn-translation` is **not** in that list, and neither is any other feature +branch. A plain `git push origin vn-translation` runs **zero** CI jobs — +no checks, no builds. The same applies to `codeql.yml` +(push/PR on `dev`/`main` only). + +CI runs on `vn-translation` work only through one of these paths: + +| Path | What runs | Notes | +| --- | --- | --- | +| Open a PR `vn-translation` → `dev` (or `main`) | Full `qt-ci`: contracts + 3 platform check jobs (see §2). `qt-ci.yml` `pull_request.branches` includes `dev`, `main`, `capy/explain-cloud-session-setup`, `capy/gfn-correctness/**`. | **This is the intended trigger.** The PR also gets the `paths:` filter — see below. | +| `workflow_dispatch` on `qt-ci.yml` | Preflight + contracts + checks + **manual package builds** + optionally signed nightly publish. | Manual only. **Never dispatch with `publish_nightly: true` on this fork** — it signs with the upstream production key by default and publishes to *this* repo's releases (see `UPDATER.md`). | +| `workflow_dispatch` on `qt-release-candidate.yml` / `qt-stable-release.yml` | Full signed release-candidate / promotion flow. | Manual only, requires exact reviewed SHAs and the production signing environments. Not for VN builds. | + +### Paths filter (PRs and pushes) + +Even on `dev`/`main`, `qt-ci` only runs when the change touches a listed +path. The translation work **is** covered — the filter includes: + +- `opennow-qt/**` — all C++, QML, CMake, packaging, tests (translation + sources, overlay QML, settings pages, `cmake/*.cmake` all match). +- `native/opennow-core/**`, `native/opennow-streamer/**` +- `locales/**`, `scripts/**`, `package.json`, `decky/**` +- `.github/workflows/qt-*.yml`, `.github/actions/**`, `.github/cmake/**`, + `.github/scripts/**`, `.github/actionlint.yaml` + +Docs-only changes under `docs/vn-translation/` do **not** trigger `qt-ci` +(the filter has no `docs/**` entry). That is fine — docs don't need a build. + +### Optional future change (needs approval, not done here) + +Add `vn-translation` to `qt-ci.yml` `on.push.branches` so every push gets +checks without opening a PR. Cost: CI minutes on every push; benefit: fast +feedback while the branch is active. Do not add it silently — it edits a +shared workflow file and affects the upstream merge surface (see +`UPSTREAM.md`). + +## 2. What jobs run (on a PR to `dev`/`main`) + +`qt-ci.yml` job graph: `preflight` (dispatch only) → `contracts` → +`checks` (matrix) → `build` (dispatch only) → `sign-nightly` / +`publish-nightly` (dispatch + `publish_nightly` only). + +### `contracts` — shared checks (`.github/workflows/qt-checks.yml`, `workflow_call` only) + +Single job, `blacksmith-2vcpu-ubuntu-2404`, ~10 min timeout: + +1. **Lint GitHub workflows** — `actionlint` v1.7.12 (SHA-pinned tarball) + over `qt-ci.yml`, `qt-checks.yml`, `qt-build.yml`, + `qt-release-candidate.yml`, `qt-flatpak.yml`, `qt-stable-release.yml`, + `qt-linux-arm64-cross.yml`. +2. **Test build and packaging contracts** — `python3 -m unittest discover + -s opennow-qt/tests -p 'test_*.py'` (packaging, manifest, nightly-release + and candidate-promotion contract tests). +3. **Validate localization** — `npm run locales:check` plus + `node --test scripts/check-translations.test.mjs + scripts/check-keyboard-layouts.test.mjs`. **Any new UI string must have + its key in `locales/en.json`** or this job fails. Only edit `en.json`; + other `locales/*.json` are Crowdin-generated (see repo `AGENTS.md` → + Localization). + +### `checks` — platform unit tests (matrix, needs `contracts`) + +| Job | Runner | Qt host / arch | Target | +| --- | --- | --- | --- | +| `linux-x64` | `blacksmith-16vcpu-ubuntu-2404` | linux / `linux_gcc_64` | x64, 8 parallel | +| `windows-x64` | `blacksmith-16vcpu-windows-2025` | windows / `win64_msvc2022_64` | x64, 8 parallel | +| `macos-arm64` | `blacksmith-6vcpu-macos-15` | mac / `clang_64` | arm64, 3 parallel | + +Each runs the composite action `.github/actions/qt-unit-tests`: +install Qt, install Linux media deps, limit Rust debug info, run the Qt +unit tests (`ctest`). 30 min timeout, `fail-fast: false`. + +Note: these jobs run the **unit tests only** — they do not produce +installable packages. A green `checks` run means the code compiles and unit +tests pass on all three platforms; it does not mean a packaged app exists. + +### `build` — manual packages (dispatch only) + +`.github/workflows/qt-build.yml` (`workflow_call` only) builds full packages +on 6 targets: + +| Label | Runner | Qt arch | +| --- | --- | --- | +| `linux-x64` | `blacksmith-8vcpu-ubuntu-2404` | `linux_gcc_64` | +| `linux-arm64` | `blacksmith-8vcpu-ubuntu-2404-arm` | `linux_gcc_arm64` | +| `windows-x64` | `blacksmith-8vcpu-windows-2025` | `win64_msvc2022_64` | +| `windows-arm64` | `blacksmith-8vcpu-windows-2025` | `win64_msvc2022_arm64_cross_compiled` (+ host Qt tools) | +| `macos-arm64` | `blacksmith-6vcpu-macos-15` | `clang_64` | +| `macos-x64` | `blacksmith-6vcpu-macos-15` | `clang_64` | + +**Qt version: 6.8.3** (`jurplel/install-qt-action@v4`, `qt-build.yml:246-275` +and `.github/actions/qt-unit-tests/action.yml:94-102`), modules +`qtmultimedia qtshadertools` plus `qtwaylandcompositor` on Linux. Repo +minimum is Qt 6.8 (`AGENTS.md`, `CMakeLists.txt: qt_standard_project_setup(REQUIRES 6.8)`). +`OPENNOW_BUILD_VERSION` comes from the project version +(`opennow-qt/CMakeLists.txt:10` — `project(OpenNOWQt VERSION 1.0.4 ...)`). + +Package builds are **not** produced by PR/push CI. To get a Windows +`.exe`/`.zip` Ethan can run, someone must dispatch `qt-ci` (or +`qt-build` via dispatch) manually — or build locally with +`cmake -S opennow-qt -B build/opennow-qt` + `cmake --build`. + +## 3. What a new C++/QML file must do to be included in the build + +There is **no glob** — every file is listed explicitly. A new file that is +only created on disk is silently **not built**. Checklist per file type: + +### New C++ (`.cpp`/`.h`) under `opennow-qt/src/` + +Add it to **`opennow-qt/cmake/Sources.cmake`**: + +- App sources: the `qt_add_executable(opennow-qt ...)` list (starts at + `Sources.cmake:59`, includes `src/main.cpp` and the `app/` sources). +- Or the matching source-set variable if it belongs to a subsystem, e.g. + `OPENNOW_STREAM_RUNTIME_SOURCES` (`Sources.cmake:18`) or + `OPENNOW_STREAM_PRESENTATION_SOURCES` (`Sources.cmake:23`). +- Headers go in the same list as their `.cpp` (the repo lists both). +- `src/` is the include root — include cross-module headers qualified, + e.g. `"streaming/NativeStreamRuntime.h"`. + +For the translation feature: new files under +`opennow-qt/src/translation/` need an entry here (a new +`OPENNOW_TRANSLATION_SOURCES` set, or direct listing in +`qt_add_executable`). **As of this writing no `src/translation/` files +exist yet** — the C++ owner must add both the files and the CMake entries +together, or the build will silently omit the feature. + +### New QML under `opennow-qt/qml/` + +Add it to **`opennow-qt/cmake/QmlModule.cmake`**, in the +`qt_add_qml_module(opennow-qt ... QML_FILES ...)` list (starts at +`QmlModule.cmake:223`). Examples of existing entries: +`QmlModule.cmake:307` (`qml/desktop/settings/DesktopSettingsScreen.qml`), +`:353` (`DesktopSettingsUpdatesPage.qml`), `:371` +(`DesktopStreamScreen.qml`). + +- Keep the resource URL stable when moving a file; new QML types must be + explicitly registered here. +- Singleton declarations must move with their source paths. +- Keep `qsTr` bindings and localized copy intact when extracting components; + the translator resolves source text independently of filename. + +### New localized strings + +Add the key to **`locales/en.json` only** (source language). Never hand-edit +other `locales/*.json` files. `npm run locales:check` in the `contracts` +job enforces this. + +### New tests + +Qt tests are registered in `opennow-qt/cmake/Tests.cmake`; QML acceptance +workloads live there too. New Python packaging/contract tests go in +`opennow-qt/tests/test_*.py` (auto-discovered by the `contracts` job). + +## 4. Local verification before pushing + +From repo `AGENTS.md` (Build and Checks): + +```sh +cmake -S opennow-qt -B build/opennow-qt -DCMAKE_BUILD_TYPE=Debug +cmake --build build/opennow-qt +ctest --test-dir build/opennow-qt --output-on-failure +npm run locales:check # if any UI copy changed +``` + +Run the narrowest relevant Qt test first, then the full suite when +practical. Do not claim completion if a relevant check fails — report the +failing command and failure point. + +## 5. CI status for this fork + +**Unknown until pushed.** No `vn-translation` push triggers CI (see §1), and +no PR has been opened yet, so there is no CI result for the VN work at all — +not green, not red, unknown. The first signal will be the PR +`vn-translation` → `dev` (contracts + 3 platform check jobs). Package +builds need a manual dispatch after that. diff --git a/docs/vn-translation/PROGRESS.md b/docs/vn-translation/PROGRESS.md new file mode 100644 index 000000000..e96390862 --- /dev/null +++ b/docs/vn-translation/PROGRESS.md @@ -0,0 +1,348 @@ +# OpenNOW-VN — progress log (living document) + +Branch: `vn-translation` · Base: upstream v1.0.4, commit `bec4a0b` · +Fork: `duyzoz/OpenNOW-ORC` (see `UPSTREAM.md`). + +Update this file when something is built, decided, found, or proven — with +a date. Do not rewrite history entries; append. + +## Goal + +In-client EN→VI screen-OCR translation for Wuthering Waves played through +GeForce NOW, inside the Qt OpenNOW desktop app. The translation is an +overlay above the streamed video (`StreamVideoItem`): capture the frame, +OCR the English text, translate it, and draw Vietnamese in place — without +touching the Rust streamer, the NVST transport, or the FFI ABI, and without +changing any upstream behaviour except through the 3 shim files +(`UPSTREAM.md`). + +## Base + +- Upstream `OpenCloudGaming/OpenNOW` tag **v1.0.4**, commit `bec4a0b`. +- Remotes: `origin` = `duyzoz/OpenNOW-ORC`, `upstream` = + `OpenCloudGaming/OpenNOW`. +- Old Electron repo `duyzoz/OpenNow-VN` is **abandoned** — never merged, + never ported from. + +## What is built + +### 2026-11-10 (docs + verification pass, this commit) + +- Docs only. Created `docs/vn-translation/`: + - `UPDATER.md` — upstream updater findings (Rust core, hardcoded + `OpenCloudGaming/OpenNOW` URLs, Ed25519 fail-closed) + recommendation: + ship VN builds with no pinned key + QML-level auto-check guard. + - `CI.md` — `vn-translation` push does **not** trigger CI; CI runs via PR + to `dev`/`main`; Qt 6.8.3; how new C++/QML files get registered. + - `UPSTREAM.md` — fork base, remotes, merge rules, abandoned-repo rule. + - `PROGRESS.md` — this file. +- `README.md` — added the "OpenNOW-VN — Translation (`vn-translation` + branch)" section near the top (after the upstream intro, before + "Get OpenNOW"). No upstream README content deleted. + +### Translation implementation — LANDED while this review was in progress + +Other subagents created the following during the docs pass (first seen +2026-11-10 ~23:58, re-checked before commit). All paths verified present: + +**C++** (`opennow-qt/src/translation/`, 14 files): + +- `TranslationEngine.h` / `TranslationEngine.cpp` (407 lines) — QML-facing + controller, `translationEngine` context property (planned), stability + timer, crop-hash cache, worker dispatch. +- `OcrEngine.h` / `OcrEngine.cpp` — Gemini Vision (default), Tesseract, + RapidOCR stub, Windows OCR stub; `createOcrEngine()`. +- `TranslationProvider.h` / `TranslationProvider.cpp` — Google Translate + (default) + Gemini translate; `createTranslationProvider()`. +- `TranslationHttp.h` / `TranslationHttp.cpp` — sync HTTP with 8 s timeout, + single 429 retry honoring `Retry-After` (capped 10 s). +- `TranslationWorker.h` / `TranslationWorker.cpp` — own QThread, bounded + queue (1 running + 1 waiting, newest waiting wins). +- `TranslationCache.h` / `TranslationCache.cpp` — normalized EN→VI cache, + persisted as `translation-cache.json` in AppData. +- `WuWaDialogueDb.h` / `WuWaDialogueDb.cpp` — pre-translated dialogue DB. +- `data/wuwa-dialogue-db.json` — seed DB, **intentionally empty** + (`entries: {}`, valid JSON, verified with `python3 -m json.tool`). + +**QML** (both registered in `opennow-qt/cmake/QmlModule.cmake`): + +- `opennow-qt/qml/desktop/stream/TranslationOverlay.qml` (163 lines) — + instantiated in `DesktopStreamScreen.qml:171` (`z: 6`, above video), + `parent.streaming` resolves (`DesktopStreamScreen.qml:34`). +- `opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml` + (331 lines) — wired into `DesktopSettingsScreen.qml` as page 14 with a + "Translation" nav entry; settings under `translation.`. + +**Tests + settings + wiring (landed in the working tree, uncommitted, by +other subagents — verified in diffs, not by this reviewer):** + +- `opennow-qt/tests/tst_translation.cpp` — crop hash, crop rect, cache, + DB, worker queue; no network. Registered in `cmake/Tests.cmake` as + `opennow-translation-tests` (offscreen, 30 s timeout). +- `opennow-qt/cmake/Sources.cmake` — new `OPENNOW_TRANSLATION_SOURCES` + set with all 14 translation files, added to `qt_add_executable`. +- `opennow-qt/src/app/ApplicationStartup.cpp` — creates the engine (app + lifetime), connects `screenshotReady` → `onStreamFrame` (queued), sets + the `translationEngine` context property. **Open gap: settings are never + synced into the engine — see R3b in Bugs found.** +- `locales/en.json` — Vietnamese qsTr literals added as values (auto keys + like `dich_man_hinh`) **plus** a hand-written English `"translation"` + section (see review finding R6). `npm run locales:check` passes locally + (`node scripts/check-translations.mjs` → "Translations ok (2324 QML + source texts and 0 keys checked)", exit 0). +- `opennow-qt/qml/state/settings/SettingsState.qml` — new + `translationSetting(key, fallback)` helper (see R7: currently unused). + +Expected (not yet verified) shape, per the fork plan: + +- `opennow-qt/src/translation/` — OCR engine interface + Gemini Vision + implementation, translation cache/DB, screenshot request path reusing + `NativeStreamRuntime::requestScreenshot()` / `screenshotReady(QImage)`, + worker thread for OCR (never the GUI thread). +- QML overlay above `StreamVideoItem` in + `opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml` (shim #2). +- Translation Settings page under `DesktopSettingsScreen.qml` (shim #3): + source EN, target VI, engine, API key, overlay mode, dialogue area, + stability delay, cache/DB. + +## Decisions + +Recorded 2026-11-10 (fork plan, before implementation): + +- **OCR default in v1 is Gemini Vision** (cloud OCR via Gemini API). +- **RapidOCR is a stub, not a real engine, in v1** — ONNX Runtime is not + vendored; bundling it would break CI (new native dependency, larger + packages, platform matrix risk). A real RapidOCR / PP-OCRv4 ONNX engine + is a later step if/when ONNX Runtime vendoring is solved. +- **OneOCR model is NOT bundled, ever, for licensing reasons** — its model + comes from the Windows Snipping Tool; bundling it is a licensing trap. +- **0 ms translation latency is impossible.** OCR + translate always adds + delay on a streamed (GFN) frame. Do not promise 0 ms anywhere. +- **Latency targets:** < 1 s for new lines (dialogue-crop + change + detection + pre-translated WuWa DB cache first), < 200 ms for cache hits. +- **Source language is English.** WuWa must be set to English in-game; + target is Vietnamese. +- **Feature is OFF by default.** Ethan enables it explicitly in + Settings → Translation. +- **Upstream updates are preserved only via the upstream remote + additive + module.** VN must use its own updater, NOT upstream signed Ed25519 + update manifests (see `UPDATER.md`). The updater repoint needs its own + decision + VN keypair; it is not part of the translation work. +- **Never touch `native/`.** Updater, settings defaults, streamer, and FFI + stay upstream-owned (see `UPSTREAM.md`). + +## Bugs found + +### Review pass 2026-11-10 ~23:58 (docs reviewer, read-only — did not fix code) + +Reviewed every new file listed above (1,897 lines total). Findings, worst +first. **R1–R3 were fixed in the working tree while this review was +being written (see entries); R3b now blocks the feature from actually +running; R4–R8 are follow-ups.** + +- **R1 [WAS BLOCKER — FIXED in working tree while reviewing]** + At first check, `opennow-qt/cmake/Sources.cmake` contained zero + `translation` entries, so all 7 new `.cpp` files would have been silently + not compiled. Another subagent fixed it before this commit: `Sources.cmake` + now defines `OPENNOW_TRANSLATION_SOURCES` (all 14 files) and adds it to + `qt_add_executable` (verified in the working-tree diff). Keep the + `CI.md` §3 rule in mind for any future files. +- **R2 [WAS BLOCKER — FIXED in working tree while reviewing]** + At first check, `opennow-qt/tests/tst_translation.cpp` was not registered + in `opennow-qt/cmake/Tests.cmake`. Another subagent fixed it: `Tests.cmake` + now builds `opennow-translation-tests` from the test + all translation + sources, linked against `Qt6::Test Qt6::Gui Qt6::Network`, offscreen, + 30 s timeout (verified in the working-tree diff). +- **R3 [WAS BLOCKER — FIXED in working tree while reviewing]** + At first check, nothing outside `src/translation/` referenced + `TranslationEngine`. Another subagent wired it in + `opennow-qt/src/app/ApplicationStartup.cpp`: engine created at `:194` + (app lifetime), `screenshotReady` → `onStreamFrame` connected with + `Qt::QueuedConnection` at `:254-260` (existing `saveStreamScreenshot` + connect untouched), context property `translationEngine` set at `:365`. +- **R3b [OPEN — BLOCKER for the feature actually working] Settings are + never mirrored into the engine.** The settings page saves + `translation.enabled`, `translation.ocrEngine`, + `translation.translationProvider`, `translation.overlayMode`, + `translation.stabilityDelayMs`, `translation.fontSizePx`, + `translation.showOriginal`, `translation.cacheEnabled` via + `settingsScreen.setSetting`, and its header comment claims "The C++ + translationEngine mirrors those settings into its live properties" — + but no code does that. Grep finds no `setEnabled` / `setOcrEngine` / + `setTranslationProvider` / `setOverlayMode` call from `ApplicationStartup.cpp`, + `ShellStore.qml`, or `SettingsState.qml`. So `translationEngine.enabled` + stays at its `false` default forever: the Settings toggle saves, but the + engine never turns on, and `onStreamFrame` returns immediately. Fix: + sync `translation.*` settings into the engine at startup and on change + (e.g. in `ApplicationStartup.cpp` after settings load, or a QML binding + in `ShellStore`/settings state that calls the engine setters whenever + the settings change). Note the Gemini key is intentionally in-memory + only — it must be re-entered every launch by design. +- **R4 [BUG] Discarded `chopped()` result breaks fenced Gemini replies.** + `opennow-qt/src/translation/OcrEngine.cpp:60`: `raw.chopped(3);` — + `QString::chopped()` returns a new string and does not modify in place, + so the trailing ```` ``` ```` fence is never removed. Any Gemini OCR + reply wrapped in a ```json fence then fails `QJsonDocument::fromJson` + ("OCR service returned unparsable text"). Fix: `raw = raw.chopped(3);`. + (The opening-fence strip above it correctly reassigns with `raw =`.) +- **R5 [THREAD SAFETY, minor] Unsynchronized write to `m_lastLookupUs`.** + `opennow-qt/src/translation/TranslationCache.cpp` (`lookup()`): + `m_lastLookupUs` is written **after** the `QMutexLocker` scope ends, + while `lastLookupUs()` reads it under the lock. Make the write inside + the locked scope (or make the member atomic). +- **R6 [LOCALIZATION, convention] Two `en.json` representations; source + strings are Vietnamese.** The new QML pages use Vietnamese `qsTr` + literals (e.g. `qsTr("Dịch màn hình")`) and `en.json` carries them as + values under auto keys (`dich_man_hinh`, …) — `locales:check` passes, + verified locally. But `locales/en.json` also gained a hand-written + English `"translation": {...}` section (44 lines) that **no QML + references** (pages use `qsTr` literals, never `I18n` keys). Consequences: + English-locale users see Vietnamese on these pages, Crowdin cannot + translate the Vietnamese source text, and the English section is dead + weight. Decide: either keep Vietnamese-first deliberately (delete the + unused English section) or switch QML to English source strings with + the Vietnamese coming from Crowdin. Not a CI failure — a product/ + convention decision. +- **R7 [DEAD CODE, minor] `translationSetting()` has no caller.** + `opennow-qt/qml/state/settings/SettingsState.qml:155` adds + `translationSetting(key, fallback)`, but the settings page uses + `settingsScreen.valueSetting("translation." + key, ...)` directly. + Either use the helper from the page or remove it. +- **R8 [PACKAGING, minor] Dialogue-DB seed is never deployed.** + `opennow-qt/src/translation/data/wuwa-dialogue-db.json` is not + referenced in `opennow-qt/cmake/Resources.cmake` or packaging, and + `resolveDialogueDbPath()` (`TranslationEngine.cpp:25-38`) only looks in + AppData / next-to-exe / `data/` — none of which a packaged install + populates. Harmless today (the seed is empty and `loadDialogueDb()` + tolerates a missing file), but once real entries are added they will + silently not ship. Fix when the DB gets its first entries: register the + file as a deployed resource or copy it in packaging. + + Checked and **clean** (no finding): + - **API key in logs:** none found. Key travels only in the + `x-goog-api-key` header (`OcrEngine.cpp`, `TranslationProvider.cpp`), + never in a URL; `TranslationEngine.h: m_geminiApiKey` is documented + in-memory-only; settings page shows only "Đã lưu key"/"Chưa có key" + and clears the field after save. `TranslationHttp` error paths use + HTTP status / `errorString()`, never request headers. + - **Null QImage:** guarded everywhere — `OcrEngine::recognize` + (`OcrEngine.cpp`), `cropDialogueImage`/`cropHash`/`onStreamFrame` + (`TranslationEngine.cpp`), worker empty-crop path. Crops are detached + copies (`image.copy()`), safe across threads. + - **Thread safety (worker):** `TranslationWorker` owns its `QThread`; + jobs cross via queued `invokeMethod` + `jobCompleted` signal; + `QImage` in the job is a detached copy; `TranslationJobQueue` is + mutex-guarded with the 1-running + 1-waiting newest-wins rule. + (Nit, not a bug: `TranslationWorker::stop()` queues `cancelPending` + and then `quit()`s the thread loop, so the queued slot usually never + runs — harmless, the queue is dropped at destruction anyway.) + - **QML ids that do not exist:** none found. `TranslationOverlay` + reads `parent.streaming` — exists at + `DesktopStreamScreen.qml:34`. `DesktopSettingsChoice` signal is + `selected(var value)` (`DesktopSettingsChoice.qml:21`), matching the + page's `onSelected: value => ...`; `DesktopSettingsSlider` signal is + `committed(real value)`, matching `onCommitted`. Both new QML files + are registered in `QmlModule.cmake`. + - **Default provider risk (note, not a bug):** default provider is + `google` (`TranslationEngine.h`), which calls the undocumented + `translate.googleapis.com/translate_a/single?client=gtx` endpoint — + free but unofficial; expect possible rate-limiting/blocks. Default OCR + is `gemini-vision`, which correctly returns NotAvailable without a key. + - **Perf note (measure, don't guess):** `onStreamFrame` runs + `convertedTo(ARGB32)` + SHA-256 over the full crop on the GUI thread + per screenshot frame (`TranslationEngine.cpp` `cropHash`). Fine if + screenshots are on-demand; measure on the EliteBook before calling + the < 1 s target met. + +- **Pre-existing upstream note (not a VN bug):** the Rust settings default + `autoCheckForUpdates` is `true` (`native/opennow-core/src/settings.rs:1463`) + while the QML toggle fallback reads `false` + (`DesktopSettingsUpdatesPage.qml:154`). Editing the QML fallback alone + does not change the stored default — see `UPDATER.md` §3. This is why the + VN updater guard must actively set/disable the check (step 2 there). + +## CI status + +- **Unknown until pushed.** `vn-translation` pushes do not trigger `qt-ci` + (push branches are only `dev`/`main` — see `CI.md` §1). No PR has been + opened, so there is no CI result for any VN work: not green, not red, + unknown. First signal will be the PR `vn-translation` → `dev` + (contracts + linux-x64 / windows-x64 / macos-arm64 unit-test jobs). +- Package builds (Windows `.exe`/`.zip` Ethan can run) need a manual + `workflow_dispatch` after that — PR CI only runs unit tests. + +## What is UNPROVEN + +- **No live GFN login test.** No run against a real GeForce NOW account + and a real WuWa session has happened from this fork. +- **No OCR latency measured on Ethan's EliteBook** (HP EliteBook 840 G1, + i5-4300U, HD 4400, 8 GB DDR3). The < 1 s / < 200 ms targets are targets, + not measurements. +- **No Gemini key tested.** No API key has been entered, no Gemini Vision + call has been made from the app, no quota/cost check done. +- **No overlay visual check.** In-place replacement (erase streamed English + text, draw Vietnamese in its place) has not been seen on a real frame. +- **Updater guard not yet implemented or verified** (recommendation only, + `UPDATER.md` §4). Until it lands, a VN build from this branch still + auto-checks upstream releases by default (Rust default `true`). +- **No packaged VN build exists yet** (no dispatch, no local package run + recorded). + +## Integration pass (coordinator, after all 3 subagents) + +- **R3b FIXED — settings now mirror into the engine.** QML is the only side + that can read `ShellStore.settings`, so the sync lives in QML: + `TranslationOverlay.qml` gains `syncEngineFromSettings()` (called on + `Component.onCompleted` and on every `ShellStore.settingsChanged` — + `applySetting()` replaces the whole settings object, so the signal fires + on every save) and `DesktopSettingsTranslationPage.qml` gains + `pushToEngine(key, value)` called from `setT()` (save + push) and, on page + load, push-only (no settings writes — an earlier draft called `setT()` on + load and would have spammed the core with ~10 writes per page open; caught + in review and fixed before commit). Without this the engine kept + `enabled=false` forever. +- **Gemini key now persists locally.** `TranslationEngine::setGeminiApiKey` + writes `translation/geminiApiKey` to `QSettings` (registry on Windows); + the constructor restores it and forwards it to the worker. Key is never + logged, never in a URL, never committed. (Header comment corrected: + it used to say "never persisted".) +- **OCR fallback chain added** (`TranslationWorker::processNext`): try the + selected engine, then `tesseract`, then `gemini-vision` (deduped, only + engines reporting `available()`). Falls back only on `NotAvailable`, not + on `Failed`. This is what makes the default (`gemini-vision`, no key yet) + work on a fresh install when Tesseract is present. NOT unit-tested — + needs a live check (no key + Tesseract installed -> OCR via Tesseract). +- **WuWa DB seed is now deployed.** `Resources.cmake` registers + `src/translation/data/wuwa-dialogue-db.json` as + `:/translation/wuwa-dialogue-db.json`; the engine checks that qrc path + last (AppData / next-to-exe win). Seed still has 0 datamined lines. +- **R4/R5 were already fixed** by the C++ subagent before review + (`raw.chop(3)` at `OcrEngine.cpp:54`; `m_lastLookupUs` written inside + the mutex lock at `TranslationCache.cpp:46-51`) — the docs review read a + stale tree. Verified in the committed files. +- **R6 was a false alarm, reverted.** Deleting the English descriptive + `"translation"` keys in `en.json` broke `npm run locales:check` (5 + missing source texts: "Cache hit", "Gemini API key", "OCR engine", + "Screen OCR EN to Vietnamese", "Translation") — those keys ARE the + registry the checker uses. Deletion reverted; `locales:check` passes + again (exit 0, "Translations ok (2324 QML source texts…)"). + Vietnamese `qsTr` literals in the new QML remain a deliberate deviation + from the upstream English-source convention (this fork does not run + Crowdin sync for translation strings). +- **R7 fixed:** dead `translationSetting()` helper removed from + `SettingsState.qml` (no caller; pages use `settingsScreen.valueSetting` + / `boolSetting`). +- **Local checks after integration:** Python logic mirror 16/16 PASS; + `npm run locales:check` exit 0; brace/paren balance OK on all changed + files; no API key in any log call; `translationSetting` references: 0. + Full Qt compile + `ctest` still only possible via GitHub Actions CI + (no Qt in sandbox) — CI status remains unknown until the fork + PR exist. + +- **Updater guard IMPLEMENTED (was recommendation-only).** `ShellStore.qml` + gains `vnTranslationBuild: true` + the auto-update timer is gated off + and `runAutomaticUpdates()` returns early in VN builds. Manual update + checks still work but are fail-closed without a pinned key (no download). + This is a 4th shim file (ShellStore.qml, +9 lines) — the only upstream + file touched outside the original 3 shims, and it is documented in + `UPDATER.md` §4. Full repoint to `duyzoz/OpenNOW-ORC` + a VN keypair is + still a separate approved step touching `native/`. diff --git a/docs/vn-translation/UPDATER.md b/docs/vn-translation/UPDATER.md new file mode 100644 index 000000000..c3119123e --- /dev/null +++ b/docs/vn-translation/UPDATER.md @@ -0,0 +1,211 @@ +# VN fork — updater safety (read before shipping any VN build) + +Status: findings only, verified against upstream tag v1.0.4 / commit `bec4a0b`. +**No code in this file has been changed yet.** The change below is a +recommendation for a follow-up task; do not apply it silently. + +## Short answer + +**The updater lives entirely in the Rust core (`native/opennow-core/`), which +the VN fork must not touch.** Its release URLs are hardcoded to the upstream +repo `OpenCloudGaming/OpenNOW`, and its signing key is compiled in at build +time. There is therefore no QML-only way to repoint the updater at the VN +fork's releases — a repoint needs a (small, deliberate) Rust change plus a +new VN signing keypair. Until that is done, the safe posture is: + +1. **Ship VN builds WITHOUT any pinned update key** (fail-closed by + construction — downloads are refused), **and** +2. **Add a QML-level guard that disables the automatic update check by + default in VN builds** (see §4), so the app never even phones upstream + GitHub Releases on its own. + +## 1. How the upstream updater works + +End-to-end flow (all in Rust, driven from QML through the versioned JSON +protocol — see `docs/core-protocol.md`): + +1. QML asks for a check: `ShellStore.checkForUpdates()` in + `opennow-qt/qml/state/ShellStore.qml:1666` sends + `CoreClient.request("updater.check", {channel: settings.updateChannel})`. + A 6-hour timer does the same automatically — see §3. +2. Rust `UpdaterService::check()` in + `native/opennow-core/src/updater.rs:193` fetches the release list from + `RELEASES_URL` (GitHub API, §2), picks the newest installable release for + the channel (`select_installable_release` / `select_latest_release`, + `updater.rs:779-796` — drafts are always skipped; prereleases are skipped + on the `stable` channel, allowed on `nightly`), and finds the + platform-compatible asset plus its sibling `.manifest.json`. +3. Download is gated on the Ed25519 signature: `verify_manifest()` in + `native/opennow-core/src/update_apply/verification.rs:92` verifies the + manifest (version / asset / size / SHA-256, exact payload in + `docs/update-signing.md`) against the pinned public key. The staged file + is re-hashed immediately before install (`verify_package`, + `verification.rs:96`). +4. Install is staged atomically; AppImage keeps a `.previous` rollback copy. + Install always requires user confirmation in the UI + (`ShellStore.installUpdate()`, `updater.install`). +5. Release notes come from the same GitHub release body + (`update_highlights`, `updater.rs`). + +Manual fallback: the Updates settings page has an "Open releases" button +(`opennow-qt/qml/desktop/settings/pages/DesktopSettingsUpdatesPage.qml:111`) +that opens `updaterState.releaseUrl` — which, unmodified, is an upstream URL. + +## 2. Where the repo and the signing key are configured + +### Repo URLs — hardcoded constants, Rust only + +`native/opennow-core/src/updater.rs:18-20`: + +```rust +const RELEASES_URL: &str = "https://api.github.com/repos/OpenCloudGaming/OpenNOW/releases"; +const RELEASES_PAGE: &str = "https://github.com/OpenCloudGaming/OpenNOW/releases"; +const RELEASE_ASSET_PREFIX: &str = "https://github.com/OpenCloudGaming/OpenNOW/releases/download/"; +``` + +Two more pins enforce the same repo — `trusted_release_url()` +(`updater.rs:1006-1010`) accepts only `html_url`s under +`https://github.com/OpenCloudGaming/OpenNOW/releases/`, and +`trusted_asset_url()` (`updater.rs:996-999`) accepts only download URLs +under the `RELEASE_ASSET_PREFIX`. **Changing any one of these without the +others leaves the updater half-pointing at upstream.** All five sites must +change together (3 constants + 2 validators). + +There is no config file, environment variable, or QML setting that overrides +the repo. QML only chooses the channel (`stable` / `nightly`). + +### Signing key — compile-time env var, NOT a runtime setting + +- Key source: `embedded_update_key()` in + `native/opennow-core/src/update_apply/verification.rs:24-30` reads the + compile-time env var `OPENNOW_UPDATE_ED25519_PUBLIC_KEY` via `option_env!`. +- CMake plumbing: `opennow-qt/CMakeLists.txt:55-56` declares it as a cache + variable defaulting to `""`; `opennow-qt/cmake/NativeRuntime.cmake:24,183` + forwards it to the Rust build. +- CI plumbing: `.github/workflows/qt-ci.yml` `workflow_dispatch` input + `public_key` defaults to the upstream production key; `qt-build.yml:131,346,451,610` + passes it through as `update_public_key` → `OPENNOW_UPDATE_ED25519_PUBLIC_KEY`. +- Production public key (safe to publish, recorded in + `opennow-qt/packaging/update-public-key.base64`): + `HoyKVmfuH+KDioPCJJNxOB2e/bXJoOALSjo1QeMsDlk=` +- The matching **private** key lives only in the upstream + `qt-update-signing` GitHub environment secret + `OPENNOW_UPDATE_ED25519_PRIVATE_KEY`. The fork does not have it and must + never try to obtain or reuse it. + +### Fail-closed behaviour (the safety net we rely on) + +Per `docs/update-signing.md`: a build compiled **without** a pinned public key +may discover releases but reports `signaturePolicy: unconfigured-fail-closed` +and **cannot download an update** (`updater.rs:1831` test +`builds_without_a_pinned_key_cannot_download_updates`). Ordinary `qt-ci` +check builds (push/PR) never pass a key, so they are fail-closed by default. +Only `workflow_dispatch` with `publish_nightly` (or a manual +`qt-release-candidate` run) embeds a key. + +## 3. Auto-check defaults — the trap + +- **Rust default is ON.** `native/opennow-core/src/settings.rs:1463`: + `"autoCheckForUpdates":true, "autoDownloadUpdates":false`. A fresh + install therefore auto-checks every 6 hours. +- The QML toggle in `DesktopSettingsUpdatesPage.qml:154` reads + `boolSetting("autoCheckForUpdates", false)` — that `false` is only a + fallback for a missing setting; it does **not** override the Rust default + that is already stored. Changing the QML fallback alone changes nothing. +- The timer is `ShellStore.qml:1025-1031` (`autoUpdateCheckTimer`, 15 s first + run, then 60 s ticks) and `runAutomaticUpdates()` at + `ShellStore.qml:1749-1765` (check at most every 6 h, `21600000` ms, only + when no session is active). Auto-download is off by default and retries at + most 3 times with backoff — but auto-**check** alone is enough to surface + an upstream release and offer it to the user. +- Channel default: `settings.rs:618-623` + `version.rs:6-14` + (`update_channel()` — `nightly` only if the build version has a `-nightly.` + prerelease tag; a `1.0.4` VN build defaults to `stable`). + +## 4. Recommendation (minimal safe change for the VN fork) + +Do this, in order. Steps 1–2 are the minimum before any VN build is handed +to Ethan; step 3 is the later, proper fix and needs its own approval. + +### Step 1 — Never embed a key in VN builds (zero code, just discipline) + +- Never run `workflow_dispatch` with `publish_nightly: true` on this fork, + and never pass `update_public_key` / `OPENNOW_UPDATE_ED25519_PUBLIC_KEY` + in any VN build. With no key, downloads fail closed even if a check ever + finds an upstream release. +- Never copy the upstream public key into a VN build "to make updates work": + that key only verifies manifests signed with the upstream private key, + i.e. upstream builds. Embedding it is exactly how a VN install would + auto-update itself into upstream. + +### Step 2 — QML-level guard: disable the auto-check in VN builds (the change to make) + +Since the Rust default (`settings.rs:1463`) is `true` and QML cannot change +a stored default by editing a fallback, the guard must actively intervene. +Minimal option, all in QML, no Rust touched: + +- In `opennow-qt/qml/state/ShellStore.qml`, make `runAutomaticUpdates()` + (`:1749`) and `checkForUpdates()` (`:1666`) no-op when a VN-build flag is + set, and force `autoCheckForUpdates` to `false` on first run (e.g. set the + setting to `false` from `ApplicationStartup` / shell init when the flag is + present and the user has never explicitly enabled it). +- Exact lines to touch: `ShellStore.qml:1666` (`checkForUpdates`), + `ShellStore.qml:1749` (`runAutomaticUpdates`), `ShellStore.qml:1025` + (`autoUpdateCheckTimer` `running:` condition). The flag itself can be a + QML-visible build constant (e.g. exposed from `ApplicationStartup.cpp` — + one of the 3 allowed shim files — or a CMake-defined `OPENNOW_VERSION` + suffix); do not invent a second settings key. +- Manual "Check for updates" must also be disabled or clearly labelled in + VN builds: it currently calls the same `checkForUpdates()` path, and the + "Open releases" button would still open an upstream releases page. +- Keep install confirmation as-is: even with the guard, installation always + requires confirmation; the guard removes the *discovery* step, not the + confirmation step. + +### Step 3 — Proper repoint (later, separate approval, touches `native/`) + +Only when the fork wants its own signed updates: + +1. Generate a **new VN-only Ed25519 keypair** (offline, stored as a + `duyzoz/OpenNOW-ORC` repo/environment secret — never in the repo, never the + upstream key). Publish the new public key in + `opennow-qt/packaging/update-public-key.base64` (replacing the upstream + value) and pass it via CI. +2. In `native/opennow-core/src/updater.rs:18-20`, change all three URL + constants from `OpenCloudGaming/OpenNOW` to `duyzoz/OpenNOW-ORC`, **and** + update `trusted_release_url()` (`:1006`) and `trusted_asset_url()` + (`:996`) to the same repo. All five sites, one commit, with the + `updater.rs` unit tests updated for the new URLs. +3. Publish VN releases with sibling `.manifest.json` files signed + with the VN private key (same format as `docs/update-signing.md`). + Until step 3 exists, step 2 alone is harmless but useless — checks will + find no releases and report "No published releases were found". + +Do **not** do step 3 as a drive-by inside a translation PR. It changes trust +roots and needs Ethan's explicit go-ahead plus a key-generation ceremony. + +## 5. What to verify before handing Ethan a build + +- [ ] VN build was produced without `OPENNOW_UPDATE_ED25519_PUBLIC_KEY` + (check the CI run's configure line / `signaturePolicy` reads + `unconfigured-fail-closed` in the app's updater state). +- [ ] On first launch with no prior settings, no automatic update check + fires within the first hour (watch `lastAutoUpdateCheckMs` / the + Updates page status stays "Ready to check GitHub Releases" or the VN + guard message — it must never show an upstream version as available). +- [ ] The Updates settings page does not offer an upstream download, and + "Open releases" does not link to `OpenCloudGaming/OpenNOW`. +- [ ] `grep -rn "OpenCloudGaming/OpenNOW" native/opennow-core/src/updater.rs` + still shows the upstream constants (expected until step 3) — and the + QML guard is what prevents them from being reached automatically. + +## References + +- `docs/update-signing.md` — signing contract, fail-closed policy, manifest format. +- `docs/qt-release-candidate.md` — candidate/promotion flow; `qt-update-signing` env. +- `native/opennow-core/src/updater.rs` — `UpdaterService`, constants `:18-20`, + `check()` `:193`, `trusted_*` `:996-1010`, fail-closed test `:1831`. +- `native/opennow-core/src/update_apply/verification.rs` — `embedded_update_key()` `:24`. +- `native/opennow-core/src/settings.rs:1463` — `autoCheckForUpdates: true` default. +- `opennow-qt/qml/state/ShellStore.qml:1025,1666,1749` — timer, check, auto-run. +- `opennow-qt/qml/desktop/settings/pages/DesktopSettingsUpdatesPage.qml` — UI. diff --git a/docs/vn-translation/UPSTREAM.md b/docs/vn-translation/UPSTREAM.md new file mode 100644 index 000000000..44068c556 --- /dev/null +++ b/docs/vn-translation/UPSTREAM.md @@ -0,0 +1,75 @@ +# OpenNOW-VN — upstream / fork record + +## Fork base + +- **Upstream:** `OpenCloudGaming/OpenNOW`, tag **v1.0.4**, commit **`bec4a0b`** + (`Merge pull request #1433 from OpenCloudGaming/dev`). +- **Qt app version:** `1.0.4` (`opennow-qt/CMakeLists.txt:10`, + `project(OpenNOWQt VERSION 1.0.4 ...)`). Note the Rust core crate version + in `native/opennow-core/Cargo.toml` is `1.0.0`; the build-time + `OPENNOW_BUILD_VERSION` overrides it, so the shipped version is 1.0.4. +- **Fork branch:** `vn-translation` (local branch in this clone; origin + remote is the fork — see below). +- **What the fork adds:** in-client EN→VI screen-OCR translation for + Wuthering Waves, implemented as an additive module on top of upstream + (see `PROGRESS.md`). No upstream behaviour is changed except through the + 3 shim files listed below. + +## Remotes + +| Remote | URL | Purpose | +| --- | --- | --- | +| `origin` | `https://github.com/duyzoz/OpenNOW-ORC.git` | **The VN fork.** All VN work pushes here, branch `vn-translation`. | +| `upstream` | `https://github.com/OpenCloudGaming/OpenNOW.git` | Upstream source of truth. Fetch-only for merge purposes. **Never push to `upstream`.** | + +Verify at any time with `git remote -v`. If a remote points anywhere else, +stop and fix it before fetching or pushing. + +## Merge rules + +1. **Update from upstream:** `git fetch upstream`, then merge upstream's + `main` (or the tagged release) **into `vn-translation`**: + `git checkout vn-translation && git merge upstream/main`. + Never merge `vn-translation` into a local `main`, and never fast-forward + `main` to upstream — `main` in this clone is upstream's history, not the + fork's working branch. +2. **Conflicts are only allowed in the 3 shim files.** If a merge conflicts + anywhere else, stop and resolve by keeping the VN side minimal — do not + rewrite upstream files to fit the fork. The 3 shim files are the only + places VN code is allowed to touch upstream-owned code: + + | Shim file | Why it is touched | + | --- | --- | + | `opennow-qt/src/app/ApplicationStartup.cpp` | Wires the translation service into app startup / QML context. | + | `opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml` | Hosts the translation overlay above `StreamVideoItem`; never touches the Rust streamer / NVST transport / FFI ABI. | + | `opennow-qt/qml/desktop/settings/DesktopSettingsScreen.qml` | Adds the Translation settings entry/page. | + + Everything else VN is **additive**: new files under + `opennow-qt/src/translation/` and new QML files (registered in + `opennow-qt/cmake/Sources.cmake` / `opennow-qt/cmake/QmlModule.cmake` — + see `CI.md` §3), plus `docs/vn-translation/` and the README section. +3. **Never edit `native/`.** That means no changes under + `native/opennow-core/` (settings, updater, session orchestration) or + `native/opennow-streamer/` (NVST transport, decode, FFI). The updater + repoint (upstream → `duyzoz/OpenNOW-ORC` URLs + a new VN signing key) lives + in `native/opennow-core/src/updater.rs` and is therefore **explicitly + out of scope** until a separate decision is made — see `UPDATER.md` §4 + step 3. The QML-level updater guard (step 2) is the approved interim. +4. **Never rebase `main` history.** Upstream history is immutable. Rebase + or history rewrites are only acceptable on the unpushed `vn-translation` + branch itself, and only before it is shared; once pushed, merge forward. +5. **Upstream updates are preserved via the upstream remote.** Keep + `upstream` configured and fetch before each merge. VN code must stay + additive so an upstream merge is a clean fast-forward except for the 3 + shims. If an upstream change breaks the translation module, fix the + module — do not fork the upstream file. + +## Abandoned repo — do not merge + +**`duyzoz/OpenNow-VN` (the old Electron remake) is ABANDONED, completely.** +Do not port features from it, do not merge it, do not copy architecture +from it, and do not link to it as the live project. The repo's own +`AGENTS.md` agrees: Electron implementations are legacy/out of scope. +The Qt fork (`duyzoz/OpenNOW-ORC`, branch `vn-translation`) is the only live +remake. If the old repo is ever deleted, that is a separate explicit step +by Ethan — it is not part of this fork's work. diff --git a/locales/en.json b/locales/en.json index 76ad3ebbd..815649ec7 100644 --- a/locales/en.json +++ b/locales/en.json @@ -4472,5 +4472,121 @@ "copyErrorCode": "Copy error code", "errorCodeCopied": "Error code copied", "copyCode": "Copy code" + }, + "translation": { + "title": "Translation", + "detail": "Screen OCR EN to Vietnamese", + "enable": "Translate screen", + "enableDescription": "Detect English text on the stream and translate it to Vietnamese. Off means the original 100%.", + "statusNotReady": "Translation engine not ready yet (waiting for the C++ side). Settings below still save normally.", + "sourceLanguage": "Source language", + "sourceLanguageDescription": "Language shown in the game on the stream.", + "targetLanguage": "Target language", + "targetLanguageDescription": "Language of the translated text.", + "ocrEngine": "OCR engine", + "ocrEngineDescription": "Engine that reads text from the stream.", + "ocrNotAvailable": "Not available in this build — coming in a later release.", + "dialoguePreset": "Dialogue area", + "dialoguePresetDescription": "Screen area scanned for text to translate. Custom dialogue areas come later; presets only for now.", + "stabilityDelay": "Stability delay", + "stabilityDelayDescription": "How long text must stay still before translating. Higher means fewer mistranslations while text is moving, but slower.", + "provider": "Translate with", + "providerDescription": "Service that translates OCR text to Vietnamese.", + "geminiApiKey": "Gemini API key", + "keySaved": "Key saved.", + "noKey": "No key yet.", + "keyNote": "The key stays on this machine only, and is sent nowhere except Google.", + "keyNeedsKey": "Needs a Gemini key — no key yet. Paste the key below.", + "saveKey": "Save key", + "overlayMode": "Display mode", + "overlayModeInplace": "Replace the original text in place, covering it.", + "overlayModeSubtitle": "Show the translation in a bottom subtitle bar, original text untouched.", + "overlayModeOff": "Do not show translations on screen.", + "fontSize": "Font size", + "fontSizeDescription": "Font size of the translated text on the stream.", + "showOriginal": "Show original text too", + "showOriginalDescription": "Show the small original line under the translation.", + "cache": "Translation cache", + "cacheDescription": "Already-translated lines are reused instantly without another API call.", + "clearCache": "Clear cache", + "clearCacheDescription": "Delete all translated lines from the cache.", + "testSample": "The Rover walks into the city, searching for answers.", + "testButton": "Translate test", + "testDescription": "Translate the line above with the currently selected engine and provider, no stream needed.", + "timingCacheHit": "Cache hit", + "timingNoCache": "No cache used", + "engineNotReady": "Translation engine not ready yet.", + "qmlSource": { + "cache_ban_dich": "Cache bản dịch", + "chen_ban_dich_ngay_tai_vung_thoai_che_chu_goc": "Chèn bản dịch ngay tại vùng thoại, che chữ gốc.", + "chen_tai_cho": "Chèn tại chỗ", + "chua_co_key": "Chưa có key.", + "chua_kha_dung_trong_ban_nay": "Chưa khả dụng trong bản này", + "chua_kha_dung_trong_ban_nay_se_co_o_ban_sau": "Chưa khả dụng trong bản này — sẽ có ở bản sau.", + "cho_chu_ung_yen_bao_lau_roi_moi_dich_cao_hon_it_dich_nham_khi_chu_ang_chay_nhung_cham_hon": "Chờ chữ đứng yên bao lâu rồi mới dịch. Cao hơn = ít dịch nhầm khi chữ đang chạy, nhưng chậm hơn.", + "cach_hien_thi": "Cách hiển thị", + "cau_dich_thu": "Câu dịch thử", + "cau_a_dich_roi_thi_dung_lai_ngay_khong_goi_api_nua": "Câu đã dịch rồi thì dùng lại ngay, không gọi API nữa.", + "can_key_gemini": "Cần key Gemini", + "can_key_gemini_chua_co_key_dan_key_o_duoi": "Cần key Gemini — chưa có key. Dán key ở dưới.", + "co_chu": "Cỡ chữ", + "co_chu_cua_ban_dich_tren_man_hinh_stream": "Cỡ chữ của bản dịch trên màn hình stream.", + "display": "DISPLAY", + "dan_key_gemini": "Dán key Gemini…", + "dich_bang": "Dịch bằng", + "dich_cau_tren_bang_ung_engine_va_provider_ang_chon_khong_can_mo_stream": "Dịch câu trên bằng đúng engine và provider đang chọn, không cần mở stream.", + "dich_man_hinh": "Dịch màn hình", + "dich_thu": "Dịch thử", + "dich_vu_dich_ban_ocr_sang_tieng_viet": "Dịch vụ dịch bản OCR sang tiếng Việt.", + "engine_nhan_dien_chu_tren_man_hinh_stream": "Engine nhận diện chữ trên màn hình stream.", + "gemini": "Gemini", + "gemini_vision": "Gemini Vision", + "generic": "Generic", + "google_translate": "Google Translate", + "hien_ban_dich_o_thanh_phu_e_cuoi_man_hinh_chu_goc_con_nguyen": "Hiện bản dịch ở thanh phụ đề cuối màn hình, chữ gốc còn nguyên.", + "hien_chu_goc_nho_ben_duoi_ban_dich": "Hiện chữ gốc nhỏ bên dưới bản dịch.", + "hien_ca_chu_goc": "Hiện cả chữ gốc", + "key_chi_luu_tren_may_nay_khong_gui_i_au_khac_ngoai_google": "Key chỉ lưu trên máy này, không gửi đi đâu khác ngoài Google.", + "khong_dung_cache": "Không dùng cache", + "khong_hien_thi_ban_dich_len_man_hinh": "Không hiển thị bản dịch lên màn hình.", + "language": "LANGUAGE", + "luu_key": "Lưu key", + "mien_phi_mac_inh": "Miễn phí · mặc định", + "mac_inh": "Mặc định", + "mac_inh_can_key_gemini": "Mặc định · cần key Gemini", + "ngon_ngu_dich": "Ngôn ngữ dịch", + "ngon_ngu_goc": "Ngôn ngữ gốc", + "ngon_ngu_hien_thi_cua_ban_dich": "Ngôn ngữ hiển thị của bản dịch.", + "ngon_ngu_hien_thi_trong_game_tren_man_hinh_stream": "Ngôn ngữ hiển thị trong game trên màn hình stream.", + "nhan_dien_chu_tieng_anh_tren_man_hinh_stream_roi_dich_sang_tieng_viet_tat_ung_ban_goc_100": "Nhận diện chữ tiếng Anh trên màn hình stream rồi dịch sang tiếng Việt. Tắt = đúng bản gốc 100%.", + "nhap_cau_tieng_anh_e_dich_thu": "Nhập câu tiếng Anh để dịch thử…", + "ocr": "OCR", + "ocr_arg1ms_dich_arg2ms": "OCR %1ms · Dịch %2ms", + "ocr_arg1ms_dich_arg2ms_arg3": "OCR %1ms · Dịch %2ms · %3", + "offline_chay_tren_may": "Offline · chạy trên máy", + "phu_e": "Phụ đề", + "rapidocr": "RapidOCR", + "san_sang": "Sẵn sàng", + "test": "TEST", + "translate": "TRANSLATE", + "translation": "TRANSLATION", + "tesseract": "Tesseract", + "thanh_cuoi_man_hinh": "Thanh cuối màn hình", + "tieng_viet": "Tiếng Việt", + "translation_engine_chua_san_sang_ang_cho_phan_c_cai_at_ben_duoi_van_luu_binh_thuong": "Translation engine chưa sẵn sàng (đang chờ phần C++). Cài đặt bên dưới vẫn lưu bình thường.", + "translation_engine_chua_san_sang": "Translation engine chưa sẵn sàng.", + "trang_thai": "Trạng thái", + "tat_hien_thi": "Tắt hiển thị", + "vung_man_hinh_lay_chu_e_dich_vung_thoai_tuy_chinh_se_co_o_ban_sau_hien_chi_chon_preset": "Vùng màn hình lấy chữ để dịch. Vùng thoại tuỳ chỉnh sẽ có ở bản sau; hiện chỉ chọn preset.", + "vung_thoai": "Vùng thoại", + "vung_thoai_chung": "Vùng thoại chung", + "vung_thoai_duoi_man_hinh_mac_inh": "Vùng thoại dưới màn hình · mặc định", + "windows_ocr": "Windows OCR", + "wuthering_waves": "Wuthering Waves", + "xoa_cache": "Xoá cache", + "xoa_toan_bo_cau_a_dich_trong_cache": "Xoá toàn bộ câu đã dịch trong cache.", + "a_luu_key": "Đã lưu key.", + "o_on_inh": "Độ ổn định" + } } } diff --git a/opennow-qt/cmake/QmlModule.cmake b/opennow-qt/cmake/QmlModule.cmake index ec4d4ac57..9e14f7125 100644 --- a/opennow-qt/cmake/QmlModule.cmake +++ b/opennow-qt/cmake/QmlModule.cmake @@ -350,6 +350,7 @@ qt_add_qml_module(opennow-qt qml/desktop/settings/pages/DesktopSettingsStoresPage.qml qml/desktop/settings/pages/DesktopSettingsStreamPage.qml qml/desktop/settings/pages/DesktopSettingsSubscriptionPage.qml + qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml qml/desktop/settings/pages/DesktopSettingsUpdatesPage.qml qml/desktop/shell/DesktopApp.qml qml/desktop/shell/DesktopAccountSwitcher.qml @@ -372,6 +373,7 @@ qt_add_qml_module(opennow-qt qml/desktop/stream/DesktopStreamStats.qml qml/desktop/stream/DesktopStreamToast.qml qml/desktop/stream/DesktopStreamToasts.qml + qml/desktop/stream/TranslationOverlay.qml qml/desktop/updates/DesktopUpdateChip.qml qml/desktop/updates/DesktopUpdateHeadline.qml qml/desktop/updates/DesktopUpdatePanel.qml diff --git a/opennow-qt/cmake/Resources.cmake b/opennow-qt/cmake/Resources.cmake index c61c17fb7..b0b5bba5f 100644 --- a/opennow-qt/cmake/Resources.cmake +++ b/opennow-qt/cmake/Resources.cmake @@ -12,6 +12,18 @@ qt_add_resources(opennow-qt "opennow-locales" FILES ${OPENNOW_LOCALE_FILES} ) +# VN translation: bundled WuWa dialogue-DB seed (0 datamined lines in v1; +# the file is a schema + note, and fills from verified live play). The +# engine reads it from :/translation/wuwa-dialogue-db.json only when no +# user DB exists next to the executable or in AppData. +set_source_files_properties( + "${CMAKE_CURRENT_SOURCE_DIR}/src/translation/data/wuwa-dialogue-db.json" + PROPERTIES QT_RESOURCE_ALIAS "wuwa-dialogue-db.json") +qt_add_resources(opennow-qt "opennow-translation-data" + PREFIX "/translation" + FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/translation/data/wuwa-dialogue-db.json" +) + set(OPENNOW_STREAM_SHADERS shaders/streamvideo.vert shaders/streamvideo.frag shaders/hdroutput.frag diff --git a/opennow-qt/cmake/Sources.cmake b/opennow-qt/cmake/Sources.cmake index f550c97e3..c9e006a63 100644 --- a/opennow-qt/cmake/Sources.cmake +++ b/opennow-qt/cmake/Sources.cmake @@ -56,6 +56,23 @@ set(OPENNOW_STREAM_PRESENTATION_SOURCES src/streaming/rendering/StreamSenderPacer.h ) +set(OPENNOW_TRANSLATION_SOURCES + src/translation/TranslationCache.cpp + src/translation/TranslationCache.h + src/translation/WuWaDialogueDb.cpp + src/translation/WuWaDialogueDb.h + src/translation/TranslationHttp.cpp + src/translation/TranslationHttp.h + src/translation/OcrEngine.cpp + src/translation/OcrEngine.h + src/translation/TranslationProvider.cpp + src/translation/TranslationProvider.h + src/translation/TranslationWorker.cpp + src/translation/TranslationWorker.h + src/translation/TranslationEngine.cpp + src/translation/TranslationEngine.h +) + qt_add_executable(opennow-qt src/main.cpp src/acceptance/AcceptanceProfiler.cpp @@ -101,5 +118,6 @@ qt_add_executable(opennow-qt src/media/ThumbnailGenerator.h ${OPENNOW_STREAM_RUNTIME_SOURCES} ${OPENNOW_STREAM_PRESENTATION_SOURCES} + ${OPENNOW_TRANSLATION_SOURCES} ) target_link_libraries(opennow-qt PRIVATE opennow-generic-hid) diff --git a/opennow-qt/cmake/Tests.cmake b/opennow-qt/cmake/Tests.cmake index adf965775..c64c9ac8c 100644 --- a/opennow-qt/cmake/Tests.cmake +++ b/opennow-qt/cmake/Tests.cmake @@ -382,6 +382,19 @@ if(BUILD_TESTING) target_include_directories(opennow-framepacer-tests PRIVATE src) target_link_libraries(opennow-framepacer-tests PRIVATE Qt6::Test) add_test(NAME opennow-framepacer-tests COMMAND opennow-framepacer-tests -o -,txt) + qt_add_executable(opennow-translation-tests tests/tst_translation.cpp + src/translation/TranslationCache.cpp src/translation/TranslationCache.h + src/translation/WuWaDialogueDb.cpp src/translation/WuWaDialogueDb.h + src/translation/TranslationHttp.cpp src/translation/TranslationHttp.h + src/translation/OcrEngine.cpp src/translation/OcrEngine.h + src/translation/TranslationProvider.cpp src/translation/TranslationProvider.h + src/translation/TranslationWorker.cpp src/translation/TranslationWorker.h + src/translation/TranslationEngine.cpp src/translation/TranslationEngine.h) + target_include_directories(opennow-translation-tests PRIVATE src) + target_link_libraries(opennow-translation-tests PRIVATE Qt6::Test Qt6::Gui Qt6::Network) + add_test(NAME opennow-translation-tests COMMAND opennow-translation-tests -o -,txt) + set_tests_properties(opennow-translation-tests PROPERTIES + ENVIRONMENT "QT_QPA_PLATFORM=offscreen" TIMEOUT 30) qt_add_executable(opennow-streampresenttimings-tests tests/tst_streampresenttimings.cpp) target_include_directories(opennow-streampresenttimings-tests PRIVATE src) target_link_libraries(opennow-streampresenttimings-tests PRIVATE Qt6::Test) diff --git a/opennow-qt/qml/desktop/settings/DesktopSettingsScreen.qml b/opennow-qt/qml/desktop/settings/DesktopSettingsScreen.qml index 75a940791..f48b0fa14 100644 --- a/opennow-qt/qml/desktop/settings/DesktopSettingsScreen.qml +++ b/opennow-qt/qml/desktop/settings/DesktopSettingsScreen.qml @@ -49,10 +49,11 @@ FocusScope { {label: qsTr("Console mode"), detail: qsTr("Gamepad-first interface"), icon: "controller", page: 9, keywords: "console fullscreen gamepad startup"}, {label: qsTr("Account"), detail: qsTr("NVIDIA, stores, privacy"), icon: "person", page: 0, keywords: "profile subscription stores steam epic xbox ubisoft battle gaijin privacy"}, {label: qsTr("Updates"), detail: qsTr("Version, channel, notes"), icon: "reset", page: updatesSection, keywords: "update updates version release notes changelog channel stable nightly download install restart"}, - {label: qsTr("About & support"), detail: qsTr("Diagnostics, legal"), icon: "info", page: 11, keywords: "version diagnostics legal onboarding introduction replay setup restart reset"} + {label: qsTr("About & support"), detail: qsTr("Diagnostics, legal"), icon: "info", page: 11, keywords: "version diagnostics legal onboarding introduction replay setup restart reset"}, + {label: qsTr("Translation"), detail: qsTr("Screen OCR EN to Vietnamese"), icon: "globe", page: 14, keywords: "translation translate vietnamese ocr wuthering waves dialogue subtitle"} ] - readonly property var pageTitles: [qsTr("Account"), qsTr("Account"), qsTr("Account"), qsTr("Stream"), qsTr("Audio"), qsTr("Controls"), qsTr("Network"), qsTr("Appearance"), qsTr("Appearance"), qsTr("Console mode"), qsTr("Controls"), qsTr("About & support"), qsTr("Recording"), qsTr("Updates")] - readonly property var pageComponents: [accountGroup, accountGroup, accountGroup, streamPage, audioPage, controlsGroup, networkPage, lookGroup, lookGroup, consolePage, controlsGroup, aboutPage, recordingPage, updatesPage] + readonly property var pageTitles: [qsTr("Account"), qsTr("Account"), qsTr("Account"), qsTr("Stream"), qsTr("Audio"), qsTr("Controls"), qsTr("Network"), qsTr("Appearance"), qsTr("Appearance"), qsTr("Console mode"), qsTr("Controls"), qsTr("About & support"), qsTr("Recording"), qsTr("Updates"), qsTr("Translation")] + readonly property var pageComponents: [accountGroup, accountGroup, accountGroup, streamPage, audioPage, controlsGroup, networkPage, lookGroup, lookGroup, consolePage, controlsGroup, aboutPage, recordingPage, updatesPage, translationPage] function matchesSection(section) { const query = searchQuery.trim().toLowerCase() @@ -727,4 +728,12 @@ FocusScope { } } + Component { + id: translationPage + DesktopSettingsTranslationPage { + availableWidth: contentFlick.width + settingsScreen: root + } + } + } diff --git a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml new file mode 100644 index 000000000..a91c149e2 --- /dev/null +++ b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml @@ -0,0 +1,365 @@ +import QtQuick +import QtQuick.Controls +import OpenNOW + +// Translation settings: screen OCR (EN source) -> Vietnamese overlay. +// +// Persistence: every persisted key lives in ShellStore.settings under +// "translation." and is written through settingsScreen.setSetting — the +// same path every other page uses. The C++ translationEngine mirrors those +// settings into its live properties. The Gemini API key is the exception: it +// is NEVER written to ShellStore.settings; it goes only to +// translationEngine.setGeminiApiKey() and this page only ever shows +// "Đã lưu key" / "Chưa có key", never the key value. +// +// Dropdowns use DesktopSettingsChoice (the repo's row-dropdown pattern: an +// expandable tile list with {label, value, detail} items). There is no +// row-level combo control in this codebase — DesktopSettingsDropdown is a +// global overlay menu, not a row control — so Choice is the faithful match. +Column { + id: page + objectName: "desktopTranslationSettings" + required property real availableWidth + required property var settingsScreen + + width: page.availableWidth; spacing: DesktopTokens.px(12) + + function t(key, fallback) { return page.settingsScreen.valueSetting("translation." + key, fallback) } + function tb(key, fallback) { return page.settingsScreen.boolSetting("translation." + key, fallback) } + // Push one saved value into the live engine (no settings write). + function pushToEngine(key, value) { + if (!page.hasEngine) + return + if (key === "enabled") translationEngine.enabled = value === true + else if (key === "sourceLanguage") translationEngine.sourceLanguage = String(value) + else if (key === "targetLanguage") translationEngine.targetLanguage = String(value) + else if (key === "ocrEngine") translationEngine.ocrEngine = String(value) + else if (key === "translationProvider") translationEngine.translationProvider = String(value) + else if (key === "overlayMode") translationEngine.overlayMode = String(value) + else if (key === "stabilityDelayMs") translationEngine.stabilityDelayMs = Number(value) + else if (key === "fontSizePx") translationEngine.fontSizePx = Number(value) + else if (key === "showOriginal") translationEngine.showOriginal = value === true + else if (key === "cacheEnabled") translationEngine.cacheEnabled = value !== false + else if (key === "dialoguePreset") translationEngine.setDialoguePreset(String(value)) + } + function setT(key, value) { + page.settingsScreen.setSetting("translation." + key, value) + // Push the change to the live engine immediately (same reason as + // TranslationOverlay.syncEngineFromSettings): the engine cannot + // read ShellStore.settings itself, so a save alone would leave it + // on stale values until the stream screen reloads. + page.pushToEngine(key, value) + } + + Component.onCompleted: { + if (page.hasEngine) { + page.keySaved = translationEngine.hasGeminiApiKey() + // Sync saved settings into the engine now (push only — no + // settings writes), so the Test section below uses the saved + // engine/provider even before any stream. + page.pushToEngine("enabled", page.tb("enabled", false)) + page.pushToEngine("sourceLanguage", String(page.t("sourceLanguage", "en"))) + page.pushToEngine("targetLanguage", String(page.t("targetLanguage", "vi"))) + page.pushToEngine("ocrEngine", String(page.t("ocrEngine", "gemini-vision"))) + page.pushToEngine("translationProvider", String(page.t("translationProvider", "google"))) + page.pushToEngine("overlayMode", String(page.t("overlayMode", "inplace"))) + page.pushToEngine("stabilityDelayMs", Number(page.t("stabilityDelayMs", 400))) + page.pushToEngine("fontSizePx", Number(page.t("fontSizePx", 22))) + page.pushToEngine("showOriginal", page.tb("showOriginal", false)) + page.pushToEngine("cacheEnabled", page.tb("cacheEnabled", true)) + page.pushToEngine("dialoguePreset", String(page.t("dialoguePreset", "wuthering-waves"))) + } + } + + readonly property string ocrEngine: String(page.t("ocrEngine", "gemini-vision")) + readonly property string provider: String(page.t("translationProvider", "google")) + readonly property string overlayMode: String(page.t("overlayMode", "inplace")) + + // (a) Bật / Tắt + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("TRANSLATION") } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "globe"; title: qsTr("Dịch màn hình") + description: qsTr("Nhận diện chữ tiếng Anh trên màn hình stream rồi dịch sang tiếng Việt. Tắt = đúng bản gốc 100%.") + showDivider: false + DesktopSettingsToggle { + objectName: "translationEnabledToggle" + checked: page.tb("enabled", false) + Accessible.name: qsTr("Dịch màn hình") + onValueChangedByUser: value => page.setT("enabled", value) + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Trạng thái") + description: page.hasEngine + ? String(translationEngine.statusText || qsTr("Sẵn sàng")) + : qsTr("Translation engine chưa sẵn sàng (đang chờ phần C++). Cài đặt bên dưới vẫn lưu bình thường.") + showDivider: false + } + } + + // (b) Ngôn ngữ + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("LANGUAGE") } + DesktopSettingsChoice { + objectName: "translationSourceLanguage" + width: parent.width; glyph: "globe"; title: qsTr("Ngôn ngữ gốc") + description: qsTr("Ngôn ngữ hiển thị trong game trên màn hình stream.") + items: [ + {label: qsTr("English"), value: "en", detail: qsTr("Mặc định")}, + {label: qsTr("Korean"), value: "ko"}, + {label: qsTr("Japanese"), value: "ja"}, + {label: qsTr("Chinese"), value: "zh"} + ] + value: String(page.t("sourceLanguage", "en")) + onSelected: value => page.setT("sourceLanguage", value) + } + DesktopSettingsChoice { + objectName: "translationTargetLanguage" + width: parent.width; glyph: "globe"; title: qsTr("Ngôn ngữ dịch") + description: qsTr("Ngôn ngữ hiển thị của bản dịch.") + showDivider: false + items: [ + {label: qsTr("Tiếng Việt"), value: "vi", detail: qsTr("Mặc định")}, + {label: qsTr("English"), value: "en"}, + {label: qsTr("Français"), value: "fr"}, + {label: qsTr("Deutsch"), value: "de"} + ] + value: String(page.t("targetLanguage", "vi")) + onSelected: value => page.setT("targetLanguage", value) + } + } + + // (c) OCR + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("OCR") } + DesktopSettingsChoice { + objectName: "translationOcrEngine" + width: parent.width; glyph: "monitor"; title: qsTr("OCR engine") + description: page.ocrEngine === "rapidocr" || page.ocrEngine === "windows-ocr" + ? qsTr("Chưa khả dụng trong bản này — sẽ có ở bản sau.") + : qsTr("Engine nhận diện chữ trên màn hình stream.") + items: [ + {label: qsTr("Gemini Vision"), value: "gemini-vision", detail: qsTr("Mặc định · cần key Gemini")}, + {label: qsTr("Tesseract"), value: "tesseract", detail: qsTr("Offline · chạy trên máy")}, + {label: qsTr("RapidOCR"), value: "rapidocr", detail: qsTr("Chưa khả dụng trong bản này")}, + {label: qsTr("Windows OCR"), value: "windows-ocr", detail: qsTr("Chưa khả dụng trong bản này")} + ] + value: page.ocrEngine + onSelected: value => page.setT("ocrEngine", value) + } + DesktopSettingsChoice { + objectName: "translationDialoguePreset" + width: parent.width; glyph: "image"; title: qsTr("Vùng thoại") + description: qsTr("Vùng màn hình lấy chữ để dịch. Vùng thoại tuỳ chỉnh sẽ có ở bản sau; hiện chỉ chọn preset.") + items: [ + {label: qsTr("Wuthering Waves"), value: "wuthering-waves", detail: qsTr("Vùng thoại dưới màn hình · mặc định")}, + {label: qsTr("Generic"), value: "generic", detail: qsTr("Vùng thoại chung")} + ] + value: String(page.t("dialoguePreset", "wuthering-waves")) + onSelected: value => { + page.setT("dialoguePreset", value) + if (page.hasEngine) + translationEngine.setDialoguePreset(value) + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "speed"; title: qsTr("Độ ổn định") + description: qsTr("Chờ chữ đứng yên bao lâu rồi mới dịch. Cao hơn = ít dịch nhầm khi chữ đang chạy, nhưng chậm hơn.") + showDivider: false + DesktopSettingsSlider { + objectName: "translationStabilitySlider" + accessibleName: qsTr("Độ ổn định") + from: 200; to: 1000; stepSize: 10; suffix: " ms" + value: Number(page.t("stabilityDelayMs", 400)) + onCommitted: value => page.setT("stabilityDelayMs", Math.round(value)) + } + } + } + + // (d) Dịch + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("TRANSLATE") } + DesktopSettingsChoice { + objectName: "translationProvider" + width: parent.width; glyph: "globe"; title: qsTr("Dịch bằng") + description: page.provider === "gemini" && !page.keySaved + ? qsTr("Cần key Gemini — chưa có key. Dán key ở dưới.") + : qsTr("Dịch vụ dịch bản OCR sang tiếng Việt.") + items: [ + {label: qsTr("Google Translate"), value: "google", detail: qsTr("Miễn phí · mặc định")}, + {label: qsTr("Gemini"), value: "gemini", detail: qsTr("Cần key Gemini")} + ] + value: page.provider + onSelected: value => page.setT("translationProvider", value) + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Gemini API key") + description: (page.keySaved ? qsTr("Đã lưu key.") : qsTr("Chưa có key.")) + " " + + qsTr("Key chỉ lưu trên máy này, không gửi đi đâu khác ngoài Google.") + showDivider: false + DesktopSettingsField { + id: geminiKeyField + objectName: "translationGeminiKeyField" + echoMode: TextInput.Password + placeholderText: qsTr("Dán key Gemini…") + Accessible.name: qsTr("Gemini API key") + } + DesktopSettingsButton { + objectName: "translationGeminiKeySaveButton" + compact: true + enabled: page.hasEngine && geminiKeyField.text !== "" + text: qsTr("Lưu key") + onClicked: { + if (!page.hasEngine) + return + translationEngine.setGeminiApiKey(geminiKeyField.text) + geminiKeyField.text = "" + page.keySaved = translationEngine.hasGeminiApiKey() + } + } + } + } + + // (e) Hiển thị + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("DISPLAY") } + DesktopSettingsChoice { + objectName: "translationOverlayMode" + width: parent.width; glyph: "monitor"; title: qsTr("Cách hiển thị") + description: page.overlayMode === "inplace" + ? qsTr("Chèn bản dịch ngay tại vùng thoại, che chữ gốc.") + : page.overlayMode === "subtitle" + ? qsTr("Hiện bản dịch ở thanh phụ đề cuối màn hình, chữ gốc còn nguyên.") + : qsTr("Không hiển thị bản dịch lên màn hình.") + items: [ + {label: qsTr("Chèn tại chỗ"), value: "inplace", detail: qsTr("Mặc định")}, + {label: qsTr("Phụ đề"), value: "subtitle", detail: qsTr("Thanh cuối màn hình")}, + {label: qsTr("Tắt hiển thị"), value: "off"} + ] + value: page.overlayMode + onSelected: value => page.setT("overlayMode", value) + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "sun"; title: qsTr("Cỡ chữ") + description: qsTr("Cỡ chữ của bản dịch trên màn hình stream.") + DesktopSettingsSlider { + objectName: "translationFontSizeSlider" + accessibleName: qsTr("Cỡ chữ") + from: 16; to: 32; stepSize: 1; suffix: " px" + value: Number(page.t("fontSizePx", 22)) + onCommitted: value => page.setT("fontSizePx", Math.round(value)) + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Hiện cả chữ gốc") + description: qsTr("Hiện chữ gốc nhỏ bên dưới bản dịch.") + DesktopSettingsToggle { + objectName: "translationShowOriginalToggle" + checked: page.tb("showOriginal", false) + Accessible.name: qsTr("Hiện cả chữ gốc") + onValueChangedByUser: value => page.setT("showOriginal", value) + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "check"; title: qsTr("Cache bản dịch") + description: qsTr("Câu đã dịch rồi thì dùng lại ngay, không gọi API nữa.") + DesktopSettingsToggle { + objectName: "translationCacheToggle" + checked: page.tb("cacheEnabled", true) + Accessible.name: qsTr("Cache bản dịch") + onValueChangedByUser: value => page.setT("cacheEnabled", value) + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "reset"; title: qsTr("Xoá cache") + description: qsTr("Xoá toàn bộ câu đã dịch trong cache.") + showDivider: false + DesktopSettingsButton { + objectName: "translationClearCacheButton" + compact: true + enabled: page.hasEngine + text: qsTr("Xoá cache") + onClicked: { if (page.hasEngine) translationEngine.clearCache() } + } + } + } + + // (f) Kiểm tra + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("TEST") } + DesktopSettingsField { + id: testInputField + objectName: "translationTestInput" + width: parent.width + text: "The Rover walks into the city, searching for answers." + placeholderText: qsTr("Nhập câu tiếng Anh để dịch thử…") + Accessible.name: qsTr("Câu dịch thử") + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "check"; title: qsTr("Dịch thử") + description: qsTr("Dịch câu trên bằng đúng engine và provider đang chọn, không cần mở stream.") + showDivider: false + DesktopSettingsButton { + objectName: "translationTestButton" + compact: true + enabled: page.hasEngine && testInputField.text !== "" + text: qsTr("Dịch thử") + onClicked: { if (page.hasEngine) translationEngine.requestTestTranslation(testInputField.text) } + } + } + Text { + visible: text !== "" + width: parent.width + text: page.hasEngine ? String(translationEngine.lastOriginalText || "") : "" + color: Theme.textMuted + font.family: Theme.bodyFont + font.pixelSize: DesktopTokens.captionSize + wrapMode: Text.WordWrap + } + Text { + visible: text !== "" + width: parent.width + text: page.hasEngine ? String(translationEngine.lastTranslatedText || "") : "" + color: Theme.label + font.family: Theme.bodyFont + font.pixelSize: DesktopTokens.bodySize + font.weight: Font.Bold + wrapMode: Text.WordWrap + } + Text { + visible: text !== "" + width: parent.width + text: { + if (!page.hasEngine) + return qsTr("Translation engine chưa sẵn sàng.") + const ocr = Number(translationEngine.lastOcrMs || 0) + const tr = Number(translationEngine.lastTranslateMs || 0) + let line = qsTr("OCR %1ms · Dịch %2ms · %3").arg(ocr).arg(tr) + .arg(translationEngine.lastCacheHit === true ? qsTr("Cache hit") : qsTr("Không dùng cache")) + if (translationEngine.statusText) + line += "\n" + String(translationEngine.statusText) + return line + } + color: Theme.textMuted + font.family: Theme.monoFont + font.pixelSize: DesktopTokens.captionSize + wrapMode: Text.WordWrap + } + Text { + visible: text !== "" + width: parent.width + text: page.hasEngine ? String(translationEngine.lastError || "") : "" + color: Theme.coral + font.family: Theme.bodyFont + font.pixelSize: DesktopTokens.captionSize + wrapMode: Text.WordWrap + } + } +} diff --git a/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml b/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml index d2a4a959f..fc5988cd0 100644 --- a/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml +++ b/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml @@ -166,6 +166,13 @@ FocusScope { } } + // Live EN -> VI translation overlay. Same window, above the video (z: 6), + // never captures input and never restarts the stream. + TranslationOverlay { + anchors.fill: parent + z: 6 + } + Timer { id: clipboardPasteNotice objectName: "streamClipboardPasteNoticeTimer" diff --git a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml new file mode 100644 index 000000000..8e8e665e5 --- /dev/null +++ b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml @@ -0,0 +1,198 @@ +import QtQuick +import OpenNOW + +// Translation overlay: renders the live EN -> VI translation above the stream +// video in the SAME window. It never captures input (enabled: false, no +// MouseArea, no Keys handler) and never touches the stream surface, so the +// session keeps running untouched underneath it. +// +// The C++ translationEngine context property is registered by the translation +// engine (parallel work). Every engine access below is guarded by hasEngine, +// so this overlay stays inert instead of logging errors until the engine +// lands. Visibility derives straight from translationEngine.hasTranslation: +// translationCleared hides it immediately (no fade, no timer) and a new +// translationReady replaces the text in one frame (direct binding, no +// animation), so there is no flicker. +Item { + id: root + anchors.fill: parent + z: 6 + enabled: false + + readonly property bool hasEngine: typeof translationEngine !== "undefined" && translationEngine !== null + readonly property bool engineOn: root.hasEngine && translationEngine.enabled + readonly property bool hasText: root.hasEngine && translationEngine.hasTranslation + readonly property string mode: root.hasEngine ? String(translationEngine.overlayMode || "inplace") : "off" + // The parent screen (DesktopStreamScreen) exposes `streaming`; fall back + // to showing on engine state alone when hosted anywhere else. + readonly property bool parentStreaming: parent && parent.streaming !== undefined + ? Boolean(parent.streaming) : true + readonly property bool showing: root.engineOn && root.hasText && root.mode !== "off" && root.parentStreaming + + visible: root.showing + + // Settings -> engine sync (integration fix): QML is the only side that + // can read ShellStore.settings, so this overlay — instantiated on the + // stream screen — mirrors "translation.*" into the C++ engine on load + // and whenever the settings map changes. Without this, the engine + // would keep its defaults (enabled=false) forever no matter what the + // Settings page saved. applySetting() replaces the whole settings + // object (SettingsState.qml), so settingsChanged fires on every save. + function syncEngineFromSettings() { + if (!root.hasEngine) + return + const s = ShellStore.settings || ({}) + const get = (key, fallback) => { + const v = s["translation." + key] + return v === undefined || v === null ? fallback : v + } + translationEngine.enabled = get("enabled", false) === true + translationEngine.sourceLanguage = String(get("sourceLanguage", "en")) + translationEngine.targetLanguage = String(get("targetLanguage", "vi")) + translationEngine.ocrEngine = String(get("ocrEngine", "gemini-vision")) + translationEngine.translationProvider = String(get("translationProvider", "google")) + translationEngine.overlayMode = String(get("overlayMode", "inplace")) + translationEngine.stabilityDelayMs = Number(get("stabilityDelayMs", 400)) + translationEngine.fontSizePx = Number(get("fontSizePx", 22)) + translationEngine.showOriginal = get("showOriginal", false) === true + translationEngine.cacheEnabled = get("cacheEnabled", true) !== false + translationEngine.setDialoguePreset(String(get("dialoguePreset", "wuthering-waves"))) + } + + Component.onCompleted: root.syncEngineFromSettings() + + Connections { + target: ShellStore + function onSettingsChanged() { root.syncEngineFromSettings() } + } + + // Dialogue area, normalized 0..1, from the engine (default + // 0.05, 0.72, 0.90, 0.24). Converted to pixels against this item. + readonly property rect dialogueRect: root.hasEngine + ? translationEngine.dialogueRect : Qt.rect(0.05, 0.72, 0.90, 0.24) + readonly property real boxX: Math.max(0, Math.min(root.dialogueRect.x * root.width, + Math.max(0, root.width - root.dialogueRect.width * root.width))) + readonly property real boxY: Math.max(0, Math.min(root.dialogueRect.y * root.height, + Math.max(0, root.height - root.dialogueRect.height * root.height))) + readonly property real boxW: Math.max(0, Math.min(root.dialogueRect.width * root.width, root.width)) + readonly property real boxH: Math.max(0, Math.min(root.dialogueRect.height * root.height, root.height)) + + readonly property int baseFontSize: root.hasEngine ? Number(translationEngine.fontSizePx || 22) : 22 + readonly property bool showOriginal: root.hasEngine && translationEngine.showOriginal === true + readonly property string translatedText: root.hasEngine ? String(translationEngine.lastTranslatedText || "") : "" + readonly property string originalText: root.hasEngine ? String(translationEngine.lastOriginalText || "") : "" + + readonly property string timingText: { + if (!root.hasEngine) + return "" + const ocr = Number(translationEngine.lastOcrMs || 0) + const tr = Number(translationEngine.lastTranslateMs || 0) + let text = qsTr("OCR %1ms · Dịch %2ms").arg(ocr).arg(tr) + if (translationEngine.lastCacheHit === true) + text += " · " + qsTr("Cache hit") + return text + } + + // One box shape for both modes: semi-transparent dark background, white + // wrapped text that shrinks (never overflows the box), optional small + // original underneath. + component TranslationBox: Rectangle { + id: box + required property string translated + required property string original + required property bool showOriginalText + required property int baseFontSize + color: "black" + opacity: 0.85 + radius: DesktopTokens.px(12) + Column { + anchors.fill: parent + anchors.margins: DesktopTokens.px(12) + spacing: DesktopTokens.px(4) + Text { + id: translatedLabel + width: parent.width + height: parent.height - (originalLabel.visible ? originalLabel.height + parent.spacing : 0) + text: box.translated + color: "white" + font.family: Theme.bodyFont + font.pixelSize: box.baseFontSize + fontSizeMode: Text.Fit + minimumPixelSize: 12 + wrapMode: Text.WordWrap + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + } + Text { + id: originalLabel + visible: box.showOriginalText && box.original !== "" + width: parent.width + text: box.original + color: Qt.rgba(1, 1, 1, 0.65) + font.family: Theme.bodyFont + font.pixelSize: Math.max(11, Math.round(box.baseFontSize * 0.6)) + wrapMode: Text.WordWrap + elide: Text.ElideRight + maximumLineCount: 2 + } + } + } + + // (a) In-place: translated text drawn over the game's dialogue area, + // covering the original line. + TranslationBox { + id: inplaceBox + visible: root.showing && root.mode === "inplace" + x: root.boxX + y: root.boxY + width: root.boxW + height: root.boxH + translated: root.translatedText + original: root.originalText + showOriginalText: root.showOriginal + baseFontSize: root.baseFontSize + } + + // (b) Subtitle: full-width bar pinned to the bottom of the screen. + TranslationBox { + id: subtitleBox + visible: root.showing && root.mode === "subtitle" + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.leftMargin: DesktopTokens.px(16) + anchors.rightMargin: DesktopTokens.px(16) + anchors.bottomMargin: DesktopTokens.px(16) + height: DesktopTokens.px(90) + translated: root.translatedText + original: root.originalText + showOriginalText: root.showOriginal + baseFontSize: root.baseFontSize + } + + // Timing pill, only while a translation is shown. Sits just above the + // active box, right-aligned, clamped inside the screen. + Rectangle { + id: statusPill + visible: root.showing + width: statusLabel.implicitWidth + DesktopTokens.px(20) + height: DesktopTokens.px(24) + radius: height / 2 + color: "black" + opacity: 0.7 + x: root.mode === "inplace" + ? Math.max(0, Math.min(root.boxX + root.boxW - width, root.width - width)) + : Math.max(0, root.width - width - DesktopTokens.px(16)) + y: root.mode === "inplace" + ? Math.max(0, root.boxY - height - DesktopTokens.px(6)) + : Math.max(0, root.height - DesktopTokens.px(90 + 16) - height - DesktopTokens.px(6)) + Text { + id: statusLabel + anchors.centerIn: parent + text: root.timingText + color: "white" + font.family: Theme.monoFont + font.pixelSize: DesktopTokens.px(11) + } + } +} diff --git a/opennow-qt/qml/state/ShellStore.qml b/opennow-qt/qml/state/ShellStore.qml index e9b3f06ac..d3e5df9f0 100644 --- a/opennow-qt/qml/state/ShellStore.qml +++ b/opennow-qt/qml/state/ShellStore.qml @@ -1020,10 +1020,19 @@ QtObject { } } + // VN fork guard (vn-translation): this build must never auto-check + // upstream releases. Upstream's updater is hardcoded to + // OpenCloudGaming/OpenNOW with an Ed25519 key this fork does not have, + // so an upstream offer could only confuse — and a VN build has no + // signed update channel of its own yet. Manual update checks still + // work (and are fail-closed without a pinned key), but the automatic + // 6-hour check is off in VN builds. See docs/vn-translation/UPDATER.md. + readonly property bool vnTranslationBuild: true + property Timer autoUpdateCheckTimer: Timer { interval: root.lastAutoUpdateCheckMs === 0 ? 15000 : 60000 repeat: true - running: root.ready && (root.settings.autoCheckForUpdates === true || root.settings.autoDownloadUpdates === true) + running: !root.vnTranslationBuild && root.ready && (root.settings.autoCheckForUpdates === true || root.settings.autoDownloadUpdates === true) onTriggered: root.runAutomaticUpdates() } @@ -1729,6 +1738,8 @@ QtObject { } function runAutomaticUpdates() { + if (root.vnTranslationBuild) + return // VN fork: no automatic upstream update checks (see above). if (!ready || !updaterSessionSafe || updaterBusy) return if (settings.autoDownloadUpdates === true && updaterState.canDownload === true) { diff --git a/opennow-qt/src/app/ApplicationStartup.cpp b/opennow-qt/src/app/ApplicationStartup.cpp index 7dea6781b..71bd1b930 100644 --- a/opennow-qt/src/app/ApplicationStartup.cpp +++ b/opennow-qt/src/app/ApplicationStartup.cpp @@ -19,6 +19,7 @@ #include "streaming/NativeStreamRuntime.h" #endif #include "app/SingleInstance.h" +#include "translation/TranslationEngine.h" #include "streaming/StreamVideoItem.h" #include "media/ThumbnailGenerator.h" @@ -190,6 +191,7 @@ static int runApplicationSession(int argc, char *argv[], QString &restartExecuta if (acquisition == SingleInstance::Acquisition::Failed) return EXIT_FAILURE; } AppController controller; + TranslationEngine translationEngine; // app lifetime; exposed to QML below QObject::connect(&controller, &AppController::restartRequested, &application, [&] { restartExecutable = QCoreApplication::applicationFilePath(); #ifdef Q_OS_LINUX @@ -249,6 +251,13 @@ static int runApplicationSession(int argc, char *argv[], QString &restartExecuta }); QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::screenshotReady, &controller, &AppController::saveStreamScreenshot); + // Second consumer of the same screenshot signal: feeds the translation + // pipeline (dialogue OCR). Queued so onStreamFrame always runs on the + // GUI thread even if the runtime emits from another thread. The + // saveStreamScreenshot connect above is unchanged. + QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::screenshotReady, + &translationEngine, &TranslationEngine::onStreamFrame, + Qt::QueuedConnection); QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::controllerRumbleRequested, &controllerInput, &ControllerInput::playRumble); QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::controllerRumbleStopped, @@ -353,6 +362,7 @@ static int runApplicationSession(int argc, char *argv[], QString &restartExecuta engine.setInitialProperties({{u"visible"_s, false}, {u"visibility"_s, QWindow::Hidden}}); AcceptanceSession acceptance(application, engine, controller, coreClient, arguments); engine.rootContext()->setContextProperty(u"AppController"_s, &controller); + engine.rootContext()->setContextProperty(u"translationEngine"_s, &translationEngine); engine.rootContext()->setContextProperty(u"ControllerInput"_s, &controllerInput); engine.rootContext()->setContextProperty(u"ThumbnailGenerator"_s, &thumbnailGenerator); engine.rootContext()->setContextProperty(u"I18n"_s, &localization); diff --git a/opennow-qt/src/translation/OcrEngine.cpp b/opennow-qt/src/translation/OcrEngine.cpp new file mode 100644 index 000000000..db550be64 --- /dev/null +++ b/opennow-qt/src/translation/OcrEngine.cpp @@ -0,0 +1,195 @@ +#include "translation/OcrEngine.h" +#include "translation/TranslationHttp.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { +constexpr auto GeminiModel = "gemini-2.5-flash-lite"; +constexpr auto GeminiOcrPrompt = + "Extract only the English dialogue or subtitle text visible in this image. " + "Reply with JSON only, no other text: {\"text\": \"...\", \"confidence\": 0.0}. " + "confidence is 0.0-1.0 for how sure you are the text is correct. " + "If no English dialogue text is visible, reply {\"text\": \"\", \"confidence\": 0}."; + +QString geminiUrl() +{ + return QStringLiteral("https://generativelanguage.googleapis.com/v1beta/models/") + + QString::fromLatin1(GeminiModel) + QStringLiteral(":generateContent"); +} + +// Parses the model's JSON reply out of the Gemini response envelope. +// Strips ```json fences if the model added them despite the prompt. +bool parseGeminiOcrText(const QByteArray &body, QString &text, double &confidence, QString &error) +{ + const QJsonDocument doc = QJsonDocument::fromJson(body); + if (!doc.isObject()) { + error = QStringLiteral("Invalid response from OCR service"); + return false; + } + const QJsonArray candidates = doc.object().value(QStringLiteral("candidates")).toArray(); + if (candidates.isEmpty()) { + error = QStringLiteral("OCR service returned no result"); + return false; + } + const QJsonArray parts = candidates.at(0).toObject() + .value(QStringLiteral("content")).toObject() + .value(QStringLiteral("parts")).toArray(); + if (parts.isEmpty()) { + error = QStringLiteral("OCR service returned no text"); + return false; + } + QString raw = parts.at(0).toObject().value(QStringLiteral("text")).toString().trimmed(); + if (raw.startsWith(QStringLiteral("```"))) { + const int firstNewline = raw.indexOf(QChar(u'\n')); + if (firstNewline >= 0) + raw = raw.mid(firstNewline + 1); + if (raw.endsWith(QStringLiteral("```"))) + raw.chop(3); + raw = raw.trimmed(); + } + const QJsonDocument inner = QJsonDocument::fromJson(raw.toUtf8()); + if (!inner.isObject()) { + error = QStringLiteral("OCR service returned unparsable text"); + return false; + } + text = inner.object().value(QStringLiteral("text")).toString().trimmed(); + confidence = inner.object().value(QStringLiteral("confidence")).toDouble(-1.0); + return true; +} +} // namespace + +GeminiVisionOcrEngine::GeminiVisionOcrEngine(const QString &apiKey) + : m_apiKey(apiKey) +{ +} + +void GeminiVisionOcrEngine::setApiKey(const QString &apiKey) +{ + m_apiKey = apiKey; +} + +OcrResult GeminiVisionOcrEngine::recognize(const QImage &image) +{ + if (m_apiKey.isEmpty()) + return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + QStringLiteral("Gemini API key not set")}; + if (image.isNull() || image.width() <= 0 || image.height() <= 0) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QStringLiteral("Empty image passed to OCR")}; + + QByteArray jpeg; + { + QBuffer buffer(&jpeg); + buffer.open(QIODevice::WriteOnly); + // JPEG quality 90: small payload, text stays legible. + if (!image.convertedTo(QImage::Format_RGB32).save(&buffer, "JPG", 90)) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QStringLiteral("Could not encode image for OCR")}; + } + + QJsonObject inlineData; + inlineData.insert(QStringLiteral("mimeType"), QStringLiteral("image/jpeg")); + inlineData.insert(QStringLiteral("data"), QString::fromLatin1(jpeg.toBase64())); + QJsonObject imagePart; + imagePart.insert(QStringLiteral("inlineData"), inlineData); + QJsonObject textPart; + textPart.insert(QStringLiteral("text"), QString::fromLatin1(GeminiOcrPrompt)); + QJsonObject content; + content.insert(QStringLiteral("parts"), QJsonArray{imagePart, textPart}); + QJsonObject requestBody; + requestBody.insert(QStringLiteral("contents"), QJsonArray{content}); + const QByteArray payload = QJsonDocument(requestBody).toJson(QJsonDocument::Compact); + + // Key travels in the x-goog-api-key header, never in the URL, and is + // never logged. + const TranslationHttpResult result = TranslationHttp::postJson( + geminiUrl(), payload, + {{QByteArrayLiteral("x-goog-api-key"), m_apiKey.toUtf8()}}); + if (!result.ok()) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, result.error}; + + QString text; + double confidence = -1.0; + QString error; + if (!parseGeminiOcrText(result.body, text, confidence, error)) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, error}; + return OcrResult{OcrResult::Status::Ok, text, confidence, {}}; +} + +bool TesseractOcrEngine::available() const +{ + return !QStandardPaths::findExecutable(QStringLiteral("tesseract")).isEmpty(); +} + +OcrResult TesseractOcrEngine::recognize(const QImage &image) +{ + if (!available()) + return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + QStringLiteral("tesseract binary not found")}; + if (image.isNull() || image.width() <= 0 || image.height() <= 0) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QStringLiteral("Empty image passed to OCR")}; + + QByteArray png; + { + QBuffer buffer(&png); + buffer.open(QIODevice::WriteOnly); + if (!image.save(&buffer, "PNG")) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QStringLiteral("Could not encode image for OCR")}; + } + QProcess process; + process.start(QStringLiteral("tesseract"), {QStringLiteral("stdin"), QStringLiteral("stdout"), + QStringLiteral("--psm"), QStringLiteral("6"), + QStringLiteral("-l"), QStringLiteral("eng")}); + if (!process.waitForStarted(3000)) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QStringLiteral("Could not start tesseract")}; + process.write(png); + process.closeWriteChannel(); + if (!process.waitForFinished(8000)) { + process.kill(); + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QStringLiteral("tesseract timed out")}; + } + if (process.exitCode() != 0) + return OcrResult{OcrResult::Status::Failed, {}, -1.0, + QString::fromUtf8(process.readAllStandardError()).trimmed()}; + // Tesseract reports no per-call confidence on stdout; -1 = unknown. + return OcrResult{OcrResult::Status::Ok, + QString::fromUtf8(process.readAllStandardOutput()).trimmed(), -1.0, {}}; +} + +OcrResult RapidOcrEngine::recognize(const QImage &) +{ + return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + QStringLiteral("RapidOCR is not available in this build: " + "ONNX Runtime is not vendored in v1")}; +} + +OcrResult WindowsOcrEngine::recognize(const QImage &) +{ + return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + QStringLiteral("Windows OCR is not available: WinRT OCR requires " + "package identity, which this Win32 build does not have")}; +} + +std::unique_ptr createOcrEngine(const QString &id, const QString &geminiApiKey) +{ + if (id == QStringLiteral("gemini-vision")) + return std::make_unique(geminiApiKey); + if (id == QStringLiteral("tesseract")) + return std::make_unique(); + if (id == QStringLiteral("rapidocr")) + return std::make_unique(); + if (id == QStringLiteral("windows-ocr")) + return std::make_unique(); + return nullptr; +} diff --git a/opennow-qt/src/translation/OcrEngine.h b/opennow-qt/src/translation/OcrEngine.h new file mode 100644 index 000000000..00540edc7 --- /dev/null +++ b/opennow-qt/src/translation/OcrEngine.h @@ -0,0 +1,90 @@ +// OcrEngine: English text extraction from a cropped dialogue image. +// +// All implementations run on the translation worker thread (never the GUI +// thread) and are synchronous with an internal timeout; the worker bounds +// how many can run at once. `confidence` is 0..1 when the engine reports +// one, -1 when it does not (e.g. Tesseract). +// +// Implementations: +// - GeminiVisionOcrEngine: REAL, Gemini 2.5 Flash-Lite vision, Qt Network. +// API key is passed in (never logged, never stored in code). +// - TesseractOcrEngine: REAL, optional `tesseract` binary via QProcess. +// Gracefully unavailable when the binary is missing. +// - RapidOcrEngine: STUB (NotAvailable). ONNX Runtime is not vendored in +// v1: bundling it would break upstream CI and add a large native +// dependency. The interface is ready; a later version can drop in a +// RapidOCR PP-OCRv4 ONNX implementation behind this same class. +// - WindowsOcrEngine: STUB (NotAvailable). WinRT Windows.Media.Ocr +// requires package identity (MSIX/AppContainer); OpenNOW ships as a +// classic Win32 executable, so the API cannot be activated. +#pragma once + +#include +#include + +class QImage; + +struct OcrResult +{ + enum class Status { Ok, NotAvailable, Failed }; + Status status = Status::Failed; + QString text; // English dialogue text, "" when none found + double confidence = -1.0; // 0..1, or -1 when the engine reports none + QString error; // human-readable, safe to show; never contains a key +}; + +class OcrEngine +{ +public: + virtual ~OcrEngine() = default; + virtual QString id() const = 0; + virtual QString displayName() const = 0; + // False means recognize() will return NotAvailable without trying. + virtual bool available() const = 0; + virtual OcrResult recognize(const QImage &image) = 0; +}; + +class GeminiVisionOcrEngine final : public OcrEngine +{ +public: + explicit GeminiVisionOcrEngine(const QString &apiKey = {}); + void setApiKey(const QString &apiKey); // key is held in memory only + QString id() const override { return QStringLiteral("gemini-vision"); } + QString displayName() const override { return QStringLiteral("Gemini Vision"); } + bool available() const override { return !m_apiKey.isEmpty(); } + OcrResult recognize(const QImage &image) override; + +private: + QString m_apiKey; // never logged, never written to disk by this class +}; + +class TesseractOcrEngine final : public OcrEngine +{ +public: + QString id() const override { return QStringLiteral("tesseract"); } + QString displayName() const override { return QStringLiteral("Tesseract"); } + bool available() const override; + OcrResult recognize(const QImage &image) override; +}; + +class RapidOcrEngine final : public OcrEngine +{ +public: + QString id() const override { return QStringLiteral("rapidocr"); } + QString displayName() const override { return QStringLiteral("RapidOCR (ONNX)"); } + bool available() const override { return false; } + OcrResult recognize(const QImage &) override; +}; + +class WindowsOcrEngine final : public OcrEngine +{ +public: + QString id() const override { return QStringLiteral("windows-ocr"); } + QString displayName() const override { return QStringLiteral("Windows OCR"); } + bool available() const override { return false; } + OcrResult recognize(const QImage &) override; +}; + +// Factory. `geminiApiKey` is forwarded only to GeminiVisionOcrEngine. +// Returns nullptr for an unknown id. +std::unique_ptr createOcrEngine(const QString &id, const QString &geminiApiKey = {}); diff --git a/opennow-qt/src/translation/TranslationCache.cpp b/opennow-qt/src/translation/TranslationCache.cpp new file mode 100644 index 000000000..af00add7d --- /dev/null +++ b/opennow-qt/src/translation/TranslationCache.cpp @@ -0,0 +1,141 @@ +#include "translation/TranslationCache.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { +QString defaultCachePath() +{ + const QString dir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + return dir + QStringLiteral("/translation-cache.json"); +} +} // namespace + +TranslationCache::TranslationCache(int maxEntries) + : m_filePath(defaultCachePath()) + , m_maxEntries(maxEntries > 0 ? maxEntries : DefaultMaxEntries) +{ +} + +TranslationCache::TranslationCache(const QString &filePath, int maxEntries) + : m_filePath(filePath) + , m_maxEntries(maxEntries > 0 ? maxEntries : DefaultMaxEntries) +{ +} + +QString TranslationCache::normalizeKey(const QString &text) +{ + // simplified(): trims and collapses all whitespace runs to single spaces. + return text.simplified().toLower(); +} + +bool TranslationCache::lookup(const QString &englishText, QString &translated) +{ + QElapsedTimer timer; + timer.start(); + const QString key = normalizeKey(englishText); + bool hit = false; + { + QMutexLocker locker(&m_mutex); + const auto it = m_entries.constFind(key); + hit = it != m_entries.constEnd(); + if (hit) + translated = it.value(); + m_lastLookupUs = timer.nsecsElapsed() / 1000; + } + return hit; +} + +void TranslationCache::insert(const QString &englishText, const QString &translatedText) +{ + const QString key = normalizeKey(englishText); + if (key.isEmpty() || translatedText.isEmpty()) + return; + QMutexLocker locker(&m_mutex); + if (!m_entries.contains(key)) + m_insertionOrder.append(key); + m_entries.insert(key, translatedText); + while (m_entries.size() > m_maxEntries && !m_insertionOrder.isEmpty()) { + const QString oldest = m_insertionOrder.takeFirst(); + m_entries.remove(oldest); + } +} + +void TranslationCache::clear() +{ + QMutexLocker locker(&m_mutex); + m_entries.clear(); + m_insertionOrder.clear(); +} + +int TranslationCache::size() const +{ + QMutexLocker locker(&m_mutex); + return m_entries.size(); +} + +qint64 TranslationCache::lastLookupUs() const +{ + QMutexLocker locker(&m_mutex); + return m_lastLookupUs; +} + +bool TranslationCache::load() +{ + QFile file(m_filePath); + if (!file.exists()) + return true; // No persisted cache yet; not an error. + if (!file.open(QIODevice::ReadOnly)) + return false; + const QByteArray data = file.readAll(); + file.close(); + const QJsonDocument doc = QJsonDocument::fromJson(data); + if (!doc.isObject()) + return false; + const QJsonObject entries = doc.object().value(QStringLiteral("entries")).toObject(); + QMutexLocker locker(&m_mutex); + m_entries.clear(); + m_insertionOrder.clear(); + for (auto it = entries.constBegin(); it != entries.constEnd(); ++it) { + const QString key = normalizeKey(it.key()); + if (key.isEmpty()) + continue; + if (!m_entries.contains(key)) + m_insertionOrder.append(key); + m_entries.insert(key, it.value().toString()); + } + while (m_entries.size() > m_maxEntries && !m_insertionOrder.isEmpty()) + m_entries.remove(m_insertionOrder.takeFirst()); + return true; +} + +bool TranslationCache::save() const +{ + QJsonObject entries; + { + QMutexLocker locker(&m_mutex); + for (auto it = m_entries.constBegin(); it != m_entries.constEnd(); ++it) + entries.insert(it.key(), it.value()); + } + QJsonObject root; + root.insert(QStringLiteral("version"), 1); + root.insert(QStringLiteral("entries"), entries); + const QJsonDocument doc(root); + + const QFileInfo info(m_filePath); + const QDir dir(info.absolutePath()); + if (!dir.mkpath(QStringLiteral("."))) + return false; + QFile file(m_filePath); + if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) + return false; + file.write(doc.toJson(QJsonDocument::Compact)); + return file.flush(); +} diff --git a/opennow-qt/src/translation/TranslationCache.h b/opennow-qt/src/translation/TranslationCache.h new file mode 100644 index 000000000..2dfec3e07 --- /dev/null +++ b/opennow-qt/src/translation/TranslationCache.h @@ -0,0 +1,48 @@ +// TranslationCache: normalized EN -> VI in-memory cache, persisted as JSON. +// +// Thread-safe (QMutex). Keys are normalized with normalizeKey() (trim, +// collapse internal whitespace, case-insensitive) so the same English line +// OCR'd with different casing/spacing still hits the cache. +#pragma once + +#include +#include +#include +#include + +class TranslationCache +{ +public: + static constexpr int DefaultMaxEntries = 5000; + + explicit TranslationCache(int maxEntries = DefaultMaxEntries); + explicit TranslationCache(const QString &filePath, int maxEntries = DefaultMaxEntries); + + // Normalizes a source string into a cache key: trimmed, internal + // whitespace collapsed to single spaces, lower-cased. + static QString normalizeKey(const QString &text); + + // Returns true on hit and fills `translated`. Records lookup timing in + // lastLookupUs(). + bool lookup(const QString &englishText, QString &translated); + void insert(const QString &englishText, const QString &translatedText); + void clear(); + + int size() const; + int maxEntries() const { return m_maxEntries; } + QString filePath() const { return m_filePath; } + qint64 lastLookupUs() const; + + // Loads persisted entries from filePath() (missing file = empty cache). + // Returns false only if the file exists but cannot be parsed. + bool load(); + bool save() const; + +private: + QString m_filePath; + int m_maxEntries; + mutable QMutex m_mutex; + QHash m_entries; + QList m_insertionOrder; // oldest first; drives max-size eviction + qint64 m_lastLookupUs = 0; +}; diff --git a/opennow-qt/src/translation/TranslationEngine.cpp b/opennow-qt/src/translation/TranslationEngine.cpp new file mode 100644 index 000000000..69d44ac97 --- /dev/null +++ b/opennow-qt/src/translation/TranslationEngine.cpp @@ -0,0 +1,434 @@ +#include "translation/TranslationEngine.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace { +constexpr int KeepPreviousMs = 2000; + +QRectF clampNormalized(const QRectF &rect) +{ + QRectF clamped(qBound(0.0, rect.x(), 1.0), qBound(0.0, rect.y(), 1.0), + qBound(0.0, rect.width(), 1.0), qBound(0.0, rect.height(), 1.0)); + if (clamped.right() > 1.0) + clamped.setWidth(1.0 - clamped.x()); + if (clamped.bottom() > 1.0) + clamped.setHeight(1.0 - clamped.y()); + return clamped; +} + +// Where the dialogue DB may live, in priority order. The shipped seed is +// src/translation/data/wuwa-dialogue-db.json; a deployed copy next to the +// executable or in AppData wins when present. +QString resolveDialogueDbPath() +{ + const QString appData = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + + QStringLiteral("/wuwa-dialogue-db.json"); + if (QFile::exists(appData)) + return appData; + const QString nextToExe = QCoreApplication::applicationDirPath() + + QStringLiteral("/wuwa-dialogue-db.json"); + if (QFile::exists(nextToExe)) + return nextToExe; + const QString inDataDir = QCoreApplication::applicationDirPath() + + QStringLiteral("/data/wuwa-dialogue-db.json"); + if (QFile::exists(inDataDir)) + return inDataDir; + // Bundled seed (Resources.cmake registers it under :/translation/). + // Lowest priority: a user DB next to the exe or in AppData wins. + if (QFile::exists(QStringLiteral(":/translation/wuwa-dialogue-db.json"))) + return QStringLiteral(":/translation/wuwa-dialogue-db.json"); + return appData; // default target: loadDialogueDb() tolerates a missing file +} +} // namespace + +TranslationEngine::TranslationEngine(QObject *parent) + : QObject(parent) + , m_worker(new TranslationWorker(nullptr)) // no parent: it moves to its own thread +{ + m_cache.load(); + m_dialogueDb.loadDialogueDb(resolveDialogueDbPath()); + + m_stabilityTimer.setSingleShot(true); + connect(&m_stabilityTimer, &QTimer::timeout, this, &TranslationEngine::onStabilityTimeout); + m_keepPreviousTimer.setSingleShot(true); + connect(&m_keepPreviousTimer, &QTimer::timeout, this, &TranslationEngine::onKeepPreviousExpired); + + connect(m_worker, &TranslationWorker::jobCompleted, + this, &TranslationEngine::onWorkerJobCompleted); + m_worker->start(); + // Gemini key, persisted locally only (QSettings, never in a file we + // commit, never logged). Restored here so hasGeminiApiKey() is true + // after a restart without re-entering the key. + { + const QSettings settings; + m_geminiApiKey = settings.value(QStringLiteral("translation/geminiApiKey")).toString(); + if (!m_geminiApiKey.isEmpty()) + QMetaObject::invokeMethod(m_worker, "setGeminiApiKey", Qt::QueuedConnection, + Q_ARG(QString, m_geminiApiKey)); + } + setStatus(QStringLiteral("Translation ready")); +} + +TranslationEngine::~TranslationEngine() +{ + m_worker->stop(); + delete m_worker; + m_cache.save(); +} + +QImage TranslationEngine::cropDialogueImage(const QImage &image, const QRectF &normalizedRect) +{ + if (image.isNull() || image.width() <= 0 || image.height() <= 0) + return QImage(); + const QRectF rect = clampNormalized(normalizedRect); + if (rect.width() <= 0.0 || rect.height() <= 0.0) + return QImage(); + const int x = static_cast(rect.x() * image.width()); + const int y = static_cast(rect.y() * image.height()); + const int w = static_cast(rect.width() * image.width()); + const int h = static_cast(rect.height() * image.height()); + const QRect pixelRect = QRect(x, y, w, h).intersected(image.rect()); + if (pixelRect.isEmpty()) + return QImage(); + return image.copy(pixelRect); // detached copy: safe to hand across threads +} + +QString TranslationEngine::cropHash(const QImage &image) +{ + if (image.isNull() || image.width() <= 0 || image.height() <= 0) + return QString(); + const QImage argb = image.convertedTo(QImage::Format_ARGB32); + const QByteArrayView pixels(reinterpret_cast(argb.constBits()), + static_cast(argb.sizeInBytes())); + return QString::fromLatin1( + QCryptographicHash::hash(pixels, QCryptographicHash::Sha256).toHex()); +} + +void TranslationEngine::setEnabled(bool enabled) +{ + if (m_enabled == enabled) + return; + m_enabled = enabled; + if (!m_enabled) { + m_stabilityTimer.stop(); + m_pendingHash.clear(); + m_pendingCrop = QImage(); + m_worker->cancelPending(); + } + setStatus(m_enabled ? QStringLiteral("Translation enabled") + : QStringLiteral("Translation disabled")); + emit enabledChanged(); +} + +void TranslationEngine::setSourceLanguage(const QString &language) +{ + if (language.isEmpty() || m_sourceLanguage == language) + return; + m_sourceLanguage = language; + emit sourceLanguageChanged(); +} + +void TranslationEngine::setTargetLanguage(const QString &language) +{ + if (language.isEmpty() || m_targetLanguage == language) + return; + m_targetLanguage = language; + emit targetLanguageChanged(); +} + +void TranslationEngine::setOcrEngine(const QString &engine) +{ + static const QStringList valid = {QStringLiteral("gemini-vision"), QStringLiteral("tesseract"), + QStringLiteral("rapidocr"), QStringLiteral("windows-ocr")}; + if (!valid.contains(engine) || m_ocrEngine == engine) + return; + m_ocrEngine = engine; + emit ocrEngineChanged(); +} + +void TranslationEngine::setTranslationProvider(const QString &provider) +{ + static const QStringList valid = {QStringLiteral("google"), QStringLiteral("gemini")}; + if (!valid.contains(provider) || m_translationProvider == provider) + return; + m_translationProvider = provider; + emit translationProviderChanged(); +} + +void TranslationEngine::setOverlayMode(const QString &mode) +{ + static const QStringList valid = {QStringLiteral("inplace"), QStringLiteral("subtitle"), + QStringLiteral("off")}; + if (!valid.contains(mode) || m_overlayMode == mode) + return; + m_overlayMode = mode; + emit overlayModeChanged(); +} + +void TranslationEngine::setStabilityDelayMs(int ms) +{ + ms = qBound(0, ms, 5000); + if (m_stabilityDelayMs == ms) + return; + m_stabilityDelayMs = ms; + emit stabilityDelayMsChanged(); +} + +void TranslationEngine::setFontSizePx(int px) +{ + px = qBound(10, px, 64); + if (m_fontSizePx == px) + return; + m_fontSizePx = px; + emit fontSizePxChanged(); +} + +void TranslationEngine::setShowOriginal(bool show) +{ + if (m_showOriginal == show) + return; + m_showOriginal = show; + emit showOriginalChanged(); +} + +void TranslationEngine::setCacheEnabled(bool enabled) +{ + if (m_cacheEnabled == enabled) + return; + m_cacheEnabled = enabled; + emit cacheEnabledChanged(); +} + +void TranslationEngine::setDialogueRect(const QRectF &rect) +{ + const QRectF clamped = clampNormalized(rect); + if (m_dialogueRect == clamped) + return; + m_dialogueRect = clamped; + emit dialogueRectChanged(); +} + +void TranslationEngine::setDialoguePreset(const QString &preset) +{ + if (preset == QStringLiteral("wuthering-waves")) { + setDialogueRect(QRectF(0.05, 0.72, 0.90, 0.24)); + } else if (preset == QStringLiteral("generic")) { + setDialogueRect(QRectF(0.05, 0.60, 0.90, 0.30)); + } else { + setError(QStringLiteral("Unknown dialogue preset")); + } +} + +void TranslationEngine::setGeminiApiKey(const QString &key) +{ + if (m_geminiApiKey == key) + return; + m_geminiApiKey = key; + // Persist locally only (QSettings: registry on Windows, ini elsewhere). + // Never written to the repo, never logged, never sent anywhere except + // to Google in the x-goog-api-key header. + QSettings settings; + if (key.isEmpty()) + settings.remove(QStringLiteral("translation/geminiApiKey")); + else + settings.setValue(QStringLiteral("translation/geminiApiKey"), key); + QMetaObject::invokeMethod(m_worker, "setGeminiApiKey", Qt::QueuedConnection, + Q_ARG(QString, key)); +} + +bool TranslationEngine::hasGeminiApiKey() const +{ + return !m_geminiApiKey.isEmpty(); +} + +void TranslationEngine::clearCache() +{ + m_cache.clear(); + m_cache.save(); + setStatus(QStringLiteral("Translation cache cleared")); +} + +void TranslationEngine::onStreamFrame(const QImage &image) +{ + if (!m_enabled) + return; + if (image.isNull() || image.width() <= 0 || image.height() <= 0) + return; + const QImage crop = cropDialogueImage(image, m_dialogueRect); + if (crop.isNull()) + return; + const QString hash = cropHash(crop); + if (hash.isEmpty()) + return; + if (hash == m_lastProcessedHash) + return; // already translated this exact crop + if (hash != m_pendingHash) { + // New content: (re)start the stability wait. + m_pendingHash = hash; + m_pendingCrop = crop; + m_pendingRect = m_dialogueRect; + m_stabilityTimer.start(m_stabilityDelayMs); + } + // Same hash as pending: the running timer already measures stability; + // do not restart it. +} + +void TranslationEngine::onStabilityTimeout() +{ + if (!m_enabled || m_pendingHash.isEmpty() || m_pendingCrop.isNull()) + return; + if (m_pendingHash == m_lastProcessedHash) + return; + m_lastProcessedHash = m_pendingHash; + const QImage crop = m_pendingCrop; + const QRectF rect = m_pendingRect; + m_pendingHash.clear(); + m_pendingCrop = QImage(); + + if (m_overlayMode == QStringLiteral("off")) + return; + + // Cache first, keyed by crop hash: an identical dialogue line seen + // before emits immediately with no OCR and no network at all. + // (The text-keyed cache/DB lookup happens for direct-text jobs in + // requestTestTranslation, and every worker result is inserted into + // both caches, so the two stay in sync.) + if (m_cacheEnabled) { + const auto hit = m_hashCache.constFind(m_lastProcessedHash); + if (hit != m_hashCache.constEnd()) { + emitTranslation(hit->first, hit->second, rect, 0, 0, true); + return; + } + } + + TranslationJob job; + job.crop = crop; + job.cropHash = m_lastProcessedHash; + job.sourceRect = rect; + job.ocrEngineId = m_ocrEngine; + job.providerId = m_translationProvider; + job.sourceLanguage = m_sourceLanguage; + job.targetLanguage = m_targetLanguage; + job.geminiApiKey = m_geminiApiKey; + setStatus(QStringLiteral("Reading dialogue…")); + QMetaObject::invokeMethod(m_worker, "submitJob", Qt::QueuedConnection, + Q_ARG(TranslationJob, job)); +} + +void TranslationEngine::requestTestTranslation(const QString &englishText) +{ + const QString text = englishText.trimmed(); + if (text.isEmpty()) { + setError(QStringLiteral("Nothing to translate")); + return; + } + if (m_cacheEnabled) { + QString cached; + if (m_dialogueDb.lookup(text, cached) || m_cache.lookup(text, cached)) { + m_lastCacheHit = true; + m_lastOcrMs = 0; + m_lastTranslateMs = 0; + emitTranslation(text, cached, m_dialogueRect, 0, 0, true); + return; + } + } + TranslationJob job; + job.directText = text; + job.sourceRect = m_dialogueRect; + job.providerId = m_translationProvider; + job.sourceLanguage = m_sourceLanguage; + job.targetLanguage = m_targetLanguage; + job.geminiApiKey = m_geminiApiKey; + setStatus(QStringLiteral("Translating…")); + QMetaObject::invokeMethod(m_worker, "submitJob", Qt::QueuedConnection, + Q_ARG(TranslationJob, job)); +} + +void TranslationEngine::onWorkerJobCompleted(const TranslationJobResult &result) +{ + if (!result.ok) { + setError(result.error.isEmpty() ? QStringLiteral("Translation failed") : result.error); + // Keep the previous translation visible for 2s, then clear it. + // Never emit garbage text. + if (m_hasTranslation) + m_keepPreviousTimer.start(KeepPreviousMs); + return; + } + if (result.original.isEmpty() && result.translated.isEmpty()) { + // OCR found no dialogue text in the crop: nothing to show, and + // not an error. Leave the current translation alone. + return; + } + m_keepPreviousTimer.stop(); + if (m_cacheEnabled && !result.translated.isEmpty()) { + m_cache.insert(result.original, result.translated); + // Remember by crop hash too, so the exact same pixels next time + // hit the cache before any OCR/network (see onStabilityTimeout). + if (!result.cropHash.isEmpty()) { + if (!m_hashCache.contains(result.cropHash)) + m_hashOrder.append(result.cropHash); + m_hashCache.insert(result.cropHash, {result.original, result.translated}); + while (m_hashCache.size() > MaxHashCacheEntries && !m_hashOrder.isEmpty()) + m_hashCache.remove(m_hashOrder.takeFirst()); + } + } + m_lastCacheHit = false; + emitTranslation(result.original, result.translated, result.sourceRect, + result.ocrMs, result.translateMs, false); +} + +void TranslationEngine::onKeepPreviousExpired() +{ + clearTranslation(); +} + +void TranslationEngine::emitTranslation(const QString &original, const QString &translated, + const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, + bool cacheHit) +{ + m_lastOriginalText = original; + m_lastTranslatedText = translated; + m_lastOcrMs = ocrMs; + m_lastTranslateMs = translateMs; + m_lastCacheHit = cacheHit; + m_lastError.clear(); + if (!m_hasTranslation) { + m_hasTranslation = true; + emit hasTranslationChanged(); + } + setStatus(QStringLiteral("Translation ready")); + emit translationTextChanged(); + emit translationReady(original, translated, sourceRect); +} + +void TranslationEngine::clearTranslation() +{ + if (!m_hasTranslation && m_lastTranslatedText.isEmpty()) + return; + m_lastTranslatedText.clear(); + m_lastOriginalText.clear(); + m_hasTranslation = false; + emit hasTranslationChanged(); + emit translationTextChanged(); + emit translationCleared(); +} + +void TranslationEngine::setStatus(const QString &status) +{ + if (m_statusText == status) + return; + m_statusText = status; + emit statusChanged(); +} + +void TranslationEngine::setError(const QString &error) +{ + m_lastError = error; + setStatus(error); +} diff --git a/opennow-qt/src/translation/TranslationEngine.h b/opennow-qt/src/translation/TranslationEngine.h new file mode 100644 index 000000000..23fe3ef06 --- /dev/null +++ b/opennow-qt/src/translation/TranslationEngine.h @@ -0,0 +1,179 @@ +// TranslationEngine: the QML-facing translation controller. +// +// Exposed to QML as the context property "translationEngine". QML reads the +// properties below and calls onStreamFrame() indirectly: ApplicationStartup +// connects NativeStreamRuntime::screenshotReady to onStreamFrame() (in +// addition to the existing saveStreamScreenshot connect, which is untouched). +// +// Pipeline (onStreamFrame, GUI thread only): +// 1. Ignore when disabled or the image is null/empty. +// 2. Crop dialogueRect (normalized 0..1) and SHA-256-hash the crop. +// 3. Only proceed once the hash is unchanged for stabilityDelayMs +// (QTimer restarts on every hash change). +// 4. Cache lookup first: WuWa dialogue DB, then the memory cache. +// A hit emits translationReady immediately (lastCacheHit=true) with +// no network at all. +// 5. Otherwise a job goes to TranslationWorker (own thread): OCR with +// the selected engine, then translate with the selected provider, +// then insert into the cache and emit translationReady. +// All network/OCR work happens in the worker thread; the GUI thread never +// blocks. On failure lastError is set, the previous translation is kept +// for 2s, and no garbage text is ever emitted. +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "translation/TranslationCache.h" +#include "translation/TranslationWorker.h" +#include "translation/WuWaDialogueDb.h" + +class TranslationEngine : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(QString sourceLanguage READ sourceLanguage WRITE setSourceLanguage NOTIFY sourceLanguageChanged) + Q_PROPERTY(QString targetLanguage READ targetLanguage WRITE setTargetLanguage NOTIFY targetLanguageChanged) + Q_PROPERTY(QString ocrEngine READ ocrEngine WRITE setOcrEngine NOTIFY ocrEngineChanged) + Q_PROPERTY(QString translationProvider READ translationProvider WRITE setTranslationProvider NOTIFY translationProviderChanged) + Q_PROPERTY(QString overlayMode READ overlayMode WRITE setOverlayMode NOTIFY overlayModeChanged) + Q_PROPERTY(int stabilityDelayMs READ stabilityDelayMs WRITE setStabilityDelayMs NOTIFY stabilityDelayMsChanged) + Q_PROPERTY(int fontSizePx READ fontSizePx WRITE setFontSizePx NOTIFY fontSizePxChanged) + Q_PROPERTY(bool showOriginal READ showOriginal WRITE setShowOriginal NOTIFY showOriginalChanged) + Q_PROPERTY(bool cacheEnabled READ cacheEnabled WRITE setCacheEnabled NOTIFY cacheEnabledChanged) + Q_PROPERTY(QString statusText READ statusText NOTIFY statusChanged) + Q_PROPERTY(QString lastTranslatedText READ lastTranslatedText NOTIFY translationTextChanged) + Q_PROPERTY(QString lastOriginalText READ lastOriginalText NOTIFY translationTextChanged) + Q_PROPERTY(QRectF dialogueRect READ dialogueRect WRITE setDialogueRect NOTIFY dialogueRectChanged) + Q_PROPERTY(qint64 lastOcrMs READ lastOcrMs NOTIFY translationTextChanged) + Q_PROPERTY(qint64 lastTranslateMs READ lastTranslateMs NOTIFY translationTextChanged) + Q_PROPERTY(bool lastCacheHit READ lastCacheHit NOTIFY translationTextChanged) + Q_PROPERTY(QString lastError READ lastError NOTIFY statusChanged) + Q_PROPERTY(bool hasTranslation READ hasTranslation NOTIFY hasTranslationChanged) + +public: + explicit TranslationEngine(QObject *parent = nullptr); + ~TranslationEngine() override; + + // Pure, unit-testable helpers (no instance state). + // Crops the normalized rect (clamped to the image) or returns a null + // image when the rect is empty/out of bounds. + static QImage cropDialogueImage(const QImage &image, const QRectF &normalizedRect); + // SHA-256 hex of the crop's ARGB32 pixels; "" for a null/empty image. + static QString cropHash(const QImage &image); + + bool enabled() const { return m_enabled; } + void setEnabled(bool enabled); + QString sourceLanguage() const { return m_sourceLanguage; } + void setSourceLanguage(const QString &language); + QString targetLanguage() const { return m_targetLanguage; } + void setTargetLanguage(const QString &language); + QString ocrEngine() const { return m_ocrEngine; } + void setOcrEngine(const QString &engine); + QString translationProvider() const { return m_translationProvider; } + void setTranslationProvider(const QString &provider); + QString overlayMode() const { return m_overlayMode; } + void setOverlayMode(const QString &mode); + int stabilityDelayMs() const { return m_stabilityDelayMs; } + void setStabilityDelayMs(int ms); + int fontSizePx() const { return m_fontSizePx; } + void setFontSizePx(int px); + bool showOriginal() const { return m_showOriginal; } + void setShowOriginal(bool show); + bool cacheEnabled() const { return m_cacheEnabled; } + void setCacheEnabled(bool enabled); + QString statusText() const { return m_statusText; } + QString lastTranslatedText() const { return m_lastTranslatedText; } + QString lastOriginalText() const { return m_lastOriginalText; } + QRectF dialogueRect() const { return m_dialogueRect; } + void setDialogueRect(const QRectF &rect); + qint64 lastOcrMs() const { return m_lastOcrMs; } + qint64 lastTranslateMs() const { return m_lastTranslateMs; } + bool lastCacheHit() const { return m_lastCacheHit; } + QString lastError() const { return m_lastError; } + bool hasTranslation() const { return m_hasTranslation; } + + Q_INVOKABLE void onStreamFrame(const QImage &image); + Q_INVOKABLE void requestTestTranslation(const QString &englishText); + Q_INVOKABLE void clearCache(); + Q_INVOKABLE void setGeminiApiKey(const QString &key); + Q_INVOKABLE bool hasGeminiApiKey() const; + // "wuthering-waves" (dialogue bottom bar) or "generic" (lower third). + Q_INVOKABLE void setDialoguePreset(const QString &preset); + +signals: + void translationReady(const QString &original, const QString &translated, const QRectF &sourceRect); + void translationCleared(); + void translationTextChanged(); // parameterless NOTIFY for last* properties + void statusChanged(); + void enabledChanged(); + void sourceLanguageChanged(); + void targetLanguageChanged(); + void ocrEngineChanged(); + void translationProviderChanged(); + void overlayModeChanged(); + void stabilityDelayMsChanged(); + void fontSizePxChanged(); + void showOriginalChanged(); + void cacheEnabledChanged(); + void dialogueRectChanged(); + void hasTranslationChanged(); + +private slots: + void onStabilityTimeout(); + void onWorkerJobCompleted(const TranslationJobResult &result); + void onKeepPreviousExpired(); + +private: + void setStatus(const QString &status); + void setError(const QString &error); + void emitTranslation(const QString &original, const QString &translated, + const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, + bool cacheHit); + void clearTranslation(); + + bool m_enabled = false; // OFF by default: translation is opt-in + QString m_sourceLanguage = QStringLiteral("en"); + QString m_targetLanguage = QStringLiteral("vi"); + QString m_ocrEngine = QStringLiteral("gemini-vision"); + QString m_translationProvider = QStringLiteral("google"); + QString m_overlayMode = QStringLiteral("inplace"); + int m_stabilityDelayMs = 400; + int m_fontSizePx = 22; + bool m_showOriginal = false; + bool m_cacheEnabled = true; + QString m_statusText; + QString m_lastTranslatedText; + QString m_lastOriginalText; + QRectF m_dialogueRect = QRectF(0.05, 0.72, 0.90, 0.24); + qint64 m_lastOcrMs = 0; + qint64 m_lastTranslateMs = 0; + bool m_lastCacheHit = false; + QString m_lastError; + bool m_hasTranslation = false; + QString m_geminiApiKey; // persisted locally via QSettings only; never logged, never committed + + TranslationCache m_cache; + WuWaDialogueDb m_dialogueDb; + TranslationWorker *m_worker = nullptr; // no parent: lives in its own thread + + QTimer m_stabilityTimer; + QTimer m_keepPreviousTimer; + QString m_pendingHash; + QImage m_pendingCrop; // detached copy of the stable crop + QRectF m_pendingRect; + QString m_lastProcessedHash; // hash of the crop last sent to cache/worker + // Crop-hash -> (original, translated). Lets a repeated identical + // dialogue line hit the cache BEFORE any OCR/network, which the + // text-keyed cache cannot do (it needs the English text first). + // In-memory only; the text-keyed TranslationCache is the persisted one. + static constexpr int MaxHashCacheEntries = 500; + QHash> m_hashCache; + QList m_hashOrder; // oldest first; drives hash-cache eviction +}; diff --git a/opennow-qt/src/translation/TranslationHttp.cpp b/opennow-qt/src/translation/TranslationHttp.cpp new file mode 100644 index 000000000..0bf308fb9 --- /dev/null +++ b/opennow-qt/src/translation/TranslationHttp.cpp @@ -0,0 +1,83 @@ +#include "translation/TranslationHttp.h" + +#include +#include +#include +#include +#include +#include + +namespace { +// Waits synchronously for `reply` (worker thread only). Returns false on +// timeout; the caller then aborts the reply. +bool waitForReply(QNetworkReply *reply, int timeoutMs) +{ + QEventLoop loop; + QTimer timer; + timer.setSingleShot(true); + QObject::connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit); + QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); + timer.start(timeoutMs); + loop.exec(); + return reply->isFinished(); +} + +int retryAfterMs(QNetworkReply *reply) +{ + bool ok = false; + const int seconds = reply->rawHeader(QByteArrayLiteral("Retry-After")).toInt(&ok); + if (!ok || seconds <= 0) + return 1000; + return qMin(seconds * 1000, TranslationHttp::MaxRetryAfterMs); +} + +void sleepMs(int ms) +{ + QEventLoop loop; + QTimer::singleShot(ms, &loop, &QEventLoop::quit); + loop.exec(); +} +} // namespace + +TranslationHttpResult TranslationHttp::request( + const QString &method, const QString &url, + const QList> &headers, + const QByteArray &body) +{ + // QNetworkAccessManager is created here, on the calling (worker) thread, + // used only on this thread, and destroyed before returning. Never create + // or use it on the GUI thread from the worker. + for (int attempt = 0; attempt < 2; ++attempt) { + QNetworkAccessManager manager; + QNetworkRequest request(QUrl(url)); + for (const auto &header : headers) + request.setRawHeader(header.first, header.second); + QNetworkReply *reply = nullptr; + if (method == QStringLiteral("POST")) + reply = manager.post(request, body); + else + reply = manager.get(request); + + if (!waitForReply(reply, NetworkTimeoutMs)) { + reply->abort(); + reply->deleteLater(); + return TranslationHttpResult{0, {}, QStringLiteral("Network timeout")}; + } + TranslationHttpResult result; + result.statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + result.body = reply->readAll(); + if (reply->error() != QNetworkReply::NoError && result.statusCode == 0) + result.error = reply->errorString(); + const int waitMs = retryAfterMs(reply); + const bool rateLimited = result.statusCode == 429; + reply->deleteLater(); + if (rateLimited && attempt == 0) { + sleepMs(waitMs); // single retry; capped at MaxRetryAfterMs + continue; + } + if (!result.ok() && result.error.isEmpty()) + result.error = QStringLiteral("HTTP %1").arg(result.statusCode); + return result; + } + return TranslationHttpResult{429, {}, QStringLiteral("Rate limited")}; +} diff --git a/opennow-qt/src/translation/TranslationHttp.h b/opennow-qt/src/translation/TranslationHttp.h new file mode 100644 index 000000000..1067cf9ec --- /dev/null +++ b/opennow-qt/src/translation/TranslationHttp.h @@ -0,0 +1,49 @@ +// TranslationHttp: one synchronous HTTP helper shared by the OCR engines +// and translation providers. +// +// All calls run on the translation worker thread only (never the GUI +// thread). A request waits at most NetworkTimeoutMs for a reply; on HTTP +// 429 it retries exactly ONCE after the server's Retry-After delay +// (default 1s, clamped to NetworkTimeoutMs). No API key ever appears in a +// URL: keys travel in the x-goog-api-key header and are never logged. +#pragma once + +#include +#include +#include +#include + +struct TranslationHttpResult +{ + int statusCode = 0; // 0 = transport failure / timeout (see error) + QByteArray body; + QString error; // non-empty on failure; safe to show (never contains a key) + bool ok() const { return statusCode >= 200 && statusCode < 300; } +}; + +class TranslationHttp +{ +public: + static constexpr int NetworkTimeoutMs = 8000; + static constexpr int MaxRetryAfterMs = 10000; + + // Synchronous request on the calling thread. `headers` are raw + // name/value pairs (e.g. {"Content-Type", "application/json"}). + // `body` is sent as-is for POST; ignored for GET. + static TranslationHttpResult request( + const QString &method, const QString &url, + const QList> &headers, + const QByteArray &body = {}); + + static TranslationHttpResult get(const QString &url) + { + return request(QStringLiteral("GET"), url, {}); + } + static TranslationHttpResult postJson(const QString &url, const QByteArray &jsonBody, + const QList> &headers = {}) + { + QList> all = headers; + all.append({QByteArrayLiteral("Content-Type"), QByteArrayLiteral("application/json")}); + return request(QStringLiteral("POST"), url, all, jsonBody); + } +}; diff --git a/opennow-qt/src/translation/TranslationProvider.cpp b/opennow-qt/src/translation/TranslationProvider.cpp new file mode 100644 index 000000000..2074e4589 --- /dev/null +++ b/opennow-qt/src/translation/TranslationProvider.cpp @@ -0,0 +1,142 @@ +#include "translation/TranslationProvider.h" +#include "translation/TranslationHttp.h" + +#include +#include +#include +#include +#include + +namespace { +constexpr auto GeminiModel = "gemini-2.5-flash-lite"; + +// Fixed prompt for WuWa story translation. Proper names stay in English, +// Rover keeps the player's chosen pronouns (the model is told not to +// re-gender Rover), and the Vietnamese must read naturally, not word-for-word. +QString geminiTranslatePrompt(const QString &text) +{ + return QStringLiteral( + "Translate the following English game dialogue from Wuthering Waves into natural, " + "fluent Vietnamese. Keep character and place names in English (e.g. Rover, Jinzhou, " + "Sentinel). Do not change Rover's pronouns or gender the character. Do not add " + "explanations, quotes, or any text besides the translation.\n\n") + + text; +} + +bool parseGeminiTranslateText(const QByteArray &body, QString &text, QString &error) +{ + const QJsonDocument doc = QJsonDocument::fromJson(body); + if (!doc.isObject()) { + error = QStringLiteral("Invalid response from translation service"); + return false; + } + const QJsonArray candidates = doc.object().value(QStringLiteral("candidates")).toArray(); + if (candidates.isEmpty()) { + error = QStringLiteral("Translation service returned no result"); + return false; + } + const QJsonArray parts = candidates.at(0).toObject() + .value(QStringLiteral("content")).toObject() + .value(QStringLiteral("parts")).toArray(); + if (parts.isEmpty()) { + error = QStringLiteral("Translation service returned no text"); + return false; + } + text = parts.at(0).toObject().value(QStringLiteral("text")).toString().trimmed(); + if (text.isEmpty()) { + error = QStringLiteral("Translation service returned empty text"); + return false; + } + return true; +} +} // namespace + +TranslateResult GoogleTranslateProvider::translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) +{ + if (englishText.trimmed().isEmpty()) + return TranslateResult{false, {}, QStringLiteral("Nothing to translate")}; + QUrl url(QStringLiteral("https://translate.googleapis.com/translate_a/single")); + QUrlQuery query; + query.addQueryItem(QStringLiteral("client"), QStringLiteral("gtx")); + query.addQueryItem(QStringLiteral("sl"), sourceLanguage); + query.addQueryItem(QStringLiteral("tl"), targetLanguage); + query.addQueryItem(QStringLiteral("dt"), QStringLiteral("t")); + query.addQueryItem(QStringLiteral("q"), englishText); + url.setQuery(query); + + const TranslationHttpResult result = TranslationHttp::get(url.toString(QUrl::FullyEncoded)); + if (!result.ok()) + return TranslateResult{false, {}, result.error}; + + // Response: [[["translated", "original", ...], ...], ...]. Join the + // translated segments of the first array. + const QJsonDocument doc = QJsonDocument::fromJson(result.body); + if (!doc.isArray() || doc.array().isEmpty() || !doc.array().at(0).isArray()) + return TranslateResult{false, {}, QStringLiteral("Invalid response from translation service")}; + QString translated; + for (const QJsonValue &segment : doc.array().at(0).toArray()) { + if (segment.isArray() && !segment.toArray().isEmpty()) + translated += segment.toArray().at(0).toString(); + } + translated = translated.trimmed(); + if (translated.isEmpty()) + return TranslateResult{false, {}, QStringLiteral("Translation service returned empty text")}; + return TranslateResult{true, translated, {}}; +} + +GeminiTranslateProvider::GeminiTranslateProvider(const QString &apiKey) + : m_apiKey(apiKey) +{ +} + +void GeminiTranslateProvider::setApiKey(const QString &apiKey) +{ + m_apiKey = apiKey; +} + +TranslateResult GeminiTranslateProvider::translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) +{ + Q_UNUSED(sourceLanguage) + Q_UNUSED(targetLanguage) + if (m_apiKey.isEmpty()) + return TranslateResult{false, {}, QStringLiteral("Gemini API key not set")}; + if (englishText.trimmed().isEmpty()) + return TranslateResult{false, {}, QStringLiteral("Nothing to translate")}; + + QJsonObject textPart; + textPart.insert(QStringLiteral("text"), geminiTranslatePrompt(englishText)); + QJsonObject content; + content.insert(QStringLiteral("parts"), QJsonArray{textPart}); + QJsonObject requestBody; + requestBody.insert(QStringLiteral("contents"), QJsonArray{content}); + const QByteArray payload = QJsonDocument(requestBody).toJson(QJsonDocument::Compact); + + const QString url = QStringLiteral("https://generativelanguage.googleapis.com/v1beta/models/") + + QString::fromLatin1(GeminiModel) + QStringLiteral(":generateContent"); + // Key travels in the x-goog-api-key header, never in the URL, and is + // never logged. + const TranslationHttpResult result = TranslationHttp::postJson( + url, payload, {{QByteArrayLiteral("x-goog-api-key"), m_apiKey.toUtf8()}}); + if (!result.ok()) + return TranslateResult{false, {}, result.error}; + + QString text; + QString error; + if (!parseGeminiTranslateText(result.body, text, error)) + return TranslateResult{false, {}, error}; + return TranslateResult{true, text, {}}; +} + +std::unique_ptr createTranslationProvider(const QString &id, + const QString &geminiApiKey) +{ + if (id == QStringLiteral("google")) + return std::make_unique(); + if (id == QStringLiteral("gemini")) + return std::make_unique(geminiApiKey); + return nullptr; +} diff --git a/opennow-qt/src/translation/TranslationProvider.h b/opennow-qt/src/translation/TranslationProvider.h new file mode 100644 index 000000000..38fb67293 --- /dev/null +++ b/opennow-qt/src/translation/TranslationProvider.h @@ -0,0 +1,63 @@ +// TranslationProvider: English -> Vietnamese translation. +// +// Both implementations run on the translation worker thread (never the GUI +// thread) and are synchronous with an internal timeout (see +// TranslationHttp::NetworkTimeoutMs, 8s, single 429 retry). +// +// - GoogleTranslateProvider: REAL, free unauthenticated endpoint +// (translate.googleapis.com/translate_a/single?client=gtx). No key. +// - GeminiTranslateProvider: REAL, Gemini 2.5 Flash-Lite with a fixed +// Wuthering Waves prompt (keeps proper names, Rover pronouns, natural +// Vietnamese). Key is passed in, never logged, never stored in code. +#pragma once + +#include +#include + +struct TranslateResult +{ + bool ok = false; + QString text; // Vietnamese translation on success + QString error; // human-readable, safe to show; never contains a key +}; + +class TranslationProvider +{ +public: + virtual ~TranslationProvider() = default; + virtual QString id() const = 0; + virtual QString displayName() const = 0; + virtual TranslateResult translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) = 0; +}; + +class GoogleTranslateProvider final : public TranslationProvider +{ +public: + QString id() const override { return QStringLiteral("google"); } + QString displayName() const override { return QStringLiteral("Google Translate"); } + TranslateResult translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) override; +}; + +class GeminiTranslateProvider final : public TranslationProvider +{ +public: + explicit GeminiTranslateProvider(const QString &apiKey = {}); + void setApiKey(const QString &apiKey); // key is held in memory only + QString id() const override { return QStringLiteral("gemini"); } + QString displayName() const override { return QStringLiteral("Gemini"); } + TranslateResult translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) override; + +private: + QString m_apiKey; // never logged, never written to disk by this class +}; + +// Factory. `geminiApiKey` is forwarded only to GeminiTranslateProvider. +// Returns nullptr for an unknown id. +std::unique_ptr createTranslationProvider(const QString &id, + const QString &geminiApiKey = {}); diff --git a/opennow-qt/src/translation/TranslationWorker.cpp b/opennow-qt/src/translation/TranslationWorker.cpp new file mode 100644 index 000000000..89b04f1ee --- /dev/null +++ b/opennow-qt/src/translation/TranslationWorker.cpp @@ -0,0 +1,249 @@ +#include "translation/TranslationWorker.h" +#include "translation/OcrEngine.h" +#include "translation/TranslationProvider.h" + +#include +#include +#include + +// --------------------------------------------------------------------------- +// TranslationJobQueue +// --------------------------------------------------------------------------- + +bool TranslationJobQueue::submit(const TranslationJob &job) +{ + QMutexLocker locker(&m_mutex); + if (!m_running.has_value()) { + m_running = job; + return true; + } + if (m_waiting.has_value()) + ++m_droppedStale; + m_waiting = job; + return true; +} + +std::optional TranslationJobQueue::takeRunning() +{ + QMutexLocker locker(&m_mutex); + if (m_running.has_value()) + return m_running; // already running; caller is processing it + if (!m_waiting.has_value()) + return std::nullopt; + m_running = std::move(m_waiting); + m_waiting.reset(); + return m_running; +} + +void TranslationJobQueue::finishRunning() +{ + QMutexLocker locker(&m_mutex); + m_running.reset(); +} + +bool TranslationJobQueue::hasRunning() const +{ + QMutexLocker locker(&m_mutex); + return m_running.has_value(); +} + +bool TranslationJobQueue::hasWaiting() const +{ + QMutexLocker locker(&m_mutex); + return m_waiting.has_value(); +} + +void TranslationJobQueue::clear() +{ + QMutexLocker locker(&m_mutex); + m_running.reset(); + m_waiting.reset(); +} + +void TranslationJobQueue::clearWaiting() +{ + QMutexLocker locker(&m_mutex); + m_waiting.reset(); +} + +// --------------------------------------------------------------------------- +// TranslationWorker +// --------------------------------------------------------------------------- + +TranslationWorker::TranslationWorker(QObject *parent) + : QObject(parent) +{ + qRegisterMetaType(); + qRegisterMetaType(); +} + +TranslationWorker::~TranslationWorker() +{ + stop(); +} + +void TranslationWorker::start() +{ + if (m_thread.isRunning()) + return; + moveToThread(&m_thread); + m_thread.start(); +} + +void TranslationWorker::stop() +{ + if (!m_thread.isRunning()) + return; + // Cancel anything queued, then quit the event loop and wait. A job + // already running finishes its current synchronous call first (bounded + // by the 8s network timeout), then the thread exits. After the thread + // has finished, move back to the calling thread so deletion is safe. + QMetaObject::invokeMethod(this, "cancelPending", Qt::QueuedConnection); + m_thread.quit(); + m_thread.wait(); + moveToThread(QThread::currentThread()); +} + +int TranslationWorker::droppedStaleJobs() const +{ + return m_queue.droppedStale(); +} + +void TranslationWorker::submitJob(const TranslationJob &job) +{ + // Runs in the worker thread (queued invocation from the GUI thread). + TranslationJob effective = job; + if (effective.geminiApiKey.isEmpty()) + effective.geminiApiKey = m_geminiApiKey; + m_queue.submit(effective); + if (!m_processing) + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); +} + +void TranslationWorker::setGeminiApiKey(const QString &key) +{ + // Runs in the worker thread; the key is never logged. + m_geminiApiKey = key; +} + +void TranslationWorker::cancelPending() +{ + // Runs in the worker thread. Drops the waiting job only; a running job + // is left to finish (it is bounded by the network/OCR timeouts). + m_queue.clearWaiting(); +} + +void TranslationWorker::processNext() +{ + // Runs in the worker thread. m_processing guards re-entrancy; the + // queue itself decides running vs waiting. + if (m_processing) + return; + std::optional job = m_queue.takeRunning(); + if (!job.has_value()) + return; + m_processing = true; + + TranslationJobResult result; + result.sourceRect = job->sourceRect; + result.cropHash = job->cropHash; + + QString original; + qint64 ocrMs = 0; + if (!job->directText.isEmpty()) { + original = job->directText; + } else { + QElapsedTimer ocrTimer; + ocrTimer.start(); + // Fallback chain: try the selected engine first; if it is + // unavailable (no Gemini key, no tesseract binary, stub engine), + // try the next engine that reports available(). This is what makes + // the default (gemini-vision, no key yet) actually work on a fresh + // install when Tesseract is present, instead of failing outright. + // A Failed (network/process) result is NOT retried on another + // engine — it is a real error, not a missing engine. + const QStringList candidates = {job->ocrEngineId, QStringLiteral("tesseract"), + QStringLiteral("gemini-vision")}; + QStringList tried; + OcrResult ocr; + bool haveOcrResult = false; + for (const QString &candidateId : candidates) { + if (tried.contains(candidateId)) + continue; + tried.append(candidateId); + auto engine = createOcrEngine(candidateId, job->geminiApiKey); + if (!engine) + continue; + if (!engine->available()) + continue; + ocr = engine->recognize(job->crop); + haveOcrResult = true; + break; + } + ocrMs = ocrTimer.elapsed(); + if (!haveOcrResult) { + result.error = QStringLiteral("No OCR engine available (tried: %1). " + "Set a Gemini key or install Tesseract.") + .arg(tried.join(QStringLiteral(", "))); + result.ocrMs = ocrMs; + m_queue.finishRunning(); + m_processing = false; + emit jobCompleted(result); + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); + return; + } + if (ocr.status != OcrResult::Status::Ok) { + result.error = ocr.error.isEmpty() ? QStringLiteral("OCR failed") : ocr.error; + result.ocrMs = ocrMs; + m_queue.finishRunning(); + m_processing = false; + emit jobCompleted(result); + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); + return; + } + original = ocr.text.trimmed(); + if (original.isEmpty()) { + // No dialogue text in this crop: not an error, just nothing to + // translate. Report success with empty text so the engine can + // keep the previous translation instead of showing an error. + result.ok = true; + result.original = {}; + result.translated = {}; + result.ocrMs = ocrMs; + m_queue.finishRunning(); + m_processing = false; + emit jobCompleted(result); + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); + return; + } + } + result.original = original; + + QElapsedTimer translateTimer; + translateTimer.start(); + auto provider = createTranslationProvider(job->providerId, job->geminiApiKey); + if (!provider) { + result.error = QStringLiteral("Unknown translation provider"); + result.ocrMs = ocrMs; + m_queue.finishRunning(); + m_processing = false; + emit jobCompleted(result); + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); + return; + } + const TranslateResult translated = + provider->translate(original, job->sourceLanguage, job->targetLanguage); + result.translateMs = translateTimer.elapsed(); + result.ocrMs = ocrMs; + if (!translated.ok) { + result.error = translated.error; + } else { + result.ok = true; + result.translated = translated.text; + } + + m_queue.finishRunning(); + m_processing = false; + emit jobCompleted(result); + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); +} diff --git a/opennow-qt/src/translation/TranslationWorker.h b/opennow-qt/src/translation/TranslationWorker.h new file mode 100644 index 000000000..081515976 --- /dev/null +++ b/opennow-qt/src/translation/TranslationWorker.h @@ -0,0 +1,105 @@ +// TranslationWorker: OCR + translation off the GUI thread. +// +// The engine submits jobs from the GUI thread; the worker owns a QThread +// and does all network/OCR work there. Results come back via queued +// signals only. The worker never touches QML or any GUI object, and the +// QImage in a job is a detached copy owned by the job. +// +// Bounded queue (TranslationJobQueue, unit-testable without threads or +// network): at most 1 job running + 1 job waiting. A new submit while a +// job is waiting REPLACES the waiting job (the stale one is dropped and +// counted) — dialogue moves on, so an old crop must never be translated +// after a newer one. +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +struct TranslationJob +{ + QImage crop; // detached dialogue crop; empty for direct-text jobs + QString cropHash; // SHA-256 of the crop; lets the engine cache by pixels + QRectF sourceRect; // normalized dialogue rect the crop came from + QString directText; // when non-empty, OCR is skipped and this is translated + QString ocrEngineId = QStringLiteral("gemini-vision"); + QString providerId = QStringLiteral("google"); + QString sourceLanguage = QStringLiteral("en"); + QString targetLanguage = QStringLiteral("vi"); + QString geminiApiKey; // forwarded to Gemini engines; never logged +}; +Q_DECLARE_METATYPE(TranslationJob) + +struct TranslationJobResult +{ + bool ok = false; + QString original; // OCR'd (or direct) English text + QString translated; // Vietnamese text on success + QRectF sourceRect; + qint64 ocrMs = 0; + qint64 translateMs = 0; + QString cropHash; + bool cacheHit = false; // true when the translation came from cache/DB + QString error; // safe to show; never contains a key +}; +Q_DECLARE_METATYPE(TranslationJobResult) + +// Pure queue logic: 1 running + 1 waiting, newest waiting job wins. +// No threads, no network — this is what the unit test exercises. +class TranslationJobQueue +{ +public: + // Returns true if the job was accepted (as running or waiting). + // When a waiting job is replaced, the replaced job is counted in + // droppedStale(). + bool submit(const TranslationJob &job); + std::optional takeRunning(); // moves waiting -> running + void finishRunning(); + bool hasRunning() const; + bool hasWaiting() const; + int droppedStale() const { return m_droppedStale; } + void clear(); + void clearWaiting(); // drops the waiting job only; running job untouched + +private: + mutable QMutex m_mutex; + std::optional m_running; + std::optional m_waiting; + int m_droppedStale = 0; +}; + +class TranslationWorker : public QObject +{ + Q_OBJECT +public: + explicit TranslationWorker(QObject *parent = nullptr); + ~TranslationWorker() override; + + void start(); // starts the worker thread + void stop(); // quits the thread and waits for it (call before destruction) + + int droppedStaleJobs() const; + +public slots: + // Called via QueuedConnection from the GUI thread. Accepts into the + // bounded queue; a stale waiting job is dropped, never processed late. + void submitJob(const TranslationJob &job); + void setGeminiApiKey(const QString &key); + void cancelPending(); + +signals: + void jobCompleted(const TranslationJobResult &result); + +private slots: + void processNext(); + +private: + TranslationJobQueue m_queue; + QThread m_thread; + QString m_geminiApiKey; // worker-thread copy; set via queued slot + bool m_processing = false; // worker-thread only +}; diff --git a/opennow-qt/src/translation/WuWaDialogueDb.cpp b/opennow-qt/src/translation/WuWaDialogueDb.cpp new file mode 100644 index 000000000..c06efdebb --- /dev/null +++ b/opennow-qt/src/translation/WuWaDialogueDb.cpp @@ -0,0 +1,61 @@ +#include "translation/WuWaDialogueDb.h" +#include "translation/TranslationCache.h" + +#include +#include +#include +#include + +WuWaDialogueDb::WuWaDialogueDb(const QString &filePath) + : m_filePath(filePath) +{ +} + +bool WuWaDialogueDb::loadDialogueDb(const QString &path) +{ + m_filePath = path; + return loadDialogueDb(); +} + +bool WuWaDialogueDb::loadDialogueDb() +{ + if (m_filePath.isEmpty()) + return true; // No DB configured; empty DB, not an error. + QFile file(m_filePath); + if (!file.exists()) + return true; // Seed file not installed yet; DB stays empty. + if (!file.open(QIODevice::ReadOnly)) + return false; + const QJsonDocument doc = QJsonDocument::fromJson(file.readAll()); + file.close(); + if (!doc.isObject()) + return false; + const QJsonObject entries = doc.object().value(QStringLiteral("entries")).toObject(); + QMutexLocker locker(&m_mutex); + m_entries.clear(); + for (auto it = entries.constBegin(); it != entries.constEnd(); ++it) { + const QString key = TranslationCache::normalizeKey(it.key()); + if (!key.isEmpty()) + m_entries.insert(key, it.value().toString()); + } + return true; +} + +bool WuWaDialogueDb::lookup(const QString &englishText, QString &translated) const +{ + const QString key = TranslationCache::normalizeKey(englishText); + if (key.isEmpty()) + return false; + QMutexLocker locker(&m_mutex); + const auto it = m_entries.constFind(key); + if (it == m_entries.constEnd()) + return false; + translated = it.value(); + return true; +} + +int WuWaDialogueDb::size() const +{ + QMutexLocker locker(&m_mutex); + return m_entries.size(); +} diff --git a/opennow-qt/src/translation/WuWaDialogueDb.h b/opennow-qt/src/translation/WuWaDialogueDb.h new file mode 100644 index 000000000..61f8e63f4 --- /dev/null +++ b/opennow-qt/src/translation/WuWaDialogueDb.h @@ -0,0 +1,40 @@ +// WuWaDialogueDb: pre-translated Wuthering Waves dialogue lines. +// +// Same JSON format as TranslationCache ({"version":1,"entries":{en: vi}}) +// with keys normalized the same way, so a DB hit and a cache hit are +// interchangeable. The DB is consulted BEFORE the memory cache: a curated +// line always wins over a machine-translated one. +// +// The shipped seed file (data/wuwa-dialogue-db.json) intentionally contains +// ZERO datamined lines: no game dialogue translations are invented here. +// It starts empty and fills only from lines actually seen (and verified) +// during live play. Do not hand-write dialogue into the seed file. +#pragma once + +#include +#include +#include + +class WuWaDialogueDb +{ +public: + WuWaDialogueDb() = default; + explicit WuWaDialogueDb(const QString &filePath); + + // Loads entries from `path` (JSON, same shape as the translation cache). + // Returns false if the file exists but cannot be parsed; a missing file + // leaves the DB empty and returns true. + bool loadDialogueDb(const QString &path); + bool loadDialogueDb(); // reloads from the path given at construction + + // Normalized lookup. Returns true on hit and fills `translated`. + bool lookup(const QString &englishText, QString &translated) const; + + int size() const; + QString filePath() const { return m_filePath; } + +private: + QString m_filePath; + mutable QMutex m_mutex; + QHash m_entries; +}; diff --git a/opennow-qt/src/translation/data/wuwa-dialogue-db.json b/opennow-qt/src/translation/data/wuwa-dialogue-db.json new file mode 100644 index 000000000..e9827a8d5 --- /dev/null +++ b/opennow-qt/src/translation/data/wuwa-dialogue-db.json @@ -0,0 +1 @@ +{"_note":"Wuthering Waves pre-translated dialogue DB. Starts EMPTY on purpose: no game dialogue translations are invented or datamined here. Entries are added only from lines actually seen and verified during live play, keyed by normalized English text (trimmed, whitespace collapsed, lower-cased) mapping to Vietnamese. Same JSON shape as translation-cache.json: {\"version\": 1, \"entries\": {\"english line\": \"Vietnamese line\"}}.","entries":{},"version":1} \ No newline at end of file diff --git a/opennow-qt/tests/translation_logic_check.py b/opennow-qt/tests/translation_logic_check.py new file mode 100644 index 000000000..e5971d049 --- /dev/null +++ b/opennow-qt/tests/translation_logic_check.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python3 +"""Standalone logic check for the translation module (no Qt needed). + +Re-implements, in Python, the three pure-logic pieces the C++ unit tests +cover, and asserts the same cases: + 1. normalize_key() -- TranslationCache::normalizeKey (trim, collapse + whitespace, lower-case). + 2. crop_hash() -- TranslationEngine::cropHash (SHA-256 over ARGB32 + pixel bytes; empty for a null/empty image). + 3. TranslationJobQueue -- 1 running + 1 waiting; a new submit replaces + the waiting job and counts it as dropped-stale. + +Run: python3 opennow-qt/tests/translation_logic_check.py +Exit code 0 = all checks pass. +""" + +import hashlib +import re +import sys + + +def normalize_key(text: str) -> str: + # Mirrors QString::simplified().toLower(): trim + collapse every + # whitespace run to one space + lower-case. + return re.sub(r"\s+", " ", text.strip()).lower() + + +def crop_hash(argb32_bytes: bytes) -> str: + # Mirrors TranslationEngine::cropHash: SHA-256 hex of raw ARGB32 bytes. + if not argb32_bytes: + return "" + return hashlib.sha256(argb32_bytes).hexdigest() + + +def crop_image(pixels, width, height, rect): + """Crop a flat ARGB32 pixel list by a normalized (x, y, w, h) rect.""" + x = int(rect[0] * width) + y = int(rect[1] * height) + w = int(rect[2] * width) + h = int(rect[3] * height) + out = [] + for row in range(y, min(y + h, height)): + out.extend(pixels[row * width + x: row * width + min(x + w, width)]) + return out + + +class TranslationJobQueue: + """Mirrors TranslationJobQueue: 1 running + 1 waiting, newest wins.""" + + def __init__(self): + self.running = None + self.waiting = None + self.dropped_stale = 0 + + def submit(self, job): + if self.running is None: + self.running = job + return True + if self.waiting is not None: + self.dropped_stale += 1 + self.waiting = job + return True + + def take_running(self): + if self.running is not None: + return self.running + if self.waiting is None: + return None + self.running, self.waiting = self.waiting, None + return self.running + + def finish_running(self): + self.running = None + + +def check(name, cond): + print(f"{'PASS' if cond else 'FAIL'} {name}") + if not cond: + check.failures += 1 + + +check.failures = 0 + + +def main(): + # 1. Normalization: trim, collapse whitespace, case-insensitive key. + check("normalize trims + collapses + lowercases", + normalize_key(" Hello World ") == "hello world") + check("normalize case-insensitive", + normalize_key("HELLO WORLD") == normalize_key("hello world")) + check("normalize tabs/newlines collapse", + normalize_key("\nhello\tworld\n") == "hello world") + check("normalize ' A B ' -> 'a b'", normalize_key(" A B ") == "a b") + + # Cache hit/miss on normalized keys (mirrors tst_translation cache tests). + cache = {} + cache[normalize_key(" Hello World ")] = "xin chào thế giới" + check("cache hit on normalized key", + cache.get(normalize_key("hello world")) == "xin chào thế giới") + check("cache miss on unknown key", cache.get(normalize_key("goodbye")) is None) + + # 2. Crop hash: identical pixels -> same hash; one pixel change -> differs. + white = b"\xff\xff\xff\xff" * (64 * 32) + changed = bytearray(white) + changed[10 * 64 * 4 + 10 * 4] = 0 # one pixel to black-ish + check("hash non-empty for real pixels", crop_hash(white) != "") + check("hash same for identical pixels", + crop_hash(white) == crop_hash(b"\xff\xff\xff\xff" * (64 * 32))) + check("hash changes when one pixel changes", + crop_hash(white) != crop_hash(bytes(changed))) + check("hash empty for empty image", crop_hash(b"") == "") + + # Crop geometry mirrors the default dialogue rect (0.05, 0.72, 0.90, 0.24). + frame = [0] * (200 * 100) + crop = crop_image(frame, 200, 100, (0.05, 0.72, 0.90, 0.24)) + check("default dialogue crop is 180x24", len(crop) == 180 * 24) + + # 3. Bounded queue drops the stale waiting job. + q = TranslationJobQueue() + assert q.submit("first") and q.running == "first" and q.waiting is None + assert q.submit("second") and q.waiting == "second" + check("no stale drop yet", q.dropped_stale == 0) + assert q.submit("third") + check("third submit drops one stale job", q.dropped_stale == 1) + check("running is still 'first'", q.take_running() == "first") + q.finish_running() + check("waiting job is 'third' (second was dropped)", + q.take_running() == "third") + q.finish_running() + check("queue drains to empty", q.take_running() is None) + + print(f"\n{check.failures} failure(s)") + return 1 if check.failures else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/opennow-qt/tests/tst_translation.cpp b/opennow-qt/tests/tst_translation.cpp new file mode 100644 index 000000000..3c21f3e7f --- /dev/null +++ b/opennow-qt/tests/tst_translation.cpp @@ -0,0 +1,206 @@ +// Unit tests for the translation module: crop hash, cache normalization, +// dialogue DB, and the bounded worker queue. No network is used; OCR and +// translation providers are exercised only through their NotAvailable paths +// (no key, no binary) where noted. +#include "translation/TranslationCache.h" +#include "translation/TranslationEngine.h" +#include "translation/TranslationWorker.h" +#include "translation/WuWaDialogueDb.h" +#include "translation/OcrEngine.h" + +#include +#include +#include +#include +#include +#include +#include + +class TranslationTest : public QObject +{ + Q_OBJECT +private slots: + void cropHashChangesWhenPixelsChange() + { + QImage first(64, 32, QImage::Format_ARGB32); + first.fill(Qt::white); + QImage identical(64, 32, QImage::Format_ARGB32); + identical.fill(Qt::white); + QImage changed(64, 32, QImage::Format_ARGB32); + changed.fill(Qt::white); + changed.setPixel(10, 10, qRgb(0, 0, 0)); + + const QString hashFirst = TranslationEngine::cropHash(first); + QVERIFY(!hashFirst.isEmpty()); + QCOMPARE(TranslationEngine::cropHash(identical), hashFirst); + QVERIFY(TranslationEngine::cropHash(changed) != hashFirst); + // Null / empty images hash to empty. + QVERIFY(TranslationEngine::cropHash(QImage()).isEmpty()); + } + + void cropDialogueImageRespectsNormalizedRect() + { + QImage frame(200, 100, QImage::Format_ARGB32); + frame.fill(Qt::black); + // Default dialogue rect: x 5%, y 72%, w 90%, h 24%. + const QImage crop = TranslationEngine::cropDialogueImage( + frame, QRectF(0.05, 0.72, 0.90, 0.24)); + QCOMPARE(crop.width(), 180); + QCOMPARE(crop.height(), 24); + QCOMPARE(crop.size(), QSize(180, 24)); + // Empty rect / null image -> null crop. + QVERIFY(TranslationEngine::cropDialogueImage(frame, QRectF()).isNull()); + QVERIFY(TranslationEngine::cropDialogueImage(QImage(), QRectF(0, 0, 1, 1)).isNull()); + } + + void cacheLookupHitAndMiss() + { + TranslationCache cache(100); + QString out; + QVERIFY(!cache.lookup(QStringLiteral("hello"), out)); + cache.insert(QStringLiteral("hello"), QStringLiteral("xin chào")); + QVERIFY(cache.lookup(QStringLiteral("hello"), out)); + QCOMPARE(out, QStringLiteral("xin chào")); + QCOMPARE(cache.size(), 1); + } + + void cacheNormalizationIsCaseAndWhitespaceInsensitive() + { + TranslationCache cache(100); + cache.insert(QStringLiteral(" Hello World "), QStringLiteral("xin chào thế giới")); + QString out; + QVERIFY(cache.lookup(QStringLiteral("hello world"), out)); + QCOMPARE(out, QStringLiteral("xin chào thế giới")); + QVERIFY(cache.lookup(QStringLiteral("HELLO WORLD"), out)); + QVERIFY(cache.lookup(QStringLiteral("\nhello\tworld\n"), out)); + QCOMPARE(TranslationCache::normalizeKey(QStringLiteral(" A B ")), + QStringLiteral("a b")); + } + + void cacheClearEmptiesIt() + { + TranslationCache cache(100); + cache.insert(QStringLiteral("a"), QStringLiteral("b")); + QCOMPARE(cache.size(), 1); + cache.clear(); + QCOMPARE(cache.size(), 0); + QString out; + QVERIFY(!cache.lookup(QStringLiteral("a"), out)); + } + + void cacheEvictsOldestAtMaxEntries() + { + TranslationCache cache(3); + cache.insert(QStringLiteral("one"), QStringLiteral("1")); + cache.insert(QStringLiteral("two"), QStringLiteral("2")); + cache.insert(QStringLiteral("three"), QStringLiteral("3")); + cache.insert(QStringLiteral("four"), QStringLiteral("4")); + QCOMPARE(cache.size(), 3); + QString out; + QVERIFY(!cache.lookup(QStringLiteral("one"), out)); + QVERIFY(cache.lookup(QStringLiteral("four"), out)); + } + + void cachePersistsToJson() + { + QTemporaryDir dir; + QVERIFY(dir.isValid()); + const QString path = dir.filePath(QStringLiteral("cache.json")); + { + TranslationCache cache(path, 100); + cache.insert(QStringLiteral("hello"), QStringLiteral("xin chào")); + QVERIFY(cache.save()); + } + TranslationCache reloaded(path, 100); + QVERIFY(reloaded.load()); + QString out; + QVERIFY(reloaded.lookup(QStringLiteral("hello"), out)); + QCOMPARE(out, QStringLiteral("xin chào")); + } + + void dialogueDbLookupMissesOnEmptyDb() + { + WuWaDialogueDb db; + QString out; + QVERIFY(!db.lookup(QStringLiteral("hello, Rover"), out)); + QCOMPARE(db.size(), 0); + } + + void dialogueDbLoadsSeedFile() + { + QTemporaryDir dir; + QVERIFY(dir.isValid()); + const QString path = dir.filePath(QStringLiteral("wuwa.json")); + QJsonObject entries; + entries.insert(QStringLiteral("Hello, Rover"), QStringLiteral("Chào, Rover")); + QJsonObject root; + root.insert(QStringLiteral("version"), 1); + root.insert(QStringLiteral("entries"), entries); + QFile file(path); + QVERIFY(file.open(QIODevice::WriteOnly)); + file.write(QJsonDocument(root).toJson(QJsonDocument::Compact)); + file.close(); + + WuWaDialogueDb db; + QVERIFY(db.loadDialogueDb(path)); + QCOMPARE(db.size(), 1); + QString out; + QVERIFY(db.lookup(QStringLiteral("hello, rover"), out)); + QCOMPARE(out, QStringLiteral("Chào, Rover")); + QVERIFY(!db.lookup(QStringLiteral("unknown line"), out)); + // Missing file: empty DB, not an error. + WuWaDialogueDb missing; + QVERIFY(missing.loadDialogueDb(dir.filePath(QStringLiteral("nope.json")))); + QCOMPARE(missing.size(), 0); + } + + void boundedQueueDropsStaleJob() + { + TranslationJobQueue queue; + TranslationJob first; + first.directText = QStringLiteral("first"); + TranslationJob second; + second.directText = QStringLiteral("second"); + TranslationJob third; + third.directText = QStringLiteral("third"); + + QVERIFY(queue.submit(first)); // becomes running + QVERIFY(queue.hasRunning()); + QVERIFY(!queue.hasWaiting()); + QVERIFY(queue.submit(second)); // becomes waiting + QVERIFY(queue.hasWaiting()); + QCOMPARE(queue.droppedStale(), 0); + QVERIFY(queue.submit(third)); // replaces waiting "second" + QCOMPARE(queue.droppedStale(), 1); + QVERIFY(queue.hasWaiting()); + + const auto running = queue.takeRunning(); + QVERIFY(running.has_value()); + QCOMPARE(running->directText, QStringLiteral("first")); + queue.finishRunning(); + const auto next = queue.takeRunning(); + QVERIFY(next.has_value()); + QCOMPARE(next->directText, QStringLiteral("third")); // "second" was dropped + queue.finishRunning(); + QVERIFY(!queue.takeRunning().has_value()); + } + + void stubOcrEnginesReportNotAvailable() + { + RapidOcrEngine rapid; + QVERIFY(!rapid.available()); + QImage image(10, 10, QImage::Format_ARGB32); + image.fill(Qt::white); + QCOMPARE(rapid.recognize(image).status, OcrResult::Status::NotAvailable); + WindowsOcrEngine windows; + QVERIFY(!windows.available()); + QCOMPARE(windows.recognize(image).status, OcrResult::Status::NotAvailable); + GeminiVisionOcrEngine gemini; + QVERIFY(!gemini.available()); // no key + QCOMPARE(gemini.recognize(image).status, OcrResult::Status::NotAvailable); + QVERIFY(createOcrEngine(QStringLiteral("bogus")) == nullptr); + } +}; + +QTEST_MAIN(TranslationTest) +#include "tst_translation.moc" From 4c418647fc3d8da4ffd036e978505fc6118e4991 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 10:36:07 +0700 Subject: [PATCH 02/54] ci: use GitHub-hosted runners instead of Blacksmith on the huyzoz fork --- .github/actionlint.yaml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 4841ad601..fdedd3fee 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,17 +1 @@ -self-hosted-runner: - labels: - - blacksmith-2vcpu-ubuntu-2404 - - blacksmith-2vcpu-ubuntu-2404-arm - - blacksmith-2vcpu-windows-2025 - - blacksmith-4vcpu-ubuntu-2404 - - blacksmith-4vcpu-ubuntu-2404-arm - - blacksmith-4vcpu-windows-2025 - - blacksmith-6vcpu-macos-15 - - blacksmith-6vcpu-macos-latest - - blacksmith-8vcpu-ubuntu-2404 - - blacksmith-8vcpu-ubuntu-2404-arm - - blacksmith-8vcpu-windows-2025 - - blacksmith-16vcpu-ubuntu-2404 - - blacksmith-16vcpu-windows-2025 - -config-variables: null +c2VsZi1ob3N0ZWQtcnVubmVyOgogIGxhYmVsczoKICAgIC0gdWJ1bnR1LTI0LjA0CiAgICAtIHVidW50dS0yNC4wNC1hcm0KICAgIC0gd2luZG93cy0yMDI1CiAgICAtIHVidW50dS0yNC4wNAogICAgLSB1YnVudHUtMjQuMDQtYXJtCiAgICAtIHdpbmRvd3MtMjAyNQogICAgLSBtYWNvcy0xNQogICAgLSBtYWNvcy1sYXRlc3QKICAgIC0gdWJ1bnR1LTI0LjA0CiAgICAtIHVidW50dS0yNC4wNC1hcm0KICAgIC0gd2luZG93cy0yMDI1CiAgICAtIHVidW50dS0yNC4wNAogICAgLSB3aW5kb3dzLTIwMjUKCmNvbmZpZy12YXJpYWJsZXM6IG51bGwK \ No newline at end of file From a97ad2c617c684099adcc9496232ff2b75d78035 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 10:39:09 +0700 Subject: [PATCH 03/54] ci: use GitHub-hosted runners instead of Blacksmith on the huyzoz fork --- .github/workflows/qt-build.yml | 16 ++++++++-------- .github/workflows/qt-checks.yml | 2 +- .github/workflows/qt-ci.yml | 12 ++++++------ .github/workflows/qt-flatpak.yml | 2 +- .github/workflows/qt-linux-arm64-cross.yml | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/qt-build.yml b/.github/workflows/qt-build.yml index dac766472..08f353544 100644 --- a/.github/workflows/qt-build.yml +++ b/.github/workflows/qt-build.yml @@ -30,7 +30,7 @@ permissions: jobs: metadata: if: github.event_name == 'workflow_dispatch' - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 outputs: version: ${{ steps.version.outputs.version }} steps: @@ -69,7 +69,7 @@ jobs: matrix: include: - label: linux-x64 - os: blacksmith-8vcpu-ubuntu-2404 + os: ubuntu-24.04 build-parallel: 8 qt-host: linux qt-arch: linux_gcc_64 @@ -78,7 +78,7 @@ jobs: cmake-arch: "" linuxdeploy-arch: x86_64 - label: linux-arm64 - os: blacksmith-8vcpu-ubuntu-2404-arm + os: ubuntu-24.04-arm build-parallel: 8 qt-host: linux_arm64 qt-arch: linux_gcc_arm64 @@ -87,7 +87,7 @@ jobs: cmake-arch: "" linuxdeploy-arch: aarch64 - label: windows-arm64 - os: blacksmith-8vcpu-windows-2025 + os: windows-2025 build-parallel: 8 qt-host: windows qt-arch: win64_msvc2022_arm64_cross_compiled @@ -95,7 +95,7 @@ jobs: rust-target: aarch64-pc-windows-msvc cmake-arch: ARM64 - label: windows-x64 - os: blacksmith-8vcpu-windows-2025 + os: windows-2025 build-parallel: 8 qt-host: windows qt-arch: win64_msvc2022_64 @@ -104,7 +104,7 @@ jobs: cmake-arch: "" linuxdeploy-arch: "" - label: macos-arm64 - os: blacksmith-6vcpu-macos-15 + os: macos-15 build-parallel: 3 qt-host: mac qt-arch: clang_64 @@ -114,7 +114,7 @@ jobs: macos-arch: arm64 package-arch: arm64 - label: macos-x64 - os: blacksmith-6vcpu-macos-15 + os: macos-15 build-parallel: 3 qt-host: mac qt-arch: clang_64 @@ -612,7 +612,7 @@ jobs: artifact-inventory: name: Verify complete unsigned artifact set needs: [metadata, packages, flatpak] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 env: RELEASE_VERSION: ${{ needs.metadata.outputs.version }} BUILD_CHANNEL: ${{ inputs.channel }} diff --git a/.github/workflows/qt-checks.yml b/.github/workflows/qt-checks.yml index b9e2560ad..83acdeb22 100644 --- a/.github/workflows/qt-checks.yml +++ b/.github/workflows/qt-checks.yml @@ -9,7 +9,7 @@ permissions: jobs: contracts: name: Workflow, packaging contracts, and localization - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 timeout-minutes: 10 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/qt-ci.yml b/.github/workflows/qt-ci.yml index b2376e2f0..2cd56c94f 100644 --- a/.github/workflows/qt-ci.yml +++ b/.github/workflows/qt-ci.yml @@ -78,7 +78,7 @@ jobs: preflight: name: Validate nightly update key if: github.event_name == 'workflow_dispatch' - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: @@ -116,19 +116,19 @@ jobs: matrix: include: - label: linux-x64 - os: blacksmith-16vcpu-ubuntu-2404 + os: ubuntu-24.04 qt-host: linux qt-arch: linux_gcc_64 target-arch: x64 parallel: "8" - label: windows-x64 - os: blacksmith-16vcpu-windows-2025 + os: windows-2025 qt-host: windows qt-arch: win64_msvc2022_64 target-arch: x64 parallel: "8" - label: macos-arm64 - os: blacksmith-6vcpu-macos-15 + os: macos-15 qt-host: mac qt-arch: clang_64 target-arch: arm64 @@ -166,7 +166,7 @@ jobs: name: Isolated nightly update signing if: github.event_name == 'workflow_dispatch' && inputs.publish_nightly && inputs.linux_arm64_host == 'native' needs: [preflight, contracts, checks, build] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 environment: qt-update-signing timeout-minutes: 30 steps: @@ -209,7 +209,7 @@ jobs: name: Publish update-signed nightly prerelease if: github.event_name == 'workflow_dispatch' && inputs.publish_nightly && inputs.linux_arm64_host == 'native' needs: [contracts, checks, build, sign-nightly] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 permissions: contents: write env: diff --git a/.github/workflows/qt-flatpak.yml b/.github/workflows/qt-flatpak.yml index 163199cfa..77381cc81 100644 --- a/.github/workflows/qt-flatpak.yml +++ b/.github/workflows/qt-flatpak.yml @@ -31,7 +31,7 @@ permissions: jobs: flatpak: name: Flatpak ${{ inputs.arch }} - runs-on: ${{ inputs.arch == 'aarch64' && 'blacksmith-8vcpu-ubuntu-2404-arm' || 'blacksmith-4vcpu-ubuntu-2404' }} + runs-on: ${{ inputs.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} timeout-minutes: 90 env: FLATPAK_USER_DIR: ${{ github.workspace }}/build/flatpak/user diff --git a/.github/workflows/qt-linux-arm64-cross.yml b/.github/workflows/qt-linux-arm64-cross.yml index 05c553cbc..dad87f19c 100644 --- a/.github/workflows/qt-linux-arm64-cross.yml +++ b/.github/workflows/qt-linux-arm64-cross.yml @@ -19,7 +19,7 @@ permissions: jobs: compile: name: Compile ARM64 on x64 - runs-on: blacksmith-8vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 timeout-minutes: 90 env: CARGO_TERM_COLOR: always @@ -109,7 +109,7 @@ jobs: validate: name: Validate and package cross-build on ARM64 needs: compile - runs-on: blacksmith-8vcpu-ubuntu-2404-arm + runs-on: ubuntu-24.04-arm timeout-minutes: 90 env: OPENNOW_BUILD_VERSION: ${{ inputs.version }} From f89c2735a4578d0089d95aa88bf361b94d7c5e2c Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 10:45:30 +0700 Subject: [PATCH 04/54] ci: swap Blacksmith runners in remaining workflows too --- .github/workflows/codeql.yml | 2 +- .github/workflows/decky.yml | 4 ++-- .github/workflows/qt-release-candidate.yml | 18 +++++++++--------- .github/workflows/qt-stable-release.yml | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 782fe79c7..d5d6bbac6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,7 +28,7 @@ jobs: # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners (GitHub.com only) # Consider using larger runners or machines with greater resources for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'blacksmith-6vcpu-macos-latest') || 'blacksmith-2vcpu-ubuntu-2404' }} + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-24.04' }} permissions: # required for all workflows security-events: write diff --git a/.github/workflows/decky.yml b/.github/workflows/decky.yml index 57d25c94c..87554436b 100644 --- a/.github/workflows/decky.yml +++ b/.github/workflows/decky.yml @@ -24,7 +24,7 @@ permissions: jobs: plugin: name: Decky plugin - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 timeout-minutes: 10 defaults: run: @@ -60,7 +60,7 @@ jobs: name: Publish plugin ZIP if: github.event_name == 'push' && github.ref == 'refs/heads/dev' needs: plugin - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 timeout-minutes: 5 permissions: contents: write diff --git a/.github/workflows/qt-release-candidate.yml b/.github/workflows/qt-release-candidate.yml index 762d1ad72..2fdecf5aa 100644 --- a/.github/workflows/qt-release-candidate.yml +++ b/.github/workflows/qt-release-candidate.yml @@ -40,7 +40,7 @@ env: jobs: preflight: name: release-preflight - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 outputs: source_sha: ${{ steps.source.outputs.source_sha }} steps: @@ -97,7 +97,7 @@ jobs: matrix: include: - arch: x64 - runner: blacksmith-8vcpu-ubuntu-2404 + runner: ubuntu-24.04 build-parallel: 8 qt_host: linux qt_arch: linux_gcc_64 @@ -105,7 +105,7 @@ jobs: linuxdeploy_sha256: c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d qt_plugin_sha256: 15106be885c1c48a021198e7e1e9a48ce9d02a86dd0a1848f00bdbf3c1c92724 - arch: arm64 - runner: blacksmith-8vcpu-ubuntu-2404-arm + runner: ubuntu-24.04-arm build-parallel: 8 qt_host: linux_arm64 qt_arch: linux_gcc_arm64 @@ -288,7 +288,7 @@ jobs: windows: name: windows-${{ matrix.arch }} needs: preflight - runs-on: blacksmith-8vcpu-windows-2025 + runs-on: windows-2025 environment: qt-production-release env: CARGO_BUILD_JOBS: 4 @@ -395,7 +395,7 @@ jobs: - name: Cache Rust dependencies and build artifacts uses: ./.github/actions/rust-build-cache with: - shared-key: qt-ci-blacksmith-8vcpu-windows-2025-windows-${{ matrix.arch }} + shared-key: qt-ci-windows-2025-windows-${{ matrix.arch }} workspaces: | native/opennow-core -> target native/opennow-streamer -> target @@ -407,8 +407,8 @@ jobs: - name: Cache Qt C++ compilation uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 with: - key: qt-ci-blacksmith-8vcpu-windows-2025-windows-${{ matrix.arch }} - restore-keys: qt-ci-blacksmith-8vcpu-windows-2025-windows-${{ matrix.arch }} + key: qt-ci-windows-2025-windows-${{ matrix.arch }} + restore-keys: qt-ci-windows-2025-windows-${{ matrix.arch }} max-size: 1G evict-old-files: job verbose: 1 @@ -554,7 +554,7 @@ jobs: matrix: include: - arch: arm64 - os: blacksmith-6vcpu-macos-15 + os: macos-15 macos-arch: arm64 rust-target: aarch64-apple-darwin - arch: x64 @@ -808,7 +808,7 @@ jobs: inventory: name: isolated-update-signing-and-inventory - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 environment: qt-update-signing needs: [preflight, linux, windows, macos, flatpak] timeout-minutes: 30 diff --git a/.github/workflows/qt-stable-release.yml b/.github/workflows/qt-stable-release.yml index b2783b278..cb655810b 100644 --- a/.github/workflows/qt-stable-release.yml +++ b/.github/workflows/qt-stable-release.yml @@ -21,7 +21,7 @@ permissions: jobs: preflight: - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 outputs: version: ${{ steps.source.outputs.version }} steps: @@ -57,19 +57,19 @@ jobs: matrix: include: - label: linux-x64 - os: blacksmith-8vcpu-ubuntu-2404 + os: ubuntu-24.04 qt-host: linux qt-arch: linux_gcc_64 target-arch: x64 parallel: "8" - label: windows-x64 - os: blacksmith-8vcpu-windows-2025 + os: windows-2025 qt-host: windows qt-arch: win64_msvc2022_64 target-arch: x64 parallel: "8" - label: macos-arm64 - os: blacksmith-6vcpu-macos-15 + os: macos-15 qt-host: mac qt-arch: clang_64 target-arch: arm64 @@ -90,7 +90,7 @@ jobs: publish: needs: [preflight, contracts, checks] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 environment: qt-production-release permissions: actions: read From 5e280e3ac6b9f2dace701bb766d84e67ae5cb4f6 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 10:47:31 +0700 Subject: [PATCH 05/54] ci: restore actionlint.yaml as real YAML (was base64 blob) --- .github/actionlint.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index fdedd3fee..ff738a753 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1 +1,17 @@ -c2VsZi1ob3N0ZWQtcnVubmVyOgogIGxhYmVsczoKICAgIC0gdWJ1bnR1LTI0LjA0CiAgICAtIHVidW50dS0yNC4wNC1hcm0KICAgIC0gd2luZG93cy0yMDI1CiAgICAtIHVidW50dS0yNC4wNAogICAgLSB1YnVudHUtMjQuMDQtYXJtCiAgICAtIHdpbmRvd3MtMjAyNQogICAgLSBtYWNvcy0xNQogICAgLSBtYWNvcy1sYXRlc3QKICAgIC0gdWJ1bnR1LTI0LjA0CiAgICAtIHVidW50dS0yNC4wNC1hcm0KICAgIC0gd2luZG93cy0yMDI1CiAgICAtIHVidW50dS0yNC4wNAogICAgLSB3aW5kb3dzLTIwMjUKCmNvbmZpZy12YXJpYWJsZXM6IG51bGwK \ No newline at end of file +self-hosted-runner: + labels: + - ubuntu-24.04 + - ubuntu-24.04-arm + - windows-2025 + - ubuntu-24.04 + - ubuntu-24.04-arm + - windows-2025 + - macos-15 + - macos-latest + - ubuntu-24.04 + - ubuntu-24.04-arm + - windows-2025 + - ubuntu-24.04 + - windows-2025 + +config-variables: null From 34d2a49895f3b0b94c22508bb8c34cc15cef248b Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 10:55:29 +0700 Subject: [PATCH 06/54] ci: teach packaging contract tests the GitHub-hosted runners --- opennow-qt/tests/test_ci_release_trust.py | 4 ++-- opennow-qt/tests/test_ci_workflow.py | 21 ++++++++++--------- opennow-qt/tests/test_linux_cross_build.py | 6 +++--- opennow-qt/tests/test_macos_build.py | 4 ++-- opennow-qt/tests/test_macos_cross_host.py | 2 +- opennow-qt/tests/test_macos_release.py | 2 +- .../tests/test_signed_nightly_release.py | 2 +- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/opennow-qt/tests/test_ci_release_trust.py b/opennow-qt/tests/test_ci_release_trust.py index 80eb0a1d4..3f57b7f68 100644 --- a/opennow-qt/tests/test_ci_release_trust.py +++ b/opennow-qt/tests/test_ci_release_trust.py @@ -92,10 +92,10 @@ def test_windows_artifact_names_and_inventory_record_platform_signing_mode(self) self.assertIn("environment: qt-update-signing", inventory) self.assertIn("secrets.OPENNOW_UPDATE_ED25519_PRIVATE_KEY", inventory) - def test_candidate_update_key_is_isolated_in_a_blacksmith_signing_job(self): + def test_candidate_update_key_is_isolated_in_a_signing_job(self): workflow = (WORKFLOWS / "qt-release-candidate.yml").read_text() builds, signer = workflow.split(" inventory:\n", 1) - self.assertIn("runs-on: blacksmith-2vcpu-ubuntu-2404", signer) + self.assertIn("runs-on: ubuntu-24.04", signer) self.assertIn("environment: qt-update-signing", signer) self.assertIn("needs: [preflight, linux, windows, macos, flatpak]", signer) self.assertIn("timeout-minutes: 30", signer) diff --git a/opennow-qt/tests/test_ci_workflow.py b/opennow-qt/tests/test_ci_workflow.py index e45be628a..2fb25d791 100644 --- a/opennow-qt/tests/test_ci_workflow.py +++ b/opennow-qt/tests/test_ci_workflow.py @@ -94,14 +94,14 @@ def test_all_native_platform_checks_keep_required_status_names(self): self.assertIn(" runs-on: ${{ matrix.os }}\n", checks) self.assertIn(" fail-fast: false\n", checks) self.assertIn("uses: ./.github/actions/qt-unit-tests", checks) - self.assertIn("os: blacksmith-16vcpu-windows-2025", checks) - self.assertIn("os: blacksmith-6vcpu-macos-15", checks) + self.assertIn("os: windows-2025", checks) + self.assertIn("os: macos-15", checks) self.assertNotIn("continue-on-error", checks) - def test_linux_and_windows_checks_use_sixteen_core_runners(self): + def test_linux_and_windows_checks_use_github_hosted_runners(self): checks = jobs((WORKFLOWS / "qt-ci.yml").read_text())["checks"] - for label, runner in (("linux-x64", "blacksmith-16vcpu-ubuntu-2404"), - ("windows-x64", "blacksmith-16vcpu-windows-2025")): + for label, runner in (("linux-x64", "ubuntu-24.04"), + ("windows-x64", "windows-2025")): with self.subTest(label=label): entry = checks.split(f" - label: {label}\n", 1)[1].split(" - label:", 1)[0] self.assertIn(f" os: {runner}\n", entry) @@ -114,12 +114,12 @@ def test_linux_and_windows_checks_use_sixteen_core_runners(self): self.assertIn("CARGO_BUILD_JOBS: ${{ inputs.parallel }}", entry) self.assertIn("parallel: ${{ matrix.parallel }}", checks) - def test_linux_and_windows_packages_use_eight_core_build_parallelism(self): + def test_linux_and_windows_packages_use_github_hosted_runners(self): packages = jobs((WORKFLOWS / "qt-build.yml").read_text())["packages"] for label in ("linux-x64", "linux-arm64", "windows-x64", "windows-arm64"): with self.subTest(label=label): entry = packages.split(f" - label: {label}\n", 1)[1].split(" - label:", 1)[0] - self.assertIn(" os: blacksmith-8vcpu-", entry) + self.assertRegex(entry, r" os: (ubuntu-24\.04|ubuntu-24\.04-arm|windows-2025)\n") self.assertIn(" build-parallel: 8\n", entry) def test_manual_packages_overlap_checks_without_bypassing_publication_gates(self): @@ -148,7 +148,7 @@ def test_checks_compile_tests_without_packaging_or_runtime_targets(self): checks = (ROOT / ".github/actions/qt-unit-tests/action.yml").read_text() entries = jobs(contracts) self.assertEqual(set(entries), {"contracts"}) - self.assertIn("runs-on: blacksmith-2vcpu-ubuntu-2404", entries["contracts"]) + self.assertIn("runs-on: ubuntu-24.04", entries["contracts"]) runner = (ROOT / ".github/scripts/run-native-checks.py").read_text() for forbidden in ("matrix:", "cpack ", "linuxdeploy", "--release", "uses: ./.github/workflows/qt-build.yml"): @@ -300,7 +300,7 @@ def test_interactive_tests_remain_registered_outside_headless_ci(self): packages = (WORKFLOWS / "qt-build.yml").read_text() self.assertEqual(packages.count("--no-tests=error -LE interactive-desktop"), 2) - def test_general_purpose_runners_are_blacksmith(self): + def test_general_purpose_runners_are_approved(self): for workflow in WORKFLOWS.glob("*.yml"): runners = re.findall(r"^\s+(?:runs-on|os|runner): (.+)$", workflow.read_text(), re.MULTILINE) for runner in runners: @@ -310,7 +310,8 @@ def test_general_purpose_runners_are_blacksmith(self): self.assertIn(" macos-arch: x86_64\n", workflow.read_text()) continue self.assertTrue( - runner.startswith(("blacksmith-", "${{")), + runner.startswith(("blacksmith-", "${{", "ubuntu-24.04", + "windows-2025", "macos-15", "macos-latest")), ) def test_rust_caches_survive_job_renames_and_later_test_failures(self): diff --git a/opennow-qt/tests/test_linux_cross_build.py b/opennow-qt/tests/test_linux_cross_build.py index 8715350a4..b9984bbc1 100644 --- a/opennow-qt/tests/test_linux_cross_build.py +++ b/opennow-qt/tests/test_linux_cross_build.py @@ -135,12 +135,12 @@ def test_experiment_uses_native_arm_tests_and_packages_without_rebuilding(self): packages = (ROOT / ".github/actions/linux-package/action.yml").read_text() baseline = workflow.split(" packages:\n", 1)[1].split(" flatpak:\n", 1)[0] validate = cross.split(" validate:\n", 1)[1] - self.assertIn("runs-on: blacksmith-8vcpu-ubuntu-2404\n", cross) - self.assertIn("os: blacksmith-8vcpu-ubuntu-2404-arm", baseline) + self.assertIn("runs-on: ubuntu-24.04\n", cross) + self.assertIn("os: ubuntu-24.04-arm", baseline) self.assertIn(" needs: metadata\n", baseline) self.assertNotIn("linux_arm64_host", baseline) self.assertIn(" needs: compile\n", validate) - self.assertIn("runs-on: blacksmith-8vcpu-ubuntu-2404-arm", validate) + self.assertIn("runs-on: ubuntu-24.04-arm", validate) self.assertNotIn("cmake --build", validate) self.assertNotIn("cmake -S", validate) self.assertIn("uses: ./.github/actions/linux-package", baseline) diff --git a/opennow-qt/tests/test_macos_build.py b/opennow-qt/tests/test_macos_build.py index 8cb817ad4..045ffc23b 100644 --- a/opennow-qt/tests/test_macos_build.py +++ b/opennow-qt/tests/test_macos_build.py @@ -34,10 +34,10 @@ def test_native_macos_matrices_match_runner_qt_sdl_rust_and_package_architecture workflow = (QT_SOURCE.parent / ".github/workflows" / filename).read_text() macos = workflow.split(" macos:\n", 1)[1] if filename == "qt-release-candidate.yml" else workflow for arch, native, target, runner in ( - ("arm64", "arm64", "aarch64-apple-darwin", "blacksmith-6vcpu-macos-15"), + ("arm64", "arm64", "aarch64-apple-darwin", "macos-15"), ("x64", "x86_64", "x86_64-apple-darwin", "macos-15-intel")): if filename == "qt-build.yml": - runner = "blacksmith-6vcpu-macos-15" + runner = "macos-15" marker = f" - label: macos-{arch}" if filename == "qt-build.yml" else f" - arch: {arch}" matrix = macos.split(marker, 1)[1].split("\n - ", 1)[0].split("\n env:", 1)[0] for required in (f"os: {runner}", f"macos-arch: {native}", f"rust-target: {target}"): diff --git a/opennow-qt/tests/test_macos_cross_host.py b/opennow-qt/tests/test_macos_cross_host.py index 568956ddc..8cd569592 100644 --- a/opennow-qt/tests/test_macos_cross_host.py +++ b/opennow-qt/tests/test_macos_cross_host.py @@ -73,7 +73,7 @@ def test_intel_target_uses_arm_host_without_a_selector_and_keeps_target_tests(se self.assertNotIn("macos_intel_host", workflow) self.assertNotIn("macos-15-intel", build) intel_matrix = build.split(" - label: macos-x64\n", 1)[1].split("\n env:", 1)[0] - self.assertIn("os: blacksmith-6vcpu-macos-15", intel_matrix) + self.assertIn("os: macos-15", intel_matrix) self.assertIn("macos-arch: x86_64", intel_matrix) self.assertIn("rust-target: x86_64-apple-darwin", intel_matrix) self.assertIn("OPENNOW_MACOS_HOST_ARCH: ${{ startsWith(matrix.label, 'macos-') && 'arm64' || '' }}", build) diff --git a/opennow-qt/tests/test_macos_release.py b/opennow-qt/tests/test_macos_release.py index 9d444fd84..452826b5e 100644 --- a/opennow-qt/tests/test_macos_release.py +++ b/opennow-qt/tests/test_macos_release.py @@ -472,7 +472,7 @@ def test_production_candidate_is_native_protected_and_never_published(self): workflow = WORKFLOW.read_text() macos = workflow.split(" macos:\n", 1)[1].split(" inventory:\n", 1)[0] self.assertIn("needs: [preflight, linux, windows, macos, flatpak]", workflow) - for required in ("blacksmith-6vcpu-macos-15", "environment: qt-production-release", + for required in ("macos-15", "environment: qt-production-release", 'CMAKE_OSX_ARCHITECTURES="$OPENNOW_MACOS_ARCH"', "OPENNOW_UPDATE_ED25519_PUBLIC_KEY=", "--locked", "ctest --test-dir", 'mv "$QT_ROOT_DIR" "$QT_ROOT_DIR.unavailable"', diff --git a/opennow-qt/tests/test_signed_nightly_release.py b/opennow-qt/tests/test_signed_nightly_release.py index f714a6187..c5075b554 100644 --- a/opennow-qt/tests/test_signed_nightly_release.py +++ b/opennow-qt/tests/test_signed_nightly_release.py @@ -196,7 +196,7 @@ def test_workflow_secret_is_isolated_and_publication_uses_only_signed_set(self): workflow = (ROOT / ".github/workflows/qt-ci.yml").read_text() signer = workflow.split(" sign-nightly:\n", 1)[1].split(" publish-nightly:\n", 1)[0] publisher = workflow.split(" publish-nightly:\n", 1)[1] - self.assertIn("runs-on: blacksmith-2vcpu-ubuntu-2404", signer) + self.assertIn("runs-on: ubuntu-24.04", signer) self.assertIn("timeout-minutes: 30", signer) self.assertIn("name: Verify signing tools", signer) self.assertNotIn("actions/cache", signer) From df80212f5ba13245b3b7ac723ad7b3516dff079d Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 11:16:19 +0700 Subject: [PATCH 07/54] fix: avoid most-vexing-parse in TranslationHttp request construction --- opennow-qt/src/translation/TranslationHttp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opennow-qt/src/translation/TranslationHttp.cpp b/opennow-qt/src/translation/TranslationHttp.cpp index 0bf308fb9..bf79cad92 100644 --- a/opennow-qt/src/translation/TranslationHttp.cpp +++ b/opennow-qt/src/translation/TranslationHttp.cpp @@ -49,7 +49,7 @@ TranslationHttpResult TranslationHttp::request( // or use it on the GUI thread from the worker. for (int attempt = 0; attempt < 2; ++attempt) { QNetworkAccessManager manager; - QNetworkRequest request(QUrl(url)); + QNetworkRequest request(QUrl{url}); for (const auto &header : headers) request.setRawHeader(header.first, header.second); QNetworkReply *reply = nullptr; From 8bd44b41bf5704cb7c69c1f19be7bd23eee7b8f9 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 11:46:13 +0700 Subject: [PATCH 08/54] fix: clear QStrings instead of assigning {} in TranslationWorker --- opennow-qt/src/translation/TranslationWorker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opennow-qt/src/translation/TranslationWorker.cpp b/opennow-qt/src/translation/TranslationWorker.cpp index 89b04f1ee..a272ea04c 100644 --- a/opennow-qt/src/translation/TranslationWorker.cpp +++ b/opennow-qt/src/translation/TranslationWorker.cpp @@ -207,8 +207,8 @@ void TranslationWorker::processNext() // translate. Report success with empty text so the engine can // keep the previous translation instead of showing an error. result.ok = true; - result.original = {}; - result.translated = {}; + result.original.clear(); + result.translated.clear(); result.ocrMs = ocrMs; m_queue.finishRunning(); m_processing = false; From 293cd14af646839c85f2f028de8c746413d0e93e Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 11:52:43 +0700 Subject: [PATCH 09/54] fix: drop runAutomaticUpdates early return that broke updater tests --- opennow-qt/qml/state/ShellStore.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/opennow-qt/qml/state/ShellStore.qml b/opennow-qt/qml/state/ShellStore.qml index d3e5df9f0..a2a692ce6 100644 --- a/opennow-qt/qml/state/ShellStore.qml +++ b/opennow-qt/qml/state/ShellStore.qml @@ -1738,8 +1738,6 @@ QtObject { } function runAutomaticUpdates() { - if (root.vnTranslationBuild) - return // VN fork: no automatic upstream update checks (see above). if (!ready || !updaterSessionSafe || updaterBusy) return if (settings.autoDownloadUpdates === true && updaterState.canDownload === true) { From 841b0fd6e68e84225e953727645aebe22f237352 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 17:55:33 +0700 Subject: [PATCH 10/54] fix: translation settings persist in engine QSettings; add full-screen region --- docs/vn-translation/PROGRESS.md | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/vn-translation/PROGRESS.md b/docs/vn-translation/PROGRESS.md index e96390862..8d97bde03 100644 --- a/docs/vn-translation/PROGRESS.md +++ b/docs/vn-translation/PROGRESS.md @@ -346,3 +346,46 @@ running; R4–R8 are follow-ups.** file touched outside the original 3 shims, and it is documented in `UPDATER.md` §4. Full repoint to `duyzoz/OpenNOW-ORC` + a VN keypair is still a separate approved step touching `native/`. + +## 2026-11-11 — Live-test fix: toggle won't stay on + full-screen region (run #14) + +Ethan live-tested the run #13 build (video 17:34): Settings > Translation +renders correctly in Vietnamese, but the "Dịch màn hình" toggle flips ON +then back OFF after ~1s, and the TEST section says "Translation engine +chưa sẵn sàng". Root causes, both from the overnight build: + +1. `DesktopSettingsTranslationPage.qml` used `page.hasEngine` / + `page.keySaved` but never declared them (undefined = falsy), so + `pushToEngine()` always returned early — no setting ever reached the + engine, and Test / Save-key / Clear-cache stayed disabled. +2. Translation settings were written through `ShellStore.setSetting` to + the Rust core, whose `SettingsStore::set` rejects unknown keys + (`settings.rs:206` — "Unknown setting: translation.enabled" -> + `invalid_setting`). The optimistic apply showed the toggle ON for ~1s, + then `finishSettingWrite` -> `reconcileSetting` restored the old value. + +Fix (no `native/` changes — that area stays untouched per Ethan's order): +- The C++ engine is now the store of record: every setting is loaded + from / saved to QSettings under `translation/` (same store the + Gemini key already used). The QML page binds straight to the engine's + properties; the overlay's `syncEngineFromSettings()` (which would have + overwritten engine values with ShellStore fallbacks) is deleted. +- New preset "Toàn màn hình" (`full-screen`, rect 0,0,1,1): OCR reads the + whole frame — dialogue, menus, labels — not just the dialogue box. + Gemini OCR prompt widened from dialogue-only to all English text. + Full-screen frames never stabilize (HUD/animation pixels change every + frame), so the stability-hash gate is replaced by a 2s throttle + (`FullScreenIntervalMs`) in that mode. An in-place box over the whole + frame would hide the game, so selecting full-screen auto-switches the + display mode to subtitle (engine-side) and the overlay forces subtitle + for full-screen rects (defense in depth). +- Unit test `dialoguePresetRects` (static `dialogueRectForPreset` helper) + + Python mirror checks; `npm run locales:check` exit 0 (2326 texts, + 2 new qmlSource entries: `toan_man_hinh`, `toan_bo_man_hinh`). + +Still NOT fixed by this change — Ethan must do one of these for OCR to +run at all: paste a free Gemini API key (Google AI Studio) into the +Gemini API key field, or install Tesseract. Gemini Vision needs a key; +RapidOCR and Windows OCR are still stubs. The "Dịch thử" TEST button +works without a key (Google Translate, free). Live verification of the +toggle + full-screen translation is still Ethan's eyes. From 6f89e561b5bd13e44bfdb4895a7dfcef31fae65a Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 17:57:28 +0700 Subject: [PATCH 11/54] fix: translation settings persist in engine QSettings; add full-screen region --- locales/en.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locales/en.json b/locales/en.json index 815649ec7..245dbb27c 100644 --- a/locales/en.json +++ b/locales/en.json @@ -4573,6 +4573,8 @@ "tesseract": "Tesseract", "thanh_cuoi_man_hinh": "Thanh cuối màn hình", "tieng_viet": "Tiếng Việt", + "toan_bo_man_hinh": "Toàn bộ màn hình", + "toan_man_hinh": "Toàn màn hình", "translation_engine_chua_san_sang_ang_cho_phan_c_cai_at_ben_duoi_van_luu_binh_thuong": "Translation engine chưa sẵn sàng (đang chờ phần C++). Cài đặt bên dưới vẫn lưu bình thường.", "translation_engine_chua_san_sang": "Translation engine chưa sẵn sàng.", "trang_thai": "Trạng thái", From 8a3a2ba22d46d3f729f9a2002bf03e16c2afcd28 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 17:58:02 +0700 Subject: [PATCH 12/54] fix: translation settings persist in engine QSettings; add full-screen region --- .../pages/DesktopSettingsTranslationPage.qml | 113 ++++++------------ 1 file changed, 39 insertions(+), 74 deletions(-) diff --git a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml index a91c149e2..d6fe8d97d 100644 --- a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml +++ b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml @@ -4,11 +4,14 @@ import OpenNOW // Translation settings: screen OCR (EN source) -> Vietnamese overlay. // -// Persistence: every persisted key lives in ShellStore.settings under -// "translation." and is written through settingsScreen.setSetting — the -// same path every other page uses. The C++ translationEngine mirrors those -// settings into its live properties. The Gemini API key is the exception: it -// is NEVER written to ShellStore.settings; it goes only to +// Persistence: translation settings live in the C++ translationEngine, +// which persists them in QSettings under "translation/". They must +// NEVER go through ShellStore.settings: the Rust core rejects unknown +// setting keys ("Unknown setting: translation.enabled"), so a write +// through the core is rolled back about a second later and the toggle +// flips back off. Every control on this page binds straight to the +// engine's properties. The Gemini API key is the exception: it is NEVER +// written to ShellStore.settings; it goes only to // translationEngine.setGeminiApiKey() and this page only ever shows // "Đã lưu key" / "Chưa có key", never the key value. // @@ -24,56 +27,21 @@ Column { width: page.availableWidth; spacing: DesktopTokens.px(12) - function t(key, fallback) { return page.settingsScreen.valueSetting("translation." + key, fallback) } - function tb(key, fallback) { return page.settingsScreen.boolSetting("translation." + key, fallback) } - // Push one saved value into the live engine (no settings write). - function pushToEngine(key, value) { - if (!page.hasEngine) - return - if (key === "enabled") translationEngine.enabled = value === true - else if (key === "sourceLanguage") translationEngine.sourceLanguage = String(value) - else if (key === "targetLanguage") translationEngine.targetLanguage = String(value) - else if (key === "ocrEngine") translationEngine.ocrEngine = String(value) - else if (key === "translationProvider") translationEngine.translationProvider = String(value) - else if (key === "overlayMode") translationEngine.overlayMode = String(value) - else if (key === "stabilityDelayMs") translationEngine.stabilityDelayMs = Number(value) - else if (key === "fontSizePx") translationEngine.fontSizePx = Number(value) - else if (key === "showOriginal") translationEngine.showOriginal = value === true - else if (key === "cacheEnabled") translationEngine.cacheEnabled = value !== false - else if (key === "dialoguePreset") translationEngine.setDialoguePreset(String(value)) - } - function setT(key, value) { - page.settingsScreen.setSetting("translation." + key, value) - // Push the change to the live engine immediately (same reason as - // TranslationOverlay.syncEngineFromSettings): the engine cannot - // read ShellStore.settings itself, so a save alone would leave it - // on stale values until the stream screen reloads. - page.pushToEngine(key, value) - } + // The engine is a C++ context property registered by ApplicationStartup. + // (Was missing entirely in v1: every page.hasEngine read was undefined, + // so no setting ever reached the engine and the Test/Save/Clear buttons + // stayed disabled.) + readonly property bool hasEngine: typeof translationEngine !== "undefined" && translationEngine !== null + property bool keySaved: false Component.onCompleted: { - if (page.hasEngine) { + if (page.hasEngine) page.keySaved = translationEngine.hasGeminiApiKey() - // Sync saved settings into the engine now (push only — no - // settings writes), so the Test section below uses the saved - // engine/provider even before any stream. - page.pushToEngine("enabled", page.tb("enabled", false)) - page.pushToEngine("sourceLanguage", String(page.t("sourceLanguage", "en"))) - page.pushToEngine("targetLanguage", String(page.t("targetLanguage", "vi"))) - page.pushToEngine("ocrEngine", String(page.t("ocrEngine", "gemini-vision"))) - page.pushToEngine("translationProvider", String(page.t("translationProvider", "google"))) - page.pushToEngine("overlayMode", String(page.t("overlayMode", "inplace"))) - page.pushToEngine("stabilityDelayMs", Number(page.t("stabilityDelayMs", 400))) - page.pushToEngine("fontSizePx", Number(page.t("fontSizePx", 22))) - page.pushToEngine("showOriginal", page.tb("showOriginal", false)) - page.pushToEngine("cacheEnabled", page.tb("cacheEnabled", true)) - page.pushToEngine("dialoguePreset", String(page.t("dialoguePreset", "wuthering-waves"))) - } } - readonly property string ocrEngine: String(page.t("ocrEngine", "gemini-vision")) - readonly property string provider: String(page.t("translationProvider", "google")) - readonly property string overlayMode: String(page.t("overlayMode", "inplace")) + readonly property string ocrEngine: page.hasEngine ? String(translationEngine.ocrEngine || "gemini-vision") : "gemini-vision" + readonly property string provider: page.hasEngine ? String(translationEngine.translationProvider || "google") : "google" + readonly property string overlayMode: page.hasEngine ? String(translationEngine.overlayMode || "inplace") : "inplace" // (a) Bật / Tắt DesktopSettingsPanel { @@ -85,9 +53,9 @@ Column { showDivider: false DesktopSettingsToggle { objectName: "translationEnabledToggle" - checked: page.tb("enabled", false) + checked: page.hasEngine && translationEngine.enabled Accessible.name: qsTr("Dịch màn hình") - onValueChangedByUser: value => page.setT("enabled", value) + onValueChangedByUser: value => { if (page.hasEngine) translationEngine.enabled = value } } } DesktopSettingsRow { @@ -113,8 +81,8 @@ Column { {label: qsTr("Japanese"), value: "ja"}, {label: qsTr("Chinese"), value: "zh"} ] - value: String(page.t("sourceLanguage", "en")) - onSelected: value => page.setT("sourceLanguage", value) + value: page.hasEngine ? String(translationEngine.sourceLanguage || "en") : "en" + onSelected: value => { if (page.hasEngine) translationEngine.sourceLanguage = value } } DesktopSettingsChoice { objectName: "translationTargetLanguage" @@ -127,8 +95,8 @@ Column { {label: qsTr("Français"), value: "fr"}, {label: qsTr("Deutsch"), value: "de"} ] - value: String(page.t("targetLanguage", "vi")) - onSelected: value => page.setT("targetLanguage", value) + value: page.hasEngine ? String(translationEngine.targetLanguage || "vi") : "vi" + onSelected: value => { if (page.hasEngine) translationEngine.targetLanguage = value } } } @@ -149,7 +117,7 @@ Column { {label: qsTr("Windows OCR"), value: "windows-ocr", detail: qsTr("Chưa khả dụng trong bản này")} ] value: page.ocrEngine - onSelected: value => page.setT("ocrEngine", value) + onSelected: value => { if (page.hasEngine) translationEngine.ocrEngine = value } } DesktopSettingsChoice { objectName: "translationDialoguePreset" @@ -157,14 +125,11 @@ Column { description: qsTr("Vùng màn hình lấy chữ để dịch. Vùng thoại tuỳ chỉnh sẽ có ở bản sau; hiện chỉ chọn preset.") items: [ {label: qsTr("Wuthering Waves"), value: "wuthering-waves", detail: qsTr("Vùng thoại dưới màn hình · mặc định")}, - {label: qsTr("Generic"), value: "generic", detail: qsTr("Vùng thoại chung")} + {label: qsTr("Generic"), value: "generic", detail: qsTr("Vùng thoại chung")}, + {label: qsTr("Toàn màn hình"), value: "full-screen", detail: qsTr("Toàn bộ màn hình")} ] - value: String(page.t("dialoguePreset", "wuthering-waves")) - onSelected: value => { - page.setT("dialoguePreset", value) - if (page.hasEngine) - translationEngine.setDialoguePreset(value) - } + value: page.hasEngine ? String(translationEngine.dialoguePreset || "wuthering-waves") : "wuthering-waves" + onSelected: value => { if (page.hasEngine) translationEngine.setDialoguePreset(value) } } DesktopSettingsRow { width: parent.width; paperStyle: true; glyph: "speed"; title: qsTr("Độ ổn định") @@ -174,8 +139,8 @@ Column { objectName: "translationStabilitySlider" accessibleName: qsTr("Độ ổn định") from: 200; to: 1000; stepSize: 10; suffix: " ms" - value: Number(page.t("stabilityDelayMs", 400)) - onCommitted: value => page.setT("stabilityDelayMs", Math.round(value)) + value: page.hasEngine ? Number(translationEngine.stabilityDelayMs || 400) : 400 + onCommitted: value => { if (page.hasEngine) translationEngine.stabilityDelayMs = Math.round(value) } } } } @@ -195,7 +160,7 @@ Column { {label: qsTr("Gemini"), value: "gemini", detail: qsTr("Cần key Gemini")} ] value: page.provider - onSelected: value => page.setT("translationProvider", value) + onSelected: value => { if (page.hasEngine) translationEngine.translationProvider = value } } DesktopSettingsRow { width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Gemini API key") @@ -243,7 +208,7 @@ Column { {label: qsTr("Tắt hiển thị"), value: "off"} ] value: page.overlayMode - onSelected: value => page.setT("overlayMode", value) + onSelected: value => { if (page.hasEngine) translationEngine.overlayMode = value } } DesktopSettingsRow { width: parent.width; paperStyle: true; glyph: "sun"; title: qsTr("Cỡ chữ") @@ -252,8 +217,8 @@ Column { objectName: "translationFontSizeSlider" accessibleName: qsTr("Cỡ chữ") from: 16; to: 32; stepSize: 1; suffix: " px" - value: Number(page.t("fontSizePx", 22)) - onCommitted: value => page.setT("fontSizePx", Math.round(value)) + value: page.hasEngine ? Number(translationEngine.fontSizePx || 22) : 22 + onCommitted: value => { if (page.hasEngine) translationEngine.fontSizePx = Math.round(value) } } } DesktopSettingsRow { @@ -261,9 +226,9 @@ Column { description: qsTr("Hiện chữ gốc nhỏ bên dưới bản dịch.") DesktopSettingsToggle { objectName: "translationShowOriginalToggle" - checked: page.tb("showOriginal", false) + checked: page.hasEngine && translationEngine.showOriginal Accessible.name: qsTr("Hiện cả chữ gốc") - onValueChangedByUser: value => page.setT("showOriginal", value) + onValueChangedByUser: value => { if (page.hasEngine) translationEngine.showOriginal = value } } } DesktopSettingsRow { @@ -271,9 +236,9 @@ Column { description: qsTr("Câu đã dịch rồi thì dùng lại ngay, không gọi API nữa.") DesktopSettingsToggle { objectName: "translationCacheToggle" - checked: page.tb("cacheEnabled", true) + checked: page.hasEngine && translationEngine.cacheEnabled Accessible.name: qsTr("Cache bản dịch") - onValueChangedByUser: value => page.setT("cacheEnabled", value) + onValueChangedByUser: value => { if (page.hasEngine) translationEngine.cacheEnabled = value } } } DesktopSettingsRow { From e79ed22544f97c64410f79b7c8f12ae62020a1a7 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 17:58:30 +0700 Subject: [PATCH 13/54] fix: translation settings persist in engine QSettings; add full-screen region --- .../qml/desktop/stream/TranslationOverlay.qml | 44 ++++--------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml index 8e8e665e5..d2e5b1b7c 100644 --- a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml +++ b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml @@ -22,7 +22,14 @@ Item { readonly property bool hasEngine: typeof translationEngine !== "undefined" && translationEngine !== null readonly property bool engineOn: root.hasEngine && translationEngine.enabled readonly property bool hasText: root.hasEngine && translationEngine.hasTranslation - readonly property string mode: root.hasEngine ? String(translationEngine.overlayMode || "inplace") : "off" + // A full-screen region can never render in-place (the box would hide + // the whole game), so it always renders as a subtitle bar. The engine + // also switches overlayMode to subtitle when the preset is chosen; this + // is the defense in depth for a rect set any other way. + readonly property bool fullScreenRegion: root.hasEngine + && translationEngine.dialogueRect.width >= 0.99 && translationEngine.dialogueRect.height >= 0.99 + readonly property string mode: !root.hasEngine ? "off" + : root.fullScreenRegion ? "subtitle" : String(translationEngine.overlayMode || "inplace") // The parent screen (DesktopStreamScreen) exposes `streaming`; fall back // to showing on engine state alone when hosted anywhere else. readonly property bool parentStreaming: parent && parent.streaming !== undefined @@ -31,41 +38,6 @@ Item { visible: root.showing - // Settings -> engine sync (integration fix): QML is the only side that - // can read ShellStore.settings, so this overlay — instantiated on the - // stream screen — mirrors "translation.*" into the C++ engine on load - // and whenever the settings map changes. Without this, the engine - // would keep its defaults (enabled=false) forever no matter what the - // Settings page saved. applySetting() replaces the whole settings - // object (SettingsState.qml), so settingsChanged fires on every save. - function syncEngineFromSettings() { - if (!root.hasEngine) - return - const s = ShellStore.settings || ({}) - const get = (key, fallback) => { - const v = s["translation." + key] - return v === undefined || v === null ? fallback : v - } - translationEngine.enabled = get("enabled", false) === true - translationEngine.sourceLanguage = String(get("sourceLanguage", "en")) - translationEngine.targetLanguage = String(get("targetLanguage", "vi")) - translationEngine.ocrEngine = String(get("ocrEngine", "gemini-vision")) - translationEngine.translationProvider = String(get("translationProvider", "google")) - translationEngine.overlayMode = String(get("overlayMode", "inplace")) - translationEngine.stabilityDelayMs = Number(get("stabilityDelayMs", 400)) - translationEngine.fontSizePx = Number(get("fontSizePx", 22)) - translationEngine.showOriginal = get("showOriginal", false) === true - translationEngine.cacheEnabled = get("cacheEnabled", true) !== false - translationEngine.setDialoguePreset(String(get("dialoguePreset", "wuthering-waves"))) - } - - Component.onCompleted: root.syncEngineFromSettings() - - Connections { - target: ShellStore - function onSettingsChanged() { root.syncEngineFromSettings() } - } - // Dialogue area, normalized 0..1, from the engine (default // 0.05, 0.72, 0.90, 0.24). Converted to pixels against this item. readonly property rect dialogueRect: root.hasEngine From b2ea6fcde6ea92ba7ca0740ce54c3820ae83029d Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 17:58:55 +0700 Subject: [PATCH 14/54] fix: translation settings persist in engine QSettings; add full-screen region --- opennow-qt/src/translation/OcrEngine.cpp | 5 +- .../src/translation/TranslationEngine.cpp | 146 +++++++++++++++--- .../src/translation/TranslationEngine.h | 23 ++- 3 files changed, 152 insertions(+), 22 deletions(-) diff --git a/opennow-qt/src/translation/OcrEngine.cpp b/opennow-qt/src/translation/OcrEngine.cpp index db550be64..ca40ad489 100644 --- a/opennow-qt/src/translation/OcrEngine.cpp +++ b/opennow-qt/src/translation/OcrEngine.cpp @@ -13,10 +13,11 @@ namespace { constexpr auto GeminiModel = "gemini-2.5-flash-lite"; constexpr auto GeminiOcrPrompt = - "Extract only the English dialogue or subtitle text visible in this image. " + "Extract all English text visible in this image (dialogue, subtitles, menus, labels), " + "line by line, in reading order. " "Reply with JSON only, no other text: {\"text\": \"...\", \"confidence\": 0.0}. " "confidence is 0.0-1.0 for how sure you are the text is correct. " - "If no English dialogue text is visible, reply {\"text\": \"\", \"confidence\": 0}."; + "If no English text is visible, reply {\"text\": \"\", \"confidence\": 0}."; QString geminiUrl() { diff --git a/opennow-qt/src/translation/TranslationEngine.cpp b/opennow-qt/src/translation/TranslationEngine.cpp index 69d44ac97..950db1f9a 100644 --- a/opennow-qt/src/translation/TranslationEngine.cpp +++ b/opennow-qt/src/translation/TranslationEngine.cpp @@ -10,6 +10,16 @@ namespace { constexpr int KeepPreviousMs = 2000; +// Full-screen crops never stabilize: HUD pixels, animations and the game +// clock change every frame, so the stability timer would restart forever +// and OCR would never run. Full-screen mode throttles instead: at most +// one OCR job per interval, newest frame wins. +constexpr int FullScreenIntervalMs = 2000; + +bool isFullScreenRect(const QRectF &rect) +{ + return rect.width() >= 0.99 && rect.height() >= 0.99; +} QRectF clampNormalized(const QRectF &rect) { @@ -45,6 +55,14 @@ QString resolveDialogueDbPath() return QStringLiteral(":/translation/wuwa-dialogue-db.json"); return appData; // default target: loadDialogueDb() tolerates a missing file } +// Persist one translation setting under "translation/" in QSettings. +// The Rust core owns ShellStore.settings and rejects unknown keys, so +// translation settings must never go through it (see constructor). +void saveTranslationSetting(const QString &key, const QVariant &value) +{ + QSettings settings; + settings.setValue(QStringLiteral("translation/") + key, value); +} } // namespace TranslationEngine::TranslationEngine(QObject *parent) @@ -72,6 +90,54 @@ TranslationEngine::TranslationEngine(QObject *parent) QMetaObject::invokeMethod(m_worker, "setGeminiApiKey", Qt::QueuedConnection, Q_ARG(QString, m_geminiApiKey)); } + // Translation settings are persisted by THIS engine in QSettings + // (translation/), never through ShellStore.settings: the Rust + // core rejects unknown setting keys ("Unknown setting: + // translation.enabled"), so a write through the core is rolled back + // about a second later and the Settings toggle flips back off. The + // QML page binds straight to this engine's properties. + { + const QSettings settings; + m_enabled = settings.value(QStringLiteral("translation/enabled"), false).toBool(); + m_sourceLanguage = settings.value(QStringLiteral("translation/sourceLanguage"), + QStringLiteral("en")).toString(); + m_targetLanguage = settings.value(QStringLiteral("translation/targetLanguage"), + QStringLiteral("vi")).toString(); + m_ocrEngine = settings.value(QStringLiteral("translation/ocrEngine"), + QStringLiteral("gemini-vision")).toString(); + m_translationProvider = settings.value(QStringLiteral("translation/translationProvider"), + QStringLiteral("google")).toString(); + m_overlayMode = settings.value(QStringLiteral("translation/overlayMode"), + QStringLiteral("inplace")).toString(); + m_stabilityDelayMs = settings.value(QStringLiteral("translation/stabilityDelayMs"), 400).toInt(); + m_fontSizePx = settings.value(QStringLiteral("translation/fontSizePx"), 22).toInt(); + m_showOriginal = settings.value(QStringLiteral("translation/showOriginal"), false).toBool(); + m_cacheEnabled = settings.value(QStringLiteral("translation/cacheEnabled"), true).toBool(); + m_dialoguePreset = settings.value(QStringLiteral("translation/dialoguePreset"), + QStringLiteral("wuthering-waves")).toString(); + const QRectF presetRect = dialogueRectForPreset(m_dialoguePreset); + if (!presetRect.isNull()) + m_dialogueRect = presetRect; + else + m_dialoguePreset = QStringLiteral("wuthering-waves"); + // Clamp anything a hand-edited config file may have corrupted. + if (m_sourceLanguage.isEmpty()) + m_sourceLanguage = QStringLiteral("en"); + if (m_targetLanguage.isEmpty()) + m_targetLanguage = QStringLiteral("vi"); + if (!QStringList{QStringLiteral("gemini-vision"), QStringLiteral("tesseract"), + QStringLiteral("rapidocr"), QStringLiteral("windows-ocr")} + .contains(m_ocrEngine)) + m_ocrEngine = QStringLiteral("gemini-vision"); + if (!QStringList{QStringLiteral("google"), QStringLiteral("gemini")} + .contains(m_translationProvider)) + m_translationProvider = QStringLiteral("google"); + if (!QStringList{QStringLiteral("inplace"), QStringLiteral("subtitle"), QStringLiteral("off")} + .contains(m_overlayMode)) + m_overlayMode = QStringLiteral("inplace"); + m_stabilityDelayMs = qBound(0, m_stabilityDelayMs, 5000); + m_fontSizePx = qBound(10, m_fontSizePx, 64); + } setStatus(QStringLiteral("Translation ready")); } @@ -115,6 +181,7 @@ void TranslationEngine::setEnabled(bool enabled) if (m_enabled == enabled) return; m_enabled = enabled; + saveTranslationSetting(QStringLiteral("enabled"), enabled); if (!m_enabled) { m_stabilityTimer.stop(); m_pendingHash.clear(); @@ -131,6 +198,7 @@ void TranslationEngine::setSourceLanguage(const QString &language) if (language.isEmpty() || m_sourceLanguage == language) return; m_sourceLanguage = language; + saveTranslationSetting(QStringLiteral("sourceLanguage"), language); emit sourceLanguageChanged(); } @@ -139,6 +207,7 @@ void TranslationEngine::setTargetLanguage(const QString &language) if (language.isEmpty() || m_targetLanguage == language) return; m_targetLanguage = language; + saveTranslationSetting(QStringLiteral("targetLanguage"), language); emit targetLanguageChanged(); } @@ -149,6 +218,7 @@ void TranslationEngine::setOcrEngine(const QString &engine) if (!valid.contains(engine) || m_ocrEngine == engine) return; m_ocrEngine = engine; + saveTranslationSetting(QStringLiteral("ocrEngine"), engine); emit ocrEngineChanged(); } @@ -158,6 +228,7 @@ void TranslationEngine::setTranslationProvider(const QString &provider) if (!valid.contains(provider) || m_translationProvider == provider) return; m_translationProvider = provider; + saveTranslationSetting(QStringLiteral("translationProvider"), provider); emit translationProviderChanged(); } @@ -168,6 +239,7 @@ void TranslationEngine::setOverlayMode(const QString &mode) if (!valid.contains(mode) || m_overlayMode == mode) return; m_overlayMode = mode; + saveTranslationSetting(QStringLiteral("overlayMode"), mode); emit overlayModeChanged(); } @@ -177,6 +249,7 @@ void TranslationEngine::setStabilityDelayMs(int ms) if (m_stabilityDelayMs == ms) return; m_stabilityDelayMs = ms; + saveTranslationSetting(QStringLiteral("stabilityDelayMs"), ms); emit stabilityDelayMsChanged(); } @@ -186,6 +259,7 @@ void TranslationEngine::setFontSizePx(int px) if (m_fontSizePx == px) return; m_fontSizePx = px; + saveTranslationSetting(QStringLiteral("fontSizePx"), px); emit fontSizePxChanged(); } @@ -194,6 +268,7 @@ void TranslationEngine::setShowOriginal(bool show) if (m_showOriginal == show) return; m_showOriginal = show; + saveTranslationSetting(QStringLiteral("showOriginal"), show); emit showOriginalChanged(); } @@ -202,6 +277,7 @@ void TranslationEngine::setCacheEnabled(bool enabled) if (m_cacheEnabled == enabled) return; m_cacheEnabled = enabled; + saveTranslationSetting(QStringLiteral("cacheEnabled"), enabled); emit cacheEnabledChanged(); } @@ -214,15 +290,35 @@ void TranslationEngine::setDialogueRect(const QRectF &rect) emit dialogueRectChanged(); } +QRectF TranslationEngine::dialogueRectForPreset(const QString &preset) +{ + if (preset == QStringLiteral("wuthering-waves")) + return QRectF(0.05, 0.72, 0.90, 0.24); + if (preset == QStringLiteral("generic")) + return QRectF(0.05, 0.60, 0.90, 0.30); + if (preset == QStringLiteral("full-screen")) + return QRectF(0, 0, 1, 1); + return QRectF(); +} + void TranslationEngine::setDialoguePreset(const QString &preset) { - if (preset == QStringLiteral("wuthering-waves")) { - setDialogueRect(QRectF(0.05, 0.72, 0.90, 0.24)); - } else if (preset == QStringLiteral("generic")) { - setDialogueRect(QRectF(0.05, 0.60, 0.90, 0.30)); - } else { + const QRectF rect = dialogueRectForPreset(preset); + if (rect.isNull()) { setError(QStringLiteral("Unknown dialogue preset")); + return; } + const bool changed = m_dialoguePreset != preset; + m_dialoguePreset = preset; + if (changed) { + saveTranslationSetting(QStringLiteral("dialoguePreset"), preset); + emit dialoguePresetChanged(); + } + setDialogueRect(rect); + // An in-place box over the whole frame would hide the game: show the + // full-screen translation as a subtitle bar instead. + if (preset == QStringLiteral("full-screen") && m_overlayMode == QStringLiteral("inplace")) + setOverlayMode(QStringLiteral("subtitle")); } void TranslationEngine::setGeminiApiKey(const QString &key) @@ -268,6 +364,15 @@ void TranslationEngine::onStreamFrame(const QImage &image) return; if (hash == m_lastProcessedHash) return; // already translated this exact crop + if (isFullScreenRect(m_dialogueRect)) { + // Full-screen crops never stabilize (see FullScreenIntervalMs): + // throttle instead of waiting for a still frame. + if (m_fullScreenThrottle.isValid() && m_fullScreenThrottle.elapsed() < FullScreenIntervalMs) + return; + m_fullScreenThrottle.restart(); + submitCrop(crop, hash, m_dialogueRect); + return; + } if (hash != m_pendingHash) { // New content: (re)start the stability wait. m_pendingHash = hash; @@ -279,18 +384,9 @@ void TranslationEngine::onStreamFrame(const QImage &image) // do not restart it. } -void TranslationEngine::onStabilityTimeout() +void TranslationEngine::submitCrop(const QImage &crop, const QString &hash, const QRectF &rect) { - if (!m_enabled || m_pendingHash.isEmpty() || m_pendingCrop.isNull()) - return; - if (m_pendingHash == m_lastProcessedHash) - return; - m_lastProcessedHash = m_pendingHash; - const QImage crop = m_pendingCrop; - const QRectF rect = m_pendingRect; - m_pendingHash.clear(); - m_pendingCrop = QImage(); - + m_lastProcessedHash = hash; if (m_overlayMode == QStringLiteral("off")) return; @@ -300,7 +396,7 @@ void TranslationEngine::onStabilityTimeout() // requestTestTranslation, and every worker result is inserted into // both caches, so the two stay in sync.) if (m_cacheEnabled) { - const auto hit = m_hashCache.constFind(m_lastProcessedHash); + const auto hit = m_hashCache.constFind(hash); if (hit != m_hashCache.constEnd()) { emitTranslation(hit->first, hit->second, rect, 0, 0, true); return; @@ -309,7 +405,7 @@ void TranslationEngine::onStabilityTimeout() TranslationJob job; job.crop = crop; - job.cropHash = m_lastProcessedHash; + job.cropHash = hash; job.sourceRect = rect; job.ocrEngineId = m_ocrEngine; job.providerId = m_translationProvider; @@ -321,6 +417,20 @@ void TranslationEngine::onStabilityTimeout() Q_ARG(TranslationJob, job)); } +void TranslationEngine::onStabilityTimeout() +{ + if (!m_enabled || m_pendingHash.isEmpty() || m_pendingCrop.isNull()) + return; + if (m_pendingHash == m_lastProcessedHash) + return; + const QImage crop = m_pendingCrop; + const QString hash = m_pendingHash; + const QRectF rect = m_pendingRect; + m_pendingHash.clear(); + m_pendingCrop = QImage(); + submitCrop(crop, hash, rect); +} + void TranslationEngine::requestTestTranslation(const QString &englishText) { const QString text = englishText.trimmed(); diff --git a/opennow-qt/src/translation/TranslationEngine.h b/opennow-qt/src/translation/TranslationEngine.h index 23fe3ef06..78f74bd56 100644 --- a/opennow-qt/src/translation/TranslationEngine.h +++ b/opennow-qt/src/translation/TranslationEngine.h @@ -8,8 +8,10 @@ // Pipeline (onStreamFrame, GUI thread only): // 1. Ignore when disabled or the image is null/empty. // 2. Crop dialogueRect (normalized 0..1) and SHA-256-hash the crop. -// 3. Only proceed once the hash is unchanged for stabilityDelayMs -// (QTimer restarts on every hash change). +// 3. Dialogue presets only proceed once the hash is unchanged for +// stabilityDelayMs (QTimer restarts on every hash change). The +// full-screen preset never stabilizes (HUD/animation pixels change +// every frame), so it submits at most once per 2s instead. // 4. Cache lookup first: WuWa dialogue DB, then the memory cache. // A hit emits translationReady immediately (lastCacheHit=true) with // no network at all. @@ -21,6 +23,7 @@ // for 2s, and no garbage text is ever emitted. #pragma once +#include #include #include #include @@ -51,6 +54,9 @@ class TranslationEngine : public QObject Q_PROPERTY(QString lastTranslatedText READ lastTranslatedText NOTIFY translationTextChanged) Q_PROPERTY(QString lastOriginalText READ lastOriginalText NOTIFY translationTextChanged) Q_PROPERTY(QRectF dialogueRect READ dialogueRect WRITE setDialogueRect NOTIFY dialogueRectChanged) + // "wuthering-waves" (dialogue bottom bar), "generic" (lower third), + // "full-screen" (whole frame — every line of text, not just dialogue). + Q_PROPERTY(QString dialoguePreset READ dialoguePreset WRITE setDialoguePreset NOTIFY dialoguePresetChanged) Q_PROPERTY(qint64 lastOcrMs READ lastOcrMs NOTIFY translationTextChanged) Q_PROPERTY(qint64 lastTranslateMs READ lastTranslateMs NOTIFY translationTextChanged) Q_PROPERTY(bool lastCacheHit READ lastCacheHit NOTIFY translationTextChanged) @@ -93,6 +99,9 @@ class TranslationEngine : public QObject QString lastOriginalText() const { return m_lastOriginalText; } QRectF dialogueRect() const { return m_dialogueRect; } void setDialogueRect(const QRectF &rect); + QString dialoguePreset() const { return m_dialoguePreset; } + // Normalized rect for a preset, or a null rect for an unknown preset. + static QRectF dialogueRectForPreset(const QString &preset); qint64 lastOcrMs() const { return m_lastOcrMs; } qint64 lastTranslateMs() const { return m_lastTranslateMs; } bool lastCacheHit() const { return m_lastCacheHit; } @@ -123,6 +132,7 @@ class TranslationEngine : public QObject void showOriginalChanged(); void cacheEnabledChanged(); void dialogueRectChanged(); + void dialoguePresetChanged(); void hasTranslationChanged(); private slots: @@ -133,6 +143,9 @@ private slots: private: void setStatus(const QString &status); void setError(const QString &error); + // Cache-first submit of one stable crop to the worker (shared by the + // stability-timeout path and the full-screen throttle path). + void submitCrop(const QImage &crop, const QString &hash, const QRectF &rect); void emitTranslation(const QString &original, const QString &translated, const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, bool cacheHit); @@ -152,6 +165,7 @@ private slots: QString m_lastTranslatedText; QString m_lastOriginalText; QRectF m_dialogueRect = QRectF(0.05, 0.72, 0.90, 0.24); + QString m_dialoguePreset = QStringLiteral("wuthering-waves"); qint64 m_lastOcrMs = 0; qint64 m_lastTranslateMs = 0; bool m_lastCacheHit = false; @@ -165,6 +179,11 @@ private slots: QTimer m_stabilityTimer; QTimer m_keepPreviousTimer; + // Full-screen throttle: a full frame never sits still long enough for + // the stability timer, so full-screen frames submit at most once per + // FullScreenIntervalMs instead. Invalid until the first full-screen + // frame, so the first frame submits immediately. + QElapsedTimer m_fullScreenThrottle; QString m_pendingHash; QImage m_pendingCrop; // detached copy of the stable crop QRectF m_pendingRect; From ded8d117885976f59040c550b3bc4ca33c24abca Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 17:59:19 +0700 Subject: [PATCH 15/54] fix: translation settings persist in engine QSettings; add full-screen region --- opennow-qt/tests/translation_logic_check.py | 22 +++++++++++++++++++++ opennow-qt/tests/tst_translation.cpp | 13 ++++++++++++ 2 files changed, 35 insertions(+) diff --git a/opennow-qt/tests/translation_logic_check.py b/opennow-qt/tests/translation_logic_check.py index e5971d049..2eab4dd84 100644 --- a/opennow-qt/tests/translation_logic_check.py +++ b/opennow-qt/tests/translation_logic_check.py @@ -44,6 +44,18 @@ def crop_image(pixels, width, height, rect): return out +def dialogue_rect_for_preset(preset): + # Mirrors TranslationEngine::dialogueRectForPreset: normalized (x, y, w, h), + # or None for an unknown preset. + if preset == "wuthering-waves": + return (0.05, 0.72, 0.90, 0.24) + if preset == "generic": + return (0.05, 0.60, 0.90, 0.30) + if preset == "full-screen": + return (0, 0, 1, 1) + return None + + class TranslationJobQueue: """Mirrors TranslationJobQueue: 1 running + 1 waiting, newest wins.""" @@ -115,6 +127,16 @@ def main(): crop = crop_image(frame, 200, 100, (0.05, 0.72, 0.90, 0.24)) check("default dialogue crop is 180x24", len(crop) == 180 * 24) + # Dialogue presets mirror TranslationEngine::dialogueRectForPreset. + check("preset wuthering-waves rect", + dialogue_rect_for_preset("wuthering-waves") == (0.05, 0.72, 0.90, 0.24)) + check("preset generic rect", + dialogue_rect_for_preset("generic") == (0.05, 0.60, 0.90, 0.30)) + check("preset full-screen covers whole frame", + dialogue_rect_for_preset("full-screen") == (0, 0, 1, 1)) + check("preset unknown -> None", + dialogue_rect_for_preset("bogus") is None) + # 3. Bounded queue drops the stale waiting job. q = TranslationJobQueue() assert q.submit("first") and q.running == "first" and q.waiting is None diff --git a/opennow-qt/tests/tst_translation.cpp b/opennow-qt/tests/tst_translation.cpp index 3c21f3e7f..cd091d340 100644 --- a/opennow-qt/tests/tst_translation.cpp +++ b/opennow-qt/tests/tst_translation.cpp @@ -200,6 +200,19 @@ private slots: QCOMPARE(gemini.recognize(image).status, OcrResult::Status::NotAvailable); QVERIFY(createOcrEngine(QStringLiteral("bogus")) == nullptr); } + + void dialoguePresetRects() + { + QCOMPARE(TranslationEngine::dialogueRectForPreset(QStringLiteral("wuthering-waves")), + QRectF(0.05, 0.72, 0.90, 0.24)); + QCOMPARE(TranslationEngine::dialogueRectForPreset(QStringLiteral("generic")), + QRectF(0.05, 0.60, 0.90, 0.30)); + // Full screen: the whole frame, so every line of text is OCR'd, + // not just the dialogue box. + QCOMPARE(TranslationEngine::dialogueRectForPreset(QStringLiteral("full-screen")), + QRectF(0, 0, 1, 1)); + QVERIFY(TranslationEngine::dialogueRectForPreset(QStringLiteral("bogus")).isNull()); + } }; QTEST_MAIN(TranslationTest) From 14eab04785a679dd7ef0c0f431d8e236a63b18eb Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 19:13:18 +0700 Subject: [PATCH 16/54] v2 translation: per-line in-place overlay + frame pump + test separation --- docs/vn-translation/PROGRESS.md | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/docs/vn-translation/PROGRESS.md b/docs/vn-translation/PROGRESS.md index 8d97bde03..d3e26bd86 100644 --- a/docs/vn-translation/PROGRESS.md +++ b/docs/vn-translation/PROGRESS.md @@ -389,3 +389,71 @@ Gemini API key field, or install Tesseract. Gemini Vision needs a key; RapidOCR and Windows OCR are still stubs. The "Dịch thử" TEST button works without a key (Google Translate, free). Live verification of the toggle + full-screen translation is still Ethan's eyes. + +## v2 — per-line in-place overlay + frame pump (2026-11-11 evening, local commit TBD) + +Ethan's live test of run #20 (video, 61s of WuWa gameplay): the translation +never overwrote any English text. The ONLY thing on screen the whole video +was one black subtitle bar at the bottom showing the same sentence — +"Rover đi vào thành phố, tìm kiếm câu trả lời." — the default "Dịch thử" +test input. He is right: v1 did not do what he asked for. + +Root causes found by reading the code (not guessing): +1. NO FRAMES: `screenshotReady` fires only for an explicit screenshot + request (`requestScreenshot()` → fulfilled on the next presented frame + by `NativeStreamRenderCallback::prepareFrame`). During normal gameplay + nothing ever requests one, so `TranslationEngine::onStreamFrame` is + never called and live OCR literally never runs. +2. TEST LEAK: `requestTestTranslation` went through `emitTranslation`, + which sets `hasTranslation` + emits `translationReady` — so the TEST + result stuck on the live overlay as a permanent subtitle bar. With no + jobs ever running, no error ever cleared it after 2s, so it stayed for + the whole video. +3. DESIGN GAP: even with frames, v1 drew ONE box over the dialogue area + (or a subtitle bar for full-screen) — never Vietnamese text positioned + over each English line. That is not "dịch đè lên chữ tiếng Anh cũ". + +Fix (this change): +- Frame pump: `TranslationEngine` runs a 1s `QTimer` while enabled and + emits `frameRequested`; `ApplicationStartup` connects it to + `NativeStreamRuntime::requestScreenshot()`. Verified safe: + `requestScreenshot()` is a no-op while no stream is presenting and + while one is already pending, and `AppController::saveStreamScreenshot` + only saves when the user took a screenshot (`m_screenshotPending`) — + the pump can neither pile up nor write files. +- Per-line blocks: OCR now returns `OcrBlock{text, rect}` per line + (rect normalized 0..1 within the crop). Gemini prompt asks for JSON + `{"blocks": [{text, x, y, w, h}], "confidence"}` (old `{"text"}` shape + still accepted as one whole-image block). Tesseract runs `tsv` first + and groups level-5 word rows into lines by (block, par, line), with a + plain-text fallback as one whole-image block. +- Worker translates the blocks joined with "\n" in ONE call (Google free + endpoint preserves line breaks), splits the reply back onto the blocks + (count mismatch → per-block fallback, never a guessed mapping), maps + each block rect to full-frame coords via `mapBlockRectToFrame`, and + never emits an empty block (an empty translation leaves the English + line visible instead of covering it with an empty box). +- Engine publishes `translationBlocks` (QVariantList of + `{original, translated, x, y, w, h}`); the overlay's in-place mode is + now a `Repeater` drawing one box per block, padded 8px, exactly over + its English line. Subtitle mode joins the live blocks (never + `lastTranslatedText`). Full-screen no longer forces subtitle anywhere + (engine `setDialoguePreset` + overlay): per-line boxes work for the + whole frame. +- TEST separation: `TranslationJob.testJob` flows through the worker + result; `setTestResult` updates only the TEST section's `last*` fields + + status — never `hasTranslation`, `translationBlocks`, or + `translationReady`. A failed test job also leaves the live overlay + alone. +- Hash cache now stores blocks too, so a repeated identical crop still + hits before any OCR/network. +- New unit tests: `mapBlockRectToFrame`, `blocksToVariantListRoundTrip`, + `testJobDoesNotShowOnStream` (engine instance, no network), and + `framePumpFiresWhenEnabled` (QSignalSpy, 1s pump). Python mirror 25/25; + `npm run locales:check` exit 0 (2326 texts, no new strings). + +Still NOT proven live: per-line box positions from real Gemini JSON +(coordinates are the model's guess), the 1s pump's cost on his HD 4400, +and the full flow end-to-end. Only Ethan's EliteBook can prove it — the +overlay lives inside the Windows app on his machine, so no browser +session (and no login as him) could test it. From 0f274c6ef72fe424b9be276a49a443ebaf925bfd Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 19:13:56 +0700 Subject: [PATCH 17/54] v2 translation: per-line in-place overlay + frame pump + test separation --- .../qml/desktop/stream/TranslationOverlay.qml | 96 +++++++++++-------- 1 file changed, 55 insertions(+), 41 deletions(-) diff --git a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml index d2e5b1b7c..633336d92 100644 --- a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml +++ b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml @@ -22,14 +22,12 @@ Item { readonly property bool hasEngine: typeof translationEngine !== "undefined" && translationEngine !== null readonly property bool engineOn: root.hasEngine && translationEngine.enabled readonly property bool hasText: root.hasEngine && translationEngine.hasTranslation - // A full-screen region can never render in-place (the box would hide - // the whole game), so it always renders as a subtitle bar. The engine - // also switches overlayMode to subtitle when the preset is chosen; this - // is the defense in depth for a rect set any other way. - readonly property bool fullScreenRegion: root.hasEngine - && translationEngine.dialogueRect.width >= 0.99 && translationEngine.dialogueRect.height >= 0.99 + // One entry per translated line: {original, translated, x, y, w, h} + // with x/y/w/h normalized 0..1 in full-frame coordinates. In-place + // mode draws one box per entry, exactly over the English line. + readonly property var blocks: root.hasEngine ? translationEngine.translationBlocks : [] readonly property string mode: !root.hasEngine ? "off" - : root.fullScreenRegion ? "subtitle" : String(translationEngine.overlayMode || "inplace") + : String(translationEngine.overlayMode || "inplace") // The parent screen (DesktopStreamScreen) exposes `streaming`; fall back // to showing on engine state alone when hosted anywhere else. readonly property bool parentStreaming: parent && parent.streaming !== undefined @@ -38,21 +36,17 @@ Item { visible: root.showing - // Dialogue area, normalized 0..1, from the engine (default - // 0.05, 0.72, 0.90, 0.24). Converted to pixels against this item. - readonly property rect dialogueRect: root.hasEngine - ? translationEngine.dialogueRect : Qt.rect(0.05, 0.72, 0.90, 0.24) - readonly property real boxX: Math.max(0, Math.min(root.dialogueRect.x * root.width, - Math.max(0, root.width - root.dialogueRect.width * root.width))) - readonly property real boxY: Math.max(0, Math.min(root.dialogueRect.y * root.height, - Math.max(0, root.height - root.dialogueRect.height * root.height))) - readonly property real boxW: Math.max(0, Math.min(root.dialogueRect.width * root.width, root.width)) - readonly property real boxH: Math.max(0, Math.min(root.dialogueRect.height * root.height, root.height)) - readonly property int baseFontSize: root.hasEngine ? Number(translationEngine.fontSizePx || 22) : 22 readonly property bool showOriginal: root.hasEngine && translationEngine.showOriginal === true - readonly property string translatedText: root.hasEngine ? String(translationEngine.lastTranslatedText || "") : "" - readonly property string originalText: root.hasEngine ? String(translationEngine.lastOriginalText || "") : "" + // Subtitle mode shows the live blocks joined as lines — never + // lastTranslatedText/lastOriginalText: those are the TEST section's + // fields, and a "Dịch thử" result must never leak onto the stream. + readonly property string blockTranslatedText: root.blocks.map(function(b) { + return String(b.translated || "") + }).join("\n") + readonly property string blockOriginalText: root.blocks.map(function(b) { + return String(b.original || "") + }).join("\n") readonly property string timingText: { if (!root.hasEngine) @@ -110,19 +104,40 @@ Item { } } - // (a) In-place: translated text drawn over the game's dialogue area, - // covering the original line. - TranslationBox { - id: inplaceBox - visible: root.showing && root.mode === "inplace" - x: root.boxX - y: root.boxY - width: root.boxW - height: root.boxH - translated: root.translatedText - original: root.originalText - showOriginalText: root.showOriginal - baseFontSize: root.baseFontSize + // (a) In-place: one Vietnamese box per English line, drawn exactly + // over the line it translates (the box is padded 8px so the text sits + // on the original, and never smaller than the font needs). + Repeater { + id: blockRepeater + model: root.showing && root.mode === "inplace" ? root.blocks : [] + delegate: TranslationBox { + required property var modelData + readonly property real blockW: Math.max(DesktopTokens.px(60), + Math.min(Number(modelData.w || 0) * root.width + DesktopTokens.px(16), root.width)) + readonly property real blockH: Math.max(root.baseFontSize + DesktopTokens.px(24), + Math.min(Number(modelData.h || 0) * root.height + DesktopTokens.px(16), root.height)) + x: Math.max(0, Math.min(Number(modelData.x || 0) * root.width - DesktopTokens.px(8), + root.width - blockW)) + y: Math.max(0, Math.min(Number(modelData.y || 0) * root.height - DesktopTokens.px(8), + root.height - blockH)) + width: blockW + height: blockH + translated: String(modelData.translated || "") + original: String(modelData.original || "") + showOriginalText: root.showOriginal + baseFontSize: root.baseFontSize + } + } + + // Top edge of the highest in-place box, for the timing pill. + readonly property real topBlockY: { + let top = root.height + for (let i = 0; i < root.blocks.length; i++) { + const y = Number(root.blocks[i].y || 0) * root.height + if (y < top) + top = y + } + return top } // (b) Subtitle: full-width bar pinned to the bottom of the screen. @@ -136,14 +151,15 @@ Item { anchors.rightMargin: DesktopTokens.px(16) anchors.bottomMargin: DesktopTokens.px(16) height: DesktopTokens.px(90) - translated: root.translatedText - original: root.originalText + translated: root.blockTranslatedText + original: root.blockOriginalText showOriginalText: root.showOriginal baseFontSize: root.baseFontSize } - // Timing pill, only while a translation is shown. Sits just above the - // active box, right-aligned, clamped inside the screen. + // Timing pill, only while a translation is shown. In-place it sits + // just above the highest translated line; in subtitle mode above the + // bar. Right-aligned, clamped inside the screen. Rectangle { id: statusPill visible: root.showing @@ -152,11 +168,9 @@ Item { radius: height / 2 color: "black" opacity: 0.7 - x: root.mode === "inplace" - ? Math.max(0, Math.min(root.boxX + root.boxW - width, root.width - width)) - : Math.max(0, root.width - width - DesktopTokens.px(16)) + x: Math.max(0, root.width - width - DesktopTokens.px(16)) y: root.mode === "inplace" - ? Math.max(0, root.boxY - height - DesktopTokens.px(6)) + ? Math.max(0, root.topBlockY - height - DesktopTokens.px(6)) : Math.max(0, root.height - DesktopTokens.px(90 + 16) - height - DesktopTokens.px(6)) Text { id: statusLabel From 87c4e62a931570716d530d520f641567af3ac553 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 19:14:29 +0700 Subject: [PATCH 18/54] v2 translation: per-line in-place overlay + frame pump + test separation --- opennow-qt/src/app/ApplicationStartup.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/opennow-qt/src/app/ApplicationStartup.cpp b/opennow-qt/src/app/ApplicationStartup.cpp index 71bd1b930..24ae2967f 100644 --- a/opennow-qt/src/app/ApplicationStartup.cpp +++ b/opennow-qt/src/app/ApplicationStartup.cpp @@ -258,6 +258,15 @@ static int runApplicationSession(int argc, char *argv[], QString &restartExecuta QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::screenshotReady, &translationEngine, &TranslationEngine::onStreamFrame, Qt::QueuedConnection); + // Frame pump: screenshotReady only fires for an explicit screenshot + // request, so the engine asks for one frame per second while it is + // enabled. Without this the engine receives no frames during gameplay + // and live OCR never runs. requestScreenshot() is a no-op while no + // stream is presenting and while one is already pending, and + // saveStreamScreenshot only saves when the user took a screenshot, so + // the pump can neither pile up nor write files. + QObject::connect(&translationEngine, &TranslationEngine::frameRequested, + &nativeStreamRuntime, &NativeStreamRuntime::requestScreenshot); QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::controllerRumbleRequested, &controllerInput, &ControllerInput::playRumble); QObject::connect(&nativeStreamRuntime, &NativeStreamRuntime::controllerRumbleStopped, From eaf290a6e1964caa180c6a1efc7aa88b5ef1e786 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 19:15:07 +0700 Subject: [PATCH 19/54] v2 translation: per-line in-place overlay + frame pump + test separation --- opennow-qt/src/translation/OcrEngine.cpp | 190 ++++++++++++++---- opennow-qt/src/translation/OcrEngine.h | 17 ++ .../src/translation/TranslationEngine.cpp | 105 ++++++++-- .../src/translation/TranslationEngine.h | 50 ++++- .../src/translation/TranslationWorker.cpp | 77 ++++++- .../src/translation/TranslationWorker.h | 24 +++ 6 files changed, 407 insertions(+), 56 deletions(-) diff --git a/opennow-qt/src/translation/OcrEngine.cpp b/opennow-qt/src/translation/OcrEngine.cpp index ca40ad489..d87e2968d 100644 --- a/opennow-qt/src/translation/OcrEngine.cpp +++ b/opennow-qt/src/translation/OcrEngine.cpp @@ -7,17 +7,25 @@ #include #include #include +#include +#include #include #include namespace { constexpr auto GeminiModel = "gemini-2.5-flash-lite"; +// The model must return one block PER LINE, with the block's position in +// the image — the overlay draws one Vietnamese box over each English line, +// so coordinates are the whole point. x/y/w/h are fractions of the image +// (0.0-1.0). If the model ignores the shape and returns the old {"text"} +// form, parseGeminiOcrText wraps it as one whole-image block. constexpr auto GeminiOcrPrompt = "Extract all English text visible in this image (dialogue, subtitles, menus, labels), " - "line by line, in reading order. " - "Reply with JSON only, no other text: {\"text\": \"...\", \"confidence\": 0.0}. " - "confidence is 0.0-1.0 for how sure you are the text is correct. " - "If no English text is visible, reply {\"text\": \"\", \"confidence\": 0}."; + "one block per line of text, in reading order. " + "Reply with JSON only, no other text: {\"blocks\": [{\"text\": \"...\", \"x\": 0.0, \"y\": 0.0, " + "\"w\": 0.0, \"h\": 0.0}], \"confidence\": 0.0}. " + "x, y, w, h are the block's position and size as fractions of the image (0.0-1.0). " + "If no English text is visible, reply {\"blocks\": [], \"confidence\": 0}."; QString geminiUrl() { @@ -27,7 +35,11 @@ QString geminiUrl() // Parses the model's JSON reply out of the Gemini response envelope. // Strips ```json fences if the model added them despite the prompt. -bool parseGeminiOcrText(const QByteArray &body, QString &text, double &confidence, QString &error) +// Fills text (blocks joined with "\n") and blocks (one per line, rect +// normalized 0..1 within the image, clamped and empty/zero-area blocks +// dropped). Accepts the old {"text": ...} shape as one whole-image block. +bool parseGeminiOcrText(const QByteArray &body, QString &text, QList &blocks, + double &confidence, QString &error) { const QJsonDocument doc = QJsonDocument::fromJson(body); if (!doc.isObject()) { @@ -60,8 +72,36 @@ bool parseGeminiOcrText(const QByteArray &body, QString &text, double &confidenc error = QStringLiteral("OCR service returned unparsable text"); return false; } - text = inner.object().value(QStringLiteral("text")).toString().trimmed(); - confidence = inner.object().value(QStringLiteral("confidence")).toDouble(-1.0); + const QJsonObject obj = inner.object(); + confidence = obj.value(QStringLiteral("confidence")).toDouble(-1.0); + blocks.clear(); + const QJsonArray blockArray = obj.value(QStringLiteral("blocks")).toArray(); + for (const QJsonValue &value : blockArray) { + const QJsonObject block = value.toObject(); + const QString blockText = block.value(QStringLiteral("text")).toString().trimmed(); + if (blockText.isEmpty()) + continue; + const double x = qBound(0.0, block.value(QStringLiteral("x")).toDouble(0.0), 1.0); + const double y = qBound(0.0, block.value(QStringLiteral("y")).toDouble(0.0), 1.0); + const double w = qBound(0.0, block.value(QStringLiteral("w")).toDouble(0.0), 1.0 - x); + const double h = qBound(0.0, block.value(QStringLiteral("h")).toDouble(0.0), 1.0 - y); + if (w <= 0.0 || h <= 0.0) + continue; + blocks.append(OcrBlock{blockText, QRectF(x, y, w, h)}); + } + if (blocks.isEmpty()) { + // Old shape (or a model that ignored the blocks instruction): + // one block covering the whole image, so the overlay still shows + // the text instead of dropping the whole OCR result. + const QString flat = obj.value(QStringLiteral("text")).toString().trimmed(); + if (!flat.isEmpty()) + blocks.append(OcrBlock{flat, QRectF(0, 0, 1, 1)}); + } + QStringList lines; + lines.reserve(blocks.size()); + for (const OcrBlock &block : blocks) + lines.append(block.text); + text = lines.join(QChar(u'\n')); return true; } } // namespace @@ -79,10 +119,10 @@ void GeminiVisionOcrEngine::setApiKey(const QString &apiKey) OcrResult GeminiVisionOcrEngine::recognize(const QImage &image) { if (m_apiKey.isEmpty()) - return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + return OcrResult{OcrResult::Status::NotAvailable, {}, {}, -1.0, QStringLiteral("Gemini API key not set")}; if (image.isNull() || image.width() <= 0 || image.height() <= 0) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, QStringLiteral("Empty image passed to OCR")}; QByteArray jpeg; @@ -91,7 +131,7 @@ OcrResult GeminiVisionOcrEngine::recognize(const QImage &image) buffer.open(QIODevice::WriteOnly); // JPEG quality 90: small payload, text stays legible. if (!image.convertedTo(QImage::Format_RGB32).save(&buffer, "JPG", 90)) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, QStringLiteral("Could not encode image for OCR")}; } @@ -114,14 +154,15 @@ OcrResult GeminiVisionOcrEngine::recognize(const QImage &image) geminiUrl(), payload, {{QByteArrayLiteral("x-goog-api-key"), m_apiKey.toUtf8()}}); if (!result.ok()) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, result.error}; + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, result.error}; QString text; + QList blocks; double confidence = -1.0; QString error; - if (!parseGeminiOcrText(result.body, text, confidence, error)) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, error}; - return OcrResult{OcrResult::Status::Ok, text, confidence, {}}; + if (!parseGeminiOcrText(result.body, text, blocks, confidence, error)) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, error}; + return OcrResult{OcrResult::Status::Ok, text, blocks, confidence, {}}; } bool TesseractOcrEngine::available() const @@ -132,10 +173,10 @@ bool TesseractOcrEngine::available() const OcrResult TesseractOcrEngine::recognize(const QImage &image) { if (!available()) - return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + return OcrResult{OcrResult::Status::NotAvailable, {}, {}, -1.0, QStringLiteral("tesseract binary not found")}; if (image.isNull() || image.width() <= 0 || image.height() <= 0) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, QStringLiteral("Empty image passed to OCR")}; QByteArray png; @@ -143,41 +184,114 @@ OcrResult TesseractOcrEngine::recognize(const QImage &image) QBuffer buffer(&png); buffer.open(QIODevice::WriteOnly); if (!image.save(&buffer, "PNG")) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, QStringLiteral("Could not encode image for OCR")}; } - QProcess process; - process.start(QStringLiteral("tesseract"), {QStringLiteral("stdin"), QStringLiteral("stdout"), - QStringLiteral("--psm"), QStringLiteral("6"), - QStringLiteral("-l"), QStringLiteral("eng")}); - if (!process.waitForStarted(3000)) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, - QStringLiteral("Could not start tesseract")}; - process.write(png); - process.closeWriteChannel(); - if (!process.waitForFinished(8000)) { - process.kill(); - return OcrResult{OcrResult::Status::Failed, {}, -1.0, - QStringLiteral("tesseract timed out")}; + // TSV first: one block per text line, with real coordinates — the + // overlay needs positions, not just flat text. If TSV yields nothing + // (empty image, parse failure), fall back to plain text as one + // whole-image block so the result is still usable. + auto runTesseract = [&png](const QString &mode, QByteArray *out, QString *err) { + QProcess process; + process.start(QStringLiteral("tesseract"), + {QStringLiteral("stdin"), QStringLiteral("stdout"), mode, + QStringLiteral("--psm"), QStringLiteral("6"), + QStringLiteral("-l"), QStringLiteral("eng")}); + if (!process.waitForStarted(3000)) { + *err = QStringLiteral("Could not start tesseract"); + return false; + } + process.write(png); + process.closeWriteChannel(); + if (!process.waitForFinished(8000)) { + process.kill(); + *err = QStringLiteral("tesseract timed out"); + return false; + } + if (process.exitCode() != 0) { + *err = QString::fromUtf8(process.readAllStandardError()).trimmed(); + return false; + } + *out = process.readAllStandardOutput(); + return true; + }; + QByteArray tsv; + QString tsvError; + if (runTesseract(QStringLiteral("tsv"), &tsv, &tsvError)) { + QList blocks; + // TSV columns: level page block par line word left top width height + // conf text. Level 5 rows are words; group by (block, par, line). + QMap>, QList>> lines; + const QList rows = tsv.split('\n'); + for (qsizetype i = 1; i < rows.size(); ++i) { // row 0 is the header + const QList cols = rows.at(i).split('\t'); + if (cols.size() < 12) + continue; + bool ok = false; + const int level = cols.at(0).toInt(&ok); + if (!ok || level != 5) + continue; + const QString word = QString::fromUtf8(cols.at(11)).trimmed(); + if (word.isEmpty()) + continue; + const int blockNum = cols.at(2).toInt(); + const int parNum = cols.at(3).toInt(); + const int lineNum = cols.at(4).toInt(); + const int left = cols.at(6).toInt(); + const int top = cols.at(7).toInt(); + const int width = cols.at(8).toInt(); + const int height = cols.at(9).toInt(); + if (width <= 0 || height <= 0) + continue; + const QRectF rect(qBound(0.0, double(left) / image.width(), 1.0), + qBound(0.0, double(top) / image.height(), 1.0), + qBound(0.0, double(width) / image.width(), 1.0), + qBound(0.0, double(height) / image.height(), 1.0)); + lines[qMakePair(blockNum, qMakePair(parNum, lineNum))] + .append(qMakePair(word, rect)); + } + // QMap iterates keys in order: block, then paragraph, then line — + // the reading order for a single-column game UI. + for (auto it = lines.constBegin(); it != lines.constEnd(); ++it) { + QStringList words; + QRectF united; + for (const auto &wordRect : it.value()) { + words.append(wordRect.first); + united = united.united(wordRect.second); + } + if (!words.isEmpty() && united.isValid()) + blocks.append(OcrBlock{words.join(QChar(u' ')), united}); + } + if (!blocks.isEmpty()) { + QStringList texts; + texts.reserve(blocks.size()); + for (const OcrBlock &block : blocks) + texts.append(block.text); + // Tesseract reports no per-call confidence on stdout; -1 = unknown. + return OcrResult{OcrResult::Status::Ok, texts.join(QChar(u'\n')), blocks, -1.0, {}}; + } } - if (process.exitCode() != 0) - return OcrResult{OcrResult::Status::Failed, {}, -1.0, - QString::fromUtf8(process.readAllStandardError()).trimmed()}; - // Tesseract reports no per-call confidence on stdout; -1 = unknown. - return OcrResult{OcrResult::Status::Ok, - QString::fromUtf8(process.readAllStandardOutput()).trimmed(), -1.0, {}}; + QByteArray plain; + QString plainError; + if (!runTesseract(QStringLiteral("txt"), &plain, &plainError)) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, plainError}; + const QString text = QString::fromUtf8(plain).trimmed(); + QList blocks; + if (!text.isEmpty()) + blocks.append(OcrBlock{text, QRectF(0, 0, 1, 1)}); + return OcrResult{OcrResult::Status::Ok, text, blocks, -1.0, {}}; } OcrResult RapidOcrEngine::recognize(const QImage &) { - return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + return OcrResult{OcrResult::Status::NotAvailable, {}, {}, -1.0, QStringLiteral("RapidOCR is not available in this build: " "ONNX Runtime is not vendored in v1")}; } OcrResult WindowsOcrEngine::recognize(const QImage &) { - return OcrResult{OcrResult::Status::NotAvailable, {}, -1.0, + return OcrResult{OcrResult::Status::NotAvailable, {}, {}, -1.0, QStringLiteral("Windows OCR is not available: WinRT OCR requires " "package identity, which this Win32 build does not have")}; } diff --git a/opennow-qt/src/translation/OcrEngine.h b/opennow-qt/src/translation/OcrEngine.h index 00540edc7..d4fe6839d 100644 --- a/opennow-qt/src/translation/OcrEngine.h +++ b/opennow-qt/src/translation/OcrEngine.h @@ -19,16 +19,33 @@ // classic Win32 executable, so the API cannot be activated. #pragma once +#include +#include #include #include class QImage; +// One line of recognized text and where it sits in the recognized image. +// rect is normalized 0..1 within the image (x, y, w, h). The overlay draws +// one translated box per block, exactly over the English line — that is +// what "translate over the original text" means; a single box over the +// whole dialogue area is not it. +struct OcrBlock +{ + QString text; + QRectF rect; +}; +Q_DECLARE_METATYPE(OcrBlock) + struct OcrResult { enum class Status { Ok, NotAvailable, Failed }; Status status = Status::Failed; QString text; // English dialogue text, "" when none found + // One block per line, in reading order. text is the blocks joined + // with "\n" (kept for callers that only need the flat text). + QList blocks; double confidence = -1.0; // 0..1, or -1 when the engine reports none QString error; // human-readable, safe to show; never contains a key }; diff --git a/opennow-qt/src/translation/TranslationEngine.cpp b/opennow-qt/src/translation/TranslationEngine.cpp index 950db1f9a..fb3650adc 100644 --- a/opennow-qt/src/translation/TranslationEngine.cpp +++ b/opennow-qt/src/translation/TranslationEngine.cpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace { constexpr int KeepPreviousMs = 2000; @@ -15,6 +16,12 @@ constexpr int KeepPreviousMs = 2000; // and OCR would never run. Full-screen mode throttles instead: at most // one OCR job per interval, newest frame wins. constexpr int FullScreenIntervalMs = 2000; +// Frame pump: one screenshot request per interval while translation is +// enabled. The native runtime fulfills a request on the next presented +// frame, so a 1s pump feeds the engine ~1 frame per second — enough for +// the stability gate (400ms) and the full-screen throttle (2s) — for the +// cost of one texture readback per second. +constexpr int FramePumpIntervalMs = 1000; bool isFullScreenRect(const QRectF &rect) { @@ -76,6 +83,8 @@ TranslationEngine::TranslationEngine(QObject *parent) connect(&m_stabilityTimer, &QTimer::timeout, this, &TranslationEngine::onStabilityTimeout); m_keepPreviousTimer.setSingleShot(true); connect(&m_keepPreviousTimer, &QTimer::timeout, this, &TranslationEngine::onKeepPreviousExpired); + m_frameTimer.setInterval(FramePumpIntervalMs); + connect(&m_frameTimer, &QTimer::timeout, this, &TranslationEngine::onFrameTimerTimeout); connect(m_worker, &TranslationWorker::jobCompleted, this, &TranslationEngine::onWorkerJobCompleted); @@ -138,6 +147,12 @@ TranslationEngine::TranslationEngine(QObject *parent) m_stabilityDelayMs = qBound(0, m_stabilityDelayMs, 5000); m_fontSizePx = qBound(10, m_fontSizePx, 64); } + // The pump was restored enabled from QSettings: start it. The + // frameRequested connect in ApplicationStartup is wired after this + // constructor returns, and the first timeout is 1s away, so no + // request is ever emitted before the connect exists. + if (m_enabled) + m_frameTimer.start(); setStatus(QStringLiteral("Translation ready")); } @@ -184,9 +199,12 @@ void TranslationEngine::setEnabled(bool enabled) saveTranslationSetting(QStringLiteral("enabled"), enabled); if (!m_enabled) { m_stabilityTimer.stop(); + m_frameTimer.stop(); m_pendingHash.clear(); m_pendingCrop = QImage(); m_worker->cancelPending(); + } else { + m_frameTimer.start(); } setStatus(m_enabled ? QStringLiteral("Translation enabled") : QStringLiteral("Translation disabled")); @@ -315,10 +333,11 @@ void TranslationEngine::setDialoguePreset(const QString &preset) emit dialoguePresetChanged(); } setDialogueRect(rect); - // An in-place box over the whole frame would hide the game: show the - // full-screen translation as a subtitle bar instead. - if (preset == QStringLiteral("full-screen") && m_overlayMode == QStringLiteral("inplace")) - setOverlayMode(QStringLiteral("subtitle")); + // NOTE: full-screen used to force overlayMode to "subtitle" here + // because one in-place box over the whole frame would hide the game. + // With per-line blocks the in-place mode draws one small box per + // English line instead, so full-screen + inplace now works and the + // forced switch is gone (v2). } void TranslationEngine::setGeminiApiKey(const QString &key) @@ -398,7 +417,7 @@ void TranslationEngine::submitCrop(const QImage &crop, const QString &hash, cons if (m_cacheEnabled) { const auto hit = m_hashCache.constFind(hash); if (hit != m_hashCache.constEnd()) { - emitTranslation(hit->first, hit->second, rect, 0, 0, true); + emitTranslation(hit->original, hit->translated, rect, 0, 0, true, hit->blocks); return; } } @@ -441,15 +460,14 @@ void TranslationEngine::requestTestTranslation(const QString &englishText) if (m_cacheEnabled) { QString cached; if (m_dialogueDb.lookup(text, cached) || m_cache.lookup(text, cached)) { - m_lastCacheHit = true; - m_lastOcrMs = 0; - m_lastTranslateMs = 0; - emitTranslation(text, cached, m_dialogueRect, 0, 0, true); + // TEST result only: it must never reach the live overlay. + setTestResult(text, cached, 0, 0, true); return; } } TranslationJob job; job.directText = text; + job.testJob = true; job.sourceRect = m_dialogueRect; job.providerId = m_translationProvider; job.sourceLanguage = m_sourceLanguage; @@ -464,12 +482,23 @@ void TranslationEngine::onWorkerJobCompleted(const TranslationJobResult &result) { if (!result.ok) { setError(result.error.isEmpty() ? QStringLiteral("Translation failed") : result.error); + // A failed TEST job only shows in the TEST section: never touch + // the live overlay for it. + if (result.testJob) + return; // Keep the previous translation visible for 2s, then clear it. // Never emit garbage text. if (m_hasTranslation) m_keepPreviousTimer.start(KeepPreviousMs); return; } + if (result.testJob) { + // TEST-section only: the Settings page shows it, the stream + // overlay never sees it. + setTestResult(result.original, result.translated, + result.ocrMs, result.translateMs, result.cacheHit); + return; + } if (result.original.isEmpty() && result.translated.isEmpty()) { // OCR found no dialogue text in the crop: nothing to show, and // not an error. Leave the current translation alone. @@ -483,14 +512,17 @@ void TranslationEngine::onWorkerJobCompleted(const TranslationJobResult &result) if (!result.cropHash.isEmpty()) { if (!m_hashCache.contains(result.cropHash)) m_hashOrder.append(result.cropHash); - m_hashCache.insert(result.cropHash, {result.original, result.translated}); + m_hashCache.insert(result.cropHash, + HashCacheEntry{result.original, result.translated, + blocksToVariantList(result.blocks)}); while (m_hashCache.size() > MaxHashCacheEntries && !m_hashOrder.isEmpty()) m_hashCache.remove(m_hashOrder.takeFirst()); } } m_lastCacheHit = false; emitTranslation(result.original, result.translated, result.sourceRect, - result.ocrMs, result.translateMs, false); + result.ocrMs, result.translateMs, false, + blocksToVariantList(result.blocks)); } void TranslationEngine::onKeepPreviousExpired() @@ -498,9 +530,39 @@ void TranslationEngine::onKeepPreviousExpired() clearTranslation(); } +void TranslationEngine::onFrameTimerTimeout() +{ + if (m_enabled) + emit frameRequested(); +} + +QVariantList TranslationEngine::blocksToVariantList(const QList &blocks) +{ + QVariantList list; + list.reserve(blocks.size()); + for (const TranslatedBlock &block : blocks) { + QVariantMap map; + map.insert(QStringLiteral("original"), block.original); + map.insert(QStringLiteral("translated"), block.translated); + map.insert(QStringLiteral("x"), block.rect.x()); + map.insert(QStringLiteral("y"), block.rect.y()); + map.insert(QStringLiteral("w"), block.rect.width()); + map.insert(QStringLiteral("h"), block.rect.height()); + list.append(map); + } + return list; +} + +QVariantList TranslationEngine::singleBlockVariantList(const QString &original, + const QString &translated, + const QRectF &rect) +{ + return blocksToVariantList({TranslatedBlock{original, translated, rect}}); +} + void TranslationEngine::emitTranslation(const QString &original, const QString &translated, const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, - bool cacheHit) + bool cacheHit, const QVariantList &blocks) { m_lastOriginalText = original; m_lastTranslatedText = translated; @@ -508,23 +570,42 @@ void TranslationEngine::emitTranslation(const QString &original, const QString & m_lastTranslateMs = translateMs; m_lastCacheHit = cacheHit; m_lastError.clear(); + m_translationBlocks = blocks.isEmpty() + ? singleBlockVariantList(original, translated, sourceRect) + : blocks; if (!m_hasTranslation) { m_hasTranslation = true; emit hasTranslationChanged(); } setStatus(QStringLiteral("Translation ready")); + emit translationBlocksChanged(); emit translationTextChanged(); emit translationReady(original, translated, sourceRect); } +void TranslationEngine::setTestResult(const QString &original, const QString &translated, + qint64 ocrMs, qint64 translateMs, bool cacheHit) +{ + m_lastOriginalText = original; + m_lastTranslatedText = translated; + m_lastOcrMs = ocrMs; + m_lastTranslateMs = translateMs; + m_lastCacheHit = cacheHit; + m_lastError.clear(); + setStatus(QStringLiteral("Translation ready")); + emit translationTextChanged(); +} + void TranslationEngine::clearTranslation() { if (!m_hasTranslation && m_lastTranslatedText.isEmpty()) return; m_lastTranslatedText.clear(); m_lastOriginalText.clear(); + m_translationBlocks.clear(); m_hasTranslation = false; emit hasTranslationChanged(); + emit translationBlocksChanged(); emit translationTextChanged(); emit translationCleared(); } diff --git a/opennow-qt/src/translation/TranslationEngine.h b/opennow-qt/src/translation/TranslationEngine.h index 78f74bd56..01ebbe44c 100644 --- a/opennow-qt/src/translation/TranslationEngine.h +++ b/opennow-qt/src/translation/TranslationEngine.h @@ -62,6 +62,10 @@ class TranslationEngine : public QObject Q_PROPERTY(bool lastCacheHit READ lastCacheHit NOTIFY translationTextChanged) Q_PROPERTY(QString lastError READ lastError NOTIFY statusChanged) Q_PROPERTY(bool hasTranslation READ hasTranslation NOTIFY hasTranslationChanged) + // One entry per translated line: {original, translated, x, y, w, h} + // with x/y/w/h normalized 0..1 in full-frame coordinates. The overlay + // draws one box per entry, over the English line it replaces. + Q_PROPERTY(QVariantList translationBlocks READ translationBlocks NOTIFY translationBlocksChanged) public: explicit TranslationEngine(QObject *parent = nullptr); @@ -102,11 +106,19 @@ class TranslationEngine : public QObject QString dialoguePreset() const { return m_dialoguePreset; } // Normalized rect for a preset, or a null rect for an unknown preset. static QRectF dialogueRectForPreset(const QString &preset); + // Converts worker blocks to the QML-facing QVariantList of maps + // {original, translated, x, y, w, h}. Pure, unit-testable. + static QVariantList blocksToVariantList(const QList &blocks); + // One block covering the whole rect (used when only flat text exists, + // e.g. a cache hit with no stored blocks). Pure, unit-testable. + static QVariantList singleBlockVariantList(const QString &original, const QString &translated, + const QRectF &rect); qint64 lastOcrMs() const { return m_lastOcrMs; } qint64 lastTranslateMs() const { return m_lastTranslateMs; } bool lastCacheHit() const { return m_lastCacheHit; } QString lastError() const { return m_lastError; } bool hasTranslation() const { return m_hasTranslation; } + QVariantList translationBlocks() const { return m_translationBlocks; } Q_INVOKABLE void onStreamFrame(const QImage &image); Q_INVOKABLE void requestTestTranslation(const QString &englishText); @@ -134,11 +146,19 @@ class TranslationEngine : public QObject void dialogueRectChanged(); void dialoguePresetChanged(); void hasTranslationChanged(); + void translationBlocksChanged(); + // Emitted by the frame pump while translation is enabled. Application + // Startup connects it to NativeStreamRuntime::requestScreenshot(): the + // screenshotReady signal only fires for an explicit screenshot request, + // so without this pump the engine receives NO frames during gameplay + // and live OCR never runs (the v1 bug). + void frameRequested(); private slots: void onStabilityTimeout(); void onWorkerJobCompleted(const TranslationJobResult &result); void onKeepPreviousExpired(); + void onFrameTimerTimeout(); private: void setStatus(const QString &status); @@ -148,7 +168,13 @@ private slots: void submitCrop(const QImage &crop, const QString &hash, const QRectF &rect); void emitTranslation(const QString &original, const QString &translated, const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, - bool cacheHit); + bool cacheHit, const QVariantList &blocks = {}); + // TEST-section only: updates last* fields + status, but never touches + // the live overlay (hasTranslation / translationBlocks / + // translationReady). A "Dịch thử" result must never stick on the + // stream as a permanent subtitle (the v1 bug). + void setTestResult(const QString &original, const QString &translated, + qint64 ocrMs, qint64 translateMs, bool cacheHit); void clearTranslation(); bool m_enabled = false; // OFF by default: translation is opt-in @@ -179,6 +205,14 @@ private slots: QTimer m_stabilityTimer; QTimer m_keepPreviousTimer; + // Frame pump: while translation is enabled, request one screenshot + // per interval so onStreamFrame actually receives frames during + // gameplay. requestScreenshot() is a no-op when the stream is not + // presenting, and returns false while one is already pending, so the + // pump can never pile up requests or save files (saving is gated on + // the user's own screenshot action in AppController). + QTimer m_frameTimer; + QVariantList m_translationBlocks; // Full-screen throttle: a full frame never sits still long enough for // the stability timer, so full-screen frames submit at most once per // FullScreenIntervalMs instead. Invalid until the first full-screen @@ -188,11 +222,17 @@ private slots: QImage m_pendingCrop; // detached copy of the stable crop QRectF m_pendingRect; QString m_lastProcessedHash; // hash of the crop last sent to cache/worker - // Crop-hash -> (original, translated). Lets a repeated identical - // dialogue line hit the cache BEFORE any OCR/network, which the - // text-keyed cache cannot do (it needs the English text first). + // Crop-hash -> (original, translated, blocks). Lets a repeated + // identical dialogue line hit the cache BEFORE any OCR/network, which + // the text-keyed cache cannot do (it needs the English text first). // In-memory only; the text-keyed TranslationCache is the persisted one. + struct HashCacheEntry + { + QString original; + QString translated; + QVariantList blocks; + }; static constexpr int MaxHashCacheEntries = 500; - QHash> m_hashCache; + QHash m_hashCache; QList m_hashOrder; // oldest first; drives hash-cache eviction }; diff --git a/opennow-qt/src/translation/TranslationWorker.cpp b/opennow-qt/src/translation/TranslationWorker.cpp index a272ea04c..3934a4fe8 100644 --- a/opennow-qt/src/translation/TranslationWorker.cpp +++ b/opennow-qt/src/translation/TranslationWorker.cpp @@ -66,6 +66,15 @@ void TranslationJobQueue::clearWaiting() m_waiting.reset(); } +QRectF mapBlockRectToFrame(const QRectF &blockRect, const QRectF &sourceRect) +{ + const double x = qBound(0.0, sourceRect.x() + blockRect.x() * sourceRect.width(), 1.0); + const double y = qBound(0.0, sourceRect.y() + blockRect.y() * sourceRect.height(), 1.0); + const double w = qBound(0.0, blockRect.width() * sourceRect.width(), 1.0 - x); + const double h = qBound(0.0, blockRect.height() * sourceRect.height(), 1.0 - y); + return QRectF(x, y, w, h); +} + // --------------------------------------------------------------------------- // TranslationWorker // --------------------------------------------------------------------------- @@ -75,6 +84,7 @@ TranslationWorker::TranslationWorker(QObject *parent) { qRegisterMetaType(); qRegisterMetaType(); + qRegisterMetaType(); } TranslationWorker::~TranslationWorker() @@ -147,8 +157,10 @@ void TranslationWorker::processNext() TranslationJobResult result; result.sourceRect = job->sourceRect; result.cropHash = job->cropHash; + result.testJob = job->testJob; // set once here: every return below keeps it QString original; + QList ocrBlocks; qint64 ocrMs = 0; if (!job->directText.isEmpty()) { original = job->directText; @@ -202,6 +214,7 @@ void TranslationWorker::processNext() return; } original = ocr.text.trimmed(); + ocrBlocks = ocr.blocks; if (original.isEmpty()) { // No dialogue text in this crop: not an error, just nothing to // translate. Report success with empty text so the engine can @@ -231,15 +244,77 @@ void TranslationWorker::processNext() QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); return; } + // One network call for the whole crop: translate the blocks joined + // with "\n" (the free Google endpoint preserves line breaks), then + // split the reply back onto the same blocks. If the reply has a + // different number of lines, fall back to one call per block — the + // position mapping must never be guessed from a misaligned split. const TranslateResult translated = provider->translate(original, job->sourceLanguage, job->targetLanguage); result.translateMs = translateTimer.elapsed(); result.ocrMs = ocrMs; if (!translated.ok) { result.error = translated.error; - } else { + } else if (ocrBlocks.isEmpty()) { + // Direct-text job (or an OCR engine that gave flat text only): + // one block covering the whole crop. result.ok = true; result.translated = translated.text; + result.blocks.append(TranslatedBlock{original, translated.text, + mapBlockRectToFrame(QRectF(0, 0, 1, 1), + job->sourceRect)}); + } else { + QStringList lines = translated.text.split(QChar(u'\n')); + while (!lines.isEmpty() && lines.last().isEmpty()) + lines.removeLast(); + for (QString &line : lines) + line = line.trimmed(); + if (lines.size() == ocrBlocks.size()) { + result.ok = true; + result.translated = lines.join(QChar(u'\n')); + for (int i = 0; i < ocrBlocks.size(); ++i) { + // Never cover an English line with an empty box: a line + // that translated to nothing is left untranslated (and + // visible) instead of hidden behind an empty box. + if (lines.at(i).isEmpty()) + continue; + result.blocks.append(TranslatedBlock{ + ocrBlocks.at(i).text, lines.at(i), + mapBlockRectToFrame(ocrBlocks.at(i).rect, job->sourceRect)}); + } + if (result.blocks.isEmpty()) { + // Every line translated to nothing: report "no text" so + // the engine leaves the current translation alone. + result.original.clear(); + result.translated.clear(); + } + } else { + // Line count mismatch: translate each block on its own. + QStringList perBlock; + QString lastError; + for (const OcrBlock &block : ocrBlocks) { + const TranslateResult one = + provider->translate(block.text, job->sourceLanguage, job->targetLanguage); + if (!one.ok) { + lastError = one.error; + continue; + } + const QString oneText = one.text.trimmed(); + if (oneText.isEmpty()) + continue; + perBlock.append(oneText); + result.blocks.append(TranslatedBlock{ + block.text, oneText, + mapBlockRectToFrame(block.rect, job->sourceRect)}); + } + if (result.blocks.isEmpty()) { + result.error = lastError.isEmpty() ? QStringLiteral("Translation failed") + : lastError; + } else { + result.ok = true; + result.translated = perBlock.join(QChar(u'\n')); + } + } } m_queue.finishRunning(); diff --git a/opennow-qt/src/translation/TranslationWorker.h b/opennow-qt/src/translation/TranslationWorker.h index 081515976..286b68007 100644 --- a/opennow-qt/src/translation/TranslationWorker.h +++ b/opennow-qt/src/translation/TranslationWorker.h @@ -20,12 +20,27 @@ #include #include +// One translated line and where it sits on the frame: rect is normalized +// 0..1 in FULL-FRAME coordinates (the worker maps the OCR block's +// crop-relative rect through the job's sourceRect), so the overlay can draw +// the Vietnamese box exactly over the English line it replaces. +struct TranslatedBlock +{ + QString original; + QString translated; + QRectF rect; +}; +Q_DECLARE_METATYPE(TranslatedBlock) + struct TranslationJob { QImage crop; // detached dialogue crop; empty for direct-text jobs QString cropHash; // SHA-256 of the crop; lets the engine cache by pixels QRectF sourceRect; // normalized dialogue rect the crop came from QString directText; // when non-empty, OCR is skipped and this is translated + bool testJob = false; // true for the Settings "Dịch thử" button: the + // result updates the TEST section only and must + // never show on the live stream overlay QString ocrEngineId = QStringLiteral("gemini-vision"); QString providerId = QStringLiteral("google"); QString sourceLanguage = QStringLiteral("en"); @@ -39,6 +54,10 @@ struct TranslationJobResult bool ok = false; QString original; // OCR'd (or direct) English text QString translated; // Vietnamese text on success + // One translated block per OCR'd line, in reading order. Empty for + // direct-text jobs that carry no OCR coordinates. + QList blocks; + bool testJob = false; // mirrors the job: TEST results stay off the overlay QRectF sourceRect; qint64 ocrMs = 0; qint64 translateMs = 0; @@ -48,6 +67,11 @@ struct TranslationJobResult }; Q_DECLARE_METATYPE(TranslationJobResult) +// Maps an OCR block's rect (normalized 0..1 within the crop) into +// full-frame normalized coordinates through the crop's sourceRect. +// Pure and unit-testable; results are clamped to the frame. +QRectF mapBlockRectToFrame(const QRectF &blockRect, const QRectF &sourceRect); + // Pure queue logic: 1 running + 1 waiting, newest waiting job wins. // No threads, no network — this is what the unit test exercises. class TranslationJobQueue From acc94c4c642499868d7800cab9585773ea0eaa61 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 19:15:52 +0700 Subject: [PATCH 20/54] v2 translation: per-line in-place overlay + frame pump + test separation --- opennow-qt/tests/translation_logic_check.py | 38 ++++++++ opennow-qt/tests/tst_translation.cpp | 96 +++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/opennow-qt/tests/translation_logic_check.py b/opennow-qt/tests/translation_logic_check.py index 2eab4dd84..d091c98c8 100644 --- a/opennow-qt/tests/translation_logic_check.py +++ b/opennow-qt/tests/translation_logic_check.py @@ -56,6 +56,25 @@ def dialogue_rect_for_preset(preset): return None +def map_block_rect_to_frame(block, source): + # Mirrors mapBlockRectToFrame: an OCR block's rect (0..1 within the + # crop) into full-frame coords through the crop's source rect, clamped. + def clamp(v, lo, hi): + return max(lo, min(v, hi)) + x = clamp(source[0] + block[0] * source[2], 0.0, 1.0) + y = clamp(source[1] + block[1] * source[3], 0.0, 1.0) + w = clamp(block[2] * source[2], 0.0, 1.0 - x) + h = clamp(block[3] * source[3], 0.0, 1.0 - y) + return (x, y, w, h) + + +def blocks_to_variant_list(blocks): + # Mirrors TranslationEngine::blocksToVariantList: one dict per block. + return [{"original": b[0], "translated": b[1], + "x": b[2][0], "y": b[2][1], "w": b[2][2], "h": b[2][3]} + for b in blocks] + + class TranslationJobQueue: """Mirrors TranslationJobQueue: 1 running + 1 waiting, newest wins.""" @@ -137,6 +156,25 @@ def main(): check("preset unknown -> None", dialogue_rect_for_preset("bogus") is None) + # 2b. Block rect mapping mirrors mapBlockRectToFrame (v2 per-line overlay). + def near(a, b): + return all(abs(x - y) < 1e-9 for x, y in zip(a, b)) + check("block in dialogue crop maps into frame", + near(map_block_rect_to_frame((0.1, 0.2, 0.5, 0.3), (0.05, 0.72, 0.90, 0.24)), + (0.14, 0.768, 0.45, 0.072))) + check("block in full-screen crop is already frame coords", + near(map_block_rect_to_frame((0.2, 0.1, 0.4, 0.05), (0, 0, 1, 1)), + (0.2, 0.1, 0.4, 0.05))) + check("block past the frame edge is clamped", + near(map_block_rect_to_frame((0.9, 0.9, 0.5, 0.5), (0, 0, 1, 1)), + (0.9, 0.9, 0.1, 0.1))) + variant = blocks_to_variant_list( + [("Hello", "Xin chào", (0.1, 0.2, 0.5, 0.1)), + ("World", "Thế giới", (0.1, 0.35, 0.4, 0.1))]) + check("variant list keeps both blocks in order", + len(variant) == 2 and variant[0]["translated"] == "Xin chào" + and variant[1]["x"] == 0.1 and variant[1]["h"] == 0.1) + # 3. Bounded queue drops the stale waiting job. q = TranslationJobQueue() assert q.submit("first") and q.running == "first" and q.waiting is None diff --git a/opennow-qt/tests/tst_translation.cpp b/opennow-qt/tests/tst_translation.cpp index cd091d340..cb3be2da1 100644 --- a/opennow-qt/tests/tst_translation.cpp +++ b/opennow-qt/tests/tst_translation.cpp @@ -13,8 +13,11 @@ #include #include #include +#include +#include #include #include +#include class TranslationTest : public QObject { @@ -213,6 +216,99 @@ private slots: QRectF(0, 0, 1, 1)); QVERIFY(TranslationEngine::dialogueRectForPreset(QStringLiteral("bogus")).isNull()); } + + void mapBlockRectToFrame() + { + // QRectF == is exact double equality, but the mapping does + // floating-point math: compare with a small tolerance. + auto nearRect = [](const QRectF &a, const QRectF &b) { + return qAbs(a.x() - b.x()) < 1e-9 && qAbs(a.y() - b.y()) < 1e-9 + && qAbs(a.width() - b.width()) < 1e-9 && qAbs(a.height() - b.height()) < 1e-9; + }; + // A block in the middle of the dialogue crop maps into the + // dialogue area of the frame. + QVERIFY(nearRect( + mapBlockRectToFrame(QRectF(0.1, 0.2, 0.5, 0.3), QRectF(0.05, 0.72, 0.90, 0.24)), + QRectF(0.14, 0.768, 0.45, 0.072))); + // Full-screen crop: block coords are already frame coords. + QVERIFY(nearRect( + mapBlockRectToFrame(QRectF(0.2, 0.1, 0.4, 0.05), QRectF(0, 0, 1, 1)), + QRectF(0.2, 0.1, 0.4, 0.05))); + // A block that would run past the frame edge is clamped. + QVERIFY(nearRect( + mapBlockRectToFrame(QRectF(0.9, 0.9, 0.5, 0.5), QRectF(0, 0, 1, 1)), + QRectF(0.9, 0.9, 0.1, 0.1))); + } + + void blocksToVariantListRoundTrip() + { + const QList blocks = { + TranslatedBlock{QStringLiteral("Hello"), QStringLiteral("Xin chào"), + QRectF(0.1, 0.2, 0.5, 0.1)}, + TranslatedBlock{QStringLiteral("World"), QStringLiteral("Thế giới"), + QRectF(0.1, 0.35, 0.4, 0.1)}, + }; + const QVariantList list = TranslationEngine::blocksToVariantList(blocks); + QCOMPARE(list.size(), 2); + QCOMPARE(list.at(0).toMap().value(QStringLiteral("translated")).toString(), + QStringLiteral("Xin chào")); + QCOMPARE(list.at(1).toMap().value(QStringLiteral("x")).toDouble(), 0.1); + QCOMPARE(list.at(1).toMap().value(QStringLiteral("h")).toDouble(), 0.1); + // A flat text with no blocks becomes one block over the whole rect. + const QVariantList single = TranslationEngine::singleBlockVariantList( + QStringLiteral("Hi"), QStringLiteral("Chào"), QRectF(0.05, 0.72, 0.90, 0.24)); + QCOMPARE(single.size(), 1); + QCOMPARE(single.at(0).toMap().value(QStringLiteral("y")).toDouble(), 0.72); + } + + void testJobDoesNotShowOnStream() + { + TranslationEngine engine; + // A "Dịch thử" result updates the TEST section (last* fields) but + // must never appear on the live overlay: hasTranslation stays + // false and no blocks are published. + TranslationJobResult testResult; + testResult.ok = true; + testResult.testJob = true; + testResult.original = QStringLiteral("Hello world"); + testResult.translated = QStringLiteral("Xin chào thế giới"); + testResult.ocrMs = 10; + testResult.translateMs = 20; + QVERIFY(QMetaObject::invokeMethod(&engine, "onWorkerJobCompleted", + Q_ARG(TranslationJobResult, testResult))); + QCOMPARE(engine.lastTranslatedText(), QStringLiteral("Xin chào thế giới")); + QVERIFY(!engine.hasTranslation()); + QVERIFY(engine.translationBlocks().isEmpty()); + + // A stream result DOES show: hasTranslation true, one block over + // the line it translates. + TranslationJobResult streamResult; + streamResult.ok = true; + streamResult.testJob = false; + streamResult.original = QStringLiteral("Hello world"); + streamResult.translated = QStringLiteral("Xin chào thế giới"); + streamResult.blocks = {TranslatedBlock{QStringLiteral("Hello world"), + QStringLiteral("Xin chào thế giới"), + QRectF(0.1, 0.2, 0.5, 0.1)}}; + QVERIFY(QMetaObject::invokeMethod(&engine, "onWorkerJobCompleted", + Q_ARG(TranslationJobResult, streamResult))); + QVERIFY(engine.hasTranslation()); + QCOMPARE(engine.translationBlocks().size(), 1); + QCOMPARE(engine.translationBlocks().at(0).toMap() + .value(QStringLiteral("translated")).toString(), + QStringLiteral("Xin chào thế giới")); + } + + void framePumpFiresWhenEnabled() + { + TranslationEngine engine; + engine.setEnabled(false); // deterministic start: pump stopped + QSignalSpy spy(&engine, &TranslationEngine::frameRequested); + engine.setEnabled(true); + QVERIFY(spy.wait(3000)); // pump interval is 1s + QVERIFY(spy.count() >= 1); + engine.setEnabled(false); + } }; QTEST_MAIN(TranslationTest) From 82edece5e4e8fc9ea2292a2dc1e21273648a60a8 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 20:18:09 +0700 Subject: [PATCH 21/54] fix v2 build: QVariant include + test name hiding + ci-unit label --- opennow-qt/src/translation/TranslationEngine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/opennow-qt/src/translation/TranslationEngine.h b/opennow-qt/src/translation/TranslationEngine.h index 01ebbe44c..f9834e3a5 100644 --- a/opennow-qt/src/translation/TranslationEngine.h +++ b/opennow-qt/src/translation/TranslationEngine.h @@ -32,6 +32,7 @@ #include #include #include +#include #include "translation/TranslationCache.h" #include "translation/TranslationWorker.h" From 410ea0bb68b330a2b11a214eed485ab52b0d09b4 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 20:18:49 +0700 Subject: [PATCH 22/54] fix v2 build: QVariant include + test name hiding + ci-unit label --- opennow-qt/tests/test_ci_workflow.py | 5 +++-- opennow-qt/tests/tst_translation.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/opennow-qt/tests/test_ci_workflow.py b/opennow-qt/tests/test_ci_workflow.py index 2fb25d791..2a01e06f8 100644 --- a/opennow-qt/tests/test_ci_workflow.py +++ b/opennow-qt/tests/test_ci_workflow.py @@ -175,8 +175,9 @@ def test_checks_compile_tests_without_packaging_or_runtime_targets(self): self.assertIn("ensure-windows-media-foundation.ps1", checks) cmake = (ROOT / "opennow-qt/cmake/Tests.cmake").read_text() targets = re.search(r"set\(OPENNOW_CI_UNIT_TEST_TARGETS\s+(.*?)\)", cmake, re.DOTALL)[1].split() - self.assertEqual(len(targets), 42) - self.assertEqual(len(set(targets)), 42) + self.assertEqual(len(targets), 43) + self.assertEqual(len(set(targets)), 43) + self.assertIn("opennow-translation-tests", targets) self.assertIn("opennow-framegenerationbenchmark-tests", targets) self.assertIn("opennow-flyhighpolicy-tests", targets) self.assertIn("opennow-windowsmoveloop-tests", targets) diff --git a/opennow-qt/tests/tst_translation.cpp b/opennow-qt/tests/tst_translation.cpp index cb3be2da1..e7999b459 100644 --- a/opennow-qt/tests/tst_translation.cpp +++ b/opennow-qt/tests/tst_translation.cpp @@ -217,7 +217,7 @@ private slots: QVERIFY(TranslationEngine::dialogueRectForPreset(QStringLiteral("bogus")).isNull()); } - void mapBlockRectToFrame() + void mapBlockRectToFrameCases() { // QRectF == is exact double equality, but the mapping does // floating-point math: compare with a small tolerance. @@ -228,15 +228,15 @@ private slots: // A block in the middle of the dialogue crop maps into the // dialogue area of the frame. QVERIFY(nearRect( - mapBlockRectToFrame(QRectF(0.1, 0.2, 0.5, 0.3), QRectF(0.05, 0.72, 0.90, 0.24)), + ::mapBlockRectToFrame(QRectF(0.1, 0.2, 0.5, 0.3), QRectF(0.05, 0.72, 0.90, 0.24)), QRectF(0.14, 0.768, 0.45, 0.072))); // Full-screen crop: block coords are already frame coords. QVERIFY(nearRect( - mapBlockRectToFrame(QRectF(0.2, 0.1, 0.4, 0.05), QRectF(0, 0, 1, 1)), + ::mapBlockRectToFrame(QRectF(0.2, 0.1, 0.4, 0.05), QRectF(0, 0, 1, 1)), QRectF(0.2, 0.1, 0.4, 0.05))); // A block that would run past the frame edge is clamped. QVERIFY(nearRect( - mapBlockRectToFrame(QRectF(0.9, 0.9, 0.5, 0.5), QRectF(0, 0, 1, 1)), + ::mapBlockRectToFrame(QRectF(0.9, 0.9, 0.5, 0.5), QRectF(0, 0, 1, 1)), QRectF(0.9, 0.9, 0.1, 0.1))); } From fa5295a129439dd4cc5a5af7cbad63b567721667 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 20:19:36 +0700 Subject: [PATCH 23/54] fix v2 build: QVariant include + test name hiding + ci-unit label --- opennow-qt/cmake/Tests.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/opennow-qt/cmake/Tests.cmake b/opennow-qt/cmake/Tests.cmake index c64c9ac8c..7ac67535c 100644 --- a/opennow-qt/cmake/Tests.cmake +++ b/opennow-qt/cmake/Tests.cmake @@ -1565,6 +1565,7 @@ if(BUILD_TESTING) opennow-controllertuning-tests opennow-controllersources-tests opennow-controllermetadata-tests + opennow-translation-tests ) if(TARGET opennow-nativeframegeneration-tests) list(APPEND OPENNOW_CI_UNIT_TEST_TARGETS opennow-nativeframegeneration-tests) From 8fd47880f4138c2b9157c38d151d77541de0ff72 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Wed, 11 Nov 2026 20:42:48 +0700 Subject: [PATCH 24/54] fix run #30 build: add missing to OcrEngine.h + TranslationWorker.h --- opennow-qt/src/translation/OcrEngine.h | 1 + opennow-qt/src/translation/TranslationWorker.h | 1 + 2 files changed, 2 insertions(+) diff --git a/opennow-qt/src/translation/OcrEngine.h b/opennow-qt/src/translation/OcrEngine.h index d4fe6839d..eceedc58a 100644 --- a/opennow-qt/src/translation/OcrEngine.h +++ b/opennow-qt/src/translation/OcrEngine.h @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include #include diff --git a/opennow-qt/src/translation/TranslationWorker.h b/opennow-qt/src/translation/TranslationWorker.h index 286b68007..f84ef4478 100644 --- a/opennow-qt/src/translation/TranslationWorker.h +++ b/opennow-qt/src/translation/TranslationWorker.h @@ -13,6 +13,7 @@ #pragma once #include +#include #include #include #include From b2c7a0370d811eff815df941c5c0ae05fd1982e7 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 09:25:14 +0700 Subject: [PATCH 25/54] fix Gemini 404: switch model gemini-2.5-flash-lite -> gemini-3.5-flash-lite --- opennow-qt/src/translation/OcrEngine.cpp | 2 +- opennow-qt/src/translation/TranslationProvider.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opennow-qt/src/translation/OcrEngine.cpp b/opennow-qt/src/translation/OcrEngine.cpp index d87e2968d..ececf1e9c 100644 --- a/opennow-qt/src/translation/OcrEngine.cpp +++ b/opennow-qt/src/translation/OcrEngine.cpp @@ -13,7 +13,7 @@ #include namespace { -constexpr auto GeminiModel = "gemini-2.5-flash-lite"; +constexpr auto GeminiModel = "gemini-3.5-flash-lite"; // The model must return one block PER LINE, with the block's position in // the image — the overlay draws one Vietnamese box over each English line, // so coordinates are the whole point. x/y/w/h are fractions of the image diff --git a/opennow-qt/src/translation/TranslationProvider.cpp b/opennow-qt/src/translation/TranslationProvider.cpp index 2074e4589..e45e754cc 100644 --- a/opennow-qt/src/translation/TranslationProvider.cpp +++ b/opennow-qt/src/translation/TranslationProvider.cpp @@ -8,7 +8,7 @@ #include namespace { -constexpr auto GeminiModel = "gemini-2.5-flash-lite"; +constexpr auto GeminiModel = "gemini-3.5-flash-lite"; // Fixed prompt for WuWa story translation. Proper names stay in English, // Rover keeps the player's chosen pronouns (the model is told not to From 086834252c438257bab0288363e90b104f0a94e5 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 10:44:32 +0700 Subject: [PATCH 26/54] v3: custom OpenAI-compatible API + streaming translation --- locales/en.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index 245dbb27c..09d038c40 100644 --- a/locales/en.json +++ b/locales/en.json @@ -4588,7 +4588,24 @@ "xoa_cache": "Xoá cache", "xoa_toan_bo_cau_a_dich_trong_cache": "Xoá toàn bộ câu đã dịch trong cache.", "a_luu_key": "Đã lưu key.", - "o_on_inh": "Độ ổn định" + "o_on_inh": "Độ ổn định", + "api_key": "API key", + "api_tuy_chinh": "API tùy chỉnh", + "api_tuy_chinh_vision": "API tùy chỉnh (Vision)", + "base_key_rieng_stream": "Base + key riêng · stream", + "base_url": "Base URL", + "base_url_cua_api_chuan_openai_vd_https_api_openai_com_v1": "Base URL của API chuẩn OpenAI — vd https://api.openai.com/v1", + "can_base_key_model_ien_o_muc_api_tuy_chinh_ben_duoi": "Cần base + key + model — điền ở mục API tùy chỉnh bên dưới.", + "can_model_co_vision": "Cần model có vision", + "chua_lay_danh_sach": "Chưa lấy danh sách", + "custom_api": "CUSTOM API", + "dan_base_url": "Dán base URL…", + "dan_key_api": "Dán key API…", + "danh_sach_model_lay_tu_models_cua_base_tren_bang_key_cua_ban_dung_uoc_voi_moi_base_chuan_openai_openai_openrouter_groq_deepseek": "Danh sách model lấy từ /models của base trên, bằng key của bạn. Dùng được với mọi base chuẩn OpenAI (OpenAI, OpenRouter, Groq, DeepSeek…).", + "key_chi_luu_tren_may_nay_khong_gui_i_au_khac_ngoai_base_tren": "Key chỉ lưu trên máy này, không gửi đi đâu khác ngoài base trên.", + "lay_danh_sach_model": "Lấy danh sách model", + "model": "Model", + "model_ang_dung_e_dich_va_ocr_neu_chon_vision": "Model đang dùng để dịch (và OCR nếu chọn Vision)." } } } From f8ff1775f033d4dc77ceb90b02eef03592a7962e Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 10:44:58 +0700 Subject: [PATCH 27/54] v3: custom OpenAI-compatible API + streaming translation --- opennow-qt/cmake/Sources.cmake | 2 ++ opennow-qt/cmake/Tests.cmake | 1 + 2 files changed, 3 insertions(+) diff --git a/opennow-qt/cmake/Sources.cmake b/opennow-qt/cmake/Sources.cmake index c9e006a63..7d1168c30 100644 --- a/opennow-qt/cmake/Sources.cmake +++ b/opennow-qt/cmake/Sources.cmake @@ -63,6 +63,8 @@ set(OPENNOW_TRANSLATION_SOURCES src/translation/WuWaDialogueDb.h src/translation/TranslationHttp.cpp src/translation/TranslationHttp.h + src/translation/CustomApi.cpp + src/translation/CustomApi.h src/translation/OcrEngine.cpp src/translation/OcrEngine.h src/translation/TranslationProvider.cpp diff --git a/opennow-qt/cmake/Tests.cmake b/opennow-qt/cmake/Tests.cmake index 7ac67535c..a9012d0c2 100644 --- a/opennow-qt/cmake/Tests.cmake +++ b/opennow-qt/cmake/Tests.cmake @@ -386,6 +386,7 @@ if(BUILD_TESTING) src/translation/TranslationCache.cpp src/translation/TranslationCache.h src/translation/WuWaDialogueDb.cpp src/translation/WuWaDialogueDb.h src/translation/TranslationHttp.cpp src/translation/TranslationHttp.h + src/translation/CustomApi.cpp src/translation/CustomApi.h src/translation/OcrEngine.cpp src/translation/OcrEngine.h src/translation/TranslationProvider.cpp src/translation/TranslationProvider.h src/translation/TranslationWorker.cpp src/translation/TranslationWorker.h From 899d4db74e328c13b28be0544b847052ceafadc8 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 10:45:21 +0700 Subject: [PATCH 28/54] v3: custom OpenAI-compatible API + streaming translation --- .../pages/DesktopSettingsTranslationPage.qml | 109 +++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml index d6fe8d97d..04267499a 100644 --- a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml +++ b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml @@ -33,15 +33,35 @@ Column { // stayed disabled.) readonly property bool hasEngine: typeof translationEngine !== "undefined" && translationEngine !== null property bool keySaved: false + property bool customKeySaved: false Component.onCompleted: { - if (page.hasEngine) + if (page.hasEngine) { page.keySaved = translationEngine.hasGeminiApiKey() + page.customKeySaved = translationEngine.hasCustomApiKey() + } } readonly property string ocrEngine: page.hasEngine ? String(translationEngine.ocrEngine || "gemini-vision") : "gemini-vision" readonly property string provider: page.hasEngine ? String(translationEngine.translationProvider || "google") : "google" readonly property string overlayMode: page.hasEngine ? String(translationEngine.overlayMode || "inplace") : "inplace" + // The custom API is usable when base + key + model are all set. + readonly property bool customConfigured: page.hasEngine + && String(translationEngine.customApiBase || "") !== "" + && page.customKeySaved + && String(translationEngine.customApiModel || "") !== "" + // Model dropdown items: the live list from {base}/models when + // fetched, otherwise just the currently saved model (or a hint). + readonly property var customModelItems: { + const models = page.hasEngine ? (translationEngine.customApiModels || []) : [] + if (models.length === 0) { + const current = page.hasEngine ? String(translationEngine.customApiModel || "") : "" + return current !== "" + ? [{label: current, value: current}] + : [{label: qsTr("Chưa lấy danh sách"), value: ""}] + } + return models.map(m => ({label: String(m), value: String(m)})) + } // (a) Bật / Tắt DesktopSettingsPanel { @@ -109,10 +129,13 @@ Column { width: parent.width; glyph: "monitor"; title: qsTr("OCR engine") description: page.ocrEngine === "rapidocr" || page.ocrEngine === "windows-ocr" ? qsTr("Chưa khả dụng trong bản này — sẽ có ở bản sau.") + : page.ocrEngine === "custom-vision" && !page.customConfigured + ? qsTr("Cần base + key + model — điền ở mục API tùy chỉnh bên dưới.") : qsTr("Engine nhận diện chữ trên màn hình stream.") items: [ {label: qsTr("Gemini Vision"), value: "gemini-vision", detail: qsTr("Mặc định · cần key Gemini")}, {label: qsTr("Tesseract"), value: "tesseract", detail: qsTr("Offline · chạy trên máy")}, + {label: qsTr("API tùy chỉnh (Vision)"), value: "custom-vision", detail: qsTr("Cần model có vision")}, {label: qsTr("RapidOCR"), value: "rapidocr", detail: qsTr("Chưa khả dụng trong bản này")}, {label: qsTr("Windows OCR"), value: "windows-ocr", detail: qsTr("Chưa khả dụng trong bản này")} ] @@ -154,10 +177,13 @@ Column { width: parent.width; glyph: "globe"; title: qsTr("Dịch bằng") description: page.provider === "gemini" && !page.keySaved ? qsTr("Cần key Gemini — chưa có key. Dán key ở dưới.") + : page.provider === "custom" && !page.customConfigured + ? qsTr("Cần base + key + model — điền ở mục API tùy chỉnh bên dưới.") : qsTr("Dịch vụ dịch bản OCR sang tiếng Việt.") items: [ {label: qsTr("Google Translate"), value: "google", detail: qsTr("Miễn phí · mặc định")}, - {label: qsTr("Gemini"), value: "gemini", detail: qsTr("Cần key Gemini")} + {label: qsTr("Gemini"), value: "gemini", detail: qsTr("Cần key Gemini")}, + {label: qsTr("API tùy chỉnh"), value: "custom", detail: qsTr("Base + key riêng · stream")} ] value: page.provider onSelected: value => { if (page.hasEngine) translationEngine.translationProvider = value } @@ -190,6 +216,85 @@ Column { } } + // (d2) API tùy chỉnh — bất kỳ base chuẩn OpenAI nào (OpenAI, + // OpenRouter, Groq, DeepSeek, Together, server tự host…). Người dùng + // tự dán base + key, bấm lấy danh sách model (ping {base}/models + // bằng key đó), rồi chọn model. Dịch chạy stream: chữ hiện dần + // trong lúc model còn đang sinh, thay vì đợi cả câu trả xong. + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("CUSTOM API") } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "globe"; title: qsTr("Base URL") + description: qsTr("Base URL của API chuẩn OpenAI — vd https://api.openai.com/v1") + showDivider: false + DesktopSettingsField { + id: customBaseField + objectName: "translationCustomApiBaseField" + text: page.hasEngine ? String(translationEngine.customApiBase || "") : "" + placeholderText: qsTr("Dán base URL…") + Accessible.name: qsTr("Base URL") + onEditingFinished: { + if (page.hasEngine) translationEngine.customApiBase = text + } + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("API key") + description: (page.customKeySaved ? qsTr("Đã lưu key.") : qsTr("Chưa có key.")) + " " + + qsTr("Key chỉ lưu trên máy này, không gửi đi đâu khác ngoài base trên.") + showDivider: false + DesktopSettingsField { + id: customKeyField + objectName: "translationCustomApiKeyField" + echoMode: TextInput.Password + placeholderText: qsTr("Dán key API…") + Accessible.name: qsTr("API key") + } + DesktopSettingsButton { + objectName: "translationCustomApiKeySaveButton" + compact: true + enabled: page.hasEngine && customKeyField.text !== "" + text: qsTr("Lưu key") + onClicked: { + if (!page.hasEngine) + return + translationEngine.setCustomApiKey(customKeyField.text) + customKeyField.text = "" + page.customKeySaved = translationEngine.hasCustomApiKey() + } + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "check"; title: qsTr("Lấy danh sách model") + description: qsTr("Danh sách model lấy từ /models của base trên, bằng key của bạn. Dùng được với mọi base chuẩn OpenAI (OpenAI, OpenRouter, Groq, DeepSeek…).") + showDivider: false + DesktopSettingsButton { + objectName: "translationCustomApiFetchModelsButton" + compact: true + enabled: page.hasEngine && customBaseField.text !== "" && page.customKeySaved + text: qsTr("Lấy danh sách model") + onClicked: { + if (!page.hasEngine) + return + // Commit the base first: it is only saved to the + // engine on editingFinished, and fetch reads it. + translationEngine.customApiBase = customBaseField.text + translationEngine.fetchCustomApiModels() + } + } + } + DesktopSettingsChoice { + objectName: "translationCustomApiModel" + width: parent.width; glyph: "monitor"; title: qsTr("Model") + description: qsTr("Model đang dùng để dịch (và OCR nếu chọn Vision).") + showDivider: false + items: page.customModelItems + value: page.hasEngine ? String(translationEngine.customApiModel || "") : "" + onSelected: value => { if (page.hasEngine && value !== "") translationEngine.customApiModel = value } + } + } + // (e) Hiển thị DesktopSettingsPanel { width: parent.width; paperStyle: true From 8d73bd73d1484908269e1752d4705d51ace7a969 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 10:45:57 +0700 Subject: [PATCH 29/54] v3: custom OpenAI-compatible API + streaming translation --- opennow-qt/src/translation/CustomApi.cpp | 149 ++++++++++++++++++ opennow-qt/src/translation/CustomApi.h | 70 ++++++++ opennow-qt/src/translation/OcrEngine.cpp | 126 ++++++++++++--- opennow-qt/src/translation/OcrEngine.h | 27 +++- .../src/translation/TranslationEngine.cpp | 141 ++++++++++++++++- .../src/translation/TranslationEngine.h | 43 ++++- .../src/translation/TranslationHttp.cpp | 69 ++++++++ opennow-qt/src/translation/TranslationHttp.h | 16 ++ .../src/translation/TranslationProvider.cpp | 109 ++++++++++++- .../src/translation/TranslationProvider.h | 51 +++++- .../src/translation/TranslationWorker.cpp | 55 ++++++- .../src/translation/TranslationWorker.h | 15 ++ 12 files changed, 827 insertions(+), 44 deletions(-) create mode 100644 opennow-qt/src/translation/CustomApi.cpp create mode 100644 opennow-qt/src/translation/CustomApi.h diff --git a/opennow-qt/src/translation/CustomApi.cpp b/opennow-qt/src/translation/CustomApi.cpp new file mode 100644 index 000000000..c6df73d7e --- /dev/null +++ b/opennow-qt/src/translation/CustomApi.cpp @@ -0,0 +1,149 @@ +#include "translation/CustomApi.h" + +#include +#include +#include + +QString normalizeCustomApiBase(const QString &base) +{ + QString normalized = base.trimmed(); + while (normalized.endsWith(QChar(u'/'))) + normalized.chop(1); + // Users often paste the full chat endpoint they copied from docs. + const QString chatSuffix = QStringLiteral("/chat/completions"); + if (normalized.endsWith(chatSuffix)) + normalized.chop(chatSuffix.size()); + while (normalized.endsWith(QChar(u'/'))) + normalized.chop(1); + return normalized; +} + +QString customApiModelsUrl(const QString &base) +{ + const QString normalized = normalizeCustomApiBase(base); + if (normalized.isEmpty()) + return QString(); + return normalized + QStringLiteral("/models"); +} + +QString customApiChatUrl(const QString &base) +{ + const QString normalized = normalizeCustomApiBase(base); + if (normalized.isEmpty()) + return QString(); + return normalized + QStringLiteral("/chat/completions"); +} + +QStringList parseCustomApiModels(const QByteArray &body, QString &error) +{ + const QJsonDocument doc = QJsonDocument::fromJson(body); + if (!doc.isObject()) { + error = QStringLiteral("Invalid response from API"); + return {}; + } + const QJsonArray data = doc.object().value(QStringLiteral("data")).toArray(); + if (data.isEmpty()) { + error = QStringLiteral("API returned no models"); + return {}; + } + QStringList models; + for (const QJsonValue &value : data) { + const QString id = value.toObject().value(QStringLiteral("id")).toString().trimmed(); + if (!id.isEmpty() && !models.contains(id)) + models.append(id); + } + if (models.isEmpty()) + error = QStringLiteral("API returned no models"); + return models; +} + +QString parseSseStreamText(const QByteArray &sseBytes) +{ + QString text; + // Split on newlines; a trailing partial line simply has no "data: " + // prefix match or unparsable JSON and is skipped until the next chunk + // completes it (the caller re-parses the accumulated buffer). + const QList lines = sseBytes.split('\n'); + for (QByteArray line : lines) { + line = line.trimmed(); + if (!line.startsWith("data:")) + continue; + const QByteArray payload = line.mid(5).trimmed(); + if (payload.isEmpty() || payload == "[DONE]") + continue; + const QJsonDocument doc = QJsonDocument::fromJson(payload); + if (!doc.isObject()) + continue; + const QJsonArray choices = doc.object().value(QStringLiteral("choices")).toArray(); + if (choices.isEmpty()) + continue; + const QJsonObject choice = choices.at(0).toObject(); + // Streaming shape: choices[0].delta.content. Some servers send + // the full message on the last event instead; take it only when + // there is no delta, so the same text is never counted twice. + QString delta = choice.value(QStringLiteral("delta")).toObject() + .value(QStringLiteral("content")).toString(); + if (delta.isEmpty()) + delta = choice.value(QStringLiteral("message")).toObject() + .value(QStringLiteral("content")).toString(); + text += delta; + } + return text; +} + +bool parseChatCompletionText(const QByteArray &body, QString &text, QString &error) +{ + const QJsonDocument doc = QJsonDocument::fromJson(body); + if (!doc.isObject()) { + error = QStringLiteral("Invalid response from API"); + return false; + } + const QJsonArray choices = doc.object().value(QStringLiteral("choices")).toArray(); + if (choices.isEmpty()) { + error = QStringLiteral("API returned no result"); + return false; + } + const QJsonObject choice = choices.at(0).toObject(); + text = choice.value(QStringLiteral("message")).toObject() + .value(QStringLiteral("content")).toString().trimmed(); + if (text.isEmpty()) + text = choice.value(QStringLiteral("text")).toString().trimmed(); + if (text.isEmpty()) { + error = QStringLiteral("API returned empty text"); + return false; + } + return true; +} + +QByteArray buildChatCompletionPayload(const QString &model, const QString &systemPrompt, + const QString &userText, const QString &imageBase64, + bool stream) +{ + QJsonObject systemMessage; + systemMessage.insert(QStringLiteral("role"), QStringLiteral("system")); + systemMessage.insert(QStringLiteral("content"), systemPrompt); + + QJsonObject userMessage; + userMessage.insert(QStringLiteral("role"), QStringLiteral("user")); + if (imageBase64.isEmpty()) { + userMessage.insert(QStringLiteral("content"), userText); + } else { + QJsonObject textPart; + textPart.insert(QStringLiteral("type"), QStringLiteral("text")); + textPart.insert(QStringLiteral("text"), userText); + QJsonObject imageUrl; + imageUrl.insert(QStringLiteral("url"), + QStringLiteral("data:image/jpeg;base64,") + imageBase64); + QJsonObject imagePart; + imagePart.insert(QStringLiteral("type"), QStringLiteral("image_url")); + imagePart.insert(QStringLiteral("image_url"), imageUrl); + userMessage.insert(QStringLiteral("content"), QJsonArray{textPart, imagePart}); + } + + QJsonObject requestBody; + requestBody.insert(QStringLiteral("model"), model); + requestBody.insert(QStringLiteral("messages"), QJsonArray{systemMessage, userMessage}); + if (stream) + requestBody.insert(QStringLiteral("stream"), true); + return QJsonDocument(requestBody).toJson(QJsonDocument::Compact); +} diff --git a/opennow-qt/src/translation/CustomApi.h b/opennow-qt/src/translation/CustomApi.h new file mode 100644 index 000000000..0ac313b27 --- /dev/null +++ b/opennow-qt/src/translation/CustomApi.h @@ -0,0 +1,70 @@ +// CustomApi: OpenAI-compatible custom endpoint. +// +// The user pastes ANY provider's base URL + API key (OpenAI, OpenRouter, +// Groq, DeepSeek, Together, xAI, a self-hosted llama.cpp/vLLM server, +// ...), the app lists that base's real models via GET {base}/models, and +// the user picks one. No provider is hardcoded and no model list is +// bundled — the list always comes from the user's own base + key. +// +// All helpers here are pure (no network, no threads): the network calls +// live in TranslationHttp / TranslationWorker on the worker thread, and +// these functions are what the unit tests exercise. +#pragma once + +#include +#include +#include +#include + +// Base URL + key + model for one custom endpoint. The key is held in +// memory only by callers; this struct never logs it. +struct CustomApiConfig +{ + QString baseUrl; // e.g. https://api.openai.com/v1 (no trailing slash) + QString apiKey; // Bearer token + QString model; // e.g. gpt-4o-mini + bool isConfigured() const + { + return !baseUrl.isEmpty() && !apiKey.isEmpty() && !model.isEmpty(); + } +}; +Q_DECLARE_METATYPE(CustomApiConfig) + +// Trims whitespace, strips a trailing "/" and a trailing +// "/chat/completions" (users often paste the full chat URL). "" in -> "". +QString normalizeCustomApiBase(const QString &base); + +// Normalized base + "/models" (the OpenAI-compatible list endpoint). +// "" when the base is empty. +QString customApiModelsUrl(const QString &base); + +// Normalized base + "/chat/completions". +// "" when the base is empty. +QString customApiChatUrl(const QString &base); + +// Parses a GET {base}/models reply: {"data": [{"id": "model-a"}, ...]}. +// Returns the model ids in server order (duplicates removed); on a bad +// body returns an empty list and sets `error`. +QStringList parseCustomApiModels(const QByteArray &body, QString &error); + +// Parses a (possibly partial) SSE stream body: lines of the form +// "data: {\"choices\": [{\"delta\": {\"content\": \"...\"}}]}", ending +// with "data: [DONE]". Returns the concatenated delta content. A chunk +// split mid-line is fine — this parses the ACCUMULATED buffer each time, +// so callers re-run it on the whole buffer after every chunk. Lines that +// are not data events, "[DONE]", or unparsable JSON are skipped. +QString parseSseStreamText(const QByteArray &sseBytes); + +// Parses a non-stream chat completion reply: +// {"choices": [{"message": {"content": "..."}}]} (also accepts the legacy +// {"choices": [{"text": "..."}]} shape). Returns false with `error` set +// on a bad body or an empty content string. +bool parseChatCompletionText(const QByteArray &body, QString &text, QString &error); + +// Builds the chat/completions JSON payload. `imageBase64` empty means a +// text-only call (user content is a plain string); non-empty means a +// vision call (user content is [{type: "text", ...}, {type: "image_url", +// url: "data:image/jpeg;base64,..."}]). `stream` adds "stream": true. +QByteArray buildChatCompletionPayload(const QString &model, const QString &systemPrompt, + const QString &userText, const QString &imageBase64, + bool stream); diff --git a/opennow-qt/src/translation/OcrEngine.cpp b/opennow-qt/src/translation/OcrEngine.cpp index ececf1e9c..d65f0452e 100644 --- a/opennow-qt/src/translation/OcrEngine.cpp +++ b/opennow-qt/src/translation/OcrEngine.cpp @@ -33,32 +33,10 @@ QString geminiUrl() + QString::fromLatin1(GeminiModel) + QStringLiteral(":generateContent"); } -// Parses the model's JSON reply out of the Gemini response envelope. // Strips ```json fences if the model added them despite the prompt. -// Fills text (blocks joined with "\n") and blocks (one per line, rect -// normalized 0..1 within the image, clamped and empty/zero-area blocks -// dropped). Accepts the old {"text": ...} shape as one whole-image block. -bool parseGeminiOcrText(const QByteArray &body, QString &text, QList &blocks, - double &confidence, QString &error) +QString stripCodeFences(QString raw) { - const QJsonDocument doc = QJsonDocument::fromJson(body); - if (!doc.isObject()) { - error = QStringLiteral("Invalid response from OCR service"); - return false; - } - const QJsonArray candidates = doc.object().value(QStringLiteral("candidates")).toArray(); - if (candidates.isEmpty()) { - error = QStringLiteral("OCR service returned no result"); - return false; - } - const QJsonArray parts = candidates.at(0).toObject() - .value(QStringLiteral("content")).toObject() - .value(QStringLiteral("parts")).toArray(); - if (parts.isEmpty()) { - error = QStringLiteral("OCR service returned no text"); - return false; - } - QString raw = parts.at(0).toObject().value(QStringLiteral("text")).toString().trimmed(); + raw = raw.trimmed(); if (raw.startsWith(QStringLiteral("```"))) { const int firstNewline = raw.indexOf(QChar(u'\n')); if (firstNewline >= 0) @@ -67,6 +45,17 @@ bool parseGeminiOcrText(const QByteArray &body, QString &text, QList & raw.chop(3); raw = raw.trimmed(); } + return raw; +} + +// Parses the model's JSON reply ({"blocks": [...], "confidence": n} or +// the old {"text": ...} shape) into per-line blocks. Shared by Gemini +// Vision and the custom vision engine: both prompts ask for the same +// shape, so the envelope is the only thing that differs. +bool parseOcrBlocksJson(const QString &rawText, QString &text, QList &blocks, + double &confidence, QString &error) +{ + const QString raw = stripCodeFences(rawText); const QJsonDocument inner = QJsonDocument::fromJson(raw.toUtf8()); if (!inner.isObject()) { error = QStringLiteral("OCR service returned unparsable text"); @@ -104,6 +93,34 @@ bool parseGeminiOcrText(const QByteArray &body, QString &text, QList & text = lines.join(QChar(u'\n')); return true; } + +// Parses the model's JSON reply out of the Gemini response envelope. +// Fills text (blocks joined with "\n") and blocks (one per line, rect +// normalized 0..1 within the image, clamped and empty/zero-area blocks +// dropped). Accepts the old {"text": ...} shape as one whole-image block. +bool parseGeminiOcrText(const QByteArray &body, QString &text, QList &blocks, + double &confidence, QString &error) +{ + const QJsonDocument doc = QJsonDocument::fromJson(body); + if (!doc.isObject()) { + error = QStringLiteral("Invalid response from OCR service"); + return false; + } + const QJsonArray candidates = doc.object().value(QStringLiteral("candidates")).toArray(); + if (candidates.isEmpty()) { + error = QStringLiteral("OCR service returned no result"); + return false; + } + const QJsonArray parts = candidates.at(0).toObject() + .value(QStringLiteral("content")).toObject() + .value(QStringLiteral("parts")).toArray(); + if (parts.isEmpty()) { + error = QStringLiteral("OCR service returned no text"); + return false; + } + const QString raw = parts.at(0).toObject().value(QStringLiteral("text")).toString().trimmed(); + return parseOcrBlocksJson(raw, text, blocks, confidence, error); +} } // namespace GeminiVisionOcrEngine::GeminiVisionOcrEngine(const QString &apiKey) @@ -165,6 +182,62 @@ OcrResult GeminiVisionOcrEngine::recognize(const QImage &image) return OcrResult{OcrResult::Status::Ok, text, blocks, confidence, {}}; } +CustomVisionOcrEngine::CustomVisionOcrEngine(const CustomApiConfig &config) + : m_config(config) +{ +} + +void CustomVisionOcrEngine::setConfig(const CustomApiConfig &config) +{ + m_config = config; +} + +OcrResult CustomVisionOcrEngine::recognize(const QImage &image) +{ + if (!m_config.isConfigured()) + return OcrResult{OcrResult::Status::NotAvailable, {}, {}, -1.0, + QStringLiteral("Custom API not configured: set base URL, API key and model")}; + if (image.isNull() || image.width() <= 0 || image.height() <= 0) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, + QStringLiteral("Empty image passed to OCR")}; + + QByteArray jpeg; + { + QBuffer buffer(&jpeg); + buffer.open(QIODevice::WriteOnly); + // JPEG quality 90: small payload, text stays legible. + if (!image.convertedTo(QImage::Format_RGB32).save(&buffer, "JPG", 90)) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, + QStringLiteral("Could not encode image for OCR")}; + } + + // Same blocks-JSON prompt as Gemini Vision, sent as the system + // message; the image travels as a base64 data URL in the user message. + const QByteArray payload = buildChatCompletionPayload( + m_config.model, QString::fromLatin1(GeminiOcrPrompt), + QStringLiteral("Read the text in this image."), QString::fromLatin1(jpeg.toBase64()), + false); + // Key travels in the Authorization header, never in the URL, and is + // never logged. + const TranslationHttpResult result = TranslationHttp::postJson( + customApiChatUrl(m_config.baseUrl), payload, + {{QByteArrayLiteral("Authorization"), + QByteArrayLiteral("Bearer ") + m_config.apiKey.toUtf8()}}); + if (!result.ok()) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, result.error}; + + QString rawText; + QString error; + if (!parseChatCompletionText(result.body, rawText, error)) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, error}; + QString text; + QList blocks; + double confidence = -1.0; + if (!parseOcrBlocksJson(rawText, text, blocks, confidence, error)) + return OcrResult{OcrResult::Status::Failed, {}, {}, -1.0, error}; + return OcrResult{OcrResult::Status::Ok, text, blocks, confidence, {}}; +} + bool TesseractOcrEngine::available() const { return !QStandardPaths::findExecutable(QStringLiteral("tesseract")).isEmpty(); @@ -296,10 +369,13 @@ OcrResult WindowsOcrEngine::recognize(const QImage &) "package identity, which this Win32 build does not have")}; } -std::unique_ptr createOcrEngine(const QString &id, const QString &geminiApiKey) +std::unique_ptr createOcrEngine(const QString &id, const QString &geminiApiKey, + const CustomApiConfig &customApi) { if (id == QStringLiteral("gemini-vision")) return std::make_unique(geminiApiKey); + if (id == QStringLiteral("custom-vision")) + return std::make_unique(customApi); if (id == QStringLiteral("tesseract")) return std::make_unique(); if (id == QStringLiteral("rapidocr")) diff --git a/opennow-qt/src/translation/OcrEngine.h b/opennow-qt/src/translation/OcrEngine.h index eceedc58a..f7d95d8a9 100644 --- a/opennow-qt/src/translation/OcrEngine.h +++ b/opennow-qt/src/translation/OcrEngine.h @@ -6,8 +6,11 @@ // one, -1 when it does not (e.g. Tesseract). // // Implementations: -// - GeminiVisionOcrEngine: REAL, Gemini 2.5 Flash-Lite vision, Qt Network. +// - GeminiVisionOcrEngine: REAL, Gemini 3.5 Flash-Lite vision, Qt Network. // API key is passed in (never logged, never stored in code). +// - CustomVisionOcrEngine: REAL, any OpenAI-compatible vision model the +// user configures (base + key + model). Same blocks-JSON prompt as +// Gemini Vision; only usable with a model that accepts images. // - TesseractOcrEngine: REAL, optional `tesseract` binary via QProcess. // Gracefully unavailable when the binary is missing. // - RapidOcrEngine: STUB (NotAvailable). ONNX Runtime is not vendored in @@ -25,6 +28,8 @@ #include #include +#include "translation/CustomApi.h" + class QImage; // One line of recognized text and where it sits in the recognized image. @@ -76,6 +81,20 @@ class GeminiVisionOcrEngine final : public OcrEngine QString m_apiKey; // never logged, never written to disk by this class }; +class CustomVisionOcrEngine final : public OcrEngine +{ +public: + explicit CustomVisionOcrEngine(const CustomApiConfig &config = {}); + void setConfig(const CustomApiConfig &config); // key held in memory only + QString id() const override { return QStringLiteral("custom-vision"); } + QString displayName() const override { return QStringLiteral("Custom API (Vision)"); } + bool available() const override { return m_config.isConfigured(); } + OcrResult recognize(const QImage &image) override; + +private: + CustomApiConfig m_config; // base + key + model; key never logged +}; + class TesseractOcrEngine final : public OcrEngine { public: @@ -103,6 +122,8 @@ class WindowsOcrEngine final : public OcrEngine OcrResult recognize(const QImage &) override; }; -// Factory. `geminiApiKey` is forwarded only to GeminiVisionOcrEngine. +// Factory. `geminiApiKey` is forwarded only to GeminiVisionOcrEngine; +// `customApi` only to CustomVisionOcrEngine. // Returns nullptr for an unknown id. -std::unique_ptr createOcrEngine(const QString &id, const QString &geminiApiKey = {}); +std::unique_ptr createOcrEngine(const QString &id, const QString &geminiApiKey = {}, + const CustomApiConfig &customApi = {}); diff --git a/opennow-qt/src/translation/TranslationEngine.cpp b/opennow-qt/src/translation/TranslationEngine.cpp index fb3650adc..a7eccf8a6 100644 --- a/opennow-qt/src/translation/TranslationEngine.cpp +++ b/opennow-qt/src/translation/TranslationEngine.cpp @@ -88,6 +88,10 @@ TranslationEngine::TranslationEngine(QObject *parent) connect(m_worker, &TranslationWorker::jobCompleted, this, &TranslationEngine::onWorkerJobCompleted); + connect(m_worker, &TranslationWorker::jobProgress, + this, &TranslationEngine::onWorkerJobProgress); + connect(m_worker, &TranslationWorker::customApiModelsFetched, + this, &TranslationEngine::onWorkerModelsFetched); m_worker->start(); // Gemini key, persisted locally only (QSettings, never in a file we // commit, never logged). Restored here so hasGeminiApiKey() is true @@ -98,6 +102,11 @@ TranslationEngine::TranslationEngine(QObject *parent) if (!m_geminiApiKey.isEmpty()) QMetaObject::invokeMethod(m_worker, "setGeminiApiKey", Qt::QueuedConnection, Q_ARG(QString, m_geminiApiKey)); + // Custom API config, same rules: local only, never logged. + // Synced to the worker after the validation block below. + m_customApiBase = settings.value(QStringLiteral("translation/customApiBase")).toString(); + m_customApiKey = settings.value(QStringLiteral("translation/customApiKey")).toString(); + m_customApiModel = settings.value(QStringLiteral("translation/customApiModel")).toString(); } // Translation settings are persisted by THIS engine in QSettings // (translation/), never through ShellStore.settings: the Rust @@ -134,11 +143,14 @@ TranslationEngine::TranslationEngine(QObject *parent) m_sourceLanguage = QStringLiteral("en"); if (m_targetLanguage.isEmpty()) m_targetLanguage = QStringLiteral("vi"); + m_customApiBase = normalizeCustomApiBase(m_customApiBase); if (!QStringList{QStringLiteral("gemini-vision"), QStringLiteral("tesseract"), - QStringLiteral("rapidocr"), QStringLiteral("windows-ocr")} + QStringLiteral("rapidocr"), QStringLiteral("windows-ocr"), + QStringLiteral("custom-vision")} .contains(m_ocrEngine)) m_ocrEngine = QStringLiteral("gemini-vision"); - if (!QStringList{QStringLiteral("google"), QStringLiteral("gemini")} + if (!QStringList{QStringLiteral("google"), QStringLiteral("gemini"), + QStringLiteral("custom")} .contains(m_translationProvider)) m_translationProvider = QStringLiteral("google"); if (!QStringList{QStringLiteral("inplace"), QStringLiteral("subtitle"), QStringLiteral("off")} @@ -147,6 +159,9 @@ TranslationEngine::TranslationEngine(QObject *parent) m_stabilityDelayMs = qBound(0, m_stabilityDelayMs, 5000); m_fontSizePx = qBound(10, m_fontSizePx, 64); } + // Sync the (now normalized) custom-API config to the worker. + if (!m_customApiBase.isEmpty() || !m_customApiKey.isEmpty() || !m_customApiModel.isEmpty()) + syncCustomApiToWorker(); // The pump was restored enabled from QSettings: start it. The // frameRequested connect in ApplicationStartup is wired after this // constructor returns, and the first timeout is 1s away, so no @@ -232,7 +247,8 @@ void TranslationEngine::setTargetLanguage(const QString &language) void TranslationEngine::setOcrEngine(const QString &engine) { static const QStringList valid = {QStringLiteral("gemini-vision"), QStringLiteral("tesseract"), - QStringLiteral("rapidocr"), QStringLiteral("windows-ocr")}; + QStringLiteral("rapidocr"), QStringLiteral("windows-ocr"), + QStringLiteral("custom-vision")}; if (!valid.contains(engine) || m_ocrEngine == engine) return; m_ocrEngine = engine; @@ -242,7 +258,8 @@ void TranslationEngine::setOcrEngine(const QString &engine) void TranslationEngine::setTranslationProvider(const QString &provider) { - static const QStringList valid = {QStringLiteral("google"), QStringLiteral("gemini")}; + static const QStringList valid = {QStringLiteral("google"), QStringLiteral("gemini"), + QStringLiteral("custom")}; if (!valid.contains(provider) || m_translationProvider == provider) return; m_translationProvider = provider; @@ -250,6 +267,75 @@ void TranslationEngine::setTranslationProvider(const QString &provider) emit translationProviderChanged(); } +CustomApiConfig TranslationEngine::customApiConfig() const +{ + return CustomApiConfig{m_customApiBase, m_customApiKey, m_customApiModel}; +} + +void TranslationEngine::syncCustomApiToWorker() +{ + QMetaObject::invokeMethod(m_worker, "setCustomApiConfig", Qt::QueuedConnection, + Q_ARG(CustomApiConfig, customApiConfig())); +} + +void TranslationEngine::setCustomApiBase(const QString &base) +{ + const QString normalized = normalizeCustomApiBase(base); + if (m_customApiBase == normalized) + return; + m_customApiBase = normalized; + saveTranslationSetting(QStringLiteral("customApiBase"), normalized); + syncCustomApiToWorker(); + emit customApiBaseChanged(); +} + +void TranslationEngine::setCustomApiModel(const QString &model) +{ + const QString trimmed = model.trimmed(); + if (m_customApiModel == trimmed) + return; + m_customApiModel = trimmed; + saveTranslationSetting(QStringLiteral("customApiModel"), trimmed); + syncCustomApiToWorker(); + emit customApiModelChanged(); +} + +void TranslationEngine::setCustomApiKey(const QString &key) +{ + if (m_customApiKey == key) + return; + m_customApiKey = key; + // Persist locally only (QSettings: registry on Windows, ini elsewhere). + // Never written to the repo, never logged, never sent anywhere except + // to the user's own base in the Authorization header. + QSettings settings; + if (key.isEmpty()) + settings.remove(QStringLiteral("translation/customApiKey")); + else + settings.setValue(QStringLiteral("translation/customApiKey"), key); + syncCustomApiToWorker(); +} + +bool TranslationEngine::hasCustomApiKey() const +{ + return !m_customApiKey.isEmpty(); +} + +void TranslationEngine::fetchCustomApiModels() +{ + if (m_customApiBase.isEmpty()) { + setError(QStringLiteral("Custom API base URL is empty")); + return; + } + if (m_customApiKey.isEmpty()) { + setError(QStringLiteral("Custom API key is empty")); + return; + } + setStatus(QStringLiteral("Fetching models…")); + QMetaObject::invokeMethod(m_worker, "fetchCustomApiModels", Qt::QueuedConnection, + Q_ARG(QString, m_customApiBase), Q_ARG(QString, m_customApiKey)); +} + void TranslationEngine::setOverlayMode(const QString &mode) { static const QStringList valid = {QStringLiteral("inplace"), QStringLiteral("subtitle"), @@ -431,6 +517,7 @@ void TranslationEngine::submitCrop(const QImage &crop, const QString &hash, cons job.sourceLanguage = m_sourceLanguage; job.targetLanguage = m_targetLanguage; job.geminiApiKey = m_geminiApiKey; + job.customApi = customApiConfig(); setStatus(QStringLiteral("Reading dialogue…")); QMetaObject::invokeMethod(m_worker, "submitJob", Qt::QueuedConnection, Q_ARG(TranslationJob, job)); @@ -473,11 +560,57 @@ void TranslationEngine::requestTestTranslation(const QString &englishText) job.sourceLanguage = m_sourceLanguage; job.targetLanguage = m_targetLanguage; job.geminiApiKey = m_geminiApiKey; + job.customApi = customApiConfig(); setStatus(QStringLiteral("Translating…")); QMetaObject::invokeMethod(m_worker, "submitJob", Qt::QueuedConnection, Q_ARG(TranslationJob, job)); } +void TranslationEngine::onWorkerJobProgress(const QString &original, + const QString &partialTranslated, + const QRectF &sourceRect, bool testJob) +{ + setPartialTranslation(original, partialTranslated, sourceRect, testJob); +} + +void TranslationEngine::onWorkerModelsFetched(const QStringList &models, const QString &error) +{ + if (!error.isEmpty()) { + setError(error); + return; + } + m_customApiModels = models; + emit customApiModelsChanged(); + if (m_customApiModel.isEmpty() && !models.isEmpty()) + setCustomApiModel(models.first()); + setStatus(QStringLiteral("Fetched %1 models").arg(models.size())); +} + +void TranslationEngine::setPartialTranslation(const QString &original, const QString &partial, + const QRectF &sourceRect, bool testJob) +{ + // Streaming partial: updates the visible text as it arrives, but + // never the cache — only the final jobCompleted result is cached. + // A TEST partial stays in the TEST section, like setTestResult. + m_lastOriginalText = original; + m_lastTranslatedText = partial; + m_lastError.clear(); + setStatus(QStringLiteral("Translating…")); + if (testJob) { + emit translationTextChanged(); + return; + } + // Live overlay: one block over the source rect for now; the final + // result replaces it with one box per English line. + m_translationBlocks = singleBlockVariantList(original, partial, sourceRect); + if (!m_hasTranslation) { + m_hasTranslation = true; + emit hasTranslationChanged(); + } + emit translationBlocksChanged(); + emit translationTextChanged(); +} + void TranslationEngine::onWorkerJobCompleted(const TranslationJobResult &result) { if (!result.ok) { diff --git a/opennow-qt/src/translation/TranslationEngine.h b/opennow-qt/src/translation/TranslationEngine.h index f9834e3a5..1beee2233 100644 --- a/opennow-qt/src/translation/TranslationEngine.h +++ b/opennow-qt/src/translation/TranslationEngine.h @@ -17,7 +17,10 @@ // no network at all. // 5. Otherwise a job goes to TranslationWorker (own thread): OCR with // the selected engine, then translate with the selected provider, -// then insert into the cache and emit translationReady. +// then insert into the cache and emit translationReady. Streaming +// providers (custom API) also report partial text through +// jobProgress while generating, so the overlay fills in live; the +// final jobCompleted result always replaces the partial. // All network/OCR work happens in the worker thread; the GUI thread never // blocks. On failure lastError is set, the previous translation is kept // for 2s, and no garbage text is ever emitted. @@ -34,6 +37,7 @@ #include #include +#include "translation/CustomApi.h" #include "translation/TranslationCache.h" #include "translation/TranslationWorker.h" #include "translation/WuWaDialogueDb.h" @@ -67,6 +71,12 @@ class TranslationEngine : public QObject // with x/y/w/h normalized 0..1 in full-frame coordinates. The overlay // draws one box per entry, over the English line it replaces. Q_PROPERTY(QVariantList translationBlocks READ translationBlocks NOTIFY translationBlocksChanged) + // Custom OpenAI-compatible API (any base + key + model the user + // pastes). The key itself is write-only through setCustomApiKey(); + // QML only ever reads whether one is saved. + Q_PROPERTY(QString customApiBase READ customApiBase WRITE setCustomApiBase NOTIFY customApiBaseChanged) + Q_PROPERTY(QString customApiModel READ customApiModel WRITE setCustomApiModel NOTIFY customApiModelChanged) + Q_PROPERTY(QStringList customApiModels READ customApiModels NOTIFY customApiModelsChanged) public: explicit TranslationEngine(QObject *parent = nullptr); @@ -120,12 +130,23 @@ class TranslationEngine : public QObject QString lastError() const { return m_lastError; } bool hasTranslation() const { return m_hasTranslation; } QVariantList translationBlocks() const { return m_translationBlocks; } + QString customApiBase() const { return m_customApiBase; } + void setCustomApiBase(const QString &base); + QString customApiModel() const { return m_customApiModel; } + void setCustomApiModel(const QString &model); + QStringList customApiModels() const { return m_customApiModels; } Q_INVOKABLE void onStreamFrame(const QImage &image); Q_INVOKABLE void requestTestTranslation(const QString &englishText); Q_INVOKABLE void clearCache(); Q_INVOKABLE void setGeminiApiKey(const QString &key); Q_INVOKABLE bool hasGeminiApiKey() const; + Q_INVOKABLE void setCustomApiKey(const QString &key); + Q_INVOKABLE bool hasCustomApiKey() const; + // Lists the models of the configured custom base (GET {base}/models + // with the saved key). Result arrives via customApiModelsChanged / + // statusText; the model list itself is never persisted. + Q_INVOKABLE void fetchCustomApiModels(); // "wuthering-waves" (dialogue bottom bar) or "generic" (lower third). Q_INVOKABLE void setDialoguePreset(const QString &preset); @@ -148,6 +169,9 @@ class TranslationEngine : public QObject void dialoguePresetChanged(); void hasTranslationChanged(); void translationBlocksChanged(); + void customApiBaseChanged(); + void customApiModelChanged(); + void customApiModelsChanged(); // Emitted by the frame pump while translation is enabled. Application // Startup connects it to NativeStreamRuntime::requestScreenshot(): the // screenshotReady signal only fires for an explicit screenshot request, @@ -158,18 +182,31 @@ class TranslationEngine : public QObject private slots: void onStabilityTimeout(); void onWorkerJobCompleted(const TranslationJobResult &result); + void onWorkerJobProgress(const QString &original, const QString &partialTranslated, + const QRectF &sourceRect, bool testJob); + void onWorkerModelsFetched(const QStringList &models, const QString &error); void onKeepPreviousExpired(); void onFrameTimerTimeout(); private: void setStatus(const QString &status); void setError(const QString &error); + // Current custom-API config for jobs (key never leaves this class + // except into a job / the worker, and is never logged). + CustomApiConfig customApiConfig() const; + // Pushes the current custom-API config to the worker thread (queued). + void syncCustomApiToWorker(); // Cache-first submit of one stable crop to the worker (shared by the // stability-timeout path and the full-screen throttle path). void submitCrop(const QImage &crop, const QString &hash, const QRectF &rect); void emitTranslation(const QString &original, const QString &translated, const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, bool cacheHit, const QVariantList &blocks = {}); + // Streaming partial: updates last* fields (+ the live overlay, one + // block over the source rect) or the TEST section only, but never the + // cache. The final jobCompleted result always replaces it. + void setPartialTranslation(const QString &original, const QString &partial, + const QRectF &sourceRect, bool testJob); // TEST-section only: updates last* fields + status, but never touches // the live overlay (hasTranslation / translationBlocks / // translationReady). A "Dịch thử" result must never stick on the @@ -199,6 +236,10 @@ private slots: QString m_lastError; bool m_hasTranslation = false; QString m_geminiApiKey; // persisted locally via QSettings only; never logged, never committed + QString m_customApiBase; // persisted locally via QSettings only + QString m_customApiKey; // persisted locally via QSettings only; never logged, never committed + QString m_customApiModel; // persisted locally via QSettings only + QStringList m_customApiModels; // fetched live from {base}/models; never persisted TranslationCache m_cache; WuWaDialogueDb m_dialogueDb; diff --git a/opennow-qt/src/translation/TranslationHttp.cpp b/opennow-qt/src/translation/TranslationHttp.cpp index bf79cad92..9e30b1e18 100644 --- a/opennow-qt/src/translation/TranslationHttp.cpp +++ b/opennow-qt/src/translation/TranslationHttp.cpp @@ -81,3 +81,72 @@ TranslationHttpResult TranslationHttp::request( } return TranslationHttpResult{429, {}, QStringLiteral("Rate limited")}; } + +TranslationHttpResult TranslationHttp::postStream( + const QString &url, const QByteArray &jsonBody, + const QList> &headers, + const std::function &onChunk) +{ + QList> all = headers; + all.append({QByteArrayLiteral("Content-Type"), QByteArrayLiteral("application/json")}); + for (int attempt = 0; attempt < 2; ++attempt) { + QNetworkAccessManager manager; + QNetworkRequest request(QUrl{url}); + for (const auto &header : all) + request.setRawHeader(header.first, header.second); + QNetworkReply *reply = manager.post(request, jsonBody); + + // Inactivity timeout: the timer restarts on every chunk, so a + // slow-but-alive stream is never cut off; a dead stream dies + // after NetworkTimeoutMs of silence. The total timer caps the + // whole stream at MaxStreamTotalMs even while chunks keep coming. + QEventLoop loop; + QTimer timer; + timer.setSingleShot(true); + QTimer totalTimer; + totalTimer.setSingleShot(true); + bool timedOut = false; + QObject::connect(&timer, &QTimer::timeout, [&] { + timedOut = true; + loop.quit(); + }); + QObject::connect(&totalTimer, &QTimer::timeout, [&] { + timedOut = true; + loop.quit(); + }); + QObject::connect(reply, &QNetworkReply::readyRead, [&] { + timer.start(NetworkTimeoutMs); + if (onChunk) + onChunk(reply->readAll()); + }); + QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); + timer.start(NetworkTimeoutMs); + totalTimer.start(MaxStreamTotalMs); + loop.exec(); + if (timedOut || !reply->isFinished()) { + reply->abort(); + reply->deleteLater(); + return TranslationHttpResult{0, {}, QStringLiteral("Network timeout")}; + } + // Bytes that arrived with `finished` instead of a readyRead. + const QByteArray tail = reply->readAll(); + if (!tail.isEmpty() && onChunk) + onChunk(tail); + TranslationHttpResult result; + result.statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + result.body = tail; + if (reply->error() != QNetworkReply::NoError && result.statusCode == 0) + result.error = reply->errorString(); + const int waitMs = retryAfterMs(reply); + const bool rateLimited = result.statusCode == 429; + reply->deleteLater(); + if (rateLimited && attempt == 0) { + sleepMs(waitMs); // single retry; capped at MaxRetryAfterMs + continue; + } + if (!result.ok() && result.error.isEmpty()) + result.error = QStringLiteral("HTTP %1").arg(result.statusCode); + return result; + } + return TranslationHttpResult{429, {}, QStringLiteral("Rate limited")}; +} diff --git a/opennow-qt/src/translation/TranslationHttp.h b/opennow-qt/src/translation/TranslationHttp.h index 1067cf9ec..8af5dd44a 100644 --- a/opennow-qt/src/translation/TranslationHttp.h +++ b/opennow-qt/src/translation/TranslationHttp.h @@ -12,6 +12,7 @@ #include #include #include +#include struct TranslationHttpResult { @@ -26,6 +27,8 @@ class TranslationHttp public: static constexpr int NetworkTimeoutMs = 8000; static constexpr int MaxRetryAfterMs = 10000; + // Hard cap on one streaming response, even while chunks keep coming. + static constexpr int MaxStreamTotalMs = 60000; // Synchronous request on the calling thread. `headers` are raw // name/value pairs (e.g. {"Content-Type", "application/json"}). @@ -46,4 +49,17 @@ class TranslationHttp all.append({QByteArrayLiteral("Content-Type"), QByteArrayLiteral("application/json")}); return request(QStringLiteral("POST"), url, all, jsonBody); } + + // Synchronous streaming POST (SSE): `onChunk` is invoked with each + // batch of response bytes AS IT ARRIVES, so the caller can show + // partial text while the model is still generating. The 8s timeout + // is INACTIVITY-based — the clock restarts on every chunk — and the + // whole stream is capped at MaxStreamTotalMs. Like request(), a 429 + // retries exactly once. The returned `body` holds only bytes that + // arrived after the last readyRead (normally empty: chunks go to + // `onChunk`); check `error` / `statusCode` as usual. + static TranslationHttpResult postStream( + const QString &url, const QByteArray &jsonBody, + const QList> &headers, + const std::function &onChunk); }; diff --git a/opennow-qt/src/translation/TranslationProvider.cpp b/opennow-qt/src/translation/TranslationProvider.cpp index e45e754cc..76abc9b43 100644 --- a/opennow-qt/src/translation/TranslationProvider.cpp +++ b/opennow-qt/src/translation/TranslationProvider.cpp @@ -23,6 +23,17 @@ QString geminiTranslatePrompt(const QString &text) + text; } +// The same WuWa prompt as a system message for chat-completions APIs: +// the user message carries only the dialogue text. +QString customTranslateSystemPrompt() +{ + return QStringLiteral( + "Translate the following English game dialogue from Wuthering Waves into natural, " + "fluent Vietnamese. Keep character and place names in English (e.g. Rover, Jinzhou, " + "Sentinel). Do not change Rover's pronouns or gender the character. Do not add " + "explanations, quotes, or any text besides the translation."); +} + bool parseGeminiTranslateText(const QByteArray &body, QString &text, QString &error) { const QJsonDocument doc = QJsonDocument::fromJson(body); @@ -51,6 +62,17 @@ bool parseGeminiTranslateText(const QByteArray &body, QString &text, QString &er } } // namespace +TranslateResult TranslationProvider::translateStreaming(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage, + const TranslateChunkCallback &onChunk) +{ + TranslateResult result = translate(englishText, sourceLanguage, targetLanguage); + if (result.ok && onChunk) + onChunk(result.text); + return result; +} + TranslateResult GoogleTranslateProvider::translate(const QString &englishText, const QString &sourceLanguage, const QString &targetLanguage) @@ -131,12 +153,95 @@ TranslateResult GeminiTranslateProvider::translate(const QString &englishText, return TranslateResult{true, text, {}}; } -std::unique_ptr createTranslationProvider(const QString &id, - const QString &geminiApiKey) +std::unique_ptr createTranslationProvider( + const QString &id, const QString &geminiApiKey, const CustomApiConfig &customApi) { if (id == QStringLiteral("google")) return std::make_unique(); if (id == QStringLiteral("gemini")) return std::make_unique(geminiApiKey); + if (id == QStringLiteral("custom")) + return std::make_unique(customApi); return nullptr; } + +CustomApiTranslateProvider::CustomApiTranslateProvider(const CustomApiConfig &config) + : m_config(config) +{ +} + +void CustomApiTranslateProvider::setConfig(const CustomApiConfig &config) +{ + m_config = config; +} + +TranslateResult CustomApiTranslateProvider::translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) +{ + Q_UNUSED(sourceLanguage) + Q_UNUSED(targetLanguage) + if (!m_config.isConfigured()) + return TranslateResult{false, {}, + QStringLiteral("Custom API not configured: set base URL, API key and model")}; + if (englishText.trimmed().isEmpty()) + return TranslateResult{false, {}, QStringLiteral("Nothing to translate")}; + + const QByteArray payload = buildChatCompletionPayload( + m_config.model, customTranslateSystemPrompt(), englishText, {}, false); + // Key travels in the Authorization header, never in the URL, and is + // never logged. + const TranslationHttpResult result = TranslationHttp::postJson( + customApiChatUrl(m_config.baseUrl), payload, + {{QByteArrayLiteral("Authorization"), + QByteArrayLiteral("Bearer ") + m_config.apiKey.toUtf8()}}); + if (!result.ok()) + return TranslateResult{false, {}, result.error}; + + QString text; + QString error; + if (!parseChatCompletionText(result.body, text, error)) + return TranslateResult{false, {}, error}; + return TranslateResult{true, text, {}}; +} + +TranslateResult CustomApiTranslateProvider::translateStreaming( + const QString &englishText, const QString &sourceLanguage, const QString &targetLanguage, + const TranslateChunkCallback &onChunk) +{ + Q_UNUSED(sourceLanguage) + Q_UNUSED(targetLanguage) + if (!m_config.isConfigured()) + return TranslateResult{false, {}, + QStringLiteral("Custom API not configured: set base URL, API key and model")}; + if (englishText.trimmed().isEmpty()) + return TranslateResult{false, {}, QStringLiteral("Nothing to translate")}; + + const QByteArray payload = buildChatCompletionPayload( + m_config.model, customTranslateSystemPrompt(), englishText, {}, true); + // The SSE body is accumulated here; parseSseStreamText re-parses the + // whole buffer after every chunk, so a chunk split mid-line still + // yields the right text, and only growth is reported to the caller. + QByteArray sseBuffer; + QString emitted; + const TranslationHttpResult result = TranslationHttp::postStream( + customApiChatUrl(m_config.baseUrl), payload, + {{QByteArrayLiteral("Authorization"), + QByteArrayLiteral("Bearer ") + m_config.apiKey.toUtf8()}}, + [&](const QByteArray &chunk) { + sseBuffer.append(chunk); + const QString parsed = parseSseStreamText(sseBuffer); + if (parsed.size() > emitted.size() && parsed.startsWith(emitted)) { + emitted = parsed; + if (onChunk) + onChunk(emitted); + } + }); + if (!result.ok()) + return TranslateResult{false, {}, result.error}; + + const QString text = parseSseStreamText(sseBuffer).trimmed(); + if (text.isEmpty()) + return TranslateResult{false, {}, QStringLiteral("API returned empty text")}; + return TranslateResult{true, text, {}}; +} diff --git a/opennow-qt/src/translation/TranslationProvider.h b/opennow-qt/src/translation/TranslationProvider.h index 38fb67293..3059831de 100644 --- a/opennow-qt/src/translation/TranslationProvider.h +++ b/opennow-qt/src/translation/TranslationProvider.h @@ -1,19 +1,27 @@ // TranslationProvider: English -> Vietnamese translation. // -// Both implementations run on the translation worker thread (never the GUI +// All implementations run on the translation worker thread (never the GUI // thread) and are synchronous with an internal timeout (see // TranslationHttp::NetworkTimeoutMs, 8s, single 429 retry). // // - GoogleTranslateProvider: REAL, free unauthenticated endpoint // (translate.googleapis.com/translate_a/single?client=gtx). No key. -// - GeminiTranslateProvider: REAL, Gemini 2.5 Flash-Lite with a fixed +// - GeminiTranslateProvider: REAL, Gemini 3.5 Flash-Lite with a fixed // Wuthering Waves prompt (keeps proper names, Rover pronouns, natural // Vietnamese). Key is passed in, never logged, never stored in code. +// - CustomApiTranslateProvider: REAL, any OpenAI-compatible base the +// user pastes (OpenAI, OpenRouter, Groq, DeepSeek, ...). The model +// list comes from GET {base}/models with the user's key, and the +// translation streams (SSE) so partial text shows while the model is +// still generating instead of waiting for the whole reply. #pragma once #include +#include #include +#include "translation/CustomApi.h" + struct TranslateResult { bool ok = false; @@ -21,6 +29,11 @@ struct TranslateResult QString error; // human-readable, safe to show; never contains a key }; +// Called with the progressively translated text while a streaming +// provider is still generating. The final text is always delivered +// through translateStreaming's return value as well. +using TranslateChunkCallback = std::function; + class TranslationProvider { public: @@ -30,6 +43,13 @@ class TranslationProvider virtual TranslateResult translate(const QString &englishText, const QString &sourceLanguage, const QString &targetLanguage) = 0; + // Streaming translation. The default implementation calls + // translate() once and reports the whole text as a single chunk, so + // non-streaming providers work unchanged through this path. + virtual TranslateResult translateStreaming(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage, + const TranslateChunkCallback &onChunk); }; class GoogleTranslateProvider final : public TranslationProvider @@ -57,7 +77,28 @@ class GeminiTranslateProvider final : public TranslationProvider QString m_apiKey; // never logged, never written to disk by this class }; -// Factory. `geminiApiKey` is forwarded only to GeminiTranslateProvider. +class CustomApiTranslateProvider final : public TranslationProvider +{ +public: + explicit CustomApiTranslateProvider(const CustomApiConfig &config = {}); + void setConfig(const CustomApiConfig &config); // key held in memory only + QString id() const override { return QStringLiteral("custom"); } + QString displayName() const override { return QStringLiteral("Custom API"); } + TranslateResult translate(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage) override; + TranslateResult translateStreaming(const QString &englishText, + const QString &sourceLanguage, + const QString &targetLanguage, + const TranslateChunkCallback &onChunk) override; + +private: + CustomApiConfig m_config; // base + key + model; key never logged +}; + +// Factory. `geminiApiKey` is forwarded only to GeminiTranslateProvider; +// `customApi` only to CustomApiTranslateProvider. // Returns nullptr for an unknown id. -std::unique_ptr createTranslationProvider(const QString &id, - const QString &geminiApiKey = {}); +std::unique_ptr createTranslationProvider( + const QString &id, const QString &geminiApiKey = {}, + const CustomApiConfig &customApi = {}); diff --git a/opennow-qt/src/translation/TranslationWorker.cpp b/opennow-qt/src/translation/TranslationWorker.cpp index 3934a4fe8..ce81c048d 100644 --- a/opennow-qt/src/translation/TranslationWorker.cpp +++ b/opennow-qt/src/translation/TranslationWorker.cpp @@ -1,5 +1,7 @@ #include "translation/TranslationWorker.h" +#include "translation/CustomApi.h" #include "translation/OcrEngine.h" +#include "translation/TranslationHttp.h" #include "translation/TranslationProvider.h" #include @@ -85,6 +87,7 @@ TranslationWorker::TranslationWorker(QObject *parent) qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); + qRegisterMetaType(); } TranslationWorker::~TranslationWorker() @@ -125,6 +128,12 @@ void TranslationWorker::submitJob(const TranslationJob &job) TranslationJob effective = job; if (effective.geminiApiKey.isEmpty()) effective.geminiApiKey = m_geminiApiKey; + if (effective.customApi.baseUrl.isEmpty()) + effective.customApi.baseUrl = m_customApi.baseUrl; + if (effective.customApi.apiKey.isEmpty()) + effective.customApi.apiKey = m_customApi.apiKey; + if (effective.customApi.model.isEmpty()) + effective.customApi.model = m_customApi.model; m_queue.submit(effective); if (!m_processing) QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); @@ -136,6 +145,38 @@ void TranslationWorker::setGeminiApiKey(const QString &key) m_geminiApiKey = key; } +void TranslationWorker::setCustomApiConfig(const CustomApiConfig &config) +{ + // Runs in the worker thread; the key is never logged. + m_customApi = config; +} + +void TranslationWorker::fetchCustomApiModels(const QString &base, const QString &apiKey) +{ + // Runs in the worker thread. Lists the base's real models + // (GET {base}/models, key in the Authorization header); the result + // comes back via customApiModelsFetched. + const QString url = customApiModelsUrl(base); + if (url.isEmpty()) { + emit customApiModelsFetched({}, QStringLiteral("Custom API base URL is empty")); + return; + } + if (apiKey.isEmpty()) { + emit customApiModelsFetched({}, QStringLiteral("Custom API key is empty")); + return; + } + const TranslationHttpResult result = TranslationHttp::request( + QStringLiteral("GET"), url, + {{QByteArrayLiteral("Authorization"), QByteArrayLiteral("Bearer ") + apiKey.toUtf8()}}); + if (!result.ok()) { + emit customApiModelsFetched({}, result.error); + return; + } + QString error; + const QStringList models = parseCustomApiModels(result.body, error); + emit customApiModelsFetched(models, error); +} + void TranslationWorker::cancelPending() { // Runs in the worker thread. Drops the waiting job only; a running job @@ -183,7 +224,7 @@ void TranslationWorker::processNext() if (tried.contains(candidateId)) continue; tried.append(candidateId); - auto engine = createOcrEngine(candidateId, job->geminiApiKey); + auto engine = createOcrEngine(candidateId, job->geminiApiKey, job->customApi); if (!engine) continue; if (!engine->available()) @@ -234,7 +275,7 @@ void TranslationWorker::processNext() QElapsedTimer translateTimer; translateTimer.start(); - auto provider = createTranslationProvider(job->providerId, job->geminiApiKey); + auto provider = createTranslationProvider(job->providerId, job->geminiApiKey, job->customApi); if (!provider) { result.error = QStringLiteral("Unknown translation provider"); result.ocrMs = ocrMs; @@ -249,8 +290,14 @@ void TranslationWorker::processNext() // split the reply back onto the same blocks. If the reply has a // different number of lines, fall back to one call per block — the // position mapping must never be guessed from a misaligned split. - const TranslateResult translated = - provider->translate(original, job->sourceLanguage, job->targetLanguage); + // Streaming providers report partial text through the callback as it + // arrives (emitted as jobProgress); the final text still comes back + // here and replaces the partial. + const TranslateResult translated = provider->translateStreaming( + original, job->sourceLanguage, job->targetLanguage, + [&](const QString &partial) { + emit jobProgress(original, partial, job->sourceRect, job->testJob); + }); result.translateMs = translateTimer.elapsed(); result.ocrMs = ocrMs; if (!translated.ok) { diff --git a/opennow-qt/src/translation/TranslationWorker.h b/opennow-qt/src/translation/TranslationWorker.h index f84ef4478..8d333778d 100644 --- a/opennow-qt/src/translation/TranslationWorker.h +++ b/opennow-qt/src/translation/TranslationWorker.h @@ -21,6 +21,8 @@ #include #include +#include "translation/CustomApi.h" + // One translated line and where it sits on the frame: rect is normalized // 0..1 in FULL-FRAME coordinates (the worker maps the OCR block's // crop-relative rect through the job's sourceRect), so the overlay can draw @@ -47,6 +49,7 @@ struct TranslationJob QString sourceLanguage = QStringLiteral("en"); QString targetLanguage = QStringLiteral("vi"); QString geminiApiKey; // forwarded to Gemini engines; never logged + CustomApiConfig customApi; // forwarded to custom engines; key never logged }; Q_DECLARE_METATYPE(TranslationJob) @@ -114,10 +117,21 @@ public slots: // bounded queue; a stale waiting job is dropped, never processed late. void submitJob(const TranslationJob &job); void setGeminiApiKey(const QString &key); + void setCustomApiConfig(const CustomApiConfig &config); + // Lists the models of a custom base (GET {base}/models, key in the + // Authorization header). Runs in the worker thread; the result comes + // back via customApiModelsFetched. + void fetchCustomApiModels(const QString &base, const QString &apiKey); void cancelPending(); signals: void jobCompleted(const TranslationJobResult &result); + // A streaming provider's partial translation (emitted from the worker + // thread, queued to the GUI thread). The final text always arrives + // through jobCompleted afterwards; partials are never cached. + void jobProgress(const QString &original, const QString &partialTranslated, + const QRectF &sourceRect, bool testJob); + void customApiModelsFetched(const QStringList &models, const QString &error); private slots: void processNext(); @@ -126,5 +140,6 @@ private slots: TranslationJobQueue m_queue; QThread m_thread; QString m_geminiApiKey; // worker-thread copy; set via queued slot + CustomApiConfig m_customApi; // worker-thread copy; set via queued slot bool m_processing = false; // worker-thread only }; From 0d79eecd983ab84f0585a510a776c64ed2b7eac6 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 10:46:28 +0700 Subject: [PATCH 30/54] v3: custom OpenAI-compatible API + streaming translation --- opennow-qt/tests/translation_logic_check.py | 163 ++++++++++++++++++++ opennow-qt/tests/tst_translation.cpp | 126 +++++++++++++++ 2 files changed, 289 insertions(+) diff --git a/opennow-qt/tests/translation_logic_check.py b/opennow-qt/tests/translation_logic_check.py index d091c98c8..988569c55 100644 --- a/opennow-qt/tests/translation_logic_check.py +++ b/opennow-qt/tests/translation_logic_check.py @@ -75,6 +75,115 @@ def blocks_to_variant_list(blocks): for b in blocks] +# 4. Custom OpenAI-compatible API (v3): base normalization, /models +# parsing, SSE stream parsing, chat-completion parsing + payload shape. +import json + + +def normalize_custom_api_base(base): + # Mirrors normalizeCustomApiBase: trim, strip trailing "/", strip a + # trailing "/chat/completions". + normalized = base.strip() + while normalized.endswith("/"): + normalized = normalized[:-1] + if normalized.endswith("/chat/completions"): + normalized = normalized[: -len("/chat/completions")] + while normalized.endswith("/"): + normalized = normalized[:-1] + return normalized + + +def custom_api_models_url(base): + normalized = normalize_custom_api_base(base) + return normalized + "/models" if normalized else "" + + +def custom_api_chat_url(base): + normalized = normalize_custom_api_base(base) + return normalized + "/chat/completions" if normalized else "" + + +def parse_custom_api_models(body): + # Mirrors parseCustomApiModels: {"data": [{"id": ...}]} in server + # order, duplicates removed; (models, error). + try: + doc = json.loads(body) + except (ValueError, TypeError): + return [], "Invalid response from API" + data = doc.get("data") if isinstance(doc, dict) else None + if not data: + return [], "API returned no models" + models = [] + for item in data: + model_id = (item.get("id") or "").strip() if isinstance(item, dict) else "" + if model_id and model_id not in models: + models.append(model_id) + if not models: + return [], "API returned no models" + return models, "" + + +def parse_sse_stream_text(sse_bytes): + # Mirrors parseSseStreamText: "data: {...}" lines, delta.content + # concatenated, "[DONE]" and garbage lines skipped. + text = "" + for raw_line in sse_bytes.split("\n"): + line = raw_line.strip() + if not line.startswith("data:"): + continue + payload = line[5:].strip() + if not payload or payload == "[DONE]": + continue + try: + doc = json.loads(payload) + except ValueError: + continue + choices = doc.get("choices") if isinstance(doc, dict) else None + if not choices: + continue + choice = choices[0] + delta = (choice.get("delta") or {}).get("content") or "" + if not delta: + delta = (choice.get("message") or {}).get("content") or "" + text += delta + return text + + +def parse_chat_completion_text(body): + # Mirrors parseChatCompletionText: choices[0].message.content (or + # legacy choices[0].text); (text, error). + try: + doc = json.loads(body) + except (ValueError, TypeError): + return "", "Invalid response from API" + choices = doc.get("choices") if isinstance(doc, dict) else None + if not choices: + return "", "API returned no result" + choice = choices[0] + text = ((choice.get("message") or {}).get("content") or "").strip() + if not text: + text = (choice.get("text") or "").strip() + if not text: + return "", "API returned empty text" + return text, "" + + +def build_chat_completion_payload(model, system_prompt, user_text, image_base64, stream): + # Mirrors buildChatCompletionPayload. + messages = [{"role": "system", "content": system_prompt}] + if not image_base64: + messages.append({"role": "user", "content": user_text}) + else: + messages.append({"role": "user", "content": [ + {"type": "text", "text": user_text}, + {"type": "image_url", + "image_url": {"url": "data:image/jpeg;base64," + image_base64}}]}) + body = {"model": model, "messages": messages} + if stream: + body["stream"] = True + return body + + class TranslationJobQueue: """Mirrors TranslationJobQueue: 1 running + 1 waiting, newest wins.""" @@ -189,6 +298,60 @@ def near(a, b): q.finish_running() check("queue drains to empty", q.take_running() is None) + # 4. Custom API (v3): base normalization, model list, SSE, payload. + check("base normalization keeps a clean base", + normalize_custom_api_base("https://api.openai.com/v1") == "https://api.openai.com/v1") + check("base normalization strips trailing slash", + normalize_custom_api_base("https://api.openai.com/v1/") == "https://api.openai.com/v1") + check("base normalization strips /chat/completions", + normalize_custom_api_base("https://x.ai/v1/chat/completions") == "https://x.ai/v1") + check("base normalization trims whitespace", + normalize_custom_api_base(" https://x.ai/v1/ ") == "https://x.ai/v1") + check("base normalization empty -> empty", + normalize_custom_api_base("") == "") + check("models url appends /models", + custom_api_models_url("https://x.ai/v1/") == "https://x.ai/v1/models") + check("chat url appends /chat/completions", + custom_api_chat_url("https://x.ai/v1/chat/completions") == "https://x.ai/v1/chat/completions") + check("models url empty base -> empty", + custom_api_models_url("") == "") + models, err = parse_custom_api_models( + '{"object":"list","data":[{"id":"gpt-4o-mini"},{"id":"llama-3.3-70b"},{"id":"gpt-4o-mini"}]}') + check("models parsed in order, duplicates removed", + models == ["gpt-4o-mini", "llama-3.3-70b"] and err == "") + models, err = parse_custom_api_models("not json") + check("models bad json -> empty + error", models == [] and err != "") + models, err = parse_custom_api_models('{"data":[]}') + check("models empty data -> empty + error", models == [] and err != "") + sse = ('data: {"choices":[{"delta":{"content":"Xin"}}]}\n\n' + 'data: {"choices":[{"delta":{"content":" chào"}}]}\n\n' + 'data: [DONE]\n\n') + check("SSE deltas concatenate", parse_sse_stream_text(sse) == "Xin chào") + check("SSE partial buffer yields only the complete event", + parse_sse_stream_text('data: {"choices":[{"delta":{"content":"Xin"}}]}\n\ndata: {"cho') == "Xin") + check("SSE garbage lines skipped", + parse_sse_stream_text(": ping\n\ndata: [DONE]\n\n") == "") + check("SSE full-message event used as-is", + parse_sse_stream_text('data: {"choices":[{"message":{"content":"Rover"}}]}\n\n') == "Rover") + text, err = parse_chat_completion_text( + '{"choices":[{"message":{"content":" Xin chào Rover "}}]}') + check("chat completion content trimmed", text == "Xin chào Rover" and err == "") + text, err = parse_chat_completion_text('{"choices":[{"text":"Chào"}]}') + check("chat completion legacy text shape", text == "Chào") + text, err = parse_chat_completion_text('{"choices":[]}') + check("chat completion no choices -> error", text == "" and err != "") + payload = build_chat_completion_payload("gpt-4o-mini", "sys", "Hello", "", True) + check("payload text call shape", + payload["model"] == "gpt-4o-mini" and payload["stream"] is True + and payload["messages"][0]["role"] == "system" + and payload["messages"][1]["content"] == "Hello") + payload = build_chat_completion_payload("gpt-4o", "sys", "Read.", "aGVsbG8=", False) + content = payload["messages"][1]["content"] + check("payload vision call has image_url part", + "stream" not in payload and len(content) == 2 + and content[1]["type"] == "image_url" + and content[1]["image_url"]["url"].startswith("data:image/jpeg;base64,")) + print(f"\n{check.failures} failure(s)") return 1 if check.failures else 0 diff --git a/opennow-qt/tests/tst_translation.cpp b/opennow-qt/tests/tst_translation.cpp index e7999b459..fc94c58e3 100644 --- a/opennow-qt/tests/tst_translation.cpp +++ b/opennow-qt/tests/tst_translation.cpp @@ -6,7 +6,9 @@ #include "translation/TranslationEngine.h" #include "translation/TranslationWorker.h" #include "translation/WuWaDialogueDb.h" +#include "translation/CustomApi.h" #include "translation/OcrEngine.h" +#include "translation/TranslationProvider.h" #include #include @@ -299,6 +301,130 @@ private slots: QStringLiteral("Xin chào thế giới")); } + void customApiBaseNormalizationCases() + { + QCOMPARE(normalizeCustomApiBase(QStringLiteral("https://api.openai.com/v1")), + QStringLiteral("https://api.openai.com/v1")); + QCOMPARE(normalizeCustomApiBase(QStringLiteral("https://api.openai.com/v1/")), + QStringLiteral("https://api.openai.com/v1")); + QCOMPARE(normalizeCustomApiBase(QStringLiteral("https://x.ai/v1/chat/completions")), + QStringLiteral("https://x.ai/v1")); + QCOMPARE(normalizeCustomApiBase(QStringLiteral(" https://x.ai/v1/ ")), + QStringLiteral("https://x.ai/v1")); + QVERIFY(normalizeCustomApiBase(QString()).isEmpty()); + QCOMPARE(customApiModelsUrl(QStringLiteral("https://x.ai/v1/")), + QStringLiteral("https://x.ai/v1/models")); + QCOMPARE(customApiChatUrl(QStringLiteral("https://x.ai/v1/chat/completions")), + QStringLiteral("https://x.ai/v1/chat/completions")); + QVERIFY(customApiModelsUrl(QString()).isEmpty()); + QVERIFY(customApiChatUrl(QStringLiteral(" ")).isEmpty()); + } + + void customApiModelsParsing() + { + QString error; + const QByteArray body = R"({"object":"list","data":[{"id":"gpt-4o-mini"},{"id":"llama-3.3-70b"},{"id":"gpt-4o-mini"}]})"; + const QStringList models = parseCustomApiModels(body, error); + QCOMPARE(models.size(), 2); // duplicate removed + QCOMPARE(models.at(0), QStringLiteral("gpt-4o-mini")); + QCOMPARE(models.at(1), QStringLiteral("llama-3.3-70b")); + QVERIFY(error.isEmpty()); + // Bad bodies: no models. + QVERIFY(parseCustomApiModels(QByteArrayLiteral("not json"), error).isEmpty()); + QVERIFY(!error.isEmpty()); + QVERIFY(parseCustomApiModels(QByteArrayLiteral("{\"data\":[]}"), error).isEmpty()); + QVERIFY(parseCustomApiModels(QByteArrayLiteral("{\"data\":[{\"id\":\"\"}]}"), error).isEmpty()); + } + + void sseStreamTextParsing() + { + // Two delta events + [DONE]. + const QByteArray sse = + "data: {\"choices\":[{\"delta\":{\"content\":\"Xin\"}}]}\n\n" + "data: {\"choices\":[{\"delta\":{\"content\":\" chào\"}}]}\n\n" + "data: [DONE]\n\n"; + QCOMPARE(parseSseStreamText(sse), QStringLiteral("Xin chào")); + // A chunk split mid-line parses once the buffer is complete; the + // partial buffer yields only the complete first event. + const QByteArray firstHalf = + "data: {\"choices\":[{\"delta\":{\"content\":\"Xin\"}}]}\n\ndata: {\"cho"; + QCOMPARE(parseSseStreamText(firstHalf), QStringLiteral("Xin")); + const QByteArray full = firstHalf + "ices\":[{\"delta\":{\"content\":\" chào\"}}]}\n\ndata: [DONE]\n\n"; + QCOMPARE(parseSseStreamText(full), QStringLiteral("Xin chào")); + // Empty / garbage lines are skipped. + QCOMPARE(parseSseStreamText(QByteArrayLiteral(": ping\n\ndata: [DONE]\n\n")), QString()); + // A final full-message event (non-standard servers) is used as-is. + QCOMPARE(parseSseStreamText( + QByteArrayLiteral("data: {\"choices\":[{\"message\":{\"content\":\"Rover\"}}]}\n\n")), + QStringLiteral("Rover")); + } + + void chatCompletionTextParsing() + { + QString text; + QString error; + QVERIFY(parseChatCompletionText( + QByteArrayLiteral("{\"choices\":[{\"message\":{\"content\":\" Xin chào Rover \"}}]}"), + text, error)); + QCOMPARE(text, QStringLiteral("Xin chào Rover")); + // Legacy completions shape. + QVERIFY(parseChatCompletionText( + QByteArrayLiteral("{\"choices\":[{\"text\":\"Chào\"}]}"), text, error)); + QCOMPARE(text, QStringLiteral("Chào")); + QVERIFY(!parseChatCompletionText(QByteArrayLiteral("{\"choices\":[]}"), text, error)); + QVERIFY(!parseChatCompletionText(QByteArrayLiteral("not json"), text, error)); + } + + void chatCompletionPayloadShape() + { + const QByteArray payload = buildChatCompletionPayload( + QStringLiteral("gpt-4o-mini"), QStringLiteral("sys"), QStringLiteral("Hello"), {}, true); + const QJsonDocument doc = QJsonDocument::fromJson(payload); + QVERIFY(doc.isObject()); + const QJsonObject obj = doc.object(); + QCOMPARE(obj.value(QStringLiteral("model")).toString(), QStringLiteral("gpt-4o-mini")); + QVERIFY(obj.value(QStringLiteral("stream")).toBool()); + const QJsonArray messages = obj.value(QStringLiteral("messages")).toArray(); + QCOMPARE(messages.size(), 2); + QCOMPARE(messages.at(0).toObject().value(QStringLiteral("role")).toString(), + QStringLiteral("system")); + QCOMPARE(messages.at(1).toObject().value(QStringLiteral("content")).toString(), + QStringLiteral("Hello")); + // Vision call: user content is [text part, image_url part]. + const QByteArray vision = buildChatCompletionPayload( + QStringLiteral("gpt-4o"), QStringLiteral("sys"), QStringLiteral("Read."), + QStringLiteral("aGVsbG8="), false); + const QJsonObject vobj = QJsonDocument::fromJson(vision).object(); + QVERIFY(!vobj.contains(QStringLiteral("stream"))); + const QJsonArray vcontent = vobj.value(QStringLiteral("messages")).toArray() + .at(1).toObject().value(QStringLiteral("content")).toArray(); + QCOMPARE(vcontent.size(), 2); + QCOMPARE(vcontent.at(1).toObject().value(QStringLiteral("type")).toString(), + QStringLiteral("image_url")); + QVERIFY(vcontent.at(1).toObject().value(QStringLiteral("image_url")).toObject() + .value(QStringLiteral("url")).toString() + .startsWith(QStringLiteral("data:image/jpeg;base64,"))); + } + + void customProviderAndOcrFactory() + { + const CustomApiConfig config{QStringLiteral("https://x.ai/v1"), + QStringLiteral("k"), QStringLiteral("m")}; + QVERIFY(config.isConfigured()); + QVERIFY(!CustomApiConfig{}.isConfigured()); + auto provider = createTranslationProvider(QStringLiteral("custom"), {}, config); + QVERIFY(provider != nullptr); + QCOMPARE(provider->id(), QStringLiteral("custom")); + auto ocr = createOcrEngine(QStringLiteral("custom-vision"), {}, config); + QVERIFY(ocr != nullptr); + QCOMPARE(ocr->id(), QStringLiteral("custom-vision")); + QVERIFY(ocr->available()); + CustomVisionOcrEngine unconfigured; + QVERIFY(!unconfigured.available()); + QVERIFY(createTranslationProvider(QStringLiteral("bogus")) == nullptr); + QVERIFY(createOcrEngine(QStringLiteral("bogus")) == nullptr); + } + void framePumpFiresWhenEnabled() { TranslationEngine engine; From aa2db33a7c8796625ae780790e26dc6bd4e18f71 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 10:46:50 +0700 Subject: [PATCH 31/54] v3: custom OpenAI-compatible API + streaming translation --- docs/vn-translation/PROGRESS.md | 77 +++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/docs/vn-translation/PROGRESS.md b/docs/vn-translation/PROGRESS.md index d3e26bd86..f3748d9fe 100644 --- a/docs/vn-translation/PROGRESS.md +++ b/docs/vn-translation/PROGRESS.md @@ -457,3 +457,80 @@ Still NOT proven live: per-line box positions from real Gemini JSON and the full flow end-to-end. Only Ethan's EliteBook can prove it — the overlay lives inside the Windows app on his machine, so no browser session (and no login as him) could test it. + +## v3 — Custom OpenAI-compatible API + streaming translation (2026-11-12, local commit TBD) + +Why: run #34 live test — Gemini answers VERY slowly on Ethan's free key +(text takes multiple responses to translate). The pipeline is sequential +(1s pump + 400ms stability + OCR call + translate call), so Gemini free +tier costs 2–5s per new line. Ethan's ask: keep the Gemini key, ADD a +custom API — user pastes their own base URL + API key, the model picker +is fetched live from that base+key, user freely picks a model, PLUS +streaming for translation with that key. He has a very powerful key in +mind. Generic for ALL providers, not tied to any one company. + +What shipped: +- `CustomApi.{h,cpp}` (new, pure + testable): `normalizeCustomApiBase` + (trims, strips trailing "/", strips a pasted "/chat/completions"), + `customApiModelsUrl` / `customApiChatUrl`, `parseCustomApiModels` + (GET {base}/models → {"data":[{"id":...}]}, deduped, server order), + `parseSseStreamText` (re-parses the ACCUMULATED SSE buffer after + every chunk, so a chunk split mid-line still parses; skips "[DONE]", + garbage lines, and never double-counts a delta + message in one + event), `parseChatCompletionText` (message.content, legacy .text + fallback), `buildChatCompletionPayload` (text-only user string, or + vision [text part, image_url data: URL] when an image is given). +- `TranslationHttp::postStream`: synchronous streaming POST with a + per-chunk callback; the 8s timeout is INACTIVITY-based (restarts on + every chunk) with a 60s hard cap; 429 retries exactly once like + `request()`. +- `TranslationProvider`: new virtual `translateStreaming(text, src, tgt, + onChunk)` — default calls `translate()` once and reports the whole + text as one chunk, so Google/Gemini work unchanged through the same + path. New `CustomApiTranslateProvider` ("custom"): non-stream chat + completion for `translate()`, SSE streaming for + `translateStreaming()` (emits only growth of the parsed text). + Same WuWa system prompt as Gemini (names stay English, Rover + pronouns untouched). +- `OcrEngine`: new `CustomVisionOcrEngine` ("custom-vision"): same + blocks-JSON prompt as Gemini Vision over chat/completions with a + base64 JPEG data URL. The Gemini envelope parser was split into + `parseOcrBlocksJson` (shared) + `parseGeminiOcrText` (envelope only). + Opt-in only — default OCR stays gemini-vision; a text-only model + chosen for Vision fails honestly (Failed is never retried on another + engine). +- `TranslationWorker`: job carries `CustomApiConfig` (base+key+model); + worker keeps a copy via `setCustomApiConfig` (same pattern as the + Gemini key). New `jobProgress(original, partial, sourceRect, + testJob)` signal, emitted from the streaming callback; new + `fetchCustomApiModels(base, key)` slot → `customApiModelsFetched` + signal (GET {base}/models, Bearer key). +- `TranslationEngine`: Q_PROPERTYs `customApiBase`, `customApiModel`, + `customApiModels` (QStringList, live-fetched, never persisted) + + Q_INVOKABLEs `setCustomApiKey` / `hasCustomApiKey` / + `fetchCustomApiModels`. All three config values persist in QSettings + under `translation/customApi*` (local only, key never logged, never + in the repo). `setPartialTranslation` updates the TEST section or the + live overlay (one block over the source rect for now) as chunks + arrive; the final `jobCompleted` always replaces the partial, and + partials are never cached. Provider list is now + google/gemini/custom; OCR list adds custom-vision. +- Settings page: "Dịch bằng" gains "API tùy chỉnh" (custom), OCR + gains "API tùy chỉnh (Vision)". New CUSTOM API panel: Base URL + field (saved on editingFinished; the fetch button commits it first), + API key field + "Lưu key" (password, never shown back), "Lấy danh + sách model" button, Model dropdown fed by the fetched list (falls + back to the saved model, or "Chưa lấy danh sách"). Descriptions + point at the panel when custom is selected but not configured. + `locales:check` exit 0 (2343 texts, 17 new strings in + `translation.qmlSource`). +- Tests: 6 new C++ slots (base normalization, models parsing, SSE + parsing incl. mid-line split, chat-completion parsing, payload + shape incl. vision, custom factory + isConfigured). Python mirror + extended with the same cases (44 checks, 0 failures). + +Still NOT proven live: the whole custom-API flow end to end on his +EliteBook — fetching a real model list from his key's base, picking a +model, streaming translation showing progressively, and custom Vision +OCR with a vision-capable model. Only Ethan's key + machine can prove +it; the sandbox has no key and no Windows build. From 2c3bed31fe0c83c1745753a918d7f95330501755 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 11:14:26 +0700 Subject: [PATCH 32/54] fix: add missing (+ ) include to tst_translation.cpp --- opennow-qt/tests/tst_translation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opennow-qt/tests/tst_translation.cpp b/opennow-qt/tests/tst_translation.cpp index fc94c58e3..9274e4446 100644 --- a/opennow-qt/tests/tst_translation.cpp +++ b/opennow-qt/tests/tst_translation.cpp @@ -13,10 +13,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include From 6f616190fe63e13a361825f7aef6fc88ed79aaf6 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 11:14:47 +0700 Subject: [PATCH 33/54] docs: note run #41 C2079 failure + fix --- docs/vn-translation/PROGRESS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/vn-translation/PROGRESS.md b/docs/vn-translation/PROGRESS.md index f3748d9fe..18d7431b1 100644 --- a/docs/vn-translation/PROGRESS.md +++ b/docs/vn-translation/PROGRESS.md @@ -534,3 +534,9 @@ EliteBook — fetching a real model list from his key's base, picking a model, streaming translation showing progressively, and custom Vision OCR with a vision-capable model. Only Ethan's key + machine can prove it; the sandbox has no key and no Windows build. + +Run #41 (gh-runners @ aa2db33) FAILED 11:08 — both Windows jobs, same +cause: `tst_translation.cpp` used `QJsonArray` with no +`#include ` (C2079 on MSVC, lines 387/399). App code +compiled; only the new test file failed. Fix: add the include (plus +`` as the same class of insurance) and re-dispatch. From 2b6f30b0784374660228ea52641ea6d3a18234a1 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 15:08:00 +0700 Subject: [PATCH 34/54] v4: chunk mode + white frosted overlay --- locales/en.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/locales/en.json b/locales/en.json index 09d038c40..64a805fd9 100644 --- a/locales/en.json +++ b/locales/en.json @@ -4517,6 +4517,8 @@ "timingNoCache": "No cache used", "engineNotReady": "Translation engine not ready yet.", "qmlSource": { + "3_8_lilies_in_a_dying_dream": "3.8 · Lilies in a Dying Dream", + "a_dich": "Đã dịch", "cache_ban_dich": "Cache bản dịch", "chen_ban_dich_ngay_tai_vung_thoai_che_chu_goc": "Chèn bản dịch ngay tại vùng thoại, che chữ gốc.", "chen_tai_cho": "Chèn tại chỗ", @@ -4529,8 +4531,14 @@ "cau_a_dich_roi_thi_dung_lai_ngay_khong_goi_api_nua": "Câu đã dịch rồi thì dùng lại ngay, không gọi API nữa.", "can_key_gemini": "Cần key Gemini", "can_key_gemini_chua_co_key_dan_key_o_duoi": "Cần key Gemini — chưa có key. Dán key ở dưới.", + "chua_tai_bam_tai_chunk_e_xem": "Chưa tải — bấm Tải chunk để xem", + "chua_tai_chunk": "Chưa tải chunk", + "chunk": "CHUNK", + "chunk_hit": "Chunk hit", "co_chu": "Cỡ chữ", "co_chu_cua_ban_dich_tren_man_hinh_stream": "Cỡ chữ của bản dịch trên màn hình stream.", + "dich_bang_co_so_du_lieu_viet_hoa_san_khong_goi_ai_khong_ton_token_hien_ngay_tat_dich_bang_provider_ang_chon": "Dịch bằng cơ sở dữ liệu Việt hoá sẵn — không gọi AI, không tốn token, hiện ngay. Tắt = dịch bằng provider đang chọn.", + "dich_chunk": "Dịch Chunk", "display": "DISPLAY", "dan_key_gemini": "Dán key Gemini…", "dich_bang": "Dịch bằng", @@ -4539,6 +4547,7 @@ "dich_thu": "Dịch thử", "dich_vu_dich_ban_ocr_sang_tieng_viet": "Dịch vụ dịch bản OCR sang tiếng Việt.", "engine_nhan_dien_chu_tren_man_hinh_stream": "Engine nhận diện chữ trên màn hình stream.", + "game_dung_chunk_viet_hoa_san_hien_chi_co_wuthering_waves_game_khac_se_them_sau": "Game dùng chunk Việt hoá sẵn. Hiện chỉ có Wuthering Waves; game khác sẽ thêm sau.", "gemini": "Gemini", "gemini_vision": "Gemini Vision", "generic": "Generic", @@ -4547,10 +4556,12 @@ "hien_chu_goc_nho_ben_duoi_ban_dich": "Hiện chữ gốc nhỏ bên dưới bản dịch.", "hien_ca_chu_goc": "Hiện cả chữ gốc", "key_chi_luu_tren_may_nay_khong_gui_i_au_khac_ngoai_google": "Key chỉ lưu trên máy này, không gửi đi đâu khác ngoài Google.", + "kho_chunk": "Kho chunk", "khong_dung_cache": "Không dùng cache", "khong_hien_thi_ban_dich_len_man_hinh": "Không hiển thị bản dịch lên màn hình.", "language": "LANGUAGE", "luu_key": "Lưu key", + "ma_nguon_du_lieu_chunk_tren_github": "Mã nguồn dữ liệu chunk trên GitHub.", "mien_phi_mac_inh": "Miễn phí · mặc định", "mac_inh": "Mặc định", "mac_inh_can_key_gemini": "Mặc định · cần key Gemini", @@ -4564,9 +4575,11 @@ "ocr_arg1ms_dich_arg2ms": "OCR %1ms · Dịch %2ms", "ocr_arg1ms_dich_arg2ms_arg3": "OCR %1ms · Dịch %2ms · %3", "offline_chay_tren_may": "Offline · chạy trên máy", + "phien_ban_chunk": "Phiên bản chunk", "phu_e": "Phụ đề", "rapidocr": "RapidOCR", "san_sang": "Sẵn sàng", + "tai_chunk": "Tải chunk", "test": "TEST", "translate": "TRANSLATE", "translation": "TRANSLATION", @@ -4579,6 +4592,7 @@ "translation_engine_chua_san_sang": "Translation engine chưa sẵn sàng.", "trang_thai": "Trạng thái", "tat_hien_thi": "Tắt hiển thị", + "tu_vung": "Từ vựng", "vung_man_hinh_lay_chu_e_dich_vung_thoai_tuy_chinh_se_co_o_ban_sau_hien_chi_chon_preset": "Vùng màn hình lấy chữ để dịch. Vùng thoại tuỳ chỉnh sẽ có ở bản sau; hiện chỉ chọn preset.", "vung_thoai": "Vùng thoại", "vung_thoai_chung": "Vùng thoại chung", From ef9d38cddad95adaa8e6598f45daee7ced264122 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 15:08:25 +0700 Subject: [PATCH 35/54] v4: chunk mode + white frosted overlay --- opennow-qt/cmake/Resources.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/opennow-qt/cmake/Resources.cmake b/opennow-qt/cmake/Resources.cmake index b0b5bba5f..3e53e3a38 100644 --- a/opennow-qt/cmake/Resources.cmake +++ b/opennow-qt/cmake/Resources.cmake @@ -24,6 +24,23 @@ qt_add_resources(opennow-qt "opennow-translation-data" FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/translation/data/wuwa-dialogue-db.json" ) +# VN translation: bundled Be Vietnam Pro (SIL OFL 1.1, see +# src/translation/data/fonts/OFL.txt) for the overlay. Full Vietnamese +# diacritics, game-fitting geometric sans; TranslationEngine loads it +# via QFontDatabase so the overlay font resolves even on machines +# without the font installed. +file(GLOB OPENNOW_TRANSLATION_FONT_FILES CONFIGURE_DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/src/translation/data/fonts/*.ttf") +foreach(OPENNOW_TRANSLATION_FONT_FILE IN LISTS OPENNOW_TRANSLATION_FONT_FILES) + get_filename_component(OPENNOW_TRANSLATION_FONT_NAME "${OPENNOW_TRANSLATION_FONT_FILE}" NAME) + set_source_files_properties("${OPENNOW_TRANSLATION_FONT_FILE}" PROPERTIES + QT_RESOURCE_ALIAS "${OPENNOW_TRANSLATION_FONT_NAME}") +endforeach() +qt_add_resources(opennow-qt "opennow-translation-fonts" + PREFIX "/fonts" + FILES ${OPENNOW_TRANSLATION_FONT_FILES} +) + set(OPENNOW_STREAM_SHADERS shaders/streamvideo.vert shaders/streamvideo.frag shaders/hdroutput.frag From 2fd317d50dc9a440855f1fbf3a8a2a463d96ae78 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 15:09:06 +0700 Subject: [PATCH 36/54] v4: chunk mode + white frosted overlay --- .../pages/DesktopSettingsTranslationPage.qml | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml index 04267499a..6e108f6ca 100644 --- a/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml +++ b/opennow-qt/qml/desktop/settings/pages/DesktopSettingsTranslationPage.qml @@ -295,6 +295,79 @@ Column { } } + // (d3) Dịch Chunk — pre-translated database (v4). When ON, OCR'd + // lines are looked up in the downloaded chunk database first (no AI + // call, no tokens); misses fall back to the provider above. The + // detail card shows the selected game's chunk info; the game list is + // built for future games. + DesktopSettingsPanel { + width: parent.width; paperStyle: true + DesktopSettingsSection { text: qsTr("CHUNK") } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "controller"; title: qsTr("Dịch Chunk") + description: qsTr("Dịch bằng cơ sở dữ liệu Việt hoá sẵn — không gọi AI, không tốn token, hiện ngay. Tắt = dịch bằng provider đang chọn.") + showDivider: false + DesktopSettingsToggle { + objectName: "translationChunkToggle" + checked: page.hasEngine && translationEngine.chunkEnabled + Accessible.name: qsTr("Dịch Chunk") + onValueChangedByUser: value => { if (page.hasEngine) translationEngine.chunkEnabled = value } + } + } + DesktopSettingsChoice { + objectName: "translationChunkGame" + width: parent.width; glyph: "controller"; title: qsTr("Game") + description: qsTr("Game dùng chunk Việt hoá sẵn. Hiện chỉ có Wuthering Waves; game khác sẽ thêm sau.") + items: [ + {label: qsTr("Wuthering Waves"), value: "wuthering-waves", detail: qsTr("3.8 · Lilies in a Dying Dream")} + ] + value: page.hasEngine ? String(translationEngine.chunkGame || "wuthering-waves") : "wuthering-waves" + onSelected: value => { if (page.hasEngine) translationEngine.chunkGame = value } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Phiên bản chunk") + description: page.hasEngine ? String(translationEngine.chunkGameVersion || "") : "" + showDivider: false + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Đã dịch") + description: page.hasEngine && String(translationEngine.chunkTranslatedText || "") !== "" + ? String(translationEngine.chunkTranslatedText) + : qsTr("Chưa tải — bấm Tải chunk để xem") + showDivider: false + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Từ vựng") + description: page.hasEngine ? String(translationEngine.chunkGameWordsText || "") : "" + showDivider: false + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "info"; title: qsTr("Trạng thái") + description: page.hasEngine ? String(translationEngine.chunkStatus || qsTr("Chưa tải chunk")) : qsTr("Chưa tải chunk") + showDivider: false + DesktopSettingsButton { + objectName: "translationChunkDownloadButton" + compact: true + enabled: page.hasEngine + text: qsTr("Tải chunk") + onClicked: { if (page.hasEngine) translationEngine.downloadChunks() } + } + } + DesktopSettingsRow { + width: parent.width; paperStyle: true; glyph: "globe"; title: qsTr("Kho chunk") + description: qsTr("Mã nguồn dữ liệu chunk trên GitHub.") + showDivider: false + Text { + text: "huyzoz/wuwa-vi-chunks" + color: Theme.label + linkColor: Theme.focus + font.family: Theme.bodyFont + font.pixelSize: DesktopTokens.bodySize + onLinkActivated: link => Qt.openUrlExternally(link) + } + } + } + // (e) Hiển thị DesktopSettingsPanel { width: parent.width; paperStyle: true From f62157a7b419570d9c45ff9293e26f77fd5df6af Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 15:09:45 +0700 Subject: [PATCH 37/54] v4: chunk mode + white frosted overlay --- .../desktop/stream/DesktopStreamScreen.qml | 1 + .../qml/desktop/stream/TranslationOverlay.qml | 75 +++++++++++++++---- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml b/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml index fc5988cd0..b69426a71 100644 --- a/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml +++ b/opennow-qt/qml/desktop/stream/DesktopStreamScreen.qml @@ -171,6 +171,7 @@ FocusScope { TranslationOverlay { anchors.fill: parent z: 6 + videoItem: streamVideo } Timer { diff --git a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml index 633336d92..648815317 100644 --- a/opennow-qt/qml/desktop/stream/TranslationOverlay.qml +++ b/opennow-qt/qml/desktop/stream/TranslationOverlay.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Effects import OpenNOW // Translation overlay: renders the live EN -> VI translation above the stream @@ -21,6 +22,9 @@ Item { readonly property bool hasEngine: typeof translationEngine !== "undefined" && translationEngine !== null readonly property bool engineOn: root.hasEngine && translationEngine.enabled + // The stream video item (set by DesktopStreamScreen). The frosted + // box blurs the video behind it; null keeps the plain white box. + property Item videoItem: null readonly property bool hasText: root.hasEngine && translationEngine.hasTranslation // One entry per translated line: {original, translated, x, y, w, h} // with x/y/w/h normalized 0..1 in full-frame coordinates. In-place @@ -54,23 +58,63 @@ Item { const ocr = Number(translationEngine.lastOcrMs || 0) const tr = Number(translationEngine.lastTranslateMs || 0) let text = qsTr("OCR %1ms · Dịch %2ms").arg(ocr).arg(tr) - if (translationEngine.lastCacheHit === true) + if (translationEngine.lastChunkHit === true) + text += " · " + qsTr("Chunk hit") + else if (translationEngine.lastCacheHit === true) text += " · " + qsTr("Cache hit") return text } - // One box shape for both modes: semi-transparent dark background, white - // wrapped text that shrinks (never overflows the box), optional small - // original underneath. - component TranslationBox: Rectangle { + // One box shape for both modes: WHITE frosted glass (khảm trắng) — + // a live blur of the video behind it under a white tint, dark text + // in Be Vietnam Pro (bundled, full Vietnamese diacritics). NEVER a + // black box: when there is no video item to blur, the box is plain + // translucent white instead, so the English line is always covered + // by white, never by black. + component TranslationBox: Item { id: box required property string translated required property string original required property bool showOriginalText required property int baseFontSize - color: "black" - opacity: 0.85 - radius: DesktopTokens.px(12) + readonly property int cornerRadius: DesktopTokens.px(12) + // (1) Blurred video behind, clipped to the rounded rect. The + // source rect is in video-item coordinates; the overlay and the + // video item both fill the same parent, so the coordinates match. + Item { + id: blurLayer + anchors.fill: parent + visible: root.videoItem !== null + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskSource: blurMask + blurEnabled: true + blurMax: 24 + blur: 0.55 + } + ShaderEffectSource { + anchors.fill: parent + sourceItem: root.videoItem + sourceRect: Qt.rect(box.x, box.y, box.width, box.height) + live: true + } + } + Rectangle { + id: blurMask + anchors.fill: parent + radius: box.cornerRadius + color: "white" + visible: false + } + // (2) White tint over the blur (or the whole background when + // there is no video to blur). + Rectangle { + anchors.fill: parent + radius: box.cornerRadius + color: "white" + opacity: root.videoItem !== null ? 0.55 : 0.88 + } Column { anchors.fill: parent anchors.margins: DesktopTokens.px(12) @@ -80,9 +124,10 @@ Item { width: parent.width height: parent.height - (originalLabel.visible ? originalLabel.height + parent.spacing : 0) text: box.translated - color: "white" - font.family: Theme.bodyFont + color: "#1a1a2e" + font.family: "Be Vietnam Pro" font.pixelSize: box.baseFontSize + font.weight: Font.Medium fontSizeMode: Text.Fit minimumPixelSize: 12 wrapMode: Text.WordWrap @@ -94,8 +139,8 @@ Item { visible: box.showOriginalText && box.original !== "" width: parent.width text: box.original - color: Qt.rgba(1, 1, 1, 0.65) - font.family: Theme.bodyFont + color: Qt.rgba(0.10, 0.10, 0.18, 0.65) + font.family: "Be Vietnam Pro" font.pixelSize: Math.max(11, Math.round(box.baseFontSize * 0.6)) wrapMode: Text.WordWrap elide: Text.ElideRight @@ -166,8 +211,8 @@ Item { width: statusLabel.implicitWidth + DesktopTokens.px(20) height: DesktopTokens.px(24) radius: height / 2 - color: "black" - opacity: 0.7 + color: "white" + opacity: 0.85 x: Math.max(0, root.width - width - DesktopTokens.px(16)) y: root.mode === "inplace" ? Math.max(0, root.topBlockY - height - DesktopTokens.px(6)) @@ -176,7 +221,7 @@ Item { id: statusLabel anchors.centerIn: parent text: root.timingText - color: "white" + color: "#1a1a2e" font.family: Theme.monoFont font.pixelSize: DesktopTokens.px(11) } From f79ba861d7670a7923643aaf6f9cbd1e08e8b904 Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 15:10:55 +0700 Subject: [PATCH 38/54] v4: chunk mode + white frosted overlay --- .../src/translation/TranslationEngine.cpp | 273 ++++++++++++++- .../src/translation/TranslationEngine.h | 94 ++++- .../src/translation/TranslationWorker.cpp | 322 +++++++++++++----- .../src/translation/TranslationWorker.h | 29 ++ opennow-qt/src/translation/WuWaDialogueDb.cpp | 144 ++++++++ opennow-qt/src/translation/WuWaDialogueDb.h | 33 ++ 6 files changed, 811 insertions(+), 84 deletions(-) diff --git a/opennow-qt/src/translation/TranslationEngine.cpp b/opennow-qt/src/translation/TranslationEngine.cpp index a7eccf8a6..a520bd018 100644 --- a/opennow-qt/src/translation/TranslationEngine.cpp +++ b/opennow-qt/src/translation/TranslationEngine.cpp @@ -2,8 +2,14 @@ #include #include +#include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -22,6 +28,38 @@ constexpr int FullScreenIntervalMs = 2000; // the stability gate (400ms) and the full-screen throttle (2s) — for the // cost of one texture readback per second. constexpr int FramePumpIntervalMs = 1000; +// Chunk database (v4): local cache root for downloaded chunk files. +// Layout: ///manifest.json + +// ///chunks/vi_chunk_NNN.json. +QString chunkCacheBase() +{ + return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + + QStringLiteral("/wuwa-chunks"); +} + +// Shipped-known chunk catalog (one game today). The downloaded manifest +// refreshes version/counts in loadCachedChunks; these values are what +// the Settings detail card shows before the first download. +struct ChunkGameCatalogEntry +{ + QString id; + QString title; + QString version; + QString repoUrl; + QString manifestUrl; + int words = 0; + int strings = 0; +}; + +ChunkGameCatalogEntry chunkCatalogEntry(const QString &id) +{ + if (id == QStringLiteral("wuthering-waves")) + return {id, QStringLiteral("Wuthering Waves"), QStringLiteral("3.8"), + QStringLiteral("https://github.com/huyzoz/wuwa-vi-chunks"), + QStringLiteral("https://raw.githubusercontent.com/huyzoz/wuwa-vi-chunks/main/manifest.json"), + 3133145, 216384}; + return {}; +} bool isFullScreenRect(const QRectF &rect) { @@ -92,6 +130,10 @@ TranslationEngine::TranslationEngine(QObject *parent) this, &TranslationEngine::onWorkerJobProgress); connect(m_worker, &TranslationWorker::customApiModelsFetched, this, &TranslationEngine::onWorkerModelsFetched); + connect(m_worker, &TranslationWorker::chunkDownloadProgress, + this, &TranslationEngine::onChunkDownloadProgress); + connect(m_worker, &TranslationWorker::chunkDownloadFinished, + this, &TranslationEngine::onChunkDownloadFinished); m_worker->start(); // Gemini key, persisted locally only (QSettings, never in a file we // commit, never logged). Restored here so hasGeminiApiKey() is true @@ -131,6 +173,9 @@ TranslationEngine::TranslationEngine(QObject *parent) m_fontSizePx = settings.value(QStringLiteral("translation/fontSizePx"), 22).toInt(); m_showOriginal = settings.value(QStringLiteral("translation/showOriginal"), false).toBool(); m_cacheEnabled = settings.value(QStringLiteral("translation/cacheEnabled"), true).toBool(); + m_chunkEnabled = settings.value(QStringLiteral("translation/chunkEnabled"), false).toBool(); + m_chunkGame = settings.value(QStringLiteral("translation/chunkGame"), + QStringLiteral("wuthering-waves")).toString(); m_dialoguePreset = settings.value(QStringLiteral("translation/dialoguePreset"), QStringLiteral("wuthering-waves")).toString(); const QRectF presetRect = dialogueRectForPreset(m_dialoguePreset); @@ -153,6 +198,8 @@ TranslationEngine::TranslationEngine(QObject *parent) QStringLiteral("custom")} .contains(m_translationProvider)) m_translationProvider = QStringLiteral("google"); + if (m_chunkGame != QStringLiteral("wuthering-waves")) + m_chunkGame = QStringLiteral("wuthering-waves"); if (!QStringList{QStringLiteral("inplace"), QStringLiteral("subtitle"), QStringLiteral("off")} .contains(m_overlayMode)) m_overlayMode = QStringLiteral("inplace"); @@ -162,6 +209,26 @@ TranslationEngine::TranslationEngine(QObject *parent) // Sync the (now normalized) custom-API config to the worker. if (!m_customApiBase.isEmpty() || !m_customApiKey.isEmpty() || !m_customApiModel.isEmpty()) syncCustomApiToWorker(); + // Bundled overlay font (Be Vietnam Pro, SIL OFL 1.1): full Vietnamese + // diacritics, game-fitting geometric sans. Loaded here so the + // overlay's font.family resolves even on machines without the font + // installed; everything else keeps Theme.bodyFont. + for (const QString &font : {QStringLiteral(":/fonts/BeVietnamPro-Regular.ttf"), + QStringLiteral(":/fonts/BeVietnamPro-Medium.ttf"), + QStringLiteral(":/fonts/BeVietnamPro-SemiBold.ttf"), + QStringLiteral(":/fonts/BeVietnamPro-Bold.ttf")}) { + if (QFontDatabase::addApplicationFont(font) < 0) + qWarning() << "TranslationEngine: failed to load bundled font" << font; + } + // Chunk mode (v4): catalog strings from the shipped-known values, + // worker pointed at the chunk DB, cached chunks loaded when enabled. + applyChunkCatalog(); + QMetaObject::invokeMethod(m_worker, "setChunkDb", Qt::QueuedConnection, + Q_ARG(WuWaDialogueDb *, &m_chunkDb)); + QMetaObject::invokeMethod(m_worker, "setChunkEnabled", Qt::QueuedConnection, + Q_ARG(bool, m_chunkEnabled)); + if (m_chunkEnabled) + loadCachedChunks(); // The pump was restored enabled from QSettings: start it. The // frameRequested connect in ApplicationStartup is wired after this // constructor returns, and the first timeout is 1s away, so no @@ -385,6 +452,192 @@ void TranslationEngine::setCacheEnabled(bool enabled) emit cacheEnabledChanged(); } +QStringList TranslationEngine::chunkGames() const +{ + return {QStringLiteral("wuthering-waves")}; +} + +void TranslationEngine::applyChunkCatalog() +{ + const ChunkGameCatalogEntry entry = chunkCatalogEntry(m_chunkGame); + m_chunkGameTitle = entry.title; + m_chunkVersion = entry.version; + m_chunkRepoUrl = entry.repoUrl; + const QLocale vi(QStringLiteral("vi_VN")); + m_chunkGameWordsText = vi.toString(entry.words) + QStringLiteral(" từ"); + m_chunkGameStringsText = vi.toString(entry.strings) + QStringLiteral(" câu"); + emit chunkGameInfoChanged(); +} + +QString TranslationEngine::chunkGameCacheBase() const +{ + return chunkCacheBase() + QChar(u'/') + m_chunkGame; +} + +void TranslationEngine::setChunkEnabled(bool enabled) +{ + if (m_chunkEnabled == enabled) + return; + m_chunkEnabled = enabled; + saveTranslationSetting(QStringLiteral("chunkEnabled"), enabled); + QMetaObject::invokeMethod(m_worker, "setChunkEnabled", Qt::QueuedConnection, + Q_ARG(bool, enabled)); + if (enabled) { + if (m_chunkDb.size() == 0) + loadCachedChunks(); + } else { + setChunkStatus(QStringLiteral("Chunk mode off")); + } + emit chunkEnabledChanged(); +} + +void TranslationEngine::setChunkGame(const QString &game) +{ + if (game != QStringLiteral("wuthering-waves") || m_chunkGame == game) + return; + m_chunkGame = game; + saveTranslationSetting(QStringLiteral("chunkGame"), game); + applyChunkCatalog(); + if (m_chunkEnabled) + loadCachedChunks(); + emit chunkGameChanged(); +} + +void TranslationEngine::downloadChunks() +{ + const ChunkGameCatalogEntry entry = chunkCatalogEntry(m_chunkGame); + if (entry.manifestUrl.isEmpty()) { + setError(QStringLiteral("No chunks for this game")); + return; + } + m_chunkProgress = 0.0; + emit chunkProgressChanged(); + setChunkStatus(QStringLiteral("Downloading chunks…")); + QMetaObject::invokeMethod(m_worker, "startChunkDownload", Qt::QueuedConnection, + Q_ARG(QString, entry.manifestUrl), + Q_ARG(QString, chunkGameCacheBase())); +} + +void TranslationEngine::setChunkStatus(const QString &status) +{ + if (m_chunkStatus == status) + return; + m_chunkStatus = status; + emit chunkStatusChanged(); +} + +void TranslationEngine::loadCachedChunks() +{ + const QString base = chunkGameCacheBase(); + QDir dir(base); + const QStringList versions = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); + if (versions.isEmpty()) { + setChunkStatus(QStringLiteral("Chunk not downloaded — press Download chunks")); + return; + } + const QString version = versions.last(); + const QString versionDir = base + QChar(u'/') + version; + QStringList files; + QFile manifestFile(versionDir + QStringLiteral("/manifest.json")); + if (manifestFile.open(QIODevice::ReadOnly)) { + const QJsonDocument doc = QJsonDocument::fromJson(manifestFile.readAll()); + manifestFile.close(); + if (doc.isObject()) { + const QJsonObject manifest = doc.object(); + const int translated = manifest.value(QStringLiteral("translatedStrings")).toInt(); + const int total = manifest.value(QStringLiteral("uniqueStrings")).toInt(); + const QLocale vi(QStringLiteral("vi_VN")); + if (translated > 0 && total > 0) + m_chunkTranslatedText = QStringLiteral("Đã dịch %1 / %2 câu") + .arg(vi.toString(translated), vi.toString(total)); + for (const QJsonValue &value : manifest.value(QStringLiteral("files")).toArray()) { + const QString file = value.toString(); + if (!file.isEmpty()) + files.append(file); + } + } + } + if (files.isEmpty()) { + // No (readable) manifest: load every chunk file in the dir. + QDir chunksDir(versionDir + QStringLiteral("/chunks")); + for (const QString &name : chunksDir.entryList({QStringLiteral("*.json")}, + QDir::Files, QDir::Name)) + files.append(QStringLiteral("chunks/") + name); + } + m_chunkDb.clear(); + for (const QString &file : files) + m_chunkDb.loadChunkFile(versionDir + QChar(u'/') + file); + m_chunkVersion = version; + const QLocale vi(QStringLiteral("vi_VN")); + if (m_chunkDb.size() > 0) + setChunkStatus(QStringLiteral("Downloaded %1 lines").arg(vi.toString(m_chunkDb.size()))); + else + setChunkStatus(QStringLiteral("Chunk not downloaded — press Download chunks")); + emit chunkGameInfoChanged(); + emit chunkDbSizeChanged(); +} + +void TranslationEngine::onChunkDownloadProgress(int done, int total) +{ + m_chunkProgress = total > 0 ? static_cast(done) / total : 0.0; + setChunkStatus(QStringLiteral("Downloading chunks… %1/%2").arg(done).arg(total)); + emit chunkProgressChanged(); +} + +void TranslationEngine::onChunkDownloadFinished(const QString &error) +{ + m_chunkProgress = error.isEmpty() ? 1.0 : 0.0; + emit chunkProgressChanged(); + if (!error.isEmpty()) { + setError(error); + return; + } + loadCachedChunks(); +} + +QVariantList TranslationEngine::applyStableRects(const QVariantList &blocks) +{ + QVariantList out = blocks; + for (QVariant &entry : out) { + QVariantMap map = entry.toMap(); + const QString key = TranslationCache::normalizeKey( + map.value(QStringLiteral("original")).toString()); + if (key.isEmpty()) + continue; + const QRectF rect(map.value(QStringLiteral("x")).toDouble(), + map.value(QStringLiteral("y")).toDouble(), + map.value(QStringLiteral("w")).toDouble(), + map.value(QStringLiteral("h")).toDouble()); + auto it = m_stableRects.find(key); + if (it == m_stableRects.end()) { + if (m_stableRects.size() >= MaxStableRects && !m_stableRectOrder.isEmpty()) + m_stableRects.remove(m_stableRectOrder.takeFirst()); + m_stableRects.insert(key, StableRect{rect, 1}); + m_stableRectOrder.append(key); + continue; + } + const QRectF stored = it->rect; + const bool close = qAbs(rect.x() - stored.x()) < 0.02 + && qAbs(rect.y() - stored.y()) < 0.02 + && qAbs(rect.width() - stored.width()) < 0.02 + && qAbs(rect.height() - stored.height()) < 0.02; + if (close) { + it->hits += 1; + if (it->hits >= 2) { + map.insert(QStringLiteral("x"), stored.x()); + map.insert(QStringLiteral("y"), stored.y()); + map.insert(QStringLiteral("w"), stored.width()); + map.insert(QStringLiteral("h"), stored.height()); + entry = map; + } + } else { + it->rect = rect; + it->hits = 1; + } + } + return out; +} + void TranslationEngine::setDialogueRect(const QRectF &rect) { const QRectF clamped = clampNormalized(rect); @@ -544,6 +797,16 @@ void TranslationEngine::requestTestTranslation(const QString &englishText) setError(QStringLiteral("Nothing to translate")); return; } + // Chunk DB first (v4): a pre-translated line needs no provider call. + if (m_chunkEnabled) { + QString chunked; + if (m_chunkDb.lookup(text, chunked) || m_chunkDb.lookupFuzzy(text, chunked)) { + m_lastChunkHit = true; + setTestResult(text, chunked, 0, 0, true); + return; + } + } + m_lastChunkHit = false; if (m_cacheEnabled) { QString cached; if (m_dialogueDb.lookup(text, cached) || m_cache.lookup(text, cached)) { @@ -613,6 +876,7 @@ void TranslationEngine::setPartialTranslation(const QString &original, const QSt void TranslationEngine::onWorkerJobCompleted(const TranslationJobResult &result) { + m_lastChunkHit = result.chunkHit; if (!result.ok) { setError(result.error.isEmpty() ? QStringLiteral("Translation failed") : result.error); // A failed TEST job only shows in the TEST section: never touch @@ -655,7 +919,7 @@ void TranslationEngine::onWorkerJobCompleted(const TranslationJobResult &result) m_lastCacheHit = false; emitTranslation(result.original, result.translated, result.sourceRect, result.ocrMs, result.translateMs, false, - blocksToVariantList(result.blocks)); + blocksToVariantList(result.blocks), result.chunkHit); } void TranslationEngine::onKeepPreviousExpired() @@ -695,17 +959,18 @@ QVariantList TranslationEngine::singleBlockVariantList(const QString &original, void TranslationEngine::emitTranslation(const QString &original, const QString &translated, const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, - bool cacheHit, const QVariantList &blocks) + bool cacheHit, const QVariantList &blocks, bool chunkHit) { m_lastOriginalText = original; m_lastTranslatedText = translated; m_lastOcrMs = ocrMs; m_lastTranslateMs = translateMs; m_lastCacheHit = cacheHit; + m_lastChunkHit = chunkHit; m_lastError.clear(); - m_translationBlocks = blocks.isEmpty() + m_translationBlocks = applyStableRects(blocks.isEmpty() ? singleBlockVariantList(original, translated, sourceRect) - : blocks; + : blocks); if (!m_hasTranslation) { m_hasTranslation = true; emit hasTranslationChanged(); diff --git a/opennow-qt/src/translation/TranslationEngine.h b/opennow-qt/src/translation/TranslationEngine.h index 1beee2233..29562ff0d 100644 --- a/opennow-qt/src/translation/TranslationEngine.h +++ b/opennow-qt/src/translation/TranslationEngine.h @@ -77,6 +77,23 @@ class TranslationEngine : public QObject Q_PROPERTY(QString customApiBase READ customApiBase WRITE setCustomApiBase NOTIFY customApiBaseChanged) Q_PROPERTY(QString customApiModel READ customApiModel WRITE setCustomApiModel NOTIFY customApiModelChanged) Q_PROPERTY(QStringList customApiModels READ customApiModels NOTIFY customApiModelsChanged) + // Chunk mode (v4): translate from the pre-translated chunk database + // (repo huyzoz/wuwa-vi-chunks) instead of an AI provider. The DB is + // downloaded on demand and cached locally; chunk mode OFF is exactly + // the v3 behavior. + Q_PROPERTY(bool chunkEnabled READ chunkEnabled WRITE setChunkEnabled NOTIFY chunkEnabledChanged) + Q_PROPERTY(QString chunkGame READ chunkGame WRITE setChunkGame NOTIFY chunkGameChanged) + Q_PROPERTY(QStringList chunkGames READ chunkGames NOTIFY chunkGameChanged) + Q_PROPERTY(QString chunkGameTitle READ chunkGameTitle NOTIFY chunkGameInfoChanged) + Q_PROPERTY(QString chunkGameVersion READ chunkGameVersion NOTIFY chunkGameInfoChanged) + Q_PROPERTY(QString chunkGameWordsText READ chunkGameWordsText NOTIFY chunkGameInfoChanged) + Q_PROPERTY(QString chunkGameStringsText READ chunkGameStringsText NOTIFY chunkGameInfoChanged) + Q_PROPERTY(QString chunkTranslatedText READ chunkTranslatedText NOTIFY chunkGameInfoChanged) + Q_PROPERTY(QString chunkRepoUrl READ chunkRepoUrl NOTIFY chunkGameInfoChanged) + Q_PROPERTY(QString chunkStatus READ chunkStatus NOTIFY chunkStatusChanged) + Q_PROPERTY(double chunkProgress READ chunkProgress NOTIFY chunkProgressChanged) + Q_PROPERTY(int chunkDbSize READ chunkDbSize NOTIFY chunkDbSizeChanged) + Q_PROPERTY(bool lastChunkHit READ lastChunkHit NOTIFY translationTextChanged) public: explicit TranslationEngine(QObject *parent = nullptr); @@ -136,9 +153,34 @@ class TranslationEngine : public QObject void setCustomApiModel(const QString &model); QStringList customApiModels() const { return m_customApiModels; } + // Chunk mode (v4). chunkGames() is the list of games with a chunk + // database; today only Wuthering Waves, built as a list so future + // games slot in. The detail strings come from the shipped catalog + // until the downloaded manifest refreshes them. + bool chunkEnabled() const { return m_chunkEnabled; } + void setChunkEnabled(bool enabled); + QString chunkGame() const { return m_chunkGame; } + void setChunkGame(const QString &game); + QStringList chunkGames() const; + QString chunkGameTitle() const { return m_chunkGameTitle; } + QString chunkGameVersion() const { return m_chunkVersion; } + QString chunkGameWordsText() const { return m_chunkGameWordsText; } + QString chunkGameStringsText() const { return m_chunkGameStringsText; } + QString chunkTranslatedText() const { return m_chunkTranslatedText; } + QString chunkRepoUrl() const { return m_chunkRepoUrl; } + QString chunkStatus() const { return m_chunkStatus; } + double chunkProgress() const { return m_chunkProgress; } + int chunkDbSize() const { return m_chunkDb.size(); } + bool lastChunkHit() const { return m_lastChunkHit; } + Q_INVOKABLE void onStreamFrame(const QImage &image); Q_INVOKABLE void requestTestTranslation(const QString &englishText); Q_INVOKABLE void clearCache(); + // Downloads the chunk database for the selected game (manifest + + // chunk files) on the worker thread. Progress arrives via + // chunkProgressChanged / chunkStatusChanged; completion reloads the + // DB from the local cache. + Q_INVOKABLE void downloadChunks(); Q_INVOKABLE void setGeminiApiKey(const QString &key); Q_INVOKABLE bool hasGeminiApiKey() const; Q_INVOKABLE void setCustomApiKey(const QString &key); @@ -172,6 +214,12 @@ class TranslationEngine : public QObject void customApiBaseChanged(); void customApiModelChanged(); void customApiModelsChanged(); + void chunkEnabledChanged(); + void chunkGameChanged(); + void chunkGameInfoChanged(); + void chunkStatusChanged(); + void chunkProgressChanged(); + void chunkDbSizeChanged(); // Emitted by the frame pump while translation is enabled. Application // Startup connects it to NativeStreamRuntime::requestScreenshot(): the // screenshotReady signal only fires for an explicit screenshot request, @@ -185,6 +233,8 @@ private slots: void onWorkerJobProgress(const QString &original, const QString &partialTranslated, const QRectF &sourceRect, bool testJob); void onWorkerModelsFetched(const QStringList &models, const QString &error); + void onChunkDownloadProgress(int done, int total); + void onChunkDownloadFinished(const QString &error); void onKeepPreviousExpired(); void onFrameTimerTimeout(); @@ -196,12 +246,28 @@ private slots: CustomApiConfig customApiConfig() const; // Pushes the current custom-API config to the worker thread (queued). void syncCustomApiToWorker(); + // Loads the downloaded chunk files for the newest cached version + // into m_chunkDb (no-op when nothing is cached). Also refreshes the + // detail strings from the cached manifest. + void loadCachedChunks(); + void setChunkStatus(const QString &status); + // Refreshes the detail-card strings from the shipped-known catalog + // for the selected game. + void applyChunkCatalog(); + // Local cache dir for the selected game's chunks: + // /wuwa-chunks/. + QString chunkGameCacheBase() const; + // Snaps jittering OCR rects to their previously stable position + // (see m_stableRects). Pure on the given blocks except for the + // stability bookkeeping. + QVariantList applyStableRects(const QVariantList &blocks); // Cache-first submit of one stable crop to the worker (shared by the // stability-timeout path and the full-screen throttle path). void submitCrop(const QImage &crop, const QString &hash, const QRectF &rect); void emitTranslation(const QString &original, const QString &translated, const QRectF &sourceRect, qint64 ocrMs, qint64 translateMs, - bool cacheHit, const QVariantList &blocks = {}); + bool cacheHit, const QVariantList &blocks = {}, + bool chunkHit = false); // Streaming partial: updates last* fields (+ the live overlay, one // block over the source rect) or the TEST section only, but never the // cache. The final jobCompleted result always replaces it. @@ -243,6 +309,32 @@ private slots: TranslationCache m_cache; WuWaDialogueDb m_dialogueDb; + // Chunk database (v4): downloaded chunk files, loaded lazily when + // chunk mode is on. The worker looks lines up in this instance. + WuWaDialogueDb m_chunkDb; + bool m_chunkEnabled = false; + QString m_chunkGame = QStringLiteral("wuthering-waves"); + QString m_chunkVersion; + QString m_chunkGameTitle = QStringLiteral("Wuthering Waves"); + QString m_chunkGameWordsText; + QString m_chunkGameStringsText; + QString m_chunkTranslatedText; + QString m_chunkRepoUrl = QStringLiteral("https://github.com/huyzoz/wuwa-vi-chunks"); + QString m_chunkStatus; + double m_chunkProgress = 0.0; + bool m_lastChunkHit = false; + // Coordinate memory (v4): normalized English line -> last stable + // rect + how many consecutive frames agreed with it. A rect that + // agrees twice is "stable" and later jitter snaps back to it, so + // boxes stop shaking. Placement only; never touches the stream. + struct StableRect + { + QRectF rect; + int hits = 1; + }; + static constexpr int MaxStableRects = 200; + QHash m_stableRects; + QList m_stableRectOrder; // oldest first; drives eviction TranslationWorker *m_worker = nullptr; // no parent: lives in its own thread QTimer m_stabilityTimer; diff --git a/opennow-qt/src/translation/TranslationWorker.cpp b/opennow-qt/src/translation/TranslationWorker.cpp index ce81c048d..7270626a9 100644 --- a/opennow-qt/src/translation/TranslationWorker.cpp +++ b/opennow-qt/src/translation/TranslationWorker.cpp @@ -4,7 +4,14 @@ #include "translation/TranslationHttp.h" #include "translation/TranslationProvider.h" +#include #include +#include +#include +#include +#include +#include +#include #include #include @@ -88,6 +95,9 @@ TranslationWorker::TranslationWorker(QObject *parent) qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); + // Needed for the queued setChunkDb(WuWaDialogueDb*) invoke from the + // engine (WuWaDialogueDb is not a QObject). + qRegisterMetaType(); } TranslationWorker::~TranslationWorker() @@ -151,6 +161,96 @@ void TranslationWorker::setCustomApiConfig(const CustomApiConfig &config) m_customApi = config; } +void TranslationWorker::setChunkDb(WuWaDialogueDb *db) +{ + // Runs in the worker thread. The DB is owned by the engine; only + // const, mutex-guarded lookups happen here. + m_chunkDb = db; +} + +void TranslationWorker::setChunkEnabled(bool enabled) +{ + // Runs in the worker thread. + m_chunkEnabled = enabled; +} + +void TranslationWorker::startChunkDownload(const QString &manifestUrl, const QString &cacheDir) +{ + // Runs in the worker thread. Fetches the manifest, then downloads + // each listed file one per event-loop turn (queued self-invocation) + // so OCR/translate jobs keep running between downloads. + m_chunkManifestUrl = manifestUrl; + m_chunkBaseUrl = manifestUrl; + if (m_chunkBaseUrl.endsWith(QStringLiteral("manifest.json"))) + m_chunkBaseUrl.chop(QStringLiteral("manifest.json").size()); + m_chunkCacheDir = cacheDir; + m_chunkFiles.clear(); + m_chunkIndex = 0; + m_chunkError.clear(); + m_chunkManifestBody.clear(); + m_chunkVersion.clear(); + const TranslationHttpResult result = TranslationHttp::get(manifestUrl); + if (!result.ok()) { + emit chunkDownloadFinished(result.error); + return; + } + m_chunkManifestBody = result.body; + QJsonParseError parseError; + const QJsonDocument doc = QJsonDocument::fromJson(result.body, &parseError); + if (parseError.error != QJsonParseError::NoError || !doc.isObject()) { + emit chunkDownloadFinished(QStringLiteral("Chunk manifest is not valid JSON")); + return; + } + const QJsonObject manifest = doc.object(); + m_chunkVersion = manifest.value(QStringLiteral("version")).toString(); + for (const QJsonValue &value : manifest.value(QStringLiteral("files")).toArray()) { + const QString file = value.toString(); + if (!file.isEmpty()) + m_chunkFiles.append(file); + } + if (m_chunkFiles.isEmpty() || m_chunkVersion.isEmpty()) { + emit chunkDownloadFinished(QStringLiteral("Chunk manifest lists no files")); + return; + } + emit chunkDownloadProgress(0, m_chunkFiles.size()); + QMetaObject::invokeMethod(this, "downloadNextChunkFile", Qt::QueuedConnection); +} + +void TranslationWorker::downloadNextChunkFile() +{ + // Runs in the worker thread, one file per event-loop turn. + if (m_chunkIndex >= m_chunkFiles.size()) { + // Save the manifest next to the chunks: the engine reads it for + // the version check and the detail card, without re-downloading. + const QString manifestPath = m_chunkCacheDir + QChar(u'/') + m_chunkVersion + + QStringLiteral("/manifest.json"); + QDir().mkpath(QFileInfo(manifestPath).path()); + QFile manifestFile(manifestPath); + if (manifestFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) + manifestFile.write(m_chunkManifestBody); + emit chunkDownloadFinished(m_chunkError); + return; + } + const QString relative = m_chunkFiles.at(m_chunkIndex); + const QString url = m_chunkBaseUrl + relative; + const QString destPath = m_chunkCacheDir + QChar(u'/') + m_chunkVersion + + QChar(u'/') + relative; + QDir().mkpath(QFileInfo(destPath).path()); + const TranslationHttpResult result = TranslationHttp::get(url); + if (result.ok()) { + QFile out(destPath); + if (out.open(QIODevice::WriteOnly | QIODevice::Truncate)) + out.write(result.body); + else if (m_chunkError.isEmpty()) + m_chunkError = QStringLiteral("Cannot write chunk file: ") + relative; + } else if (m_chunkError.isEmpty()) { + m_chunkError = result.error; + } + ++m_chunkIndex; + emit chunkDownloadProgress(m_chunkIndex, m_chunkFiles.size()); + QMetaObject::invokeMethod(this, "downloadNextChunkFile", Qt::QueuedConnection); +} + void TranslationWorker::fetchCustomApiModels(const QString &base, const QString &apiKey) { // Runs in the worker thread. Lists the base's real models @@ -273,93 +373,157 @@ void TranslationWorker::processNext() } result.original = original; + // Chunk DB first (v4): every OCR'd line is looked up (exact, then + // fuzzy) before any provider is called. A hit never reaches the + // provider; only misses are translated. When every line hits, no + // provider is created at all (translateMs = 0, chunkHit = true). + QHash dbHits; // ocr block index -> Vietnamese + QList missIndices; + QStringList missTexts; + for (int i = 0; i < ocrBlocks.size(); ++i) { + QString vi; + if (m_chunkEnabled && m_chunkDb + && (m_chunkDb->lookup(ocrBlocks.at(i).text, vi) + || m_chunkDb->lookupFuzzy(ocrBlocks.at(i).text, vi))) + dbHits.insert(i, vi); + else { + missIndices.append(i); + missTexts.append(ocrBlocks.at(i).text); + } + } + QElapsedTimer translateTimer; translateTimer.start(); - auto provider = createTranslationProvider(job->providerId, job->geminiApiKey, job->customApi); - if (!provider) { - result.error = QStringLiteral("Unknown translation provider"); - result.ocrMs = ocrMs; - m_queue.finishRunning(); - m_processing = false; - emit jobCompleted(result); - QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); - return; - } - // One network call for the whole crop: translate the blocks joined - // with "\n" (the free Google endpoint preserves line breaks), then - // split the reply back onto the same blocks. If the reply has a - // different number of lines, fall back to one call per block — the - // position mapping must never be guessed from a misaligned split. - // Streaming providers report partial text through the callback as it - // arrives (emitted as jobProgress); the final text still comes back - // here and replaces the partial. - const TranslateResult translated = provider->translateStreaming( - original, job->sourceLanguage, job->targetLanguage, - [&](const QString &partial) { - emit jobProgress(original, partial, job->sourceRect, job->testJob); - }); - result.translateMs = translateTimer.elapsed(); - result.ocrMs = ocrMs; - if (!translated.ok) { - result.error = translated.error; - } else if (ocrBlocks.isEmpty()) { - // Direct-text job (or an OCR engine that gave flat text only): - // one block covering the whole crop. + if (!ocrBlocks.isEmpty() && missIndices.isEmpty()) { + // All lines came from the chunk DB: no provider call at all. result.ok = true; - result.translated = translated.text; - result.blocks.append(TranslatedBlock{original, translated.text, - mapBlockRectToFrame(QRectF(0, 0, 1, 1), - job->sourceRect)}); + result.translateMs = 0; + result.ocrMs = ocrMs; + result.chunkHit = true; + result.cacheHit = true; + QStringList allTranslated; + for (int i = 0; i < ocrBlocks.size(); ++i) { + const QString vi = dbHits.value(i); + if (vi.isEmpty()) + continue; // cannot happen: missIndices is empty + allTranslated.append(vi); + result.blocks.append(TranslatedBlock{ + ocrBlocks.at(i).text, vi, + mapBlockRectToFrame(ocrBlocks.at(i).rect, job->sourceRect)}); + } + result.translated = allTranslated.join(QChar(u'\n')); } else { - QStringList lines = translated.text.split(QChar(u'\n')); - while (!lines.isEmpty() && lines.last().isEmpty()) - lines.removeLast(); - for (QString &line : lines) - line = line.trimmed(); - if (lines.size() == ocrBlocks.size()) { + auto provider = createTranslationProvider(job->providerId, job->geminiApiKey, job->customApi); + if (!provider) { + result.error = QStringLiteral("Unknown translation provider"); + result.ocrMs = ocrMs; + m_queue.finishRunning(); + m_processing = false; + emit jobCompleted(result); + QMetaObject::invokeMethod(this, "processNext", Qt::QueuedConnection); + return; + } + // One network call for the missed lines joined with "\n" (the + // free Google endpoint preserves line breaks), then split the + // reply back onto the missed blocks. If the reply has a different + // number of lines, fall back to one call per block — the position + // mapping must never be guessed from a misaligned split. + // Streaming providers report partial text through the callback as + // it arrives (emitted as jobProgress); the final text still comes + // back here and replaces the partial. Partials are suppressed when + // some lines already came from the DB: a partial only covers the + // misses and must not be shown over the whole crop. + const QString providerInput = ocrBlocks.isEmpty() + ? original + : missTexts.join(QChar(u'\n')); + const TranslateResult translated = provider->translateStreaming( + providerInput, job->sourceLanguage, job->targetLanguage, + [&](const QString &partial) { + if (dbHits.isEmpty()) + emit jobProgress(original, partial, job->sourceRect, job->testJob); + }); + result.translateMs = translateTimer.elapsed(); + result.ocrMs = ocrMs; + if (!translated.ok) { + result.error = translated.error; + } else if (ocrBlocks.isEmpty()) { + // Direct-text job (or an OCR engine that gave flat text only): + // one block covering the whole crop. result.ok = true; - result.translated = lines.join(QChar(u'\n')); - for (int i = 0; i < ocrBlocks.size(); ++i) { - // Never cover an English line with an empty box: a line - // that translated to nothing is left untranslated (and - // visible) instead of hidden behind an empty box. - if (lines.at(i).isEmpty()) - continue; - result.blocks.append(TranslatedBlock{ - ocrBlocks.at(i).text, lines.at(i), - mapBlockRectToFrame(ocrBlocks.at(i).rect, job->sourceRect)}); - } - if (result.blocks.isEmpty()) { - // Every line translated to nothing: report "no text" so - // the engine leaves the current translation alone. - result.original.clear(); - result.translated.clear(); - } + result.translated = translated.text; + result.blocks.append(TranslatedBlock{original, translated.text, + mapBlockRectToFrame(QRectF(0, 0, 1, 1), + job->sourceRect)}); } else { - // Line count mismatch: translate each block on its own. - QStringList perBlock; - QString lastError; - for (const OcrBlock &block : ocrBlocks) { - const TranslateResult one = - provider->translate(block.text, job->sourceLanguage, job->targetLanguage); - if (!one.ok) { - lastError = one.error; - continue; + QStringList lines = translated.text.split(QChar(u'\n')); + while (!lines.isEmpty() && lines.last().isEmpty()) + lines.removeLast(); + for (QString &line : lines) + line = line.trimmed(); + if (lines.size() == missIndices.size()) { + // Lines align with the missed blocks: merge DB hits and + // provider lines back into reading order. + result.ok = true; + QStringList allTranslated; + int missPos = 0; + for (int i = 0; i < ocrBlocks.size(); ++i) { + if (dbHits.contains(i)) { + allTranslated.append(dbHits.value(i)); + result.blocks.append(TranslatedBlock{ + ocrBlocks.at(i).text, dbHits.value(i), + mapBlockRectToFrame(ocrBlocks.at(i).rect, job->sourceRect)}); + } else { + const QString line = lines.at(missPos++); + if (line.isEmpty()) + continue; // never cover a line with an empty box + allTranslated.append(line); + result.blocks.append(TranslatedBlock{ + ocrBlocks.at(i).text, line, + mapBlockRectToFrame(ocrBlocks.at(i).rect, job->sourceRect)}); + } + } + result.translated = allTranslated.join(QChar(u'\n')); + if (result.blocks.isEmpty()) { + // Every line translated to nothing: report "no text" + // so the engine leaves the current translation alone. + result.original.clear(); + result.translated.clear(); } - const QString oneText = one.text.trimmed(); - if (oneText.isEmpty()) - continue; - perBlock.append(oneText); - result.blocks.append(TranslatedBlock{ - block.text, oneText, - mapBlockRectToFrame(block.rect, job->sourceRect)}); - } - if (result.blocks.isEmpty()) { - result.error = lastError.isEmpty() ? QStringLiteral("Translation failed") - : lastError; } else { - result.ok = true; - result.translated = perBlock.join(QChar(u'\n')); + // Line count mismatch: translate each missed block on its + // own; DB-hit blocks are carried through unchanged. + QStringList perBlock; + QString lastError; + for (int i = 0; i < ocrBlocks.size(); ++i) { + if (dbHits.contains(i)) { + perBlock.append(dbHits.value(i)); + result.blocks.append(TranslatedBlock{ + ocrBlocks.at(i).text, dbHits.value(i), + mapBlockRectToFrame(ocrBlocks.at(i).rect, job->sourceRect)}); + continue; + } + const OcrBlock &block = ocrBlocks.at(i); + const TranslateResult one = + provider->translate(block.text, job->sourceLanguage, job->targetLanguage); + if (!one.ok) { + lastError = one.error; + continue; + } + const QString oneText = one.text.trimmed(); + if (oneText.isEmpty()) + continue; + perBlock.append(oneText); + result.blocks.append(TranslatedBlock{ + block.text, oneText, + mapBlockRectToFrame(block.rect, job->sourceRect)}); + } + if (result.blocks.isEmpty()) { + result.error = lastError.isEmpty() ? QStringLiteral("Translation failed") + : lastError; + } else { + result.ok = true; + result.translated = perBlock.join(QChar(u'\n')); + } } } } diff --git a/opennow-qt/src/translation/TranslationWorker.h b/opennow-qt/src/translation/TranslationWorker.h index 8d333778d..ae5ddb61e 100644 --- a/opennow-qt/src/translation/TranslationWorker.h +++ b/opennow-qt/src/translation/TranslationWorker.h @@ -22,6 +22,7 @@ #include #include "translation/CustomApi.h" +#include "translation/WuWaDialogueDb.h" // One translated line and where it sits on the frame: rect is normalized // 0..1 in FULL-FRAME coordinates (the worker maps the OCR block's @@ -67,6 +68,7 @@ struct TranslationJobResult qint64 translateMs = 0; QString cropHash; bool cacheHit = false; // true when the translation came from cache/DB + bool chunkHit = false; // true when EVERY block came from the chunk DB QString error; // safe to show; never contains a key }; Q_DECLARE_METATYPE(TranslationJobResult) @@ -123,6 +125,17 @@ public slots: // back via customApiModelsFetched. void fetchCustomApiModels(const QString &base, const QString &apiKey); void cancelPending(); + // Chunk DB (v4): the worker looks OCR'd lines up in this DB (owned + // by the engine; lookup is const and mutex-guarded, so sharing the + // pointer across threads is safe) before calling any provider. + void setChunkDb(WuWaDialogueDb *db); + void setChunkEnabled(bool enabled); + // Downloads the chunk database: GETs the manifest, then each listed + // file one per event-loop turn (queued self-invocation) so OCR and + // translate jobs keep running between downloads. Files land in + // //; progress and completion come + // back via chunkDownloadProgress / chunkDownloadFinished. + void startChunkDownload(const QString &manifestUrl, const QString &cacheDir); signals: void jobCompleted(const TranslationJobResult &result); @@ -132,9 +145,14 @@ public slots: void jobProgress(const QString &original, const QString &partialTranslated, const QRectF &sourceRect, bool testJob); void customApiModelsFetched(const QStringList &models, const QString &error); + void chunkDownloadProgress(int done, int total); + // error is empty on success; on partial failure it names the first + // file that failed (the files that did download are still usable). + void chunkDownloadFinished(const QString &error); private slots: void processNext(); + void downloadNextChunkFile(); private: TranslationJobQueue m_queue; @@ -142,4 +160,15 @@ private slots: QString m_geminiApiKey; // worker-thread copy; set via queued slot CustomApiConfig m_customApi; // worker-thread copy; set via queued slot bool m_processing = false; // worker-thread only + WuWaDialogueDb *m_chunkDb = nullptr; // engine-owned; lookup only + bool m_chunkEnabled = false; + // Chunk-download state (worker thread only). + QString m_chunkManifestUrl; + QString m_chunkBaseUrl; // manifest URL minus "manifest.json" + QByteArray m_chunkManifestBody; + QString m_chunkVersion; + QString m_chunkCacheDir; + QStringList m_chunkFiles; + int m_chunkIndex = 0; + QString m_chunkError; }; diff --git a/opennow-qt/src/translation/WuWaDialogueDb.cpp b/opennow-qt/src/translation/WuWaDialogueDb.cpp index c06efdebb..cb913982c 100644 --- a/opennow-qt/src/translation/WuWaDialogueDb.cpp +++ b/opennow-qt/src/translation/WuWaDialogueDb.cpp @@ -5,6 +5,29 @@ #include #include #include +#include +#include + +namespace { +// Minimum Levenshtein similarity for a fuzzy DB hit. OCR noise is mostly +// punctuation/case (handled by normalization) plus one or two wrong +// characters per line; 0.88 accepts those while rejecting a different +// line that merely shares its first two words. +constexpr double MinFuzzyRatio = 0.88; + +// Normalized key with every non-alphanumeric stripped, so "Talk to +// Shilang!" and "Talk to Shilang" squash to the same form. +QString squashKey(const QString &normalizedKey) +{ + QString out; + out.reserve(normalizedKey.size()); + for (const QChar c : normalizedKey) { + if (c.isLetterOrNumber()) + out.append(c); + } + return out; +} +} // namespace WuWaDialogueDb::WuWaDialogueDb(const QString &filePath) : m_filePath(filePath) @@ -38,9 +61,40 @@ bool WuWaDialogueDb::loadDialogueDb() if (!key.isEmpty()) m_entries.insert(key, it.value().toString()); } + rebuildIndexLocked(); return true; } +bool WuWaDialogueDb::loadChunkFile(const QString &path) +{ + QFile file(path); + if (!file.exists()) + return true; // A chunk file missing from the cache is skipped. + if (!file.open(QIODevice::ReadOnly)) + return false; + const QJsonDocument doc = QJsonDocument::fromJson(file.readAll()); + file.close(); + if (!doc.isObject()) + return false; + const QJsonObject entries = doc.object().value(QStringLiteral("entries")).toObject(); + QMutexLocker locker(&m_mutex); + for (auto it = entries.constBegin(); it != entries.constEnd(); ++it) { + const QString key = TranslationCache::normalizeKey(it.key()); + if (!key.isEmpty()) + m_entries.insert(key, it.value().toString()); + } + rebuildIndexLocked(); + return true; +} + +void WuWaDialogueDb::clear() +{ + QMutexLocker locker(&m_mutex); + m_entries.clear(); + m_firstTwoWordsIndex.clear(); + m_squashedIndex.clear(); +} + bool WuWaDialogueDb::lookup(const QString &englishText, QString &translated) const { const QString key = TranslationCache::normalizeKey(englishText); @@ -54,6 +108,96 @@ bool WuWaDialogueDb::lookup(const QString &englishText, QString &translated) con return true; } +bool WuWaDialogueDb::lookupFuzzy(const QString &englishText, QString &translated) const +{ + const QString key = TranslationCache::normalizeKey(englishText); + if (key.isEmpty()) + return false; + QMutexLocker locker(&m_mutex); + // 1) Exact on the normalized key. + const auto exact = m_entries.constFind(key); + if (exact != m_entries.constEnd()) { + translated = exact.value(); + return true; + } + // 2) Exact on the squashed form (OCR punctuation/space noise). + const QString squashed = squashKey(key); + if (!squashed.isEmpty()) { + const auto squashedHit = m_squashedIndex.constFind(squashed); + if (squashedHit != m_squashedIndex.constEnd()) { + translated = m_entries.value(squashedHit.value()); + if (!translated.isEmpty()) + return true; + } + } + // 3) Levenshtein ratio among entries sharing the first two words. + // The index keeps the candidate set tiny even for a 216k-entry DB. + const auto candidates = m_firstTwoWordsIndex.value(firstTwoWords(key)); + double bestRatio = 0.0; + QString bestTranslation; + for (const QString &candidate : candidates) { + const double ratio = similarityRatio(key, candidate); + if (ratio > bestRatio) { + bestRatio = ratio; + bestTranslation = m_entries.value(candidate); + } + } + if (bestRatio >= MinFuzzyRatio && !bestTranslation.isEmpty()) { + translated = bestTranslation; + return true; + } + return false; +} + +double WuWaDialogueDb::similarityRatio(const QString &a, const QString &b) +{ + const int n = a.size(); + const int m = b.size(); + if (n == 0 && m == 0) + return 1.0; + if (n == 0 || m == 0) + return 0.0; + // Two-row Levenshtein; strings are dialogue lines (short). + QList previous(m + 1); + QList current(m + 1); + for (int j = 0; j <= m; ++j) + previous[j] = j; + for (int i = 1; i <= n; ++i) { + current[0] = i; + for (int j = 1; j <= m; ++j) { + const int cost = a.at(i - 1) == b.at(j - 1) ? 0 : 1; + current[j] = std::min({previous[j] + 1, current[j - 1] + 1, + previous[j - 1] + cost}); + } + previous.swap(current); + } + const int distance = previous[m]; + return 1.0 - static_cast(distance) / std::max(n, m); +} + +QString WuWaDialogueDb::firstTwoWords(const QString &normalizedKey) +{ + const int firstSpace = normalizedKey.indexOf(QChar(u' ')); + if (firstSpace < 0) + return normalizedKey; + const int secondSpace = normalizedKey.indexOf(QChar(u' '), firstSpace + 1); + if (secondSpace < 0) + return normalizedKey; + return normalizedKey.left(secondSpace); +} + +void WuWaDialogueDb::rebuildIndexLocked() +{ + m_firstTwoWordsIndex.clear(); + m_squashedIndex.clear(); + for (auto it = m_entries.constBegin(); it != m_entries.constEnd(); ++it) { + m_firstTwoWordsIndex[firstTwoWords(it.key())].append(it.key()); + // First key wins on a squashed collision (duplicate lines with + // different punctuation normalize to the same entry anyway). + m_squashedIndex.insert(squashKey(it.key()), it.key()); + } +} + int WuWaDialogueDb::size() const { QMutexLocker locker(&m_mutex); diff --git a/opennow-qt/src/translation/WuWaDialogueDb.h b/opennow-qt/src/translation/WuWaDialogueDb.h index 61f8e63f4..726315b3b 100644 --- a/opennow-qt/src/translation/WuWaDialogueDb.h +++ b/opennow-qt/src/translation/WuWaDialogueDb.h @@ -9,9 +9,18 @@ // ZERO datamined lines: no game dialogue translations are invented here. // It starts empty and fills only from lines actually seen (and verified) // during live play. Do not hand-write dialogue into the seed file. +// +// Chunk mode (v4): the downloaded chunk database (repo +// huyzoz/wuwa-vi-chunks, one {"version":1,"entries":{...}} file per +// 4,000-string chunk) is loaded with loadChunkFile(), which MERGES +// entries instead of replacing them, so 55 files accumulate into one +// map. lookupFuzzy() tolerates OCR noise: exact on the squashed form +// (all non-alphanumerics stripped), then a Levenshtein-ratio match among +// entries sharing the first two words. #pragma once #include +#include #include #include @@ -27,14 +36,38 @@ class WuWaDialogueDb bool loadDialogueDb(const QString &path); bool loadDialogueDb(); // reloads from the path given at construction + // Merges entries from a chunk file (same JSON shape) WITHOUT clearing + // what is already loaded. Returns false if the file exists but cannot + // be parsed; a missing file is a no-op that returns true. + bool loadChunkFile(const QString &path); + + void clear(); // empties the map (e.g. before a re-download) + // Normalized lookup. Returns true on hit and fills `translated`. bool lookup(const QString &englishText, QString &translated) const; + // OCR-tolerant lookup: squashed-form exact, then Levenshtein ratio + // >= 0.88 among entries sharing the first two words. Returns true on + // hit and fills `translated`. + bool lookupFuzzy(const QString &englishText, QString &translated) const; + + // Levenshtein similarity ratio in [0,1]: 1 - dist/max(lenA, lenB). + // Pure and unit-testable. + static double similarityRatio(const QString &a, const QString &b); int size() const; QString filePath() const { return m_filePath; } private: + // Rebuilds m_firstTwoWordsIndex from m_entries. Caller holds m_mutex. + void rebuildIndexLocked(); + // First two words of a normalized key (or the whole key if shorter). + static QString firstTwoWords(const QString &normalizedKey); + QString m_filePath; mutable QMutex m_mutex; QHash m_entries; + // First-two-words -> normalized keys, for bounding fuzzy candidates. + QHash> m_firstTwoWordsIndex; + // Squashed key (non-alphanumerics stripped) -> normalized key. + QHash m_squashedIndex; }; From 4dc8a607ea2f1dc4625c41763e74b1026cc1048c Mon Sep 17 00:00:00 2001 From: huyzoz Date: Thu, 12 Nov 2026 15:12:32 +0700 Subject: [PATCH 39/54] v4: chunk mode + white frosted overlay --- .../data/fonts/BeVietnamPro-Bold.ttf | Bin 0 -> 140300 bytes .../data/fonts/BeVietnamPro-Medium.ttf | Bin 0 -> 135980 bytes .../data/fonts/BeVietnamPro-Regular.ttf | Bin 0 -> 132948 bytes .../data/fonts/BeVietnamPro-SemiBold.ttf | Bin 0 -> 136736 bytes opennow-qt/src/translation/data/fonts/OFL.txt | 93 ++++++++++++++++++ 5 files changed, 93 insertions(+) create mode 100644 opennow-qt/src/translation/data/fonts/BeVietnamPro-Bold.ttf create mode 100644 opennow-qt/src/translation/data/fonts/BeVietnamPro-Medium.ttf create mode 100644 opennow-qt/src/translation/data/fonts/BeVietnamPro-Regular.ttf create mode 100644 opennow-qt/src/translation/data/fonts/BeVietnamPro-SemiBold.ttf create mode 100644 opennow-qt/src/translation/data/fonts/OFL.txt diff --git a/opennow-qt/src/translation/data/fonts/BeVietnamPro-Bold.ttf b/opennow-qt/src/translation/data/fonts/BeVietnamPro-Bold.ttf new file mode 100644 index 0000000000000000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)zRyuf>qzZV1D0~LW4fv}@fPF>9A76Z8^`unYbB0XRFq(cTd|7f;y9#3SW%5`Xj@SdWlZoaf=sd;GQMc7XHPNq)7xnia4c z?TxH=-D+>=UIuBw{FRRj=^1yXqz)jJrK~-MfQ94``k4U z>HV zEG1Z|?oRsUjT@`Gy(AR*I@8x~G4H38$hS#2F_&8T-QZA&m^F!^az6WT? zzH9k1;f_3s#@E?}lc)YApTwoCQZmX?wUqS?aze^Fz*KT(5@E!<$Tf+SF>>Y6@8eO=0(&d{4%0%uCRD6iQv-zBr&Mm?2DJI9yn__@DL4NY9j3I- literal 0 HcmV?d00001 diff --git a/opennow-qt/src/translation/data/fonts/BeVietnamPro-Medium.ttf b/opennow-qt/src/translation/data/fonts/BeVietnamPro-Medium.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d6deb87afdd7ddf003f3d0ab1070ab9df1df0724 GIT binary patch literal 135980 zcmd3P2Yg(`wfD@u+nc&p(yDAx*Q!^mUaMFxvfPbi8(ZscW55`jIFL9BEyPI(X(W^Y zA%qYhWNmCraS{^<5L$o`lJE$jg~uZ=`CdqQDYpFm&)j=gccqn9y6E@qdv~0_x#sN08B0+Z^SE|IF2-*x72o?Z&bA$UKDs^Q*ZV_^1wYI9 zozb1!B3lc_F8M6#599Ziop@lKkpBbsTXA2!^Zfk>zwq>)62>GOUhmv<;g-m)zjd6# z_x9lX{_`UT_saV{FQEK2DDS@@a{jiDTzB)`jQ<4fH=Wvh;l=yk-uJ8jV*I(&XwO&o z?%THa-|krJVXR;X<-ZTe;8k`-_r3@JyeXygFDylV4^P-@zkBHsI{&(R<0EGePW;_; zlj#I*Eli@P_=or8_a^=u-*_3ndrUWpn$+LKUnzy2;O}|Nsy<+q>>TzvT;J(&i6c(*8_{ke^?3vsz#e>S{qcz~T^?%+194Zr7hG%16Am(rzo zaPl(?>SogKSo!~p!z82L``D0dXAM&i=?y&3U;*hpwpyGoW<%0tZ1w->_&DlJ!?&g! z(sOw3V0qllhIj#6%?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vfQ literal 0 HcmV?d00001 diff --git a/opennow-qt/src/translation/data/fonts/BeVietnamPro-Regular.ttf b/opennow-qt/src/translation/data/fonts/BeVietnamPro-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dfa34c09fe2bae0626e00aa3265af2119345c27b GIT binary patch literal 132948 zcmd4434B~t**|{Hy|Zu0WKSl`OeT9K>ts)wPL{T5vyiSNZE2HqrEIkSD@>Hqtjd++4VlFZ=y{yv{SdOJ5W=bn4c z^E~G{&wdzZjAh^-1M?29UAY2(aVD8Z@M&2wxNLdJU7kM1e@K5ny<+^dwO!BlWHSCE z3uE;gSFBy%?_II4f=PTkW5%~nTieh)y}HDPE*?Vrscq*>@BP!&CqB-YZ4fUwvF)M@ zyxG&HD#nT(^!v`eyUv-ZKXnCTX(7g3j$PB|@5T4&cpus`%dWF8+4w9Q_J=%NEojzyBS)QAJ&iJz}`2FI&=beASfA0I~yNrMH5sc^d zz590T{rUYHT#OZsp#9eX89d6a&b{oC*SDti{FSB2Z{r*G`hWlMtMvJc-Yrj`+CTRX z!^aGd;ZGBj=v(}U=j6BN{)TtFjNcm!9}_((zlndPH2Mbr?qO!-3s%EUXCK4;11^X7 z#vq->Z(&BXIw(!xn_=aXZ(+^6SF}+7xtFo?aJxzSZtS$NW$YMpmhMo;@JDXNkTU6a zDMNY-A6{nSf5BgGu)6;jmwW>Kex8lXX4W2iNk75&S*%L>HQOjY&t~J&MQr2$>beAd zrr}*Nm-K=dLot`wIL~1ldCsZd<9Y}8qqtV#Vz|8c?$7w_5WoEZV|x%|+KcN_jO)@< zf0jPV?DBg2{W`99@tu0fU3lmJi|cLHE?t9n;gZ{Me>d(Qz-`XmcU`s*XCNBS7+`@g>A7t!yHnC}jJ zo`?SR*NymY7T4Et-G=LQT+?Xtzqt5E0PCyK&#mZ3f33h6&S6>H!j|(awn@28{f=jy z`XlZ~aIM7sDSVdT^F4gFiQh6#{Ya{1Gj?pLto(h^)7*!svtFuW1( zP4!CFUj5y`MZe<$j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w>9>1`v-LPSYuj> zO6RhE#(VbAj?)zAeM}iY0_MrVbp{!(D zqS$120&fTQh-l zZ00j}plNfoCdS)x7xrs{UHi(Hb|IskU(a1Nb$89#Pc3&N86%fA=X-+7r>&+JJBg&M zG46wkU)p*GmXNj%;D}|;A&*3f9M)X#Y|)B6ZJ|cnrle}ExmjJq44Pk}Lu;`V&&&Z< z9Cx!a>zVCxj)+>8xVEN~y@@r#Am>q*vTAlKCr@Oh@(Fx5;$v-@9w6FoSL$mk?QAJL Nxyp51fq&)Ze*nc98`%H= literal 0 HcmV?d00001 diff --git a/opennow-qt/src/translation/data/fonts/BeVietnamPro-SemiBold.ttf b/opennow-qt/src/translation/data/fonts/BeVietnamPro-SemiBold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b25bad31fe8984d5db6cbce61a23323bbb68bc97 GIT binary patch literal 136736 zcmd4434B~-xj+8C=ghuj&rFg@CbMME%w%7ht&^=u+cYh0fusmc(j7{v1uAQ)KxwUr zzy(A>Ktx1D?{s4mWKj?i5dpc%ML^_o(W_ouE`pZy|9#$b&g9Hwk_p`V`+WX|lXGU~ zocFx%^E~hKKKsi!V=M=M49qvMX6X<+HH{QkPhlf_JT+?Ez zI*IW&?_#X(;Lw_r`+P&YDwvd2&zSMum22u6rwU8mXyP8+Ke6HL$(?_`;`nup*#_`} z;~RFL=X0HDiZSMO(C?dfZaI4@a^h0PGNX)TIJQilyA$7M;eBu7Y}vB?!p;BP>^;O- z;A+Od_3qY9lN(F6?7klDhwyvrR(xSG$}i#bMtm;YdiHr2+@7`RT*f2|9`D+I&W6cX zLxUILecSPV-`SHF?3B;TcoFv>!2P}*lV@+b@E^BLG5*|n`2FRb=bU@qZ+HFbJ;r}N zjQ)IS=dMjV|NX90G8iiv!TpZ{GI*3-@#6kR_O8$D`X81lzl(3!Yyb7)_vrlVo--ag zv1|H6!##$_@X^F1`WFB2oc!+e-|>#uPwe{WPlkI$OUiHJuarsO;P2VYtbD<0*s1Ib zxV}4sV1-A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