feat: machine translation resumes after a page reload
CI / frontend (push) Failing after 14s
CI / backend (push) Failing after 49s

The run is recorded at every page and picked up from the translator's finished job; one run across tabs via Web Locks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mrleo1nidandClaude Sonnet 5.5 committed 2026-10-25 20:39:37 +03:00
1 parent 7fa88e4025
commit 68b66a1d94
5 files changed
+200 -30

No files matched your search

+2 -2
View File
@@ -65,11 +65,11 @@ export function MachineTranslate({ session, versionId, lang, title, view, follow
setPreparing(true);
try {
const projectId = await session.project();
const started = run.start({
const started = await run.start({
client, projectId, versionId, lang, title, kind: view.kind, module: view.module, q: view.q,
states, batch: prefs.batch,
});
if (!started) setError("Другой перевод уже идёт: дождитесь его или остановите.");
if (!started) setError("Другой перевод уже идёт (возможно, в другой вкладке): дождитесь его или остановите.");
} catch (e) {
setError((e as Error).message);
} finally {