@twentyfirstmedia/ui-core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/admin.d.ts.map +1 -1
- package/dist/components/admin.js +95 -71
- package/dist/components/admin.js.map +1 -1
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +49 -35
- package/dist/components/agents.js.map +1 -1
- package/dist/components/app-chrome.d.ts.map +1 -1
- package/dist/components/app-chrome.js +6 -2
- package/dist/components/app-chrome.js.map +1 -1
- package/dist/components/approvals.d.ts.map +1 -1
- package/dist/components/approvals.js +22 -18
- package/dist/components/approvals.js.map +1 -1
- package/dist/components/building-blocks.d.ts.map +1 -1
- package/dist/components/building-blocks.js +6 -2
- package/dist/components/building-blocks.js.map +1 -1
- package/dist/components/charts.d.ts.map +1 -1
- package/dist/components/charts.js +20 -10
- package/dist/components/charts.js.map +1 -1
- package/dist/components/chat.d.ts.map +1 -1
- package/dist/components/chat.js +31 -19
- package/dist/components/chat.js.map +1 -1
- package/dist/components/commerce.d.ts +2 -2
- package/dist/components/commerce.d.ts.map +1 -1
- package/dist/components/commerce.js +45 -31
- package/dist/components/commerce.js.map +1 -1
- package/dist/components/data-display.d.ts +5 -9
- package/dist/components/data-display.d.ts.map +1 -1
- package/dist/components/data-display.js +34 -35
- package/dist/components/data-display.js.map +1 -1
- package/dist/components/data-table.d.ts.map +1 -1
- package/dist/components/data-table.js +15 -10
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/developer.d.ts.map +1 -1
- package/dist/components/developer.js +20 -11
- package/dist/components/developer.js.map +1 -1
- package/dist/components/feedback.d.ts.map +1 -1
- package/dist/components/feedback.js +12 -6
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/form.d.ts +2 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +12 -9
- package/dist/components/form.js.map +1 -1
- package/dist/components/forms.d.ts +2 -1
- package/dist/components/forms.d.ts.map +1 -1
- package/dist/components/forms.js +92 -42
- package/dist/components/forms.js.map +1 -1
- package/dist/components/foundation.d.ts +5 -2
- package/dist/components/foundation.d.ts.map +1 -1
- package/dist/components/foundation.js +15 -12
- package/dist/components/foundation.js.map +1 -1
- package/dist/components/inputs.d.ts.map +1 -1
- package/dist/components/inputs.js +3 -1
- package/dist/components/inputs.js.map +1 -1
- package/dist/components/mail.d.ts.map +1 -1
- package/dist/components/mail.js +15 -10
- package/dist/components/mail.js.map +1 -1
- package/dist/components/media.d.ts.map +1 -1
- package/dist/components/media.js +39 -18
- package/dist/components/media.js.map +1 -1
- package/dist/components/navigation.d.ts.map +1 -1
- package/dist/components/navigation.js +21 -9
- package/dist/components/navigation.js.map +1 -1
- package/dist/components/operations.d.ts.map +1 -1
- package/dist/components/operations.js +37 -27
- package/dist/components/operations.js.map +1 -1
- package/dist/components/previews.d.ts.map +1 -1
- package/dist/components/previews.js +14 -10
- package/dist/components/previews.js.map +1 -1
- package/dist/components/primitives.d.ts.map +1 -1
- package/dist/components/primitives.js +4 -1
- package/dist/components/primitives.js.map +1 -1
- package/dist/components/real-estate.d.ts.map +1 -1
- package/dist/components/real-estate.js +43 -28
- package/dist/components/real-estate.js.map +1 -1
- package/dist/components/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor.js +18 -15
- package/dist/components/rich-text-editor.js.map +1 -1
- package/dist/components/select-menu.d.ts.map +1 -1
- package/dist/components/select-menu.js +4 -1
- package/dist/components/select-menu.js.map +1 -1
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +8 -3
- package/dist/components/shell.js.map +1 -1
- package/dist/components/site.d.ts.map +1 -1
- package/dist/components/site.js +17 -13
- package/dist/components/site.js.map +1 -1
- package/dist/components/types.d.ts +102 -3
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/workspace.d.ts.map +1 -1
- package/dist/components/workspace.js +50 -34
- package/dist/components/workspace.js.map +1 -1
- package/dist/context.d.ts +39 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +76 -0
- package/dist/context.js.map +1 -0
- package/dist/format.d.ts +33 -6
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +75 -10
- package/dist/format.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +18 -11
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +11 -18
- package/dist/provider.js.map +1 -1
- package/dist/strings.d.ts +503 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/strings.js +537 -0
- package/dist/strings.js.map +1 -0
- package/package.json +1 -1
- package/src/components/admin.tsx +117 -93
- package/src/components/agents.tsx +55 -41
- package/src/components/app-chrome.tsx +6 -2
- package/src/components/approvals.tsx +26 -22
- package/src/components/building-blocks.tsx +6 -2
- package/src/components/charts.tsx +21 -11
- package/src/components/chat.tsx +45 -35
- package/src/components/commerce.tsx +61 -53
- package/src/components/data-display.tsx +38 -45
- package/src/components/data-table.tsx +20 -15
- package/src/components/developer.tsx +26 -15
- package/src/components/feedback.tsx +19 -7
- package/src/components/form.tsx +17 -9
- package/src/components/forms.tsx +131 -53
- package/src/components/foundation.tsx +23 -36
- package/src/components/inputs.tsx +4 -2
- package/src/components/mail.tsx +16 -11
- package/src/components/media.tsx +64 -21
- package/src/components/navigation.tsx +25 -13
- package/src/components/operations.tsx +40 -32
- package/src/components/previews.tsx +17 -15
- package/src/components/primitives.tsx +8 -5
- package/src/components/real-estate.tsx +55 -35
- package/src/components/rich-text-editor.tsx +20 -17
- package/src/components/select-menu.tsx +5 -2
- package/src/components/shell.tsx +8 -3
- package/src/components/site.tsx +18 -14
- package/src/components/types.ts +111 -3
- package/src/components/workspace.tsx +79 -60
- package/src/context.ts +112 -0
- package/src/format.ts +108 -15
- package/src/index.ts +43 -0
- package/src/provider.tsx +36 -40
- package/src/strings.ts +1500 -0
package/src/strings.ts
ADDED
|
@@ -0,0 +1,1500 @@
|
|
|
1
|
+
import { Fragment, createElement, type ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Every built-in string of the kits: accessible names, button texts, placeholders and status
|
|
5
|
+
* words that a component shows when no prop sets them. English by default. Apps replace any of
|
|
6
|
+
* them with `<UIProvider messages={{ … }}>` (partial); components read them with `useUIStrings()`.
|
|
7
|
+
* Texts with a value in them are functions, so word order stays free (`selectedCount(3)`).
|
|
8
|
+
*/
|
|
9
|
+
export interface UIStrings {
|
|
10
|
+
/* Shared */
|
|
11
|
+
close: string;
|
|
12
|
+
cancel: string;
|
|
13
|
+
confirm: string;
|
|
14
|
+
send: string;
|
|
15
|
+
stop: string;
|
|
16
|
+
copy: string;
|
|
17
|
+
copied: string;
|
|
18
|
+
dismiss: string;
|
|
19
|
+
remove: string;
|
|
20
|
+
/** "Remove {name}", on remove buttons next to a named item. */
|
|
21
|
+
removeItem: (name: string) => string;
|
|
22
|
+
clear: string;
|
|
23
|
+
search: string;
|
|
24
|
+
edit: string;
|
|
25
|
+
save: string;
|
|
26
|
+
apply: string;
|
|
27
|
+
undo: string;
|
|
28
|
+
redo: string;
|
|
29
|
+
loading: string;
|
|
30
|
+
thinking: string;
|
|
31
|
+
paused: string;
|
|
32
|
+
actions: string;
|
|
33
|
+
settings: string;
|
|
34
|
+
status: string;
|
|
35
|
+
preview: string;
|
|
36
|
+
expand: string;
|
|
37
|
+
results: string;
|
|
38
|
+
selectPlaceholder: string;
|
|
39
|
+
noMatches: string;
|
|
40
|
+
/* Chat: CodeBlock, ChatMessage, ToolCall, Reasoning, ModelPicker, Composer */
|
|
41
|
+
copyCode: string;
|
|
42
|
+
/** TypingDots. */
|
|
43
|
+
working: string;
|
|
44
|
+
/** Name on the user's own chat messages. */
|
|
45
|
+
you: string;
|
|
46
|
+
copyReply: string;
|
|
47
|
+
regenerate: string;
|
|
48
|
+
regenerateReply: string;
|
|
49
|
+
goodReply: string;
|
|
50
|
+
badReply: string;
|
|
51
|
+
toolInput: string;
|
|
52
|
+
toolResult: string;
|
|
53
|
+
toolError: string;
|
|
54
|
+
thoughtFor: (duration?: string) => string;
|
|
55
|
+
model: string;
|
|
56
|
+
commands: string;
|
|
57
|
+
messagePlaceholder: string;
|
|
58
|
+
message: string;
|
|
59
|
+
attachFiles: string;
|
|
60
|
+
composerHint: string;
|
|
61
|
+
/* Agents: AgentStatus, RunTrace, UsageMeter */
|
|
62
|
+
/** Display text per agent status (the status values stay English). */
|
|
63
|
+
agentStatus: Record<string, string>;
|
|
64
|
+
step: string;
|
|
65
|
+
timeline: (total: string) => string;
|
|
66
|
+
stepRunning: string;
|
|
67
|
+
context: string;
|
|
68
|
+
/* Data: FilterBar, DataTable */
|
|
69
|
+
removeFilter: (filter: string) => string;
|
|
70
|
+
/** FilterBar's add-filter chip. */
|
|
71
|
+
addFilter: string;
|
|
72
|
+
clearAll: string;
|
|
73
|
+
back: string;
|
|
74
|
+
columns: string;
|
|
75
|
+
chooseColumns: string;
|
|
76
|
+
selectAllRows: string;
|
|
77
|
+
selectRow: string;
|
|
78
|
+
expandRow: string;
|
|
79
|
+
collapseRow: string;
|
|
80
|
+
nothingMatchesFilters: string;
|
|
81
|
+
bulkActions: string;
|
|
82
|
+
/** "{n} selected"; `formatted` is `n` in the provider locale. */
|
|
83
|
+
selectedCount: (n: number, formatted?: string) => string;
|
|
84
|
+
/* Media: ImageVariants, Gallery, BeforeAfter */
|
|
85
|
+
variants: string;
|
|
86
|
+
images: string;
|
|
87
|
+
imageN: (n: number) => string;
|
|
88
|
+
previousImage: string;
|
|
89
|
+
nextImage: string;
|
|
90
|
+
fullScreen: string;
|
|
91
|
+
before: string;
|
|
92
|
+
after: string;
|
|
93
|
+
compareBeforeAfter: string;
|
|
94
|
+
/* Feedback: ConfirmDialog */
|
|
95
|
+
/** "Type {text} to confirm"; `text` is the highlighted word to type. */
|
|
96
|
+
typeToConfirm: (text: ReactNode) => ReactNode;
|
|
97
|
+
/* Navigation: Breadcrumb, Pagination, NavigationMenu, Sidebar, AppShell */
|
|
98
|
+
breadcrumb: string;
|
|
99
|
+
pagination: string;
|
|
100
|
+
previousPage: string;
|
|
101
|
+
nextPage: string;
|
|
102
|
+
/** Accessible name of main navigation landmarks. */
|
|
103
|
+
mainNavigation: string;
|
|
104
|
+
sidebar: string;
|
|
105
|
+
expandSidebar: string;
|
|
106
|
+
collapseSidebar: string;
|
|
107
|
+
/* Carousel */
|
|
108
|
+
/** aria-roledescription of a carousel slide. */
|
|
109
|
+
slide: string;
|
|
110
|
+
slideOf: (n: number, total: number) => string;
|
|
111
|
+
previousSlide: string;
|
|
112
|
+
nextSlide: string;
|
|
113
|
+
goToSlide: (n: number) => string;
|
|
114
|
+
/* Forms: Combobox, TagInput, Calendar, DatePicker, NumberInput, OtpInput, FileDrop */
|
|
115
|
+
createOption: (text: string) => string;
|
|
116
|
+
tagPlaceholder: string;
|
|
117
|
+
previousMonth: string;
|
|
118
|
+
nextMonth: string;
|
|
119
|
+
lastDays: (n: number) => string;
|
|
120
|
+
thisYear: string;
|
|
121
|
+
pickDate: string;
|
|
122
|
+
pickRange: string;
|
|
123
|
+
decrease: string;
|
|
124
|
+
increase: string;
|
|
125
|
+
verificationCode: string;
|
|
126
|
+
digitN: (n: number) => string;
|
|
127
|
+
dropFiles: string;
|
|
128
|
+
dropToUpload: string;
|
|
129
|
+
dropHint: string;
|
|
130
|
+
uploaded: (size: string) => string;
|
|
131
|
+
cancelUpload: string;
|
|
132
|
+
/* Form validation */
|
|
133
|
+
fieldRequired: string;
|
|
134
|
+
invalidEmail: string;
|
|
135
|
+
minLength: (n: number) => string;
|
|
136
|
+
maxLength: (n: number) => string;
|
|
137
|
+
minValue: (n: number) => string;
|
|
138
|
+
maxValue: (n: number) => string;
|
|
139
|
+
invalidFormat: string;
|
|
140
|
+
/* Data display: EventCard, ListRow, FileRow, KanbanColumn, Progress */
|
|
141
|
+
open: string;
|
|
142
|
+
unread: string;
|
|
143
|
+
downloadItem: (name: string) => string;
|
|
144
|
+
columnOptions: string;
|
|
145
|
+
addCard: string;
|
|
146
|
+
progress: string;
|
|
147
|
+
/* Real estate: ListingCard, ResultsToolbar, SavedSearch, ValuationCard, EnergyClass */
|
|
148
|
+
/** Listing facts; `rooms` is the formatted count. */
|
|
149
|
+
rooms: (rooms: string, n: number) => string;
|
|
150
|
+
priceOnRequest: string;
|
|
151
|
+
perMonth: string;
|
|
152
|
+
/** Badge on new listings. */
|
|
153
|
+
isNew: string;
|
|
154
|
+
select: string;
|
|
155
|
+
removeFromSaved: string;
|
|
156
|
+
privateSeller: string;
|
|
157
|
+
agent: string;
|
|
158
|
+
phoneAvailable: string;
|
|
159
|
+
selectAll: string;
|
|
160
|
+
deselectAll: string;
|
|
161
|
+
foundCount: (n: number, formatted: string) => string;
|
|
162
|
+
workingEllipsis: string;
|
|
163
|
+
sort: string;
|
|
164
|
+
view: string;
|
|
165
|
+
viewGrid: string;
|
|
166
|
+
viewMap: string;
|
|
167
|
+
viewList: string;
|
|
168
|
+
checkedAt: (when: string) => string;
|
|
169
|
+
enabled: string;
|
|
170
|
+
showResults: string;
|
|
171
|
+
estimatedValue: string;
|
|
172
|
+
highConfidence: string;
|
|
173
|
+
mediumConfidence: string;
|
|
174
|
+
lowConfidence: string;
|
|
175
|
+
range: (low: string, high: string) => string;
|
|
176
|
+
askingPrice: string;
|
|
177
|
+
energyClass: (value: string) => string;
|
|
178
|
+
/* Shell: SideRail, Dock */
|
|
179
|
+
tools: string;
|
|
180
|
+
quickActions: string;
|
|
181
|
+
/* Site: ChatLauncher, CookieConsent */
|
|
182
|
+
assistant: string;
|
|
183
|
+
openAssistant: string;
|
|
184
|
+
closeAssistant: string;
|
|
185
|
+
privacySettings: string;
|
|
186
|
+
cookieText: string;
|
|
187
|
+
alwaysOn: string;
|
|
188
|
+
saveChoice: string;
|
|
189
|
+
onlyNecessary: string;
|
|
190
|
+
acceptAll: string;
|
|
191
|
+
/* App chrome: ModuleRegistry */
|
|
192
|
+
coreModule: string;
|
|
193
|
+
/* Charts */
|
|
194
|
+
barChart: string;
|
|
195
|
+
lineChart: string;
|
|
196
|
+
trend: string;
|
|
197
|
+
breakdown: string;
|
|
198
|
+
stackedBarChart: string;
|
|
199
|
+
areaChart: string;
|
|
200
|
+
heatmap: string;
|
|
201
|
+
less: string;
|
|
202
|
+
more: string;
|
|
203
|
+
gauge: string;
|
|
204
|
+
gaugeValue: (label: string, value: number, max: number) => string;
|
|
205
|
+
/* SelectMenu */
|
|
206
|
+
options: string;
|
|
207
|
+
/* ResizablePanels */
|
|
208
|
+
resizePanel: (label: string | undefined, n: number) => string;
|
|
209
|
+
/* RichTextEditor */
|
|
210
|
+
bold: string;
|
|
211
|
+
italic: string;
|
|
212
|
+
underline: string;
|
|
213
|
+
heading: string;
|
|
214
|
+
quote: string;
|
|
215
|
+
bulletedList: string;
|
|
216
|
+
numberedList: string;
|
|
217
|
+
link: string;
|
|
218
|
+
formatting: string;
|
|
219
|
+
linkAddress: string;
|
|
220
|
+
removeLink: string;
|
|
221
|
+
insertField: string;
|
|
222
|
+
/** Accessible name of the editor area without a label. */
|
|
223
|
+
text: string;
|
|
224
|
+
/* Agents: AgentCard, ChatList, FeedbackRating, DailyBriefing, BudgetStop, MemoryViewer, OverrideDiff, TriggerList, VoiceMode */
|
|
225
|
+
chatWith: (name: string) => string;
|
|
226
|
+
costToday: string;
|
|
227
|
+
lastAction: string;
|
|
228
|
+
searchChats: string;
|
|
229
|
+
noChatsMatch: string;
|
|
230
|
+
nothingFound: string;
|
|
231
|
+
thanksNoted: string;
|
|
232
|
+
good: string;
|
|
233
|
+
notGood: string;
|
|
234
|
+
whatShouldBeDifferent: string;
|
|
235
|
+
needsYou: string;
|
|
236
|
+
suggestions: string;
|
|
237
|
+
budgetUsedUp: string;
|
|
238
|
+
raiseBudget: string;
|
|
239
|
+
budgetText: string;
|
|
240
|
+
spentThisMonth: string;
|
|
241
|
+
stillRunning: string;
|
|
242
|
+
nothing: string;
|
|
243
|
+
searchMemory: string;
|
|
244
|
+
nothingRemembered: string;
|
|
245
|
+
forget: string;
|
|
246
|
+
discardOverride: string;
|
|
247
|
+
moveToCode: string;
|
|
248
|
+
runNow: string;
|
|
249
|
+
listening: string;
|
|
250
|
+
speaking: string;
|
|
251
|
+
mute: string;
|
|
252
|
+
unmute: string;
|
|
253
|
+
endConversation: string;
|
|
254
|
+
/* Approvals: ApprovalCard, ApprovalInbox */
|
|
255
|
+
/** Option A. */
|
|
256
|
+
approveAsShown: string;
|
|
257
|
+
/** Option B. */
|
|
258
|
+
approveWithChange: string;
|
|
259
|
+
whatShouldChange: string;
|
|
260
|
+
/** Option C. */
|
|
261
|
+
discard: string;
|
|
262
|
+
/** Option D. */
|
|
263
|
+
differentInstruction: string;
|
|
264
|
+
whatInstead: string;
|
|
265
|
+
approvalNeeded: string;
|
|
266
|
+
approvals: string;
|
|
267
|
+
nothingWaiting: string;
|
|
268
|
+
/** Badge text per risk family. */
|
|
269
|
+
riskFamily: Record<"money" | "infra" | "comms" | "marketing" | "apps" | "legal", string>;
|
|
270
|
+
/* Developer: SecretField, MoneyInput, ShortcutsOverlay, UptimeBar */
|
|
271
|
+
hide: string;
|
|
272
|
+
reveal: string;
|
|
273
|
+
rotate: string;
|
|
274
|
+
vatRate: string;
|
|
275
|
+
gross: (amount: string) => string;
|
|
276
|
+
keyboardShortcuts: string;
|
|
277
|
+
daysAgo: (n: number) => string;
|
|
278
|
+
/* Operations: ConnectionBanner, ServerCard, DeployPipeline, DnsRecordTable, DomainList, MailAuthStatus, LedgerTable, PnLStatement, ReceiptSuggestion */
|
|
279
|
+
offline: string;
|
|
280
|
+
connectionLost: (seconds?: number) => string;
|
|
281
|
+
retryNow: string;
|
|
282
|
+
unknown: string;
|
|
283
|
+
deployPipeline: string;
|
|
284
|
+
colType: string;
|
|
285
|
+
colName: string;
|
|
286
|
+
colContent: string;
|
|
287
|
+
colProxy: string;
|
|
288
|
+
proxied: string;
|
|
289
|
+
dnsOnly: string;
|
|
290
|
+
expires: string;
|
|
291
|
+
daysCount: (n: number) => string;
|
|
292
|
+
domain: string;
|
|
293
|
+
colDate: string;
|
|
294
|
+
colRef: string;
|
|
295
|
+
colDescription: string;
|
|
296
|
+
colCategory: string;
|
|
297
|
+
colProject: string;
|
|
298
|
+
net: string;
|
|
299
|
+
vat: string;
|
|
300
|
+
grossLabel: string;
|
|
301
|
+
suggestedBy: (who: string) => string;
|
|
302
|
+
total: string;
|
|
303
|
+
notAReceipt: string;
|
|
304
|
+
bookIt: string;
|
|
305
|
+
/* Mail: AccountSwitcher, SignatureEditor */
|
|
306
|
+
allInboxes: string;
|
|
307
|
+
addressCount: (n: number) => string;
|
|
308
|
+
findAddress: string;
|
|
309
|
+
role: string;
|
|
310
|
+
company: string;
|
|
311
|
+
phone: string;
|
|
312
|
+
website: string;
|
|
313
|
+
/* Previews: EmailPreview, SearchAdPreview */
|
|
314
|
+
noSubject: string;
|
|
315
|
+
device: string;
|
|
316
|
+
desktop: string;
|
|
317
|
+
mobile: string;
|
|
318
|
+
emailPreview: string;
|
|
319
|
+
sponsored: string;
|
|
320
|
+
yourHeadline: string;
|
|
321
|
+
yourDescription: string;
|
|
322
|
+
/** Warning when a search ad text is too long. */
|
|
323
|
+
adTooLong: (
|
|
324
|
+
field: "headlines" | "descriptions" | "paths",
|
|
325
|
+
n: number,
|
|
326
|
+
length: number,
|
|
327
|
+
limit: number,
|
|
328
|
+
) => string;
|
|
329
|
+
/* Commerce: Rating, StockBadge, ProductCard, VariantPicker, CartLine, OrderSummary, CheckoutSteps, OrderTimeline, PlanCard */
|
|
330
|
+
ratingLabel: (value: string, count?: number) => string;
|
|
331
|
+
outOfStock: string;
|
|
332
|
+
lowStock: (left: number) => string;
|
|
333
|
+
inStock: string;
|
|
334
|
+
inStockCount: (n: number) => string;
|
|
335
|
+
soldOut: string;
|
|
336
|
+
addToCart: (name: string) => string;
|
|
337
|
+
variantSoldOut: (variant: string) => string;
|
|
338
|
+
oneLess: string;
|
|
339
|
+
oneMore: string;
|
|
340
|
+
orderSummary: string;
|
|
341
|
+
freeShippingIn: (amount: ReactNode) => ReactNode;
|
|
342
|
+
invalidCode: string;
|
|
343
|
+
discountCode: string;
|
|
344
|
+
subtotal: string;
|
|
345
|
+
discount: string;
|
|
346
|
+
shipping: string;
|
|
347
|
+
free: string;
|
|
348
|
+
inclVat: (rate: string) => string;
|
|
349
|
+
/** Default CheckoutSteps. */
|
|
350
|
+
checkoutSteps: string[];
|
|
351
|
+
checkoutProgress: string;
|
|
352
|
+
/** Display text per order status (the status values stay English). */
|
|
353
|
+
orderStatus: Record<string, string>;
|
|
354
|
+
mostPopular: string;
|
|
355
|
+
letsTalk: string;
|
|
356
|
+
perSeatMonth: string;
|
|
357
|
+
currentPlan: string;
|
|
358
|
+
choosePlan: (name: string) => string;
|
|
359
|
+
/* Workspace: SubNav, CommandPalette, NotificationList, Flow, FileCard, Wizard, PermissionMatrix, InvoicePreview, TransactionRow */
|
|
360
|
+
sectionPages: (section?: string) => string;
|
|
361
|
+
commandPalette: string;
|
|
362
|
+
paletteSearchPlaceholder: string;
|
|
363
|
+
escKey: string;
|
|
364
|
+
searching: string;
|
|
365
|
+
nothingMatches: (query: string) => string;
|
|
366
|
+
paletteMove: string;
|
|
367
|
+
paletteOpen: string;
|
|
368
|
+
paletteAnywhere: string;
|
|
369
|
+
notifications: string;
|
|
370
|
+
markAllRead: string;
|
|
371
|
+
all: string;
|
|
372
|
+
allCaughtUp: string;
|
|
373
|
+
/** Flow step kinds. */
|
|
374
|
+
flowStep: Record<"trigger" | "condition" | "agent" | "approval" | "action", string>;
|
|
375
|
+
flowRunning: string;
|
|
376
|
+
waitingForYou: string;
|
|
377
|
+
approve: string;
|
|
378
|
+
reject: string;
|
|
379
|
+
shared: string;
|
|
380
|
+
setup: string;
|
|
381
|
+
stepOf: (n: number, total: number) => string;
|
|
382
|
+
/** PermissionMatrix levels 0–3. */
|
|
383
|
+
permissionLevels: [string, string, string, string];
|
|
384
|
+
memberCount: (n: number) => string;
|
|
385
|
+
invoice: string;
|
|
386
|
+
billTo: string;
|
|
387
|
+
issued: string;
|
|
388
|
+
due: string;
|
|
389
|
+
untitledLine: string;
|
|
390
|
+
vatAt: (rate: string) => string;
|
|
391
|
+
totalDue: string;
|
|
392
|
+
matchedTo: (ref: string) => string;
|
|
393
|
+
matched: string;
|
|
394
|
+
match: string;
|
|
395
|
+
noSuggestion: string;
|
|
396
|
+
accept: string;
|
|
397
|
+
/* Admin: RangeSlider, LiveFeed, MapView, BalanceCard, WebhookEndpoint, BackupList, BlockList, ReviewCard, CouponCard, LocaleField, LocaleSwitcher, ExportDialog, TwoFactorSetup, ColorField */
|
|
398
|
+
minimum: string;
|
|
399
|
+
maximum: string;
|
|
400
|
+
min: string;
|
|
401
|
+
max: string;
|
|
402
|
+
live: string;
|
|
403
|
+
newCount: (n: number) => string;
|
|
404
|
+
resume: string;
|
|
405
|
+
pause: string;
|
|
406
|
+
waitingForEvents: string;
|
|
407
|
+
balanceEmpty: string;
|
|
408
|
+
balanceLow: string;
|
|
409
|
+
balanceOk: string;
|
|
410
|
+
perDay: (amount: string) => string;
|
|
411
|
+
lastsAbout: (days: number) => string;
|
|
412
|
+
warnsBelow: (amount: string) => string;
|
|
413
|
+
topUp: string;
|
|
414
|
+
recentDeliveries: string;
|
|
415
|
+
retry: string;
|
|
416
|
+
download: string;
|
|
417
|
+
restore: string;
|
|
418
|
+
searchBlocked: string;
|
|
419
|
+
block: string;
|
|
420
|
+
nothingBlocked: string;
|
|
421
|
+
until: (when: string) => string;
|
|
422
|
+
permanent: string;
|
|
423
|
+
unblock: string;
|
|
424
|
+
/** ReviewCard states. */
|
|
425
|
+
reviewState: Record<"pending" | "published" | "hidden" | "flagged", string>;
|
|
426
|
+
verifiedPurchase: string;
|
|
427
|
+
yourReply: string;
|
|
428
|
+
writeReply: string;
|
|
429
|
+
reply: string;
|
|
430
|
+
postReply: string;
|
|
431
|
+
publish: string;
|
|
432
|
+
editReply: string;
|
|
433
|
+
usedOf: (used: string, limit: string) => string;
|
|
434
|
+
used: (used: string) => string;
|
|
435
|
+
validUntil: (when: string) => string;
|
|
436
|
+
fromAmount: (amount: string) => string;
|
|
437
|
+
revenue: (amount: string) => string;
|
|
438
|
+
languages: string;
|
|
439
|
+
missing: string;
|
|
440
|
+
doneOf: (done: number, total: number) => string;
|
|
441
|
+
copyFrom: (language: string) => string;
|
|
442
|
+
translate: string;
|
|
443
|
+
languageAndCurrency: string;
|
|
444
|
+
language: string;
|
|
445
|
+
currency: string;
|
|
446
|
+
export: string;
|
|
447
|
+
rowsMatch: (formatted: string, n: number) => string;
|
|
448
|
+
format: string;
|
|
449
|
+
period: string;
|
|
450
|
+
allTime: string;
|
|
451
|
+
exportProgress: string;
|
|
452
|
+
preparingFile: string;
|
|
453
|
+
fileReady: string;
|
|
454
|
+
newExport: string;
|
|
455
|
+
twoFactorSteps: [string, string, string];
|
|
456
|
+
qrCode: string;
|
|
457
|
+
scanText: string;
|
|
458
|
+
next: string;
|
|
459
|
+
enterCode: string;
|
|
460
|
+
codeFailed: string;
|
|
461
|
+
codesText: string;
|
|
462
|
+
savedCodes: string;
|
|
463
|
+
turnOnTwoFactor: string;
|
|
464
|
+
pickColour: string;
|
|
465
|
+
contrastAgainst: (colour: string) => string;
|
|
466
|
+
contrastAA: string;
|
|
467
|
+
contrastAALarge: string;
|
|
468
|
+
contrastFails: string;
|
|
469
|
+
// @@KEYS
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/** Strings several components share. */
|
|
473
|
+
export const SHARED_STRINGS: Pick<
|
|
474
|
+
UIStrings,
|
|
475
|
+
| "close"
|
|
476
|
+
| "cancel"
|
|
477
|
+
| "send"
|
|
478
|
+
| "copy"
|
|
479
|
+
| "copied"
|
|
480
|
+
| "dismiss"
|
|
481
|
+
| "remove"
|
|
482
|
+
| "removeItem"
|
|
483
|
+
| "search"
|
|
484
|
+
| "edit"
|
|
485
|
+
| "apply"
|
|
486
|
+
| "undo"
|
|
487
|
+
| "thinking"
|
|
488
|
+
| "paused"
|
|
489
|
+
| "status"
|
|
490
|
+
| "preview"
|
|
491
|
+
| "results"
|
|
492
|
+
| "selectPlaceholder"
|
|
493
|
+
| "model"
|
|
494
|
+
| "back"
|
|
495
|
+
| "columns"
|
|
496
|
+
| "selectedCount"
|
|
497
|
+
| "mainNavigation"
|
|
498
|
+
| "lastDays"
|
|
499
|
+
| "unread"
|
|
500
|
+
| "agent"
|
|
501
|
+
| "viewMap"
|
|
502
|
+
| "enabled"
|
|
503
|
+
| "more"
|
|
504
|
+
| "text"
|
|
505
|
+
| "hide"
|
|
506
|
+
| "colName"
|
|
507
|
+
| "net"
|
|
508
|
+
| "total"
|
|
509
|
+
| "role"
|
|
510
|
+
| "all"
|
|
511
|
+
| "next"
|
|
512
|
+
> = {
|
|
513
|
+
close: "Close",
|
|
514
|
+
cancel: "Cancel",
|
|
515
|
+
send: "Send",
|
|
516
|
+
copy: "Copy",
|
|
517
|
+
copied: "Copied",
|
|
518
|
+
dismiss: "Dismiss",
|
|
519
|
+
remove: "Remove",
|
|
520
|
+
removeItem: (name) => `Remove ${name}`,
|
|
521
|
+
search: "Search",
|
|
522
|
+
edit: "Edit",
|
|
523
|
+
apply: "Apply",
|
|
524
|
+
undo: "Undo",
|
|
525
|
+
thinking: "Thinking…",
|
|
526
|
+
paused: "Paused",
|
|
527
|
+
status: "Status",
|
|
528
|
+
preview: "Preview",
|
|
529
|
+
results: "Results",
|
|
530
|
+
selectPlaceholder: "Select…",
|
|
531
|
+
model: "Model",
|
|
532
|
+
back: "Back",
|
|
533
|
+
columns: "Columns",
|
|
534
|
+
selectedCount: (n, formatted) => `${formatted ?? n} selected`,
|
|
535
|
+
mainNavigation: "Main",
|
|
536
|
+
lastDays: (n) => `Last ${n} days`,
|
|
537
|
+
unread: "Unread",
|
|
538
|
+
agent: "Agent",
|
|
539
|
+
viewMap: "Map",
|
|
540
|
+
enabled: "Enabled",
|
|
541
|
+
more: "More",
|
|
542
|
+
text: "Text",
|
|
543
|
+
hide: "Hide",
|
|
544
|
+
colName: "Name",
|
|
545
|
+
net: "Net",
|
|
546
|
+
total: "Total",
|
|
547
|
+
role: "Role",
|
|
548
|
+
all: "All",
|
|
549
|
+
next: "Next",
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
/** Strings of the components in `admin.tsx`. */
|
|
553
|
+
export const ADMIN_STRINGS: Pick<
|
|
554
|
+
UIStrings,
|
|
555
|
+
| "minimum"
|
|
556
|
+
| "maximum"
|
|
557
|
+
| "min"
|
|
558
|
+
| "max"
|
|
559
|
+
| "live"
|
|
560
|
+
| "newCount"
|
|
561
|
+
| "resume"
|
|
562
|
+
| "pause"
|
|
563
|
+
| "waitingForEvents"
|
|
564
|
+
| "balanceEmpty"
|
|
565
|
+
| "balanceLow"
|
|
566
|
+
| "balanceOk"
|
|
567
|
+
| "perDay"
|
|
568
|
+
| "lastsAbout"
|
|
569
|
+
| "warnsBelow"
|
|
570
|
+
| "topUp"
|
|
571
|
+
| "recentDeliveries"
|
|
572
|
+
| "retry"
|
|
573
|
+
| "download"
|
|
574
|
+
| "restore"
|
|
575
|
+
| "searchBlocked"
|
|
576
|
+
| "block"
|
|
577
|
+
| "nothingBlocked"
|
|
578
|
+
| "until"
|
|
579
|
+
| "permanent"
|
|
580
|
+
| "unblock"
|
|
581
|
+
| "reviewState"
|
|
582
|
+
| "verifiedPurchase"
|
|
583
|
+
| "yourReply"
|
|
584
|
+
| "writeReply"
|
|
585
|
+
| "reply"
|
|
586
|
+
| "postReply"
|
|
587
|
+
| "publish"
|
|
588
|
+
| "editReply"
|
|
589
|
+
| "usedOf"
|
|
590
|
+
| "used"
|
|
591
|
+
| "validUntil"
|
|
592
|
+
| "fromAmount"
|
|
593
|
+
| "revenue"
|
|
594
|
+
| "languages"
|
|
595
|
+
| "missing"
|
|
596
|
+
| "doneOf"
|
|
597
|
+
| "copyFrom"
|
|
598
|
+
| "translate"
|
|
599
|
+
| "languageAndCurrency"
|
|
600
|
+
| "language"
|
|
601
|
+
| "currency"
|
|
602
|
+
| "export"
|
|
603
|
+
| "rowsMatch"
|
|
604
|
+
| "format"
|
|
605
|
+
| "period"
|
|
606
|
+
| "allTime"
|
|
607
|
+
| "exportProgress"
|
|
608
|
+
| "preparingFile"
|
|
609
|
+
| "fileReady"
|
|
610
|
+
| "newExport"
|
|
611
|
+
| "twoFactorSteps"
|
|
612
|
+
| "qrCode"
|
|
613
|
+
| "scanText"
|
|
614
|
+
| "enterCode"
|
|
615
|
+
| "codeFailed"
|
|
616
|
+
| "codesText"
|
|
617
|
+
| "savedCodes"
|
|
618
|
+
| "turnOnTwoFactor"
|
|
619
|
+
| "pickColour"
|
|
620
|
+
| "contrastAgainst"
|
|
621
|
+
| "contrastAA"
|
|
622
|
+
| "contrastAALarge"
|
|
623
|
+
| "contrastFails"
|
|
624
|
+
> = {
|
|
625
|
+
minimum: "Minimum",
|
|
626
|
+
maximum: "Maximum",
|
|
627
|
+
min: "Min",
|
|
628
|
+
max: "Max",
|
|
629
|
+
live: "Live",
|
|
630
|
+
newCount: (n) => `${n} new`,
|
|
631
|
+
resume: "Resume",
|
|
632
|
+
pause: "Pause",
|
|
633
|
+
waitingForEvents: "Waiting for events…",
|
|
634
|
+
balanceEmpty: "Empty",
|
|
635
|
+
balanceLow: "Low",
|
|
636
|
+
balanceOk: "OK",
|
|
637
|
+
perDay: (amount) => `${amount} per day`,
|
|
638
|
+
lastsAbout: (days) => `lasts about ${days} days`,
|
|
639
|
+
warnsBelow: (amount) => `Warns below ${amount}`,
|
|
640
|
+
topUp: "Top up",
|
|
641
|
+
recentDeliveries: "Recent deliveries",
|
|
642
|
+
retry: "Retry",
|
|
643
|
+
download: "Download",
|
|
644
|
+
restore: "Restore",
|
|
645
|
+
searchBlocked: "Search blocked entries",
|
|
646
|
+
block: "Block",
|
|
647
|
+
nothingBlocked: "Nothing blocked.",
|
|
648
|
+
until: (when) => `until ${when}`,
|
|
649
|
+
permanent: "permanent",
|
|
650
|
+
unblock: "Unblock",
|
|
651
|
+
reviewState: {
|
|
652
|
+
pending: "Waiting",
|
|
653
|
+
published: "Published",
|
|
654
|
+
hidden: "Hidden",
|
|
655
|
+
flagged: "Flagged",
|
|
656
|
+
},
|
|
657
|
+
verifiedPurchase: "Verified purchase",
|
|
658
|
+
yourReply: "Your reply",
|
|
659
|
+
writeReply: "Write a public reply",
|
|
660
|
+
reply: "Reply",
|
|
661
|
+
postReply: "Post reply",
|
|
662
|
+
publish: "Publish",
|
|
663
|
+
editReply: "Edit reply",
|
|
664
|
+
usedOf: (used, limit) => `${used} of ${limit} used`,
|
|
665
|
+
used: (used) => `${used} used`,
|
|
666
|
+
validUntil: (when) => `Valid until ${when}`,
|
|
667
|
+
fromAmount: (amount) => `from ${amount}`,
|
|
668
|
+
revenue: (amount) => `${amount} revenue`,
|
|
669
|
+
languages: "Languages",
|
|
670
|
+
missing: "Missing",
|
|
671
|
+
doneOf: (done, total) => `${done} of ${total}`,
|
|
672
|
+
copyFrom: (language) => `Copy from ${language}`,
|
|
673
|
+
translate: "Translate",
|
|
674
|
+
languageAndCurrency: "Language and currency",
|
|
675
|
+
language: "Language",
|
|
676
|
+
currency: "Currency",
|
|
677
|
+
export: "Export",
|
|
678
|
+
rowsMatch: (formatted) => `${formatted} rows match your filters.`,
|
|
679
|
+
format: "Format",
|
|
680
|
+
period: "Period",
|
|
681
|
+
allTime: "All time",
|
|
682
|
+
exportProgress: "Export progress",
|
|
683
|
+
preparingFile: "Preparing the file…",
|
|
684
|
+
fileReady: "Your file is ready.",
|
|
685
|
+
newExport: "New export",
|
|
686
|
+
twoFactorSteps: ["Scan", "Confirm", "Save codes"],
|
|
687
|
+
qrCode: "QR code",
|
|
688
|
+
scanText:
|
|
689
|
+
"Scan the code with your authenticator app. If you can't scan it, enter the key by hand.",
|
|
690
|
+
enterCode: "Enter the 6-digit code from the app.",
|
|
691
|
+
codeFailed: "That code didn't work. Try the current one.",
|
|
692
|
+
codesText: "Each code works once if you lose your phone. Keep them somewhere safe.",
|
|
693
|
+
savedCodes: "I saved the recovery codes",
|
|
694
|
+
turnOnTwoFactor: "Turn on two-factor",
|
|
695
|
+
pickColour: "Pick a colour",
|
|
696
|
+
contrastAgainst: (colour) => `Contrast against ${colour}`,
|
|
697
|
+
contrastAA: "AA",
|
|
698
|
+
contrastAALarge: "AA large",
|
|
699
|
+
contrastFails: "Fails",
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
/** Strings of the components in `agents.tsx`. */
|
|
703
|
+
export const AGENTS_STRINGS: Pick<
|
|
704
|
+
UIStrings,
|
|
705
|
+
| "chatWith"
|
|
706
|
+
| "costToday"
|
|
707
|
+
| "lastAction"
|
|
708
|
+
| "searchChats"
|
|
709
|
+
| "noChatsMatch"
|
|
710
|
+
| "nothingFound"
|
|
711
|
+
| "thanksNoted"
|
|
712
|
+
| "good"
|
|
713
|
+
| "notGood"
|
|
714
|
+
| "whatShouldBeDifferent"
|
|
715
|
+
| "needsYou"
|
|
716
|
+
| "suggestions"
|
|
717
|
+
| "budgetUsedUp"
|
|
718
|
+
| "raiseBudget"
|
|
719
|
+
| "budgetText"
|
|
720
|
+
| "spentThisMonth"
|
|
721
|
+
| "stillRunning"
|
|
722
|
+
| "nothing"
|
|
723
|
+
| "searchMemory"
|
|
724
|
+
| "nothingRemembered"
|
|
725
|
+
| "forget"
|
|
726
|
+
| "discardOverride"
|
|
727
|
+
| "moveToCode"
|
|
728
|
+
| "runNow"
|
|
729
|
+
| "listening"
|
|
730
|
+
| "speaking"
|
|
731
|
+
| "unmute"
|
|
732
|
+
| "mute"
|
|
733
|
+
| "endConversation"
|
|
734
|
+
> = {
|
|
735
|
+
chatWith: (name) => `Chat with ${name}`,
|
|
736
|
+
costToday: "Cost today",
|
|
737
|
+
lastAction: "Last action",
|
|
738
|
+
searchChats: "Search chats",
|
|
739
|
+
noChatsMatch: "No chats match",
|
|
740
|
+
nothingFound: "Nothing found",
|
|
741
|
+
thanksNoted: "Thanks, noted",
|
|
742
|
+
good: "Good",
|
|
743
|
+
notGood: "Not good",
|
|
744
|
+
whatShouldBeDifferent: "What should be different?",
|
|
745
|
+
needsYou: "Needs you",
|
|
746
|
+
suggestions: "Suggestions",
|
|
747
|
+
budgetUsedUp: "Budget used up · agents paused",
|
|
748
|
+
raiseBudget: "Raise budget",
|
|
749
|
+
budgetText: "Everything is kept. Agents continue where they stopped once the budget allows it.",
|
|
750
|
+
spentThisMonth: "Spent this month",
|
|
751
|
+
stillRunning: "Still running",
|
|
752
|
+
nothing: "Nothing",
|
|
753
|
+
searchMemory: "Search memory",
|
|
754
|
+
nothingRemembered: "Nothing remembered here yet.",
|
|
755
|
+
forget: "Forget",
|
|
756
|
+
discardOverride: "Discard override",
|
|
757
|
+
moveToCode: "Move to code",
|
|
758
|
+
runNow: "Run now",
|
|
759
|
+
listening: "Listening…",
|
|
760
|
+
speaking: "Speaking…",
|
|
761
|
+
unmute: "Unmute",
|
|
762
|
+
mute: "Mute",
|
|
763
|
+
endConversation: "End conversation",
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
/** Strings of the components in `app-chrome.tsx`. */
|
|
767
|
+
export const APP_CHROME_STRINGS: Pick<UIStrings, "coreModule"> = {
|
|
768
|
+
coreModule: "Core module, always on",
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
/** Strings of the components in `approvals.tsx`. */
|
|
772
|
+
export const APPROVALS_STRINGS: Pick<
|
|
773
|
+
UIStrings,
|
|
774
|
+
| "approveAsShown"
|
|
775
|
+
| "approveWithChange"
|
|
776
|
+
| "whatShouldChange"
|
|
777
|
+
| "discard"
|
|
778
|
+
| "differentInstruction"
|
|
779
|
+
| "whatInstead"
|
|
780
|
+
| "approvalNeeded"
|
|
781
|
+
| "riskFamily"
|
|
782
|
+
| "approvals"
|
|
783
|
+
| "nothingWaiting"
|
|
784
|
+
> = {
|
|
785
|
+
approveAsShown: "Yes, run it as shown",
|
|
786
|
+
approveWithChange: "Yes, with a change",
|
|
787
|
+
whatShouldChange: "What should change?",
|
|
788
|
+
discard: "No, discard",
|
|
789
|
+
differentInstruction: "Different instruction",
|
|
790
|
+
whatInstead: "What should happen instead?",
|
|
791
|
+
approvalNeeded: "Approval needed",
|
|
792
|
+
riskFamily: {
|
|
793
|
+
money: "Money",
|
|
794
|
+
infra: "Infrastructure",
|
|
795
|
+
comms: "Communication",
|
|
796
|
+
marketing: "Marketing",
|
|
797
|
+
apps: "Own apps",
|
|
798
|
+
legal: "Legal",
|
|
799
|
+
},
|
|
800
|
+
approvals: "Approvals",
|
|
801
|
+
nothingWaiting: "Nothing waiting for you",
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
/** Strings of the components in `building-blocks.tsx`. */
|
|
805
|
+
export const BUILDING_BLOCKS_STRINGS: Pick<UIStrings, "loading" | "resizePanel"> = {
|
|
806
|
+
loading: "Loading",
|
|
807
|
+
resizePanel: (label, n) => `Resize ${label ?? `panel ${n}`}`,
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
/** Strings of the components in `charts.tsx`. */
|
|
811
|
+
export const CHARTS_STRINGS: Pick<
|
|
812
|
+
UIStrings,
|
|
813
|
+
| "barChart"
|
|
814
|
+
| "lineChart"
|
|
815
|
+
| "trend"
|
|
816
|
+
| "breakdown"
|
|
817
|
+
| "stackedBarChart"
|
|
818
|
+
| "areaChart"
|
|
819
|
+
| "heatmap"
|
|
820
|
+
| "less"
|
|
821
|
+
| "gaugeValue"
|
|
822
|
+
| "gauge"
|
|
823
|
+
> = {
|
|
824
|
+
barChart: "Bar chart",
|
|
825
|
+
lineChart: "Line chart",
|
|
826
|
+
trend: "Trend",
|
|
827
|
+
breakdown: "Breakdown",
|
|
828
|
+
stackedBarChart: "Stacked bar chart",
|
|
829
|
+
areaChart: "Area chart",
|
|
830
|
+
heatmap: "Heatmap",
|
|
831
|
+
less: "Less",
|
|
832
|
+
gaugeValue: (label, value, max) => `${label}: ${value} of ${max}`,
|
|
833
|
+
gauge: "Gauge",
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
/** Strings of the components in `chat.tsx`. */
|
|
837
|
+
export const CHAT_STRINGS: Pick<
|
|
838
|
+
UIStrings,
|
|
839
|
+
| "copyCode"
|
|
840
|
+
| "working"
|
|
841
|
+
| "you"
|
|
842
|
+
| "copyReply"
|
|
843
|
+
| "regenerate"
|
|
844
|
+
| "regenerateReply"
|
|
845
|
+
| "goodReply"
|
|
846
|
+
| "badReply"
|
|
847
|
+
| "toolInput"
|
|
848
|
+
| "toolError"
|
|
849
|
+
| "toolResult"
|
|
850
|
+
| "thoughtFor"
|
|
851
|
+
| "commands"
|
|
852
|
+
| "messagePlaceholder"
|
|
853
|
+
| "message"
|
|
854
|
+
| "attachFiles"
|
|
855
|
+
| "composerHint"
|
|
856
|
+
| "stop"
|
|
857
|
+
| "agentStatus"
|
|
858
|
+
| "step"
|
|
859
|
+
| "timeline"
|
|
860
|
+
| "stepRunning"
|
|
861
|
+
| "context"
|
|
862
|
+
> = {
|
|
863
|
+
copyCode: "Copy code",
|
|
864
|
+
working: "Working",
|
|
865
|
+
you: "You",
|
|
866
|
+
copyReply: "Copy reply",
|
|
867
|
+
regenerate: "Regenerate",
|
|
868
|
+
regenerateReply: "Regenerate reply",
|
|
869
|
+
goodReply: "Good reply",
|
|
870
|
+
badReply: "Bad reply",
|
|
871
|
+
toolInput: "Input",
|
|
872
|
+
toolError: "Error",
|
|
873
|
+
toolResult: "Result",
|
|
874
|
+
thoughtFor: (d) => `Thought for ${d || "a few seconds"}`,
|
|
875
|
+
commands: "Commands",
|
|
876
|
+
messagePlaceholder: "Message…",
|
|
877
|
+
message: "Message",
|
|
878
|
+
attachFiles: "Attach files",
|
|
879
|
+
composerHint: "Enter to send · Shift+Enter for a new line",
|
|
880
|
+
stop: "Stop",
|
|
881
|
+
agentStatus: {
|
|
882
|
+
Running: "Running",
|
|
883
|
+
Thinking: "Thinking",
|
|
884
|
+
"Waiting for approval": "Waiting for approval",
|
|
885
|
+
Idle: "Idle",
|
|
886
|
+
Paused: "Paused",
|
|
887
|
+
Error: "Error",
|
|
888
|
+
},
|
|
889
|
+
step: "Step",
|
|
890
|
+
timeline: (total) => `Timeline · ${total}`,
|
|
891
|
+
stepRunning: "running…",
|
|
892
|
+
context: "Context",
|
|
893
|
+
};
|
|
894
|
+
|
|
895
|
+
/** Strings of the components in `commerce.tsx`. */
|
|
896
|
+
export const COMMERCE_STRINGS: Pick<
|
|
897
|
+
UIStrings,
|
|
898
|
+
| "ratingLabel"
|
|
899
|
+
| "outOfStock"
|
|
900
|
+
| "lowStock"
|
|
901
|
+
| "inStock"
|
|
902
|
+
| "inStockCount"
|
|
903
|
+
| "soldOut"
|
|
904
|
+
| "addToCart"
|
|
905
|
+
| "variantSoldOut"
|
|
906
|
+
| "oneLess"
|
|
907
|
+
| "oneMore"
|
|
908
|
+
| "orderSummary"
|
|
909
|
+
| "freeShippingIn"
|
|
910
|
+
| "invalidCode"
|
|
911
|
+
| "discountCode"
|
|
912
|
+
| "subtotal"
|
|
913
|
+
| "discount"
|
|
914
|
+
| "shipping"
|
|
915
|
+
| "free"
|
|
916
|
+
| "inclVat"
|
|
917
|
+
| "checkoutSteps"
|
|
918
|
+
| "checkoutProgress"
|
|
919
|
+
| "orderStatus"
|
|
920
|
+
| "mostPopular"
|
|
921
|
+
| "letsTalk"
|
|
922
|
+
| "perSeatMonth"
|
|
923
|
+
| "currentPlan"
|
|
924
|
+
| "choosePlan"
|
|
925
|
+
> = {
|
|
926
|
+
ratingLabel: (value, count) => `${value} out of 5` + (count != null ? `, ${count} reviews` : ""),
|
|
927
|
+
outOfStock: "Out of stock",
|
|
928
|
+
lowStock: (left) => `Low stock · ${left} left`,
|
|
929
|
+
inStock: "In stock",
|
|
930
|
+
inStockCount: (n) => `In stock · ${n}`,
|
|
931
|
+
soldOut: "Sold out",
|
|
932
|
+
addToCart: (name) => `Add ${name} to cart`,
|
|
933
|
+
variantSoldOut: (variant) => `${variant} (sold out)`,
|
|
934
|
+
oneLess: "One less",
|
|
935
|
+
oneMore: "One more",
|
|
936
|
+
orderSummary: "Order summary",
|
|
937
|
+
freeShippingIn: (amount) => createElement(Fragment, null, "Add ", amount, " for free shipping"),
|
|
938
|
+
invalidCode: "That code isn’t valid",
|
|
939
|
+
discountCode: "Discount code",
|
|
940
|
+
subtotal: "Subtotal",
|
|
941
|
+
discount: "Discount",
|
|
942
|
+
shipping: "Shipping",
|
|
943
|
+
free: "Free",
|
|
944
|
+
inclVat: (rate) => `incl. ${rate} VAT`,
|
|
945
|
+
checkoutSteps: ["Cart", "Details", "Shipping", "Payment"],
|
|
946
|
+
checkoutProgress: "Checkout progress",
|
|
947
|
+
orderStatus: {
|
|
948
|
+
Placed: "Placed",
|
|
949
|
+
Paid: "Paid",
|
|
950
|
+
Packed: "Packed",
|
|
951
|
+
Shipped: "Shipped",
|
|
952
|
+
Delivered: "Delivered",
|
|
953
|
+
Refunded: "Refunded",
|
|
954
|
+
Cancelled: "Cancelled",
|
|
955
|
+
},
|
|
956
|
+
mostPopular: "Most popular",
|
|
957
|
+
letsTalk: "Let’s talk",
|
|
958
|
+
perSeatMonth: "per seat / month",
|
|
959
|
+
currentPlan: "Current plan",
|
|
960
|
+
choosePlan: (name) => `Choose ${name}`,
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
/** Strings of the components in `data-display.tsx`. */
|
|
964
|
+
export const DATA_DISPLAY_STRINGS: Pick<
|
|
965
|
+
UIStrings,
|
|
966
|
+
"open" | "downloadItem" | "columnOptions" | "addCard" | "progress"
|
|
967
|
+
> = {
|
|
968
|
+
open: "Open",
|
|
969
|
+
downloadItem: (name) => `Download ${name}`,
|
|
970
|
+
columnOptions: "Column options",
|
|
971
|
+
addCard: "Add card",
|
|
972
|
+
progress: "Progress",
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
/** Strings of the components in `data-table.tsx`. */
|
|
976
|
+
export const DATA_TABLE_STRINGS: Pick<
|
|
977
|
+
UIStrings,
|
|
978
|
+
| "removeFilter"
|
|
979
|
+
| "addFilter"
|
|
980
|
+
| "clearAll"
|
|
981
|
+
| "chooseColumns"
|
|
982
|
+
| "selectAllRows"
|
|
983
|
+
| "expand"
|
|
984
|
+
| "nothingMatchesFilters"
|
|
985
|
+
| "selectRow"
|
|
986
|
+
| "collapseRow"
|
|
987
|
+
| "expandRow"
|
|
988
|
+
| "bulkActions"
|
|
989
|
+
| "clear"
|
|
990
|
+
> = {
|
|
991
|
+
removeFilter: (filter) => `Remove filter ${filter}`,
|
|
992
|
+
addFilter: "Filter",
|
|
993
|
+
clearAll: "Clear all",
|
|
994
|
+
chooseColumns: "Choose columns",
|
|
995
|
+
selectAllRows: "Select all rows",
|
|
996
|
+
expand: "Expand",
|
|
997
|
+
nothingMatchesFilters: "Nothing matches these filters.",
|
|
998
|
+
selectRow: "Select row",
|
|
999
|
+
collapseRow: "Collapse row",
|
|
1000
|
+
expandRow: "Expand row",
|
|
1001
|
+
bulkActions: "Bulk actions",
|
|
1002
|
+
clear: "Clear",
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1005
|
+
/** Strings of the components in `developer.tsx`. */
|
|
1006
|
+
export const DEVELOPER_STRINGS: Pick<
|
|
1007
|
+
UIStrings,
|
|
1008
|
+
"reveal" | "rotate" | "vatRate" | "gross" | "keyboardShortcuts" | "daysAgo"
|
|
1009
|
+
> = {
|
|
1010
|
+
reveal: "Reveal",
|
|
1011
|
+
rotate: "Rotate",
|
|
1012
|
+
vatRate: "VAT rate",
|
|
1013
|
+
gross: (amount) => `Gross ${amount}`,
|
|
1014
|
+
keyboardShortcuts: "Keyboard shortcuts",
|
|
1015
|
+
daysAgo: (n) => `${n} days ago`,
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
/** Strings of the components in `feedback.tsx`. */
|
|
1019
|
+
export const FEEDBACK_STRINGS: Pick<UIStrings, "typeToConfirm" | "confirm"> = {
|
|
1020
|
+
typeToConfirm: (text) => createElement(Fragment, null, "Type ", text, " to confirm"),
|
|
1021
|
+
confirm: "Confirm",
|
|
1022
|
+
};
|
|
1023
|
+
|
|
1024
|
+
/** Strings of the components in `form.tsx`. */
|
|
1025
|
+
export const FORM_STRINGS: Pick<
|
|
1026
|
+
UIStrings,
|
|
1027
|
+
| "fieldRequired"
|
|
1028
|
+
| "invalidEmail"
|
|
1029
|
+
| "minLength"
|
|
1030
|
+
| "maxLength"
|
|
1031
|
+
| "minValue"
|
|
1032
|
+
| "maxValue"
|
|
1033
|
+
| "invalidFormat"
|
|
1034
|
+
> = {
|
|
1035
|
+
fieldRequired: "This field is required",
|
|
1036
|
+
invalidEmail: "Enter a valid email address",
|
|
1037
|
+
minLength: (n) => `Use at least ${n} characters`,
|
|
1038
|
+
maxLength: (n) => `Use at most ${n} characters`,
|
|
1039
|
+
minValue: (n) => `Use ${n} or more`,
|
|
1040
|
+
maxValue: (n) => `Use ${n} or less`,
|
|
1041
|
+
invalidFormat: "Use the expected format",
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
/** Strings of the components in `forms.tsx`. */
|
|
1045
|
+
export const FORMS_STRINGS: Pick<
|
|
1046
|
+
UIStrings,
|
|
1047
|
+
| "noMatches"
|
|
1048
|
+
| "createOption"
|
|
1049
|
+
| "tagPlaceholder"
|
|
1050
|
+
| "previousMonth"
|
|
1051
|
+
| "nextMonth"
|
|
1052
|
+
| "thisYear"
|
|
1053
|
+
| "pickRange"
|
|
1054
|
+
| "pickDate"
|
|
1055
|
+
| "decrease"
|
|
1056
|
+
| "increase"
|
|
1057
|
+
| "verificationCode"
|
|
1058
|
+
| "digitN"
|
|
1059
|
+
| "dropToUpload"
|
|
1060
|
+
| "dropFiles"
|
|
1061
|
+
| "dropHint"
|
|
1062
|
+
| "uploaded"
|
|
1063
|
+
| "cancelUpload"
|
|
1064
|
+
> = {
|
|
1065
|
+
noMatches: "No matches",
|
|
1066
|
+
createOption: (text) => `Create “${text}”`,
|
|
1067
|
+
tagPlaceholder: "Type and press Enter",
|
|
1068
|
+
previousMonth: "Previous month",
|
|
1069
|
+
nextMonth: "Next month",
|
|
1070
|
+
thisYear: "This year",
|
|
1071
|
+
pickRange: "Pick a range",
|
|
1072
|
+
pickDate: "Pick a date",
|
|
1073
|
+
decrease: "Decrease",
|
|
1074
|
+
increase: "Increase",
|
|
1075
|
+
verificationCode: "Verification code",
|
|
1076
|
+
digitN: (n) => `Digit ${n}`,
|
|
1077
|
+
dropToUpload: "Drop to upload",
|
|
1078
|
+
dropFiles: "Drop files here or browse",
|
|
1079
|
+
dropHint: "PDF, PNG or JPG up to 10 MB",
|
|
1080
|
+
uploaded: (size) => `${size} · uploaded`,
|
|
1081
|
+
cancelUpload: "Cancel upload",
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
/** Strings of the components in `mail.tsx`. */
|
|
1085
|
+
export const MAIL_STRINGS: Pick<
|
|
1086
|
+
UIStrings,
|
|
1087
|
+
"allInboxes" | "addressCount" | "findAddress" | "company" | "phone" | "website"
|
|
1088
|
+
> = {
|
|
1089
|
+
allInboxes: "All inboxes",
|
|
1090
|
+
addressCount: (n) => `${n} addresses`,
|
|
1091
|
+
findAddress: "Find an address",
|
|
1092
|
+
company: "Company",
|
|
1093
|
+
phone: "Phone",
|
|
1094
|
+
website: "Website",
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
/** Strings of the components in `media.tsx`. */
|
|
1098
|
+
export const MEDIA_STRINGS: Pick<
|
|
1099
|
+
UIStrings,
|
|
1100
|
+
| "variants"
|
|
1101
|
+
| "previousImage"
|
|
1102
|
+
| "nextImage"
|
|
1103
|
+
| "fullScreen"
|
|
1104
|
+
| "images"
|
|
1105
|
+
| "imageN"
|
|
1106
|
+
| "before"
|
|
1107
|
+
| "after"
|
|
1108
|
+
| "compareBeforeAfter"
|
|
1109
|
+
> = {
|
|
1110
|
+
variants: "Variants",
|
|
1111
|
+
previousImage: "Previous image",
|
|
1112
|
+
nextImage: "Next image",
|
|
1113
|
+
fullScreen: "Full screen",
|
|
1114
|
+
images: "Images",
|
|
1115
|
+
imageN: (n) => `Image ${n}`,
|
|
1116
|
+
before: "Before",
|
|
1117
|
+
after: "After",
|
|
1118
|
+
compareBeforeAfter: "Compare before and after",
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
/** Strings of the components in `navigation.tsx`. */
|
|
1122
|
+
export const NAVIGATION_STRINGS: Pick<
|
|
1123
|
+
UIStrings,
|
|
1124
|
+
| "breadcrumb"
|
|
1125
|
+
| "pagination"
|
|
1126
|
+
| "previousPage"
|
|
1127
|
+
| "nextPage"
|
|
1128
|
+
| "sidebar"
|
|
1129
|
+
| "expandSidebar"
|
|
1130
|
+
| "collapseSidebar"
|
|
1131
|
+
> = {
|
|
1132
|
+
breadcrumb: "Breadcrumb",
|
|
1133
|
+
pagination: "Pagination",
|
|
1134
|
+
previousPage: "Previous page",
|
|
1135
|
+
nextPage: "Next page",
|
|
1136
|
+
sidebar: "Sidebar",
|
|
1137
|
+
expandSidebar: "Expand sidebar",
|
|
1138
|
+
collapseSidebar: "Collapse sidebar",
|
|
1139
|
+
};
|
|
1140
|
+
|
|
1141
|
+
/** Strings of the components in `operations.tsx`. */
|
|
1142
|
+
export const OPERATIONS_STRINGS: Pick<
|
|
1143
|
+
UIStrings,
|
|
1144
|
+
| "offline"
|
|
1145
|
+
| "connectionLost"
|
|
1146
|
+
| "retryNow"
|
|
1147
|
+
| "unknown"
|
|
1148
|
+
| "deployPipeline"
|
|
1149
|
+
| "colType"
|
|
1150
|
+
| "colContent"
|
|
1151
|
+
| "colProxy"
|
|
1152
|
+
| "proxied"
|
|
1153
|
+
| "dnsOnly"
|
|
1154
|
+
| "actions"
|
|
1155
|
+
| "expires"
|
|
1156
|
+
| "daysCount"
|
|
1157
|
+
| "domain"
|
|
1158
|
+
| "colDate"
|
|
1159
|
+
| "colRef"
|
|
1160
|
+
| "colDescription"
|
|
1161
|
+
| "suggestedBy"
|
|
1162
|
+
| "colCategory"
|
|
1163
|
+
| "colProject"
|
|
1164
|
+
| "vat"
|
|
1165
|
+
| "grossLabel"
|
|
1166
|
+
| "notAReceipt"
|
|
1167
|
+
| "bookIt"
|
|
1168
|
+
> = {
|
|
1169
|
+
offline: "Offline. Changes are kept and sent when you’re back.",
|
|
1170
|
+
connectionLost: (s) => `Connection lost. Retrying in ${s != null ? s : "…"} s`,
|
|
1171
|
+
retryNow: "Retry now",
|
|
1172
|
+
unknown: "Unknown",
|
|
1173
|
+
deployPipeline: "Deploy pipeline",
|
|
1174
|
+
colType: "Type",
|
|
1175
|
+
colContent: "Content",
|
|
1176
|
+
colProxy: "Proxy",
|
|
1177
|
+
proxied: "Proxied",
|
|
1178
|
+
dnsOnly: "DNS only",
|
|
1179
|
+
actions: "Actions",
|
|
1180
|
+
expires: "Expires",
|
|
1181
|
+
daysCount: (n) => `${n} days`,
|
|
1182
|
+
domain: "Domain",
|
|
1183
|
+
colDate: "Date",
|
|
1184
|
+
colRef: "Ref.",
|
|
1185
|
+
colDescription: "Description",
|
|
1186
|
+
suggestedBy: (who) => `Suggested by ${who}`,
|
|
1187
|
+
colCategory: "Category",
|
|
1188
|
+
colProject: "Project",
|
|
1189
|
+
vat: "VAT",
|
|
1190
|
+
grossLabel: "Gross",
|
|
1191
|
+
notAReceipt: "Not a receipt",
|
|
1192
|
+
bookIt: "Book it",
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1195
|
+
/** Strings of the components in `previews.tsx`. */
|
|
1196
|
+
export const PREVIEWS_STRINGS: Pick<
|
|
1197
|
+
UIStrings,
|
|
1198
|
+
| "noSubject"
|
|
1199
|
+
| "device"
|
|
1200
|
+
| "desktop"
|
|
1201
|
+
| "mobile"
|
|
1202
|
+
| "emailPreview"
|
|
1203
|
+
| "adTooLong"
|
|
1204
|
+
| "sponsored"
|
|
1205
|
+
| "yourHeadline"
|
|
1206
|
+
| "yourDescription"
|
|
1207
|
+
> = {
|
|
1208
|
+
noSubject: "(No subject)",
|
|
1209
|
+
device: "Device",
|
|
1210
|
+
desktop: "Desktop",
|
|
1211
|
+
mobile: "Mobile",
|
|
1212
|
+
emailPreview: "Email preview",
|
|
1213
|
+
adTooLong: (field, n, length, limit) =>
|
|
1214
|
+
`${field === "headlines" ? "Headline" : field === "descriptions" ? "Description" : "Path"} ${n} is ${length} characters, the limit is ${limit}`,
|
|
1215
|
+
sponsored: "Sponsored",
|
|
1216
|
+
yourHeadline: "Your headline",
|
|
1217
|
+
yourDescription: "Your description",
|
|
1218
|
+
};
|
|
1219
|
+
|
|
1220
|
+
/** Strings of the components in `primitives.tsx`. */
|
|
1221
|
+
export const PRIMITIVES_STRINGS: Pick<
|
|
1222
|
+
UIStrings,
|
|
1223
|
+
"slide" | "slideOf" | "previousSlide" | "goToSlide" | "nextSlide"
|
|
1224
|
+
> = {
|
|
1225
|
+
slide: "slide",
|
|
1226
|
+
slideOf: (n, total) => `${n} of ${total}`,
|
|
1227
|
+
previousSlide: "Previous slide",
|
|
1228
|
+
goToSlide: (n) => `Go to slide ${n}`,
|
|
1229
|
+
nextSlide: "Next slide",
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1232
|
+
/** Strings of the components in `real-estate.tsx`. */
|
|
1233
|
+
export const REAL_ESTATE_STRINGS: Pick<
|
|
1234
|
+
UIStrings,
|
|
1235
|
+
| "rooms"
|
|
1236
|
+
| "priceOnRequest"
|
|
1237
|
+
| "perMonth"
|
|
1238
|
+
| "isNew"
|
|
1239
|
+
| "select"
|
|
1240
|
+
| "removeFromSaved"
|
|
1241
|
+
| "save"
|
|
1242
|
+
| "privateSeller"
|
|
1243
|
+
| "phoneAvailable"
|
|
1244
|
+
| "deselectAll"
|
|
1245
|
+
| "selectAll"
|
|
1246
|
+
| "foundCount"
|
|
1247
|
+
| "workingEllipsis"
|
|
1248
|
+
| "sort"
|
|
1249
|
+
| "view"
|
|
1250
|
+
| "viewGrid"
|
|
1251
|
+
| "viewList"
|
|
1252
|
+
| "checkedAt"
|
|
1253
|
+
| "showResults"
|
|
1254
|
+
| "highConfidence"
|
|
1255
|
+
| "mediumConfidence"
|
|
1256
|
+
| "lowConfidence"
|
|
1257
|
+
| "estimatedValue"
|
|
1258
|
+
| "range"
|
|
1259
|
+
| "askingPrice"
|
|
1260
|
+
| "energyClass"
|
|
1261
|
+
> = {
|
|
1262
|
+
rooms: (rooms) => `${rooms} rooms`,
|
|
1263
|
+
priceOnRequest: "Price on request",
|
|
1264
|
+
perMonth: "/ month",
|
|
1265
|
+
isNew: "New",
|
|
1266
|
+
select: "Select",
|
|
1267
|
+
removeFromSaved: "Remove from saved",
|
|
1268
|
+
save: "Save",
|
|
1269
|
+
privateSeller: "Private seller",
|
|
1270
|
+
phoneAvailable: "Phone number available",
|
|
1271
|
+
deselectAll: "Deselect all",
|
|
1272
|
+
selectAll: "Select all",
|
|
1273
|
+
foundCount: (_, formatted) => `${formatted} found`,
|
|
1274
|
+
workingEllipsis: "Working…",
|
|
1275
|
+
sort: "Sort",
|
|
1276
|
+
view: "View",
|
|
1277
|
+
viewGrid: "Grid",
|
|
1278
|
+
viewList: "List",
|
|
1279
|
+
checkedAt: (when) => `Checked ${when}`,
|
|
1280
|
+
showResults: "Show results",
|
|
1281
|
+
highConfidence: "High confidence",
|
|
1282
|
+
mediumConfidence: "Medium confidence",
|
|
1283
|
+
lowConfidence: "Low confidence",
|
|
1284
|
+
estimatedValue: "Estimated value",
|
|
1285
|
+
range: (low, high) => `Range ${low} to ${high}`,
|
|
1286
|
+
askingPrice: "Asking price",
|
|
1287
|
+
energyClass: (value) => `Energy class ${value}`,
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
/** Strings of the components in `rich-text-editor.tsx`. */
|
|
1291
|
+
export const RICH_TEXT_EDITOR_STRINGS: Pick<
|
|
1292
|
+
UIStrings,
|
|
1293
|
+
| "bold"
|
|
1294
|
+
| "italic"
|
|
1295
|
+
| "underline"
|
|
1296
|
+
| "heading"
|
|
1297
|
+
| "quote"
|
|
1298
|
+
| "bulletedList"
|
|
1299
|
+
| "numberedList"
|
|
1300
|
+
| "link"
|
|
1301
|
+
| "redo"
|
|
1302
|
+
| "formatting"
|
|
1303
|
+
| "linkAddress"
|
|
1304
|
+
| "removeLink"
|
|
1305
|
+
| "insertField"
|
|
1306
|
+
> = {
|
|
1307
|
+
bold: "Bold",
|
|
1308
|
+
italic: "Italic",
|
|
1309
|
+
underline: "Underline",
|
|
1310
|
+
heading: "Heading",
|
|
1311
|
+
quote: "Quote",
|
|
1312
|
+
bulletedList: "Bulleted list",
|
|
1313
|
+
numberedList: "Numbered list",
|
|
1314
|
+
link: "Link",
|
|
1315
|
+
redo: "Redo",
|
|
1316
|
+
formatting: "Formatting",
|
|
1317
|
+
linkAddress: "Link address",
|
|
1318
|
+
removeLink: "Remove link",
|
|
1319
|
+
insertField: "Insert field",
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
/** Strings of the components in `select-menu.tsx`. */
|
|
1323
|
+
export const SELECT_MENU_STRINGS: Pick<UIStrings, "options"> = {
|
|
1324
|
+
options: "Options",
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1327
|
+
/** Strings of the components in `shell.tsx`. */
|
|
1328
|
+
export const SHELL_STRINGS: Pick<UIStrings, "tools" | "quickActions"> = {
|
|
1329
|
+
tools: "Tools",
|
|
1330
|
+
quickActions: "Quick actions",
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
/** Strings of the components in `site.tsx`. */
|
|
1334
|
+
export const SITE_STRINGS: Pick<
|
|
1335
|
+
UIStrings,
|
|
1336
|
+
| "assistant"
|
|
1337
|
+
| "closeAssistant"
|
|
1338
|
+
| "openAssistant"
|
|
1339
|
+
| "privacySettings"
|
|
1340
|
+
| "cookieText"
|
|
1341
|
+
| "alwaysOn"
|
|
1342
|
+
| "saveChoice"
|
|
1343
|
+
| "settings"
|
|
1344
|
+
| "onlyNecessary"
|
|
1345
|
+
| "acceptAll"
|
|
1346
|
+
> = {
|
|
1347
|
+
assistant: "Assistant",
|
|
1348
|
+
closeAssistant: "Close assistant",
|
|
1349
|
+
openAssistant: "Open assistant",
|
|
1350
|
+
privacySettings: "Privacy settings",
|
|
1351
|
+
cookieText: "We use cookies to run this site and, with your consent, to measure and improve it.",
|
|
1352
|
+
alwaysOn: "Always on",
|
|
1353
|
+
saveChoice: "Save choice",
|
|
1354
|
+
settings: "Settings",
|
|
1355
|
+
onlyNecessary: "Only necessary",
|
|
1356
|
+
acceptAll: "Accept all",
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
/** Strings of the components in `workspace.tsx`. */
|
|
1360
|
+
export const WORKSPACE_STRINGS: Pick<
|
|
1361
|
+
UIStrings,
|
|
1362
|
+
| "sectionPages"
|
|
1363
|
+
| "commandPalette"
|
|
1364
|
+
| "paletteSearchPlaceholder"
|
|
1365
|
+
| "escKey"
|
|
1366
|
+
| "searching"
|
|
1367
|
+
| "nothingMatches"
|
|
1368
|
+
| "paletteMove"
|
|
1369
|
+
| "paletteOpen"
|
|
1370
|
+
| "paletteAnywhere"
|
|
1371
|
+
| "notifications"
|
|
1372
|
+
| "markAllRead"
|
|
1373
|
+
| "allCaughtUp"
|
|
1374
|
+
| "flowStep"
|
|
1375
|
+
| "flowRunning"
|
|
1376
|
+
| "waitingForYou"
|
|
1377
|
+
| "approve"
|
|
1378
|
+
| "reject"
|
|
1379
|
+
| "shared"
|
|
1380
|
+
| "setup"
|
|
1381
|
+
| "stepOf"
|
|
1382
|
+
| "permissionLevels"
|
|
1383
|
+
| "memberCount"
|
|
1384
|
+
| "invoice"
|
|
1385
|
+
| "billTo"
|
|
1386
|
+
| "issued"
|
|
1387
|
+
| "due"
|
|
1388
|
+
| "untitledLine"
|
|
1389
|
+
| "vatAt"
|
|
1390
|
+
| "totalDue"
|
|
1391
|
+
| "matchedTo"
|
|
1392
|
+
| "matched"
|
|
1393
|
+
| "match"
|
|
1394
|
+
| "noSuggestion"
|
|
1395
|
+
| "accept"
|
|
1396
|
+
> = {
|
|
1397
|
+
sectionPages: (section) => `${section || "Section"} pages`,
|
|
1398
|
+
commandPalette: "Command palette",
|
|
1399
|
+
paletteSearchPlaceholder: "Search pages, actions and records…",
|
|
1400
|
+
escKey: "Esc",
|
|
1401
|
+
searching: "Searching…",
|
|
1402
|
+
nothingMatches: (query) => `Nothing matches “${query}”.`,
|
|
1403
|
+
paletteMove: "move",
|
|
1404
|
+
paletteOpen: "open",
|
|
1405
|
+
paletteAnywhere: "anywhere",
|
|
1406
|
+
notifications: "Notifications",
|
|
1407
|
+
markAllRead: "Mark all read",
|
|
1408
|
+
allCaughtUp: "You are all caught up",
|
|
1409
|
+
flowStep: {
|
|
1410
|
+
trigger: "When",
|
|
1411
|
+
condition: "If",
|
|
1412
|
+
agent: "Agent",
|
|
1413
|
+
approval: "Approval",
|
|
1414
|
+
action: "Then",
|
|
1415
|
+
},
|
|
1416
|
+
flowRunning: "running",
|
|
1417
|
+
waitingForYou: "waiting for you",
|
|
1418
|
+
approve: "Approve",
|
|
1419
|
+
reject: "Reject",
|
|
1420
|
+
shared: "Shared",
|
|
1421
|
+
setup: "Setup",
|
|
1422
|
+
stepOf: (n, total) => `Step ${n} of ${total}`,
|
|
1423
|
+
permissionLevels: ["None", "View", "Edit", "Full"],
|
|
1424
|
+
memberCount: (n) => (n === 1 ? "1 member" : `${n} members`),
|
|
1425
|
+
invoice: "Invoice",
|
|
1426
|
+
billTo: "Bill to",
|
|
1427
|
+
issued: "Issued",
|
|
1428
|
+
due: "Due",
|
|
1429
|
+
untitledLine: "Untitled line",
|
|
1430
|
+
vatAt: (rate) => `VAT ${rate}`,
|
|
1431
|
+
totalDue: "Total due",
|
|
1432
|
+
matchedTo: (ref) => `matched to ${ref}`,
|
|
1433
|
+
matched: "Matched",
|
|
1434
|
+
match: "Match",
|
|
1435
|
+
noSuggestion: "No suggestion yet.",
|
|
1436
|
+
accept: "Accept",
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
/** The English defaults: every group together. */
|
|
1440
|
+
export const DEFAULT_STRINGS: UIStrings = /* @__PURE__ */ Object.assign(
|
|
1441
|
+
{},
|
|
1442
|
+
SHARED_STRINGS,
|
|
1443
|
+
ADMIN_STRINGS,
|
|
1444
|
+
AGENTS_STRINGS,
|
|
1445
|
+
APP_CHROME_STRINGS,
|
|
1446
|
+
APPROVALS_STRINGS,
|
|
1447
|
+
BUILDING_BLOCKS_STRINGS,
|
|
1448
|
+
CHARTS_STRINGS,
|
|
1449
|
+
CHAT_STRINGS,
|
|
1450
|
+
COMMERCE_STRINGS,
|
|
1451
|
+
DATA_DISPLAY_STRINGS,
|
|
1452
|
+
DATA_TABLE_STRINGS,
|
|
1453
|
+
DEVELOPER_STRINGS,
|
|
1454
|
+
FEEDBACK_STRINGS,
|
|
1455
|
+
FORM_STRINGS,
|
|
1456
|
+
FORMS_STRINGS,
|
|
1457
|
+
MAIL_STRINGS,
|
|
1458
|
+
MEDIA_STRINGS,
|
|
1459
|
+
NAVIGATION_STRINGS,
|
|
1460
|
+
OPERATIONS_STRINGS,
|
|
1461
|
+
PREVIEWS_STRINGS,
|
|
1462
|
+
PRIMITIVES_STRINGS,
|
|
1463
|
+
REAL_ESTATE_STRINGS,
|
|
1464
|
+
RICH_TEXT_EDITOR_STRINGS,
|
|
1465
|
+
SELECT_MENU_STRINGS,
|
|
1466
|
+
SHELL_STRINGS,
|
|
1467
|
+
SITE_STRINGS,
|
|
1468
|
+
WORKSPACE_STRINGS,
|
|
1469
|
+
);
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* A partial set of strings for `UIProvider messages`. Groups (such as `agentStatus`) can be
|
|
1473
|
+
* partial too: what is left out keeps its value.
|
|
1474
|
+
*/
|
|
1475
|
+
export type UIMessages = {
|
|
1476
|
+
[K in keyof UIStrings]?: UIStrings[K] extends (...args: never[]) => unknown
|
|
1477
|
+
? UIStrings[K]
|
|
1478
|
+
: UIStrings[K] extends object
|
|
1479
|
+
? Partial<UIStrings[K]>
|
|
1480
|
+
: UIStrings[K];
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
const isGroup = (v: unknown): v is Record<string, unknown> =>
|
|
1484
|
+
!!v && typeof v === "object" && !Array.isArray(v);
|
|
1485
|
+
|
|
1486
|
+
/** `base` with `messages` applied; groups (such as `agentStatus`) are merged one level deep. */
|
|
1487
|
+
export function mergeStrings(base: UIStrings, messages: UIMessages): UIStrings {
|
|
1488
|
+
return mergeMessages(base, messages) as UIStrings;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
/** Two partial sets merged, the second on top (what nested `UIProvider`s do). */
|
|
1492
|
+
export function mergeMessages(base: UIMessages, messages: UIMessages): UIMessages {
|
|
1493
|
+
const out: Record<string, unknown> = { ...base };
|
|
1494
|
+
for (const [k, v] of Object.entries(messages)) {
|
|
1495
|
+
if (v === undefined || v === null) continue;
|
|
1496
|
+
const prev = out[k];
|
|
1497
|
+
out[k] = isGroup(prev) && isGroup(v) ? { ...prev, ...v } : v;
|
|
1498
|
+
}
|
|
1499
|
+
return out as UIMessages;
|
|
1500
|
+
}
|