diff --git a/packages/ui/src/App.tsx b/packages/ui/src/App.tsx index 382cbe46..81064972 100644 --- a/packages/ui/src/App.tsx +++ b/packages/ui/src/App.tsx @@ -18,6 +18,7 @@ import { useAppLifecycle } from "./lib/hooks/use-app-lifecycle" import { getLogger } from "./lib/logger" import { initReleaseNotifications } from "./stores/releases" import { runtimeEnv } from "./lib/runtime-env" +import { useI18n } from "./lib/i18n" import { hasInstances, isSelectingFolder, @@ -51,6 +52,7 @@ const log = getLogger("actions") const App: Component = () => { const { isDark } = useTheme() + const { t } = useI18n() const { preferences, recordWorkspaceLaunch, @@ -119,7 +121,7 @@ const App: Component = () => { const formatLaunchErrorMessage = (error: unknown): string => { if (!error) { - return "Failed to launch workspace" + return t("app.launchError.fallbackMessage") } const raw = typeof error === "string" ? error : error instanceof Error ? error.message : String(error) try { @@ -202,12 +204,12 @@ const App: Component = () => { async function handleCloseInstance(instanceId: string) { const confirmed = await showConfirmDialog( - "Stop OpenCode instance? This will stop the server.", + t("app.stopInstance.confirmMessage"), { - title: "Stop instance", + title: t("app.stopInstance.title"), variant: "warning", - confirmLabel: "Stop", - cancelLabel: "Keep running", + confirmLabel: t("app.stopInstance.confirmLabel"), + cancelLabel: t("app.stopInstance.cancelLabel"), }, ) @@ -330,21 +332,20 @@ const App: Component = () => {
Binary path
+{t("app.launchError.binaryPathLabel")}
{launchErrorPath()}
Error output
+{t("app.launchError.errorOutputLabel")}
{launchErrorMessage()}