/** * Localized copy for everything this plugin puts in front of a person. * * The harness renders none of a third-party schema's descriptions — the * provider editor is hand-written React with its own bundled copy — so the * plugin's user-facing surface is exactly two things: the names of its entries * in the model picker, and the failure text a refused call shows. Those are * what this module translates. * * The browser client only lets a user *choose* `en` or `zh` * (`dsh-client-locale` ships those two), so `language: 'auto'` follows that * choice, and the other five locales are reachable by naming one explicitly in * this plugin's settings. * * Log lines stay English on purpose: they are diagnostics that end up in * issues and grep, not UI copy. */ /** Every locale this plugin ships copy for. */ export declare const LOCALES: readonly ["en", "ru", "zh", "de", "fr", "es", "tr"]; /** One shipped locale. */ export type Locale = (typeof LOCALES)[number]; /** The locale used when nothing else resolves. */ export declare const FALLBACK_LOCALE: Locale; /** Message keys this plugin translates. */ export type MessageKey = 'entry.auto' | 'entry.auto-cost-saver' | 'entry.auto-balanced' | 'entry.auto-quality-first' | 'error.noProvider' | 'error.refused'; /** * Whether `value` names a locale this plugin ships copy for. * @param value - a candidate locale id, from settings or the harness. * @returns true when the value can be used as a {@link Locale}. */ export declare function isLocale(value: unknown): value is Locale; /** * One translated message with its `{placeholders}` filled in. * * A locale never falls back per key: every locale carries every key, so a * partially translated release cannot leak English into the middle of a * sentence. Only an unknown locale falls back, and it falls back whole. * @param locale - the resolved locale. * @param key - the message to render. * @param params - values for the `{name}` placeholders in that message. * @returns the rendered message. */ export declare function translate(locale: Locale, key: MessageKey, params?: Record): string; /** * The localized label for one of this plugin's own catalog entries. * A user-added entry has no shipped copy and keeps whatever name it configures. * @param locale - the resolved locale. * @param id - the catalog entry id. * @returns the label, or `undefined` for an entry this plugin does not ship. */ export declare function entryLabel(locale: Locale, id: string): string | undefined;