/** * UI string catalogs for Modyra controls — pure data plus message * functions, shared by every framework adapter. Tokens/providers that * inject these live in the framework packages. */ /** * All static UI strings used by modyra renderers. * Override by providing `MDY_I18N_MESSAGES` at the root or component level. * * @example * providers: [{ provide: MDY_I18N_MESSAGES, useValue: { ...MDY_I18N_MESSAGES_DEFAULT, noResults: 'Nessun risultato' } }] */ export interface MdyI18nMessages { readonly searchPlaceholder: string; /** * What a chooser shows before anything is chosen, where the document names none of its own. * * A default written into a renderer is a default in one language: three renderers wrote three * (one of them nothing at all), and an English word sat inside a form whose every other word had * been translated. A caller that wants silence passes an empty string. */ readonly selectPlaceholder: string; readonly noResults: string; readonly colorPresetsHeader: string; readonly selectColorPrefix: string; /** * The door out of the panel, to the platform's own colour chooser. * * It names the dimension the two commands differ in, which is *how many colours you can reach* — * ten against all of them — rather than "ready against custom", which describes how they were * made. And the ellipsis is not decoration: it is the convention for *this opens another surface * rather than performing an action*, which people read without knowing they do — and it is the * reliable half of saying so, because the panel cannot describe a surface it does not draw, cannot * name it, and on some platforms cannot even see it close. * * It stays the same when the door carries a colour. A name holding the value would say the door * is a value, which is the confusion the door is built to avoid. */ readonly colorCustomEntry: string; /** * What the colour picked by hand is called, receiving the value it holds. * * Poor and honest. Nobody has named `#4361EE`, so this is the one value in the panel that cannot * be described to somebody who cannot see it — and an approximated colour name is worse than the * hexadecimal, because a swatch announcing itself as "blue" while being nearly violet claims a * meaning it does not have and the hexadecimal claims none. */ readonly colorCustomValue: string; readonly colorHexLabel: string; readonly timepickerOpenLabel: string; readonly timepickerCancel: string; readonly timepickerConfirm: string; readonly timepickerHourLabel: string; readonly timepickerMinuteLabel: string; readonly timepickerSwitchToDial: string; readonly timepickerSwitchToInput: string; /** * Shown beside a date or time control when what was typed could not be read. * * Says what happened rather than what the person did wrong: the commonest cause is a control whose * locale writes a time differently from the person reading it, which is not their mistake. */ readonly entryUnreadable: string; readonly datepickerToggleLabel: string; readonly datepickerCancel: string; readonly datepickerConfirm: string; readonly datepickerSelectFallback: string; readonly datepickerChooseDate: string; readonly datepickerPreviousMonth: string; readonly datepickerNextMonth: string; /** aria-label of the month/year view toggle; receives " ". */ readonly datepickerChangeView: (current: string) => string; readonly daterangeChooseRange: string; readonly daterangeSelectFallback: string; readonly daterangeStartLabel: string; readonly daterangeEndLabel: string; readonly daterangePickStartHint: string; readonly daterangePickEndHint: string; readonly loading: string; readonly increase: string; readonly decrease: string; readonly searchOptionsLabel: string; /** The control that takes a chosen value off, named on the chip it belongs to. */ readonly chipRemoveLabel: string; /** The two steppers on a counter chip: one fewer of this, one more of this. */ readonly chipDecrementLabel: string; readonly chipIncrementLabel: string; /** The two controls that move a chosen value one place, without a drag. */ readonly chipMoveEarlierLabel: string; readonly chipMoveLaterLabel: string; /** * What a live region says when a choice lands or leaves: the change and the new total. * * `{value}` is the label that moved, `{count}` how many are chosen after it. The **change**, not * the list — a polite region queues rather than replaces, so announcing the whole selection builds * a backlog of stale lists and a person hears a selection several actions out of date. The list * itself is an on-demand fact and belongs in the field's description. */ readonly selectionAdded: string; readonly selectionRemoved: string; /** What is said when the last choice is taken off and there is nothing left to name. */ readonly selectionEmpty: string; /** * What is said when the value removed was the last one. * * Both halves, because both are needed and neither implies the other. *"Roma removed"* alone leaves * a person not knowing the field is now empty; *"nothing selected"* alone leaves them not knowing * which of twelve went. And once the strip is gone there is nothing left in the page to tell them — * a field somebody has just emptied looks exactly like one they never filled. */ readonly selectionRemovedLast: string; /** * What is said when one act moves more than one value, and how many are held afterwards. * * `{moved}` is how many changed, `{count}` how many are held — two numbers because a clear that * takes three from a field of three and one that takes three from a field of ten are different * facts, and a sentence with one number cannot tell them apart. * * Counted rather than listed. The singular templates put `{value}` before a verb that agrees with * it, so a list of names dropped into one is ungrammatical in every language that inflects — and a * reader hearing twelve names for one act they took knowingly is being read a list, not told a * fact. */ readonly selectionAddedMany: string; readonly selectionRemovedMany: string; readonly selectionRemovedManyLast: string; /** What a quantity says when it settles: the value and how many of it. */ readonly quantitySettled: string; /** * What it says on arriving at the smallest quantity it can hold. * * Said on **reaching** one, not on leaving it. A warning at the moment of deletion is too late — * the value is already gone and the person is being told rather than asked; said on arrival, the * next step down is a known act rather than a surprise. */ readonly quantityAtMinimum: string; /** * What a live region says when a chosen value is moved. * * The modifier-plus-arrow way of reordering has no "grabbed" state to announce, so the *movement* * is the only thing there is to say — unannounced, a reorder is invisible to somebody who cannot * see the strip. `{value}` moved, `{position}` of `{count}`. */ readonly selectionMoved: string; /** * A chip picked up, and where it was picked up from. * * A grab is a state, and a state nobody announces is one a person cannot know they are in: the * arrows would carry a chip they believe is still walking the strip. `{value}` held, `{position}` * of `{count}`. */ readonly selectionGrabbed: string; /** * How a control is operated, one clause per thing its keys do. * * The sentence is *derived* from `MDY_WIDGET_KEYBOARD` — a phrase written beside the table is a * copy of the key map and goes stale the moment a binding moves, which is the failure this * project has now found five times in five shapes. These are the frames the derivation fills: * `{keys}` is the keys that carry an intent, joined by {@link MdyI18nMessages.keyGuideOr}. * * Nothing else tells anyone the key map exists. It is discoverable by guessing, and a person who * does not guess has a control they can see and cannot operate. */ readonly keyGuideOpen: string; readonly keyGuideMove: string; readonly keyGuideStep: string; readonly keyGuideToggle: string; readonly keyGuideCommit: string; readonly keyGuideCancel: string; readonly keyGuideRemove: string; readonly keyGuideGrab: string; /** What joins two keys that do the same thing, and two clauses. */ readonly keyGuideOr: string; readonly keyGuideJoin: string; /** What a key is called when it has no printable name of its own. */ readonly keyGuideSpace: string; /** A chip put down where it now is. */ readonly selectionDropped: string; /** A grab abandoned, with the chip back where it started. */ readonly selectionReturned: string; /** * How many are chosen, in the field's own description. * * Not the live region: this is the *state*, asked for rather than announced, and a person who * arrives at a field whose chips have scrolled out of sight has no other way to learn there are * more. ADR 0127 makes the count one of the conditions the scrolling row is allowed under. */ readonly selectionCount: string; /** The control that takes every choice off at once. */ readonly clearSelection: string; /** * The affordance at the strip's trailing edge, which says how many chips are out of sight and * opens the list where all of them are. * * ADR 0127 allows the row to scroll only where something reaches what leaves it. A wheel is that * mechanism for most people and not for a pointer with no horizontal axis, which is most desktop * mice — so the count is a fact one control states and the same control acts on. `{count}` is how * many are hidden; the short form is what is drawn, the long one is what is announced. */ readonly chipsHiddenShort: string; readonly chipsHidden: string; /** * The one way back, and what it says it is putting back. * * A single reversal covers the last destructive change whatever produced it, so "Undo" alone is * ambiguous and the affordance names the act: `{value}` for a removal or a move, `{count}` for a * clear, which is about all of them and can name none. It is untimed — a message that disappears * after five seconds is a time limit under 2.2.1, and an undo has no exception under it. */ readonly wayBackLabel: string; readonly wayBackRemoved: string; readonly wayBackMoved: string; readonly wayBackCleared: string; readonly fileSelect: string; readonly fileSelectMultiple: string; readonly fileNoneSelected: string; readonly fileClearSelection: string; /** * What a file field says about candidates it would not take; receives their names. * * A refused file is something that happened to the person — they chose it — and without a sentence * for it the only record is an array no page ever shows. */ readonly fileRejected: (names: readonly string[]) => string; readonly overlayOpened: string; readonly overlayClosed: string; /** Label of the "create new option" row in a searchable select. */ readonly selectCreateOption: (query: string) => string; readonly wizardNext: string; readonly wizardPrevious: string; readonly wizardFinish: string; /** a11y label of the wizard progress, e.g. "Step 2 of 4". */ readonly wizardStepStatus: (current: number, total: number) => string; } export declare const MDY_I18N_MESSAGES_DEFAULT: MdyI18nMessages; /** * DI token for UI string overrides. * Has a root-level factory so no explicit `provide` is needed for the defaults. */ export type MdyBuiltInLocale = "en" | "it" | "de" | "fr" | "es"; export declare const MDY_I18N_MESSAGES_IT: MdyI18nMessages; export declare const MDY_I18N_MESSAGES_DE: MdyI18nMessages; export declare const MDY_I18N_MESSAGES_FR: MdyI18nMessages; export declare const MDY_I18N_MESSAGES_ES: MdyI18nMessages; export declare const MDY_I18N_PRESETS: Readonly>; /** Default BCP 47 tag per built-in language preset. */ export declare const MDY_I18N_DEFAULT_TAGS: Readonly>; /** * The messages a locale tag asks for. * * A tag is `it-IT`, `it`, or `IT-it`; a preset is keyed by the primary subtag alone, because a * region does not change what a confirm button says. An unknown tag answers with the default rather * than nothing: a renderer that cannot find a translation shows English, it does not show blanks. * * Stated once. Three renderers each parsing a tag is three answers to "what does `pt-BR` get". */ export declare function messagesForLocale(tag: string | undefined | null): MdyI18nMessages;