diff options
Diffstat (limited to 'packages/desktop/src/cli.ts')
| -rw-r--r-- | packages/desktop/src/cli.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/desktop/src/cli.ts b/packages/desktop/src/cli.ts index 965ed6ddc..5a8875cf8 100644 --- a/packages/desktop/src/cli.ts +++ b/packages/desktop/src/cli.ts @@ -1,13 +1,15 @@ import { invoke } from "@tauri-apps/api/core" import { message } from "@tauri-apps/plugin-dialog" +import { initI18n, t } from "./i18n" + export async function installCli(): Promise<void> { + await initI18n() + try { const path = await invoke<string>("install_cli") - await message(`CLI installed to ${path}\n\nRestart your terminal to use the 'opencode' command.`, { - title: "CLI Installed", - }) + await message(t("desktop.cli.installed.message", { path }), { title: t("desktop.cli.installed.title") }) } catch (e) { - await message(`Failed to install CLI: ${e}`, { title: "Installation Failed" }) + await message(t("desktop.cli.failed.message", { error: String(e) }), { title: t("desktop.cli.failed.title") }) } } |
