import { type ReactNode } from 'react'; import type { AccessText } from '../access/strings.js'; import type { FileExplorerText } from '../file-explorer/strings.js'; import type { GraphEditorText, InputsEditorText } from '../graph/editorStrings.js'; import type { FilterOperator } from '../list/filterModel.js'; export interface UIStrings { modal: { creating: string; addDescription: string; advanced: string; favorite: string; favorited: string; favoriteHintOn: string; favoriteHintOff: string; }; common: { /** Returns to the view a drawer or panel showed before. */ back: string; cancel: string; close: string; save: string; clear: string; delete: string; download: string; retry: string; reset: string; apply: string; dismiss: string; /** Names the region toasts appear in. */ notifications: string; rename: string; share: string; send: string; filter: string; /** A filter's choice that turns it off, showing everything. */ all: string; loading: string; loadMore: string; showMore: string; showLess: string; previous: string; next: string; zoomIn: string; zoomOut: string; expandAll: string; collapseAll: string; moveUp: string; moveDown: string; undo: string; redo: string; duplicate: string; copied: string; copyToClipboard: string; /** The toast after a copy that names nothing. */ copiedToClipboard: string; copyFailed: string; /** `label` names what is copied, such as "email address". */ copyThing: (label: string) => string; copiedThing: (label: string) => string; copyThingFailed: (label: string) => string; /** A count past a badge's cap, `max` already formatted, such as "99+". */ countOverflow: (max: string) => string; /** Read out where a value is missing, which shows as a dash. */ noValue: string; /** A name field's rule: the characters a key or identifier allows. */ invalidName: string; invalidNumber: string; copy: string; /** A masked value's eye toggle, for a password or a secret. */ showValue: string; hideValue: string; expand: string; collapse: string; showHiddenFields: string; showHiddenFieldsHint: string; jsonHasErrors: string; add: string; create: string; remove: string; sort: string; userAvatar: string; /** A person's presence beside their avatar, read with their name. */ presence: Record<'online' | 'offline' | 'busy' | 'away', string>; /** An avatar's name with the person's presence, such as "Ada Lovelace, online". */ withPresence: (name: string, presence: string) => string; moreInfo: string; /** The name of a menu of actions on a page or row. */ actions: string; edit: string; submit: string; search: string; clearSearch: string; filterPlaceholder: string; breadcrumb: string; /** Names the menu of the breadcrumbs a narrow trail folds away. */ showFullPath: string; yes: string; no: string; /** Read after a link that opens a new tab. */ opensInNewTab: string; /** Names a code editor that has no label of its own. */ codeEditor: string; /** Names a block of code that has no title of its own, by its language, * such as "yaml code"; `language` is empty when it has none. */ codeOf: (language: string) => string; /** Shown when someone types in a read-only code editor. */ readOnlyText: string; /** Names the handle that resizes a panel. */ resizePanel: string; /** A resizable panel's width, read aloud. */ panelWidth: (px: number) => string; refresh: string; refreshing: string; /** A refresh button's label once it knows when the data was fetched. */ updated: (ago: string) => string; /** Read with a "+3" chip that stands for the items a list leaves out. */ moreCount: (count: number) => string; /** Names the button that copies the text selected in a block. */ copySelection: string; /** Read in place of a masked secret's dots. */ hiddenValue: string; }; dropdown: { select: (type: string) => string; noOptionsFound: string; /** While a search for options is under way. */ searching: string; showOptions: string; /** The row that adds typed text as a new value. */ add: (text: string) => string; /** The row that creates the thing typed text names, such as a new label. */ create: (text: string) => string; /** Heads the values offered under a tag field. */ suggested: string; /** In place of the placeholder once a field holds as many values as it takes. */ limitReached: (max: number) => string; /** Names the button on a chosen value's chip that takes it out. */ removeValue: (label: string) => string; }; datePicker: { /** The button's text while no date is chosen. */ pickDate: string; /** Names the time beside the date. */ time: string; previousMonth: string; nextMonth: string; /** Names the box in the calendar's popup that takes a typed date. */ typeDate: string; /** Under the box while what is typed isn't a date that can be chosen. */ invalidDate: string; }; colorInput: { /** Names the picker beside the hex field: the field's name, or none when it has no plain one. */ pick: (name?: string) => string; /** Under the hex field while what is typed isn't a color. */ invalid: string; }; imageUpload: { /** Names the tile's menu: what the image stands for, such as a team's name. */ change: (name: string) => string; /** The menu trigger beside the tile. */ edit: string; upload: string; replace: string; remove: string; cropTitle: (name: string) => string; cropHint: string; /** Names the square the image is moved in, for assistive technology. */ cropArea: string; zoom: string; save: string; /** When the browser can't read the chosen file as an image. */ unreadable: string; /** When saving fails without a message of its own. */ failed: string; }; oneTimeCode: { /** Names each box after the first, which the field's label names. */ character: (position: number, length: number) => string; }; theme: { /** Names the light, dark or system choice. */ appearance: string; light: string; dark: string; system: string; /** Names the choice of which mode's colors the controls edit. */ editing: string; presets: string; /** The background a theme is generated from. */ base: string; accent: string; /** Exchanges the background and the accent. */ swap: string; contrast: string; /** Under the contrast slider. */ contrastHelp: string; /** The switch that gives the sidebar its own colors. */ customSidebar: string; sidebarBase: string; sidebarAccent: string; code: string; codeStyle: (style: 'balanced' | 'vivid' | 'muted' | 'mono') => string; copy: string; /** The thing a copy toast names. */ copied: string; import: string; importLabel: string; importPlaceholder: string; apply: string; reset: string; /** Why a pasted theme was refused. */ importError: (code: 'json' | 'version' | 'shape' | 'color' | 'range', path: string) => string; preview: string; previewNav: readonly string[]; previewHeading: string; previewBody: string; previewMuted: string; previewLink: string; previewButton: string; previewSearch: string; previewPassed: string; previewFailed: string; }; logviewer: { error: string; warning: string; notice: string; top: string; clearSelection: string; copyLines: (count: number) => string; copyAll: string; hideDebug: string; showDebug: string; filterLogs: string; beginningOfLog: string; loadingOlderEntries: string; loadOlderEntries: string; timeRange: string; timeRangeActive: string; timeRangeOn: string; filterByTimeRange: string; timeRangeHelp: string; timeRangeFrom: string; timeRangeTo: string; invalidStartTime: string; invalidEndTime: string; endBeforeStart: string; endInFuture: string; follow: string; following: string; /** A line number's name: it selects the line for copying. */ selectLine: (line: number) => string; }; dag: { workflow: string; run: string; status: string; runtime: string; submitted: string; resetView: string; previousGraph: string; nextGraph: string; matrixOf: (name: string) => string; jobCount: (count: number) => string; loadingLogs: string; noLogFound: string; logLoadFailed: string; loadingSummary: string; hasSummary: string; stepOf: (position: number, count: number) => string; summaryLoadFailed: string; summaryTab: string; /** Names the cards under the graph, one for each step that wrote a summary. */ stepSummaries: string; logsTab: string; scriptTab: string; openSubworkflow: string; statusLabel: (status: string) => string; statusReason: (reason: string | undefined | null) => string | undefined; /** A run's general log, beside its summary. */ generalLog: string; previousStep: string; nextStep: string; /** The view toggle: the graph, and the list of jobs and steps. */ graphView: string; treeView: string; summary: string; dependsOn: string; subworkflow: string; annotations: string; annotationType: { error: string; warning: string; notice: string; }; /** Names the annotations' toggle for a screen reader, in place of its count badges, such as * "Annotations: 2 errors, 1 warning". It starts with `annotations`, the toggle's visible text. */ annotationsLabel: (counts: { error: number; warning: number; notice: number; }) => string; /** Where an annotation came from, under its message. */ annotationSource: (job: string, step: string) => string; /** A step without a name, numbered from 0 as the run reports it. */ stepNumber: (index: number) => string; /** How many warnings: the title of a run's list of warnings, and the name of the mark on a job * or step they're about, such as "2 warnings". */ warningCount: (count: number) => string; /** The link from a warning to the page that explains it, when it has one. */ warningAbout: string; }; jobActions: { openSubworkflowLogs: string; openOriginalWorkflow: string; openInNewGraph: string; }; /** The visual editor's text a host translates; the editor fills in the rest in English. */ graphEditor: Partial; /** The access drawer's text, over its English defaults. */ access: Partial; inputsEditor: Partial; /** The file explorer's text a host translates; it fills in the rest in English. */ fileExplorer: Overrides; form: { /** Under a field the form needs a value in. */ required: string; /** Under a field the server rejected without saying why. */ checkValue: string; invalidDuration: string; durationOutOfRange: (min: string, max: string) => string; durationBelowMin: (min: string) => string; /** A repeated wizard page's copy, numbered from 1. */ copyTitle: (title: string, number: number) => string; addCopy: (title: string) => string; removeCopy: (title: string) => string; /** A wizard's steps: what its list of them is called. */ steps: string; /** Where a wizard is, numbered from 1. */ stepOf: (number: number, total: number) => string; /** The button that opens the list of a wizard's steps. */ allSteps: string; /** A step before the current one. */ stepDone: string; /** A step with a value to fix. */ stepNeedsAttention: string; /** A wizard's last button, unless its config names its own. */ runWizard: string; fixErrorsToContinue: string; stepFailed: string; /** A step's name in the list of steps, numbered from 1. */ stepLabel: (number: number, title: string) => string; }; /** A compact relative time ("5m", "3h"), which reads as a date after a week. */ time: { now: string; minutes: (n: number) => string; hours: (n: number) => string; days: (n: number) => string; /** @deprecated A compact time reads as a date once it is a week away, so no longer counts in years. */ years: (n: number) => string; /** A compact time still to come, such as "in 5m"; `label` is one of the counts above. */ inFuture: (label: string) => string; /** A compact time a week or more away, such as "Sep 4"; by default with the year only while * it isn't this year. `locale` is UIProvider's, when the host gives one. */ date: (date: Date, locale?: string) => string; }; /** Key names in a shortcut, as keycaps carry them off an Apple keyboard, such as * "Strg" for Control in German. An Apple keyboard shows its symbols: ⌘ ⌥ ⇧ ⌃. */ keys: { ctrl: string; alt: string; shift: string; meta: string; enter: string; escape: string; space: string; tab: string; backspace: string; delete: string; }; /** A run's status in words, beside its icon: one ended in an error or a fault reads as * failed, and one skipped after a failure as skipped. */ runStatus: { queued: string; running: string; canceling: string; completed: string; warning: string; failed: string; canceled: string; skipped: string; notRun: string; }; chart: { /** The row under a chart's tooltip that sums its series. */ total: string; /** The series that sums a chart's series past the eighth. */ other: string; }; list: { moreActions: string; /** A toolbar toggle's name in the overflow menu, where a row can't be pressed. */ labelName: string; labelEmail: string; labelUsername: string; labelUid: string; labelId: string; labelUrl: string; couldNotLoad: (noun: string) => string; /** What `ListError` says under its heading when the host gives no message of its own. */ couldNotLoadHint: string; /** What `ListError` names when the host gives no noun. */ data: string; /** A list's size, as `ListCount` shows it; `count` is formatted and `noun` agrees with it. */ count: (count: string, noun: string) => string; /** How many rows a filter left, of how many. */ matchCount: (matches: string, total: string, nounPlural: string) => string; displayOptions: string; /** Names the Display menu's switch between a list's layouts, such as rows and a board. */ layout: string; grouping: string; /** The Display menu's line that collapses or expands every group the list shows. */ groups: string; ordering: string; orderDefault: string; orderFavorites: string; ascending: string; descending: string; /** On a phone, where a list's other columns stack under its name, the header's control that * shows and changes the order, as Display options' Ordering does. `order` is the order's * label, such as a column's. It shows without `direction`, which its arrow shows; a screen * reader hears it with one. */ sortedBy: (order: string, direction?: 'ascending' | 'descending') => string; /** `sortedBy` for the list's own default order, as one phrase, such as "Default order", * rather than `orderDefault` set into `sortedBy` as if it were a column's name. */ sortedByDefault: (direction?: 'ascending' | 'descending') => string; columnHeaders: string; showColumnHeaders: string; /** The header checkbox that ticks every row, or clears them all. */ selectAll: string; showActions: string; showRowActions: string; alwaysShowActions: string; alwaysShowRowActions: string; displayProperties: string; pinnedActions: string; pinnedActionsHelp: string; none: string; searchOptions: string; /** `atLeast`: `total` is a floor, because the count was capped and more rows follow. */ pager: (start: number, end: number, total: number, atLeast: boolean) => string; perPage: string; paginationPrevious: string; paginationNext: string; pagination: string; /** A numbered page's name in `Pagination`, counting from 1. */ page: (page: number) => string; /** Where the page sits, for `Pagination` too narrow for page numbers: it shows "5 / 12". */ pageOfTotal: (page: number, total: number) => string; removeSearchTerm: (term: string) => string; /** The search button's name while a query it holds narrows the list, its field closed. */ searchActive: (label: string) => string; }; /** The chip row of a list's active filters, its Filter menu and its pickers. Field and option * labels come from the host's fields, already translated. */ filters: { /** The button at the end of the chip row that adds one, and the Filter menu's heading. */ addFilter: string; /** Names the Filter menu's search over the fields. */ searchFields: string; /** Names the chip row. */ activeFilters: string; /** The toolbar's Filter button, saying how many filters are on, since its dot is only seen. */ filterButton: (count: number) => string; /** A required or pinned filter's value while it has none. */ any: string; /** The value part of a chip just added, until a value is chosen. */ pending: string; /** A condition, worded for how many values follow it: "is" / "is any of". */ operator: (op: FilterOperator, count: number) => string; /** After the first values shown in a chip: "+3". */ more: (count: number) => string; /** At phone width, the chip that opens every filter in a sheet: "+3 filters". */ overflow: (count: number) => string; /** The sheet's title. */ sheetTitle: string; /** Names a chip's remove button. */ remove: (field: string) => string; /** Names a chip, read as a sentence. */ chip: (field: string, operator: string, values: string) => string; /** Names a chip's field part, which picks another field. */ changeField: (field: string) => string; /** Names a chip's condition part. */ changeOperator: (operator: string) => string; /** Names a chip's value part. */ changeValue: (values: string) => string; /** Joins the values a chip lists. */ list: (values: string[]) => string; /** A relative date preset: `today`, `month` (so far), `year` (so far), `all` (every date), * any `-Nd` (the last N days) or any `-Nh` (the last N hours). */ datePreset: (preset: string) => string; /** At phone width, the toggle that shows a quick filter's other options: "+3 more". */ quickMore: (count: number) => string; /** The date picker's entry that picks days on a calendar. */ customDate: string; /** Two days a filter spans. */ between: (from: string, to: string) => string; /** A day in a chip; by default without the year while it is this year. `locale` is * UIProvider's, when the host gives one. */ formatDate: (date: Date, locale?: string) => string; /** The text picker's hint. */ textPlaceholder: string; /** A yes-or-no filter's values. */ yes: string; no: string; }; /** `ErrorPage`'s words: the way back, and a title and description for each kind of error. */ errorPage: { /** Back through the browser's history. */ back: string; /** Back to the app's start, when there is no history to go back through. */ home: string; /** The title when nothing more is known about the error. */ error: string; /** The title for a status no kind covers, such as 418. */ statusTitle: (status: string) => string; titles: Record; descriptions: Record; }; } /** What went wrong, which picks an `ErrorPage`'s words: `notFound` (404), * `forbidden` (403), `unauthenticated` (401), `unavailable` (502, 503 and * 504), `server` (any other 5xx), and `network` for a request that never * reached the server. */ export type ErrorPageKind = 'notFound' | 'forbidden' | 'unauthenticated' | 'unavailable' | 'server' | 'network'; /** What a host passes to translate the strings: any group, any string in it, at any depth. * A string it leaves out stays in English. */ export type UIStringOverrides = Overrides; type Overrides = { [K in keyof T]?: T[K] extends (...args: never[]) => unknown ? T[K] : T[K] extends readonly unknown[] ? T[K] : T[K] extends object ? Overrides : T[K]; }; export declare function mergeStrings(defaults: T, overrides: unknown): T; export declare function useStrings(): UIStrings; /** UIProvider's `strings` and `locale` alone, for a host that can't render UIProvider, such as one * without a DOM. Overrides lay over the English defaults, not over an outer provider's strings; * without a `locale`, an outer provider's stays. */ export declare function UIStringsProvider({ strings, locale, children, }: { strings?: UIStringOverrides | undefined; /** The locale `useLocale()` gives, such as `de-DE`, as UIProvider's `locale`. */ locale?: string | undefined; children: ReactNode; }): import("react").JSX.Element; export {};