import type { Locale } from '@trazum/core'; import { en } from './en.js'; import { es } from './es.js'; import type { CliMessages } from './types.js'; export declare function getCliMessages(locale?: Locale): CliMessages; /** * Locale for this run, most explicit source first: * the `--locale` flag, then `TRAZUM_LOCALE`, then the usual POSIX variables, * and last the project config file. * * **The config comes last on purpose.** A repository stating `"locale": "es"` * is choosing the language its CI logs read in, where `LANG` is usually unset * or `C`; a contributor whose machine says otherwise should still get their own * language. So the project sets the floor and the person at the keyboard wins. * * An unrecognised value falls back to English rather than failing: the point * of the tool is to optimise the prompt, and the language of the report is * never a good reason to refuse to do that. */ /** * Every environment variable this reads, in precedence order. * * Exported because it was a hardcoded list in two places and they drifted. The * CLI's own test suite has to neutralise the ambient locale before asserting on * English output, and its copy of this list omitted `LC_MESSAGES` — so the suite * passed on a CI runner and failed for a contributor whose machine sets it. * There is one list now, and it is this one: a variable added here is read by the * detector and neutralised by the tests in the same commit, or by neither. */ export declare const LOCALE_ENV_VARS: readonly ['TRAZUM_LOCALE', 'LC_ALL', 'LC_MESSAGES', 'LANG']; export declare function detectLocale(flag: string | undefined, env?: Record, configLocale?: string): Locale; export { en, es }; export type { CliMessages, HelpDefaults } from './types.js'; //# sourceMappingURL=index.d.ts.map