/** * A sentence the admin reads, kept as a template and its values, so that it can * be said again in another language when it is read (ยง 8.4, Issues). * * ```ts * say`The value in column "${column}" must be a number.` * ``` * * The English text is what the literal says with the values put in. The * template, `The value in column "${1}" must be a number.`, is the key in * `translations//import.csv`: the values are numbered in the order they * appear, and a translation may move a number to where its sentence needs it. * A value that is itself a `say` sentence (a part of a longer one) is said in * the language of the whole. * * The values are the admin's own text (a column, a key, a number), not words: * they are put in as they are. A part of a sentence that is made of words, such * as the reason an image failed, is a `say` of its own. */ export declare class Say { private readonly strings; private readonly values; constructor(strings: readonly string[], values: readonly unknown[]); /** The sentence in English. */ toString(): string; /** The key of the sentence: its text with `${1}`, `${2}` ... for the values. */ get template(): string; /** What is stored of the sentence: the template and the values. */ data(): SayData; } /** A sentence as it is stored: the template and the values, plain JSON. */ export interface SayData { t: string; a: Array; } /** The tag: ``say`...${value}...` ``. */ export declare function say(strings: TemplateStringsArray, ...values: unknown[]): Say; /** A sentence that is only text (a part of a longer one, or a fixed one). */ export declare function sayText(text: string): Say; /** Says a stored sentence with `translate` (the key and the values as `translate` takes them). */ export declare function renderSay(data: SayData, translate: (key: string, values: Record) => string): string;