/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * Every word the Studio's renderers say themselves (#996, #997, #998, #1000) — * ONE typed message table: the builder's toolbar, its palette and its * placeholders; the inspector's section heads, its fields and its controls' * names, its footer, and what it says with nothing selected; the page * library's toolbar, pane, section heads and cards; the popovers that name a * new page or a template; the publish preview's bar, its aside and its * footer; and what a page says when it has nothing to draw. What the AUTHOR wrote — a component's name, key, reads and * description, a placement's title, a project's, a page's and an * environment's names, the audience and the rollout — is data, and never * passes through it. * * English is the default. A host overrides any subset for a subtree with * {@link StudioMessagesProvider}; numbers format in the locale react-aria's * `I18nProvider` above the app sets (the browser's otherwise). * * @packageDocumentation */ import { type ReactNode } from "react"; /** * The Studio's message table. * * @remarks * Numbers — `span`, `px`, the counts, a version's number — arrive already * formatted for the locale; `np`, `nt` and `n` are the raw counts, for plurals. */ export interface StudioMessages { /** The builder toolbar's status: never published. */ statusDraft: () => string; /** Published, its draft its live layout. */ statusLive: () => string; /** Published, its draft changed since. */ statusLiveEdited: () => string; /** A template is open. */ statusTemplate: () => string; /** The builder toolbar's Publish. */ publish: () => string; /** The ⋯ chip a row short of room folds Save as template, Preview and Publish into (#1229) — its accessible name. */ more: () => string; /** Save as template in the ⋯ chip's menu, which opens its popover. */ saveAsTemplateItem: () => string; /** The builder with no page of the project open — its heading. */ noPageOpen: () => string; /** Under it, what to do. */ noPageOpenHint: (p: { project: string; page: string; }) => string; /** The palette's pane — its tab and its rail's name. */ components: () => string; /** One component, and any other count — the palette's noun. */ componentNoun: () => { singular: string; plural: string; }; /** One page, and any other count — the palette's noun. */ pageNoun: () => { singular: string; plural: string; }; /** A palette card's lock. */ logicFixed: () => string; /** The palette's grouping and filter facet. */ category: () => string; /** The palette's tags facet. */ tags: () => string; /** The palette's collections facet. */ collections: () => string; /** The inspector's pane — its tab and its rail's name. */ inspector: () => string; /** The inspector's rail badge — the selected placement's span, `8/12`. */ spanBadge: (p: { span: string; }) => string; /** A placement whose component the surface does not list — its heading. */ noComponent: (p: { key: string; }) => string; /** Under it. */ noComponentHint: () => string; /** A placement whose key two listed components share — its heading. */ twoComponents: (p: { key: string; }) => string; /** Under it. */ twoComponentsHint: () => string; /** A page whose live version is asked for before it is published — its heading. */ notPublished: (p: { page: string; }) => string; /** Under it. */ notPublishedHint: () => string; /** A page the record does not hold — its heading. */ noPage: (p: { page: string; }) => string; /** Under it. */ noPageHint: (p: { project: string; }) => string; /** Blank grid's card — what it places. */ blankSummary: () => string; /** A page card's count of placements — `3 components`. */ placements: (p: { n: number; count: string; }) => string; /** A page card's action. */ openInBuilder: () => string; /** The Pages row's dashed last card. */ newPageFromTemplate: () => string; /** The inspector's selection block — its eyebrow. */ selectedComponent: () => string; /** The Data block's eyebrow. */ data: () => string; /** A component whose code reads no dataset. */ readsNothing: () => string; /** The Configuration block's eyebrow. */ configuration: () => string; /** Beside it, what the lock says. */ fixedByDeveloper: () => string; /** A component with no description. */ noDescription: () => string; /** The Layout block's eyebrow. */ layout: () => string; /** The span stepper's label. */ columnSpan: () => string; /** The span as the stepper shows it — `8 / 12`. */ spanOf: (p: { span: string; }) => string; /** The stepper's minus button. */ decreaseSpan: () => string; /** The stepper's plus button. */ increaseSpan: () => string; /** The row field's label. */ row: () => string; /** The height field's label. */ height: () => string; /** A height that is its content's own. */ auto: () => string; /** A height in px — `240 px`. */ px: (p: { px: string; }) => string; /** The alignment's label. */ align: () => string; /** At the row's top. */ alignTop: () => string; /** Centred in the row. */ alignCenter: () => string; /** As tall as the row. */ alignStretch: () => string; /** The inspector's footer. */ published: () => string; /** The inspector with nothing selected — its heading. */ nothingSelected: () => string; /** Under it, what to do. */ nothingSelectedHint: () => string; /** The page library's search, counting what it searches — `Search 4 pages and 4 templates…`. */ searchLibrary: (p: { pages: string; templates: string; np: number; nt: number; }) => string; /** The search field's name. */ searchLabel: () => string; /** The search's clear button. */ clearSearch: () => string; /** The Sort menu's trigger. */ sortByName: () => string; /** Name, A to Z. */ nameAz: () => string; /** Name, Z to A. */ nameZa: () => string; /** The primary action — `New page in Ops console`. */ newPageIn: (p: { project: string; }) => string; /** The primary action, folded, and the New page popover's head. */ newPage: () => string; /** The pane's projects caption. */ projects: () => string; /** The pane's pages caption, and the Pages section's head. */ pages: () => string; /** The legend's live status. */ live: () => string; /** The legend's draft status. */ draft: () => string; /** The Templates section's head. */ templates: () => string; /** Beside it. */ cloneToStart: () => string; /** Beside the Pages head — `4 in Ops console`, or `1 of 4 in Ops console` while the search narrows. */ pagesIn: (p: { shown: string; total: string; project: string; narrowed: boolean; }) => string; /** The New page popover's name field. */ pageName: () => string; /** Under it, while it is empty. */ pageNameMissing: () => string; /** The New page popover's template field. */ template: () => string; /** Blank grid — no template. */ blankGrid: () => string; /** The New page popover's commit. */ createPage: () => string; /** A popover's cancel. */ cancel: () => string; /** A name the project holds already. */ nameTaken: (p: { name: string; }) => string; /** The builder toolbar's Save as template, and its popover's head. */ saveAsTemplate: () => string; /** Its popover's name field. */ templateName: () => string; /** Under it, while it is empty. */ templateNameMissing: () => string; /** Its popover's commit. */ saveTemplate: () => string; /** The name it offers — `Overview template`. */ templateNameFor: (p: { page: string; }) => string; /** Why it is disabled while a template is open. */ templateOpen: () => string; /** The publish preview's bar — `● Preview`. */ preview: () => string; /** The device strip's accessible name. */ devices: () => string; /** The device the page is drawn for. */ device: (p: { device: "desktop" | "tablet" | "mobile"; }) => string; /** The Env pill's label, before the environment's name. */ env: () => string; /** Back to the builder. */ exit: () => string; /** The aside's head while there is something to publish. */ readyToPublish: () => string; /** The aside's head while the page is live as it stands. */ upToDate: () => string; /** The aside's head while a template is open. */ templateNotPublished: () => string; /** A version — `v4`. */ version: (p: { version: string; }) => string; /** After the live version in the aside's head — `v4 live`. */ liveVersion: () => string; /** After a template's name in the aside's head. */ templateKind: () => string; /** The change list's head — `3 changes since v3`. */ changesSince: (p: { n: number; count: string; version: string; }) => string; /** The change list's head on a first publish — `3 changes · first version`. */ changesFirst: (p: { n: number; count: string; }) => string; /** The change list's head while nothing changed — `No changes since v4`. */ noChangesSince: (p: { version: string; }) => string; /** A change's verb, before the placement's name — `Added`, `Resized`. */ changeVerb: (p: { change: "added" | "removed" | "moved" | "resized" | "height" | "aligned" | "retitled"; }) => string; /** The Audience row's label. */ audience: () => string; /** The Rollout row's label. */ rollout: () => string; /** The footer's Apply. */ saveAsDraft: () => string; /** The footer's publish — `Publish v4 to Staging`; with no environment, `Publish v4`; for a template, `Publish`. */ publishTo: (p: { version?: string | undefined; env?: string | undefined; }) => string; /** A phone's Components tab: what to do. */ phoneComponentsIntro: () => string; /** A phone's Pages tab: what to do. */ phonePagesIntro: () => string; /** A card's line once its component is on the page. */ phoneOnPage: () => string; /** A phone's inspector's one tab. */ phoneDetails: () => string; /** The strip's Inspector meta — `row 2`. */ phoneRowMeta: (p: { row: string; }) => string; /** The inspector's meta line — `row 2 · columns 1–8`. */ phoneWhere: (p: { row: string; first: string; last: string; }) => string; /** The inspector's Row readout — `2 of 3`. */ phoneRowOf: (p: { row: string; rows: string; }) => string; /** The inspector's Move. */ phoneMove: () => string; /** Nothing selected on a phone: first. */ phoneNothingFirst: () => string; /** Then. */ phoneNothingThen: () => string; /** Save as template's help line on a phone. */ phoneTemplateHelp: (p: { project: string; page: string; }) => string; /** Back to the builder, from a phone's preview. */ phoneBack: () => string; /** A phone's preview's Page tab. */ phonePage: () => string; /** A phone's preview's Changes tab. */ phoneChanges: () => string; /** Under Tablet or Desktop — `Desktop · 1,440 px · the layout, each tile by name`. */ phoneWireCaption: (p: { device: string; px: string; }) => string; } /** The Studio's English messages — the default table. */ export declare const studioMessages: StudioMessages; /** * The message table in effect — {@link studioMessages} with every * {@link StudioMessagesProvider} above overriding it. * * @returns The table */ export declare function useStudioMessages(): StudioMessages; /** Props of {@link StudioMessagesProvider}. */ export interface StudioMessagesProviderProps { /** The messages to override — any subset; the rest come from the table above. */ messages: Partial; /** The subtree the overrides apply to. */ children?: ReactNode; } /** * Override the Studio's words for a subtree — a translation, or a house style. * Providers nest: each overrides the table the one above it resolved. * * @remarks * The overrides are read by identity: define them once (module scope, or a * memo), as below. * * @param props - The overrides and the subtree * @returns The provider * * @example * ```tsx * const GERMAN: Partial = { * nothingSelected: () => "Nichts ausgewählt", * columnSpan: () => "Spaltenbreite", * }; * * * * * * * ``` */ export declare function StudioMessagesProvider({ messages, children }: StudioMessagesProviderProps): import("react").FunctionComponentElement>; //# sourceMappingURL=messages.d.ts.map