setup: say why the page waits while the bundled engine unpacks (8 languages)

This commit is contained in:
Niko1221 committed 2026-10-18 04:42:27 +02:00
1 parent 9b75c6a127
commit 83aa59fdc5
10 files changed
+38 -9

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { useEffect, useState } from 'react';
import { api } from './client';
/**
* True while the host is still unpacking the engine that came inside the app (the first start; about a minute, longer on a busy disk).
* The model list and the setup wait for it, so the page would otherwise sit on "Getting your setup ready…" with no reason given.
*/
export function useEngineUnpacking(active: boolean): boolean {
const [unpacking, setUnpacking] = useState(false);
useEffect(() => {
if (!active) return undefined;
let live = true;
const ask = () => api.get<{ engineSetup?: boolean }>('/api/control/status').then(s => { if (live) setUnpacking(s.engineSetup === true); }, () => {});
void ask();
const timer = setInterval(() => void ask(), 2000);
return () => { live = false; clearInterval(timer); };
}, [active]);
return unpacking;
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata wurde beendet",
"s3155": "Strata wurde beendet. Du kannst diesen Tab schließen. Um es wieder zu nutzen, starte Strata über sein Symbol.",
"s3156": "Strata konnte von hier aus nicht beendet werden. Starte die App im Terminal mit --quit oder versuche es erneut.",
"s3157": "Wird beendet …"
"s3157": "Wird beendet …",
"s3158": "Die mit der App gelieferte Engine wird entpackt. Beim ersten Start dauert das etwa eine Minute."
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata has stopped",
"s3155": "Strata has stopped. You can close this tab. To use it again, start Strata from its icon.",
"s3156": "Strata could not be stopped from here. Run the app with --quit in a terminal, or try again.",
"s3157": "Quitting…"
"s3157": "Quitting…",
"s3158": "Unpacking the engine that came with the app. This takes about a minute the first time."
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata se ha detenido",
"s3155": "Strata se ha detenido. Puedes cerrar esta pestaña. Para volver a usarlo, inicia Strata desde su icono.",
"s3156": "No se pudo detener Strata desde aquí. Ejecuta la app con --quit en una terminal o inténtalo de nuevo.",
"s3157": "Saliendo…"
"s3157": "Saliendo…",
"s3158": "Se está descomprimiendo el motor incluido con la app. La primera vez tarda aproximadamente un minuto."
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata を停止しました",
"s3155": "Strata を停止しました。このタブを閉じて構いません。もう一度使うには、アイコンから Strata を起動してください。",
"s3156": "ここから Strata を停止できませんでした。ターミナルで --quit を付けてアプリを実行するか、もう一度お試しください。",
"s3157": "終了しています…"
"s3157": "終了しています…",
"s3158": "アプリに付属のエンジンを展開しています。初回は1分ほどかかります。"
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata가 종료되었습니다",
"s3155": "Strata가 종료되었습니다. 이 탭을 닫아도 됩니다. 다시 사용하려면 아이콘에서 Strata를 실행하세요.",
"s3156": "여기서는 Strata를 종료하지 못했습니다. 터미널에서 --quit 옵션으로 앱을 실행하거나 다시 시도하세요.",
"s3157": "종료하는 중…"
"s3157": "종료하는 중…",
"s3158": "앱에 포함된 엔진의 압축을 푸는 중입니다. 처음에는 약 1분이 걸립니다."
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "O Strata parou",
"s3155": "O Strata parou. Pode fechar este separador. Para o usar de novo, inicie o Strata a partir do seu ícone.",
"s3156": "Não foi possível parar o Strata a partir daqui. Execute a app com --quit num terminal ou tente novamente.",
"s3157": "A sair…"
"s3157": "A sair…",
"s3158": "A descompactar o motor que veio com a app. Na primeira vez demora cerca de um minuto."
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata остановлена",
"s3155": "Strata остановлена. Эту вкладку можно закрыть. Чтобы снова пользоваться, запустите Strata по её значку.",
"s3156": "Не удалось остановить Strata отсюда. Запустите приложение с --quit в терминале или повторите попытку.",
"s3157": "Выход…"
"s3157": "Выход…",
"s3158": "Распаковывается движок, поставляемый с приложением. При первом запуске это занимает около минуты."
}
+2 -1
View File
@@ -3150,5 +3150,6 @@
"s3154": "Strata 已停止",
"s3155": "Strata 已停止。你可以关闭此标签页。要再次使用,请从图标启动 Strata。",
"s3156": "无法在这里停止 Strata。请在终端中用 --quit 运行应用,或再试一次。",
"s3157": "正在退出…"
"s3157": "正在退出…",
"s3158": "正在解压随应用附带的引擎。首次启动大约需要一分钟。"
}
+3 -1
View File
@@ -2,10 +2,12 @@ import { tr } from '../lib/i18n';
import { GuidedSetup } from '../components/GuidedSetup';
import { useNative } from '../lib/native';
import { useStore } from '../lib/store';
import { useEngineUnpacking } from '../lib/engine-setup';
/** Every setup entry uses the same guided onboarding. */
export function SetupScreen() {
const native = useNative(), setup = useStore(s => s.setup);
const unpacking = useEngineUnpacking(!native || !setup);
if (!native || !setup)
return <div className="setup guided-onboarding"><p className="onboard-loading" role="status">{tr("Getting your setup ready\u2026")}</p></div>;
return <div className="setup guided-onboarding"><p className="onboard-loading" role="status">{tr("Getting your setup ready\u2026")}</p>{unpacking ? <p className="onboard-loading small" role="status">{tr("Unpacking the engine that came with the app. This takes about a minute the first time.")}</p> : null}</div>;
return <GuidedSetup />;
}