/** * Runtime UI locale for the SSH TUI. * * Order: `DSH_TUI_LANG` → settings `ssh-tui.language` (`/language`) → * `LC_ALL` / `LC_MESSAGES` / `LANG`. Unrecognized and C/POSIX stay Chinese: * jump-host SSH is the default audience, and CI often runs with `LANG=C`. */ import z from '@deepseek-ai/schemastery'; import type { Context } from '@deepseek-ai/cordis'; export type Locale = 'zh' | 'en'; export type MessageVars = Record; export declare const UI_LOCALE_NAMESPACE: import("@deepseek-ai/dsh-settings").SettingsNamespace; /** * Fields `/language`, `/view`, `/disconnect` and `/autoapproval` persist. * * Every field is live: on 0.1.7 the section *is* this form, and only volatile * paths may be written (see {@link liveField}). */ export declare const UI_LOCALE_SCHEMA: z; skipUpdate: z; view: z; disconnect: z; autoApproval: z; /** Milliseconds a leftover, finished Host waits before exiting; 0 = never. */ idleExit: z; /** * Command run once when a question starts waiting and nobody is attached. * Empty means off. See `question-wait.ts` for the environment it receives. */ notify: z; }>>, Schemastery.ObjectT; skipUpdate: z; view: z; disconnect: z; autoApproval: z; /** Milliseconds a leftover, finished Host waits before exiting; 0 = never. */ idleExit: z; /** * Command run once when a question starts waiting and nobody is attached. * Empty means off. See `question-wait.ts` for the environment it receives. */ notify: z; }>>, "plain">; export declare function localeFromTag(tag: string): Locale | undefined; /** Pick zh/en from env, optionally after a saved settings value. */ export declare function resolveLocale(env?: NodeJS.ProcessEnv, saved?: string): Locale; export declare function getLocale(): Locale; export declare function setLocale(locale: Locale): void; export declare function t(key: string, vars?: MessageVars, fallback?: string): string; export declare function refreshLocale(env?: NodeJS.ProcessEnv, saved?: string): Locale; export declare function applySavedLocale(raw: unknown): Locale; /** Register `$DSH_HOME/settings.yaml` `ssh-tui.language` and apply it now. */ export declare function installUiLocale(ctx: Context): void; export declare function localeDisplayName(locale: Locale): string;