feat: machine translation resumes after a page reload
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:
1 parent
7fa88e4025
commit
68b66a1d94
5 files changed
+200
-30
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user