@cascivo/i18n 0.2.13 → 0.2.14
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/{index.d.mts → index.d.ts} +0 -10
- package/dist/index.js +549 -0
- package/package.json +7 -7
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -662
- package/dist/index.mjs.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReadonlySignal } from "@cascivo/core";
|
|
2
2
|
|
|
3
|
-
//#region src/locale.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The active locale string. This is a plain function (not a hook), so it cannot
|
|
6
5
|
* self-subscribe: a React component that reads it during render must call
|
|
@@ -19,8 +18,6 @@ declare function createLocale<const L extends string>(options: {
|
|
|
19
18
|
default: L;
|
|
20
19
|
supported: readonly L[];
|
|
21
20
|
}): LocaleStore<L>;
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/types.d.ts
|
|
24
21
|
/** CLDR plural-form branches (subset actually selected by Intl.PluralRules). */
|
|
25
22
|
interface PluralForms {
|
|
26
23
|
zero?: string;
|
|
@@ -43,15 +40,11 @@ type BranchParams<P extends PluralForms> = ParamKeys<Extract<P[keyof P], string>
|
|
|
43
40
|
type MessageParams<V extends MessageValue> = V extends string ? ParamKeys<V> : V extends PluralForms ? BranchParams<V> | 'count' : string;
|
|
44
41
|
/** No-placeholder messages need no params argument; others require a typed record. */
|
|
45
42
|
type TArgs<V extends MessageValue> = [MessageParams<V>] extends [never] ? [] : [params: { [K in MessageParams<V>]: string | number }];
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/messages.d.ts
|
|
48
43
|
declare function defineMessages<const T extends Record<string, MessageValue>>(namespace: string, messages: T): { [K in keyof T]: Message<T[K]> };
|
|
49
44
|
declare function defineCatalog<T extends Record<string, Message>>(messages: T, locale: string, dict: { [K in keyof T]: T[K]['value'] extends PluralForms ? PluralForms : string }): void;
|
|
50
45
|
/** Key-string lookup for serialized references (JSON configs). Untyped by design. */
|
|
51
46
|
declare function translateKey(key: string, params?: Record<string, string | number>): string;
|
|
52
47
|
declare function t<V extends MessageValue>(message: Message<V>, ...args: TArgs<V>): string;
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/format.d.ts
|
|
55
48
|
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
|
|
56
49
|
declare function formatDate(value: Date | number, options?: Intl.DateTimeFormatOptions): string;
|
|
57
50
|
declare function formatRelativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
|
|
@@ -66,8 +59,6 @@ interface FormatBytesOptions extends Intl.NumberFormatOptions {
|
|
|
66
59
|
* active `@cascivo/i18n` store.
|
|
67
60
|
*/
|
|
68
61
|
declare function formatBytes(bytes: number, options?: FormatBytesOptions): string;
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/builtin.d.ts
|
|
71
62
|
/**
|
|
72
63
|
* Built-in strings for cascade components. Components call
|
|
73
64
|
* `t(builtin.<component>.<key>)` as the default and accept a `labels` prop
|
|
@@ -371,6 +362,5 @@ declare const builtin: {
|
|
|
371
362
|
readonly commandMenuEmpty: Message<"No commands">;
|
|
372
363
|
};
|
|
373
364
|
};
|
|
374
|
-
//#endregion
|
|
375
365
|
export { type FormatBytesOptions, type LocaleStore, type Message, type MessageValue, type PluralForms, builtin, createLocale, currentLocale, defineCatalog, defineMessages, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, t, translateKey };
|
|
376
366
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import { signal as e } from "@cascivo/core";
|
|
2
|
+
//#region src/locale.ts
|
|
3
|
+
var t = e("en");
|
|
4
|
+
function n() {
|
|
5
|
+
return t.value;
|
|
6
|
+
}
|
|
7
|
+
function r(e) {
|
|
8
|
+
let n = /* @__PURE__ */ new Map(), r = new Set([e.default]);
|
|
9
|
+
return t.value = e.default, {
|
|
10
|
+
locale: t,
|
|
11
|
+
supported: e.supported,
|
|
12
|
+
registerCatalog(e, t) {
|
|
13
|
+
n.set(e, t);
|
|
14
|
+
},
|
|
15
|
+
async set(i) {
|
|
16
|
+
if (!e.supported.includes(i)) throw Error(`Unsupported locale "${i}" (supported: ${e.supported.join(", ")})`);
|
|
17
|
+
let a = n.get(i);
|
|
18
|
+
a && !r.has(i) && (await a(), r.add(i)), t.value = i;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/messages.ts
|
|
24
|
+
var i = /* @__PURE__ */ new Map(), a = e(0), o = /* @__PURE__ */ new Map();
|
|
25
|
+
function s(e, t) {
|
|
26
|
+
return Object.fromEntries(Object.entries(t).map(([t, n]) => {
|
|
27
|
+
let r = `${e}.${t}`;
|
|
28
|
+
return o.set(r, n), [t, {
|
|
29
|
+
key: r,
|
|
30
|
+
value: n
|
|
31
|
+
}];
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
function c(e, t, n) {
|
|
35
|
+
let r = i.get(t);
|
|
36
|
+
r || (r = /* @__PURE__ */ new Map(), i.set(t, r));
|
|
37
|
+
for (let [t, i] of Object.entries(e)) r.set(i.key, n[t]);
|
|
38
|
+
a.value++;
|
|
39
|
+
}
|
|
40
|
+
var l = /* @__PURE__ */ new Map();
|
|
41
|
+
function u(e, t) {
|
|
42
|
+
return t ? e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e) : e;
|
|
43
|
+
}
|
|
44
|
+
function d(e, t) {
|
|
45
|
+
a.value;
|
|
46
|
+
let r = n(), s = i.get(r)?.get(e) ?? o.get(e);
|
|
47
|
+
return s === void 0 ? e : f({
|
|
48
|
+
key: e,
|
|
49
|
+
value: s
|
|
50
|
+
}, t);
|
|
51
|
+
}
|
|
52
|
+
function f(e, ...t) {
|
|
53
|
+
if (a.value, e == null || typeof e.key != "string") return "";
|
|
54
|
+
let r = n(), o = i.get(r)?.get(e.key) ?? e.value, s = t[0];
|
|
55
|
+
if (typeof o == "string") return u(o, s);
|
|
56
|
+
let c = l.get(r);
|
|
57
|
+
return c || (c = new Intl.PluralRules(r), l.set(r, c)), u(o[c.select(Number(s?.count ?? 0))] ?? o.other, s);
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/format.ts
|
|
61
|
+
function p(e) {
|
|
62
|
+
let t = /* @__PURE__ */ new Map();
|
|
63
|
+
return (r) => {
|
|
64
|
+
let i = n(), a = `${i}|${JSON.stringify(r ?? {})}`, o = t.get(a);
|
|
65
|
+
return o || (o = e(i, r), t.set(a, o)), o;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
var m = p((e, t) => new Intl.NumberFormat(e, t)), h = p((e, t) => new Intl.DateTimeFormat(e, t)), g = p((e, t) => new Intl.RelativeTimeFormat(e, t)), _ = p((e, t) => new Intl.ListFormat(e, t));
|
|
69
|
+
function v(e, t) {
|
|
70
|
+
return m(t).format(e);
|
|
71
|
+
}
|
|
72
|
+
function y(e, t) {
|
|
73
|
+
return h(t).format(e);
|
|
74
|
+
}
|
|
75
|
+
function b(e, t, n) {
|
|
76
|
+
return g(n).format(e, t);
|
|
77
|
+
}
|
|
78
|
+
function x(e, t) {
|
|
79
|
+
return _(t).format(e);
|
|
80
|
+
}
|
|
81
|
+
var S = [
|
|
82
|
+
"byte",
|
|
83
|
+
"kilobyte",
|
|
84
|
+
"megabyte",
|
|
85
|
+
"gigabyte",
|
|
86
|
+
"terabyte",
|
|
87
|
+
"petabyte"
|
|
88
|
+
];
|
|
89
|
+
function C(e, t = {}) {
|
|
90
|
+
let { binary: n = !1, ...r } = t, i = n ? 1024 : 1e3, a = e < 0, o = Math.abs(e), s = 0;
|
|
91
|
+
for (; o >= i && s < S.length - 1;) o /= i, s++;
|
|
92
|
+
return v(a ? -o : o, {
|
|
93
|
+
style: "unit",
|
|
94
|
+
unit: S[s],
|
|
95
|
+
unitDisplay: "short",
|
|
96
|
+
maximumFractionDigits: s === 0 ? 0 : 1,
|
|
97
|
+
...r
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/builtin.ts
|
|
102
|
+
var w = {
|
|
103
|
+
pagination: s("cascade.pagination", {
|
|
104
|
+
itemsPerPage: "Items per page",
|
|
105
|
+
pageOf: "Page {page} of {total}",
|
|
106
|
+
range: "{start}–{end} of {total} items",
|
|
107
|
+
previous: "Previous page",
|
|
108
|
+
next: "Next page",
|
|
109
|
+
nav: "Pagination"
|
|
110
|
+
}),
|
|
111
|
+
toast: s("cascade.toast", {
|
|
112
|
+
dismiss: "Dismiss notification",
|
|
113
|
+
region: "Notifications"
|
|
114
|
+
}),
|
|
115
|
+
modal: s("cascade.modal", { close: "Close modal" }),
|
|
116
|
+
alert: s("cascade.alert", { dismiss: "Dismiss" }),
|
|
117
|
+
header: s("cascade.header", { nav: "Main" }),
|
|
118
|
+
search: s("cascade.search", {
|
|
119
|
+
label: "Search",
|
|
120
|
+
placeholder: "Search",
|
|
121
|
+
clear: "Clear search"
|
|
122
|
+
}),
|
|
123
|
+
commandMenu: s("cascade.commandMenu", {
|
|
124
|
+
label: "Command menu",
|
|
125
|
+
placeholder: "Type a command or search…",
|
|
126
|
+
empty: "No results found",
|
|
127
|
+
back: "Back",
|
|
128
|
+
loading: "Loading…",
|
|
129
|
+
matches: "{count} matches",
|
|
130
|
+
scopeLabel: "Scope",
|
|
131
|
+
clearScope: "Clear scope"
|
|
132
|
+
}),
|
|
133
|
+
breadcrumb: s("cascade.breadcrumb", { nav: "Breadcrumb" }),
|
|
134
|
+
toc: s("cascade.toc", { nav: "On this page" }),
|
|
135
|
+
datePicker: s("cascade.datePicker", {
|
|
136
|
+
placeholder: "Select a date",
|
|
137
|
+
previousMonth: "Previous month",
|
|
138
|
+
nextMonth: "Next month",
|
|
139
|
+
clear: "Clear date"
|
|
140
|
+
}),
|
|
141
|
+
combobox: s("cascade.combobox", {
|
|
142
|
+
placeholder: "Select an option",
|
|
143
|
+
empty: "No options found",
|
|
144
|
+
clear: "Clear selection",
|
|
145
|
+
search: "Search options"
|
|
146
|
+
}),
|
|
147
|
+
dataTable: s("cascade.dataTable", {
|
|
148
|
+
search: "Search",
|
|
149
|
+
empty: "No data",
|
|
150
|
+
selectAll: "Select all rows",
|
|
151
|
+
selectRow: "Select row",
|
|
152
|
+
itemsSelected: "{count} selected",
|
|
153
|
+
expandRow: "Expand row",
|
|
154
|
+
previousPage: "Previous page",
|
|
155
|
+
nextPage: "Next page"
|
|
156
|
+
}),
|
|
157
|
+
dock: s("cascade.dock", { nav: "Main navigation" }),
|
|
158
|
+
steps: s("cascade.steps", { label: "Steps" }),
|
|
159
|
+
overflowMenu: s("cascade.overflowMenu", { trigger: "More actions" }),
|
|
160
|
+
sideNav: s("cascade.sideNav", {
|
|
161
|
+
nav: "Side navigation",
|
|
162
|
+
collapse: "Collapse navigation",
|
|
163
|
+
expand: "Expand navigation"
|
|
164
|
+
}),
|
|
165
|
+
spinner: s("cascade.spinner", { label: "Loading" }),
|
|
166
|
+
numberInput: s("cascade.numberInput", {
|
|
167
|
+
increment: "Increment",
|
|
168
|
+
decrement: "Decrement"
|
|
169
|
+
}),
|
|
170
|
+
tag: s("cascade.tag", { dismiss: "Remove" }),
|
|
171
|
+
appShell: s("cascade.appShell", {
|
|
172
|
+
collapse: "Collapse navigation",
|
|
173
|
+
expand: "Expand navigation",
|
|
174
|
+
dismissError: "Dismiss error"
|
|
175
|
+
}),
|
|
176
|
+
charts: s("cascade.charts", {
|
|
177
|
+
legendToggle: "Toggle series {name}",
|
|
178
|
+
noData: "No data",
|
|
179
|
+
resetZoom: "Reset zoom",
|
|
180
|
+
exportPng: "Export PNG",
|
|
181
|
+
exportSvg: "Export SVG",
|
|
182
|
+
dataView: "Data view",
|
|
183
|
+
restore: "Restore"
|
|
184
|
+
}),
|
|
185
|
+
alertDialog: s("cascade.alertDialog", {
|
|
186
|
+
confirm: "Confirm",
|
|
187
|
+
cancel: "Cancel"
|
|
188
|
+
}),
|
|
189
|
+
sheet: s("cascade.sheet", { close: "Close panel" }),
|
|
190
|
+
bottomSheet: s("cascade.bottomSheet", {
|
|
191
|
+
close: "Close",
|
|
192
|
+
handle: "Drag to resize"
|
|
193
|
+
}),
|
|
194
|
+
actionSheet: s("cascade.actionSheet", {
|
|
195
|
+
label: "Actions",
|
|
196
|
+
cancel: "Cancel"
|
|
197
|
+
}),
|
|
198
|
+
pullToRefresh: s("cascade.pullToRefresh", {
|
|
199
|
+
pull: "Pull to refresh",
|
|
200
|
+
release: "Release to refresh",
|
|
201
|
+
refreshing: "Refreshing"
|
|
202
|
+
}),
|
|
203
|
+
fileUploader: s("cascade.fileUploader", {
|
|
204
|
+
label: "Upload files",
|
|
205
|
+
drop: "Drag and drop files here or click to upload",
|
|
206
|
+
remove: "Remove {name}",
|
|
207
|
+
uploading: "Uploading",
|
|
208
|
+
complete: "Upload complete",
|
|
209
|
+
error: "Upload failed"
|
|
210
|
+
}),
|
|
211
|
+
passwordInput: s("cascade.passwordInput", {
|
|
212
|
+
reveal: "Show password",
|
|
213
|
+
hide: "Hide password",
|
|
214
|
+
strengthWeak: "weak",
|
|
215
|
+
strengthFair: "fair",
|
|
216
|
+
strengthGood: "good",
|
|
217
|
+
strengthStrong: "strong",
|
|
218
|
+
strengthLabel: "Password strength: {level}"
|
|
219
|
+
}),
|
|
220
|
+
multiSelect: s("cascade.multiSelect", {
|
|
221
|
+
label: "Options",
|
|
222
|
+
placeholder: "Select options",
|
|
223
|
+
selected: "{count} selected",
|
|
224
|
+
search: "Search options",
|
|
225
|
+
noResults: "No options found"
|
|
226
|
+
}),
|
|
227
|
+
tagsInput: s("cascade.tagsInput", {
|
|
228
|
+
label: "Tags",
|
|
229
|
+
remove: "Remove {tag}",
|
|
230
|
+
placeholder: "Add tag…"
|
|
231
|
+
}),
|
|
232
|
+
otpInput: s("cascade.otpInput", {
|
|
233
|
+
label: "One-time code",
|
|
234
|
+
digit: "Digit {n}"
|
|
235
|
+
}),
|
|
236
|
+
ai: s("cascade.ai", {
|
|
237
|
+
generating: "Generating…",
|
|
238
|
+
done: "Done",
|
|
239
|
+
error: "Error",
|
|
240
|
+
send: "Send",
|
|
241
|
+
placeholder: "Type a message…",
|
|
242
|
+
you: "You",
|
|
243
|
+
assistant: "Assistant"
|
|
244
|
+
}),
|
|
245
|
+
shellHeader: s("cascade.shellHeader", {
|
|
246
|
+
skipToContent: "Skip to main content",
|
|
247
|
+
nav: "Main",
|
|
248
|
+
openMenu: "Open navigation",
|
|
249
|
+
closeMenu: "Close navigation"
|
|
250
|
+
}),
|
|
251
|
+
headerPanel: s("cascade.headerPanel", { close: "Close panel" }),
|
|
252
|
+
switcher: s("cascade.switcher", { label: "Switch application" }),
|
|
253
|
+
copyButton: s("cascade.copyButton", {
|
|
254
|
+
copy: "Copy",
|
|
255
|
+
copied: "Copied"
|
|
256
|
+
}),
|
|
257
|
+
skipNav: s("cascade.skipNav", { label: "Skip to content" }),
|
|
258
|
+
form: s("cascade.form", {
|
|
259
|
+
required: "Required",
|
|
260
|
+
invalid: "Invalid value"
|
|
261
|
+
}),
|
|
262
|
+
label: s("cascade.label", { required: "Required" }),
|
|
263
|
+
inlineLoading: s("cascade.inlineLoading", {
|
|
264
|
+
active: "Loading",
|
|
265
|
+
finished: "Loaded",
|
|
266
|
+
error: "Error"
|
|
267
|
+
}),
|
|
268
|
+
notification: s("cascade.notification", { dismiss: "Dismiss" }),
|
|
269
|
+
treeView: s("cascade.treeView", {
|
|
270
|
+
loading: "Loading…",
|
|
271
|
+
expand: "Expand",
|
|
272
|
+
collapse: "Collapse"
|
|
273
|
+
}),
|
|
274
|
+
carousel: s("cascade.carousel", {
|
|
275
|
+
region: "Carousel",
|
|
276
|
+
previous: "Previous slide",
|
|
277
|
+
next: "Next slide",
|
|
278
|
+
slide: "{n} of {total}",
|
|
279
|
+
goTo: "Go to slide {n}"
|
|
280
|
+
}),
|
|
281
|
+
calendar: s("cascade.calendar", {
|
|
282
|
+
previousMonth: "Previous month",
|
|
283
|
+
nextMonth: "Next month",
|
|
284
|
+
today: "Today"
|
|
285
|
+
}),
|
|
286
|
+
colorPicker: s("cascade.colorPicker", {
|
|
287
|
+
hue: "Hue",
|
|
288
|
+
alpha: "Alpha",
|
|
289
|
+
colorArea: "Saturation and lightness",
|
|
290
|
+
eyedropper: "Pick a color from the screen"
|
|
291
|
+
}),
|
|
292
|
+
drawer: s("cascade.drawer", { close: "Close" }),
|
|
293
|
+
menuButton: s("cascade.menuButton", { open: "Open menu" }),
|
|
294
|
+
resizable: s("cascade.resizable", { handle: "Resize panels" }),
|
|
295
|
+
codeSnippet: s("cascade.codeSnippet", {
|
|
296
|
+
copy: "Copy code",
|
|
297
|
+
copied: "Copied"
|
|
298
|
+
}),
|
|
299
|
+
dateRangePicker: s("cascade.dateRangePicker", {
|
|
300
|
+
label: "Date range",
|
|
301
|
+
placeholder: "Select a date range",
|
|
302
|
+
start: "Start date",
|
|
303
|
+
end: "End date",
|
|
304
|
+
apply: "Apply",
|
|
305
|
+
clear: "Clear"
|
|
306
|
+
}),
|
|
307
|
+
toggletip: s("cascade.toggletip", { label: "More information" }),
|
|
308
|
+
avatarGroup: s("cascade.avatarGroup", { more: "{count} more" }),
|
|
309
|
+
comparison: s("cascade.comparison", { label: "Comparison slider" }),
|
|
310
|
+
qrCode: s("cascade.qrCode", { label: "QR code" }),
|
|
311
|
+
flow: s("cascade.flow", {
|
|
312
|
+
zoomIn: "Zoom in",
|
|
313
|
+
zoomOut: "Zoom out",
|
|
314
|
+
fitView: "Fit view",
|
|
315
|
+
minimap: "Minimap",
|
|
316
|
+
play: "Play",
|
|
317
|
+
pause: "Pause",
|
|
318
|
+
next: "Next step",
|
|
319
|
+
previous: "Previous step",
|
|
320
|
+
restart: "Restart",
|
|
321
|
+
step: "Step {current} of {total}"
|
|
322
|
+
}),
|
|
323
|
+
logViewer: s("cascade.logViewer", {
|
|
324
|
+
label: "Log output",
|
|
325
|
+
search: "Search log",
|
|
326
|
+
follow: "Following",
|
|
327
|
+
paused: "Jump to latest",
|
|
328
|
+
copy: "Copy",
|
|
329
|
+
copied: "Copied",
|
|
330
|
+
empty: "No log output",
|
|
331
|
+
matches: "{count} matches",
|
|
332
|
+
lines: "{count} lines"
|
|
333
|
+
}),
|
|
334
|
+
editor: s("cascade.editor", {
|
|
335
|
+
label: "Code editor",
|
|
336
|
+
code: "Code",
|
|
337
|
+
find: "Find",
|
|
338
|
+
replace: "Replace",
|
|
339
|
+
findPlaceholder: "Find",
|
|
340
|
+
replacePlaceholder: "Replace with",
|
|
341
|
+
next: "Next match",
|
|
342
|
+
previous: "Previous match",
|
|
343
|
+
replaceOne: "Replace",
|
|
344
|
+
replaceAll: "Replace all",
|
|
345
|
+
close: "Close",
|
|
346
|
+
matchCase: "Match case",
|
|
347
|
+
toggleReplace: "Toggle replace",
|
|
348
|
+
noMatches: "No results",
|
|
349
|
+
findCount: "{current} of {total}",
|
|
350
|
+
commandMenu: "Command menu",
|
|
351
|
+
commandMenuEmpty: "No commands"
|
|
352
|
+
})
|
|
353
|
+
};
|
|
354
|
+
c(w.pagination, "de", {
|
|
355
|
+
itemsPerPage: "Einträge pro Seite",
|
|
356
|
+
pageOf: "Seite {page} von {total}",
|
|
357
|
+
range: "{start}–{end} von {total} Einträgen",
|
|
358
|
+
previous: "Vorherige Seite",
|
|
359
|
+
next: "Nächste Seite",
|
|
360
|
+
nav: "Seitennummerierung"
|
|
361
|
+
}), c(w.toast, "de", {
|
|
362
|
+
dismiss: "Benachrichtigung schließen",
|
|
363
|
+
region: "Benachrichtigungen"
|
|
364
|
+
}), c(w.modal, "de", { close: "Dialog schließen" }), c(w.alert, "de", { dismiss: "Schließen" }), c(w.header, "de", { nav: "Hauptnavigation" }), c(w.search, "de", {
|
|
365
|
+
label: "Suche",
|
|
366
|
+
placeholder: "Suchen",
|
|
367
|
+
clear: "Suche löschen"
|
|
368
|
+
}), c(w.commandMenu, "de", {
|
|
369
|
+
label: "Befehlsmenü",
|
|
370
|
+
placeholder: "Befehl oder Suche eingeben…",
|
|
371
|
+
empty: "Keine Ergebnisse",
|
|
372
|
+
back: "Zurück",
|
|
373
|
+
loading: "Wird geladen…",
|
|
374
|
+
matches: "{count} Treffer",
|
|
375
|
+
scopeLabel: "Bereich",
|
|
376
|
+
clearScope: "Bereich löschen"
|
|
377
|
+
}), c(w.breadcrumb, "de", { nav: "Navigationspfad" }), c(w.datePicker, "de", {
|
|
378
|
+
placeholder: "Datum auswählen",
|
|
379
|
+
previousMonth: "Vorheriger Monat",
|
|
380
|
+
nextMonth: "Nächster Monat",
|
|
381
|
+
clear: "Datum löschen"
|
|
382
|
+
}), c(w.combobox, "de", {
|
|
383
|
+
placeholder: "Option auswählen",
|
|
384
|
+
empty: "Keine Optionen gefunden",
|
|
385
|
+
clear: "Auswahl löschen",
|
|
386
|
+
search: "Optionen durchsuchen"
|
|
387
|
+
}), c(w.dataTable, "de", {
|
|
388
|
+
search: "Suchen",
|
|
389
|
+
empty: "Keine Daten",
|
|
390
|
+
selectAll: "Alle Zeilen auswählen",
|
|
391
|
+
selectRow: "Zeile auswählen",
|
|
392
|
+
itemsSelected: "{count} ausgewählt",
|
|
393
|
+
expandRow: "Zeile aufklappen",
|
|
394
|
+
previousPage: "Vorherige Seite",
|
|
395
|
+
nextPage: "Nächste Seite"
|
|
396
|
+
}), c(w.dock, "de", { nav: "Hauptnavigation" }), c(w.steps, "de", { label: "Schritte" }), c(w.overflowMenu, "de", { trigger: "Weitere Aktionen" }), c(w.sideNav, "de", {
|
|
397
|
+
nav: "Seitennavigation",
|
|
398
|
+
collapse: "Navigation einklappen",
|
|
399
|
+
expand: "Navigation ausklappen"
|
|
400
|
+
}), c(w.spinner, "de", { label: "Wird geladen" }), c(w.numberInput, "de", {
|
|
401
|
+
increment: "Erhöhen",
|
|
402
|
+
decrement: "Verringern"
|
|
403
|
+
}), c(w.tag, "de", { dismiss: "Entfernen" }), c(w.appShell, "de", {
|
|
404
|
+
collapse: "Navigation einklappen",
|
|
405
|
+
expand: "Navigation ausklappen",
|
|
406
|
+
dismissError: "Fehler schließen"
|
|
407
|
+
}), c(w.charts, "de", {
|
|
408
|
+
legendToggle: "Reihe {name} umschalten",
|
|
409
|
+
noData: "Keine Daten",
|
|
410
|
+
resetZoom: "Zoom zurücksetzen",
|
|
411
|
+
exportPng: "PNG exportieren",
|
|
412
|
+
exportSvg: "SVG exportieren",
|
|
413
|
+
dataView: "Datenansicht",
|
|
414
|
+
restore: "Zurücksetzen"
|
|
415
|
+
}), c(w.alertDialog, "de", {
|
|
416
|
+
confirm: "Bestätigen",
|
|
417
|
+
cancel: "Abbrechen"
|
|
418
|
+
}), c(w.sheet, "de", { close: "Bereich schließen" }), c(w.bottomSheet, "de", {
|
|
419
|
+
close: "Schließen",
|
|
420
|
+
handle: "Zum Anpassen ziehen"
|
|
421
|
+
}), c(w.actionSheet, "de", {
|
|
422
|
+
label: "Aktionen",
|
|
423
|
+
cancel: "Abbrechen"
|
|
424
|
+
}), c(w.pullToRefresh, "de", {
|
|
425
|
+
pull: "Zum Aktualisieren ziehen",
|
|
426
|
+
release: "Zum Aktualisieren loslassen",
|
|
427
|
+
refreshing: "Wird aktualisiert"
|
|
428
|
+
}), c(w.fileUploader, "de", {
|
|
429
|
+
label: "Dateien hochladen",
|
|
430
|
+
drop: "Dateien hier ablegen oder klicken zum Hochladen",
|
|
431
|
+
remove: "{name} entfernen",
|
|
432
|
+
uploading: "Wird hochgeladen",
|
|
433
|
+
complete: "Hochladen abgeschlossen",
|
|
434
|
+
error: "Hochladen fehlgeschlagen"
|
|
435
|
+
}), c(w.passwordInput, "de", {
|
|
436
|
+
reveal: "Passwort anzeigen",
|
|
437
|
+
hide: "Passwort verbergen",
|
|
438
|
+
strengthWeak: "schwach",
|
|
439
|
+
strengthFair: "mäßig",
|
|
440
|
+
strengthGood: "gut",
|
|
441
|
+
strengthStrong: "stark",
|
|
442
|
+
strengthLabel: "Passwortstärke: {level}"
|
|
443
|
+
}), c(w.multiSelect, "de", {
|
|
444
|
+
label: "Optionen",
|
|
445
|
+
placeholder: "Optionen auswählen",
|
|
446
|
+
selected: "{count} ausgewählt",
|
|
447
|
+
search: "Optionen durchsuchen",
|
|
448
|
+
noResults: "Keine Optionen gefunden"
|
|
449
|
+
}), c(w.tagsInput, "de", {
|
|
450
|
+
label: "Schlagwörter",
|
|
451
|
+
remove: "{tag} entfernen",
|
|
452
|
+
placeholder: "Tag hinzufügen…"
|
|
453
|
+
}), c(w.otpInput, "de", {
|
|
454
|
+
label: "Einmalcode",
|
|
455
|
+
digit: "Ziffer {n}"
|
|
456
|
+
}), c(w.ai, "de", {
|
|
457
|
+
generating: "Wird generiert…",
|
|
458
|
+
done: "Fertig",
|
|
459
|
+
error: "Fehler",
|
|
460
|
+
send: "Senden",
|
|
461
|
+
placeholder: "Nachricht eingeben…",
|
|
462
|
+
you: "Du",
|
|
463
|
+
assistant: "Assistent"
|
|
464
|
+
}), c(w.shellHeader, "de", {
|
|
465
|
+
skipToContent: "Zum Hauptinhalt springen",
|
|
466
|
+
nav: "Hauptnavigation",
|
|
467
|
+
openMenu: "Navigation öffnen",
|
|
468
|
+
closeMenu: "Navigation schließen"
|
|
469
|
+
}), c(w.headerPanel, "de", { close: "Panel schließen" }), c(w.switcher, "de", { label: "Anwendung wechseln" }), c(w.copyButton, "de", {
|
|
470
|
+
copy: "Kopieren",
|
|
471
|
+
copied: "Kopiert"
|
|
472
|
+
}), c(w.skipNav, "de", { label: "Zum Inhalt springen" }), c(w.form, "de", {
|
|
473
|
+
required: "Pflichtfeld",
|
|
474
|
+
invalid: "Ungültiger Wert"
|
|
475
|
+
}), c(w.label, "de", { required: "Erforderlich" }), c(w.inlineLoading, "de", {
|
|
476
|
+
active: "Wird geladen",
|
|
477
|
+
finished: "Geladen",
|
|
478
|
+
error: "Fehler"
|
|
479
|
+
}), c(w.notification, "de", { dismiss: "Schließen" }), c(w.treeView, "de", {
|
|
480
|
+
loading: "Wird geladen…",
|
|
481
|
+
expand: "Aufklappen",
|
|
482
|
+
collapse: "Zuklappen"
|
|
483
|
+
}), c(w.carousel, "de", {
|
|
484
|
+
region: "Karussell",
|
|
485
|
+
previous: "Vorherige Folie",
|
|
486
|
+
next: "Nächste Folie",
|
|
487
|
+
slide: "{n} von {total}",
|
|
488
|
+
goTo: "Zu Folie {n}"
|
|
489
|
+
}), c(w.calendar, "de", {
|
|
490
|
+
previousMonth: "Vorheriger Monat",
|
|
491
|
+
nextMonth: "Nächster Monat",
|
|
492
|
+
today: "Heute"
|
|
493
|
+
}), c(w.colorPicker, "de", {
|
|
494
|
+
hue: "Farbton",
|
|
495
|
+
alpha: "Alpha",
|
|
496
|
+
colorArea: "Sättigung und Helligkeit",
|
|
497
|
+
eyedropper: "Farbe vom Bildschirm wählen"
|
|
498
|
+
}), c(w.drawer, "de", { close: "Schließen" }), c(w.menuButton, "de", { open: "Menü öffnen" }), c(w.resizable, "de", { handle: "Bereiche anpassen" }), c(w.codeSnippet, "de", {
|
|
499
|
+
copy: "Code kopieren",
|
|
500
|
+
copied: "Kopiert"
|
|
501
|
+
}), c(w.dateRangePicker, "de", {
|
|
502
|
+
label: "Zeitraum",
|
|
503
|
+
placeholder: "Zeitraum auswählen",
|
|
504
|
+
start: "Startdatum",
|
|
505
|
+
end: "Enddatum",
|
|
506
|
+
apply: "Anwenden",
|
|
507
|
+
clear: "Löschen"
|
|
508
|
+
}), c(w.toggletip, "de", { label: "Weitere Informationen" }), c(w.toc, "de", { nav: "Auf dieser Seite" }), c(w.avatarGroup, "de", { more: "{count} weitere" }), c(w.comparison, "de", { label: "Vergleichsregler" }), c(w.qrCode, "de", { label: "QR-Code" }), c(w.flow, "de", {
|
|
509
|
+
zoomIn: "Vergrößern",
|
|
510
|
+
zoomOut: "Verkleinern",
|
|
511
|
+
fitView: "Ansicht anpassen",
|
|
512
|
+
minimap: "Übersichtskarte",
|
|
513
|
+
play: "Abspielen",
|
|
514
|
+
pause: "Pause",
|
|
515
|
+
next: "Nächster Schritt",
|
|
516
|
+
previous: "Vorheriger Schritt",
|
|
517
|
+
restart: "Neu starten",
|
|
518
|
+
step: "Schritt {current} von {total}"
|
|
519
|
+
}), c(w.logViewer, "de", {
|
|
520
|
+
label: "Protokollausgabe",
|
|
521
|
+
search: "Protokoll durchsuchen",
|
|
522
|
+
follow: "Folgt",
|
|
523
|
+
paused: "Zum Neuesten springen",
|
|
524
|
+
copy: "Kopieren",
|
|
525
|
+
copied: "Kopiert",
|
|
526
|
+
empty: "Keine Protokollausgabe",
|
|
527
|
+
matches: "{count} Treffer",
|
|
528
|
+
lines: "{count} Zeilen"
|
|
529
|
+
}), c(w.editor, "de", {
|
|
530
|
+
label: "Code-Editor",
|
|
531
|
+
code: "Code",
|
|
532
|
+
find: "Suchen",
|
|
533
|
+
replace: "Ersetzen",
|
|
534
|
+
findPlaceholder: "Suchen",
|
|
535
|
+
replacePlaceholder: "Ersetzen durch",
|
|
536
|
+
next: "Nächster Treffer",
|
|
537
|
+
previous: "Vorheriger Treffer",
|
|
538
|
+
replaceOne: "Ersetzen",
|
|
539
|
+
replaceAll: "Alle ersetzen",
|
|
540
|
+
close: "Schließen",
|
|
541
|
+
matchCase: "Groß-/Kleinschreibung",
|
|
542
|
+
toggleReplace: "Ersetzen umschalten",
|
|
543
|
+
noMatches: "Keine Treffer",
|
|
544
|
+
findCount: "{current} von {total}",
|
|
545
|
+
commandMenu: "Befehlsmenü",
|
|
546
|
+
commandMenuEmpty: "Keine Befehle"
|
|
547
|
+
});
|
|
548
|
+
//#endregion
|
|
549
|
+
export { w as builtin, r as createLocale, n as currentLocale, c as defineCatalog, s as defineMessages, C as formatBytes, y as formatDate, x as formatList, v as formatNumber, b as formatRelativeTime, f as t, d as translateKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cascivo/i18n",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Signal-driven locale store, typed message catalogs, and Intl-based formatting for cascivo",
|
|
6
6
|
"keywords": [
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"type": "module",
|
|
29
|
-
"types": "./dist/index.d.
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
30
|
"exports": {
|
|
31
31
|
"./package.json": "./package.json",
|
|
32
32
|
".": {
|
|
33
|
-
"types": "./dist/index.d.
|
|
34
|
-
"import": "./dist/index.
|
|
35
|
-
"default": "./dist/index.
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js",
|
|
35
|
+
"default": "./dist/index.js"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"provenance": true
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cascivo/core": "^0.7.
|
|
43
|
+
"@cascivo/core": "^0.7.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@preact/signals-react": "^3",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@preact/signals-react": ">=3.0.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"build": "vp
|
|
54
|
+
"build": "vp build && node scripts/flatten-types.mjs && node scripts/check-types-flat.mjs",
|
|
55
55
|
"check": "tsc --noEmit",
|
|
56
56
|
"test": "vp test",
|
|
57
57
|
"dev": "vp pack --watch"
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/locale.ts","../src/types.ts","../src/messages.ts","../src/format.ts","../src/builtin.ts"],"mappings":";;;;;AAaA;;;;iBAAgB,aAAA;AAAA,UAIC,WAAA;EACf,MAAA,EAAQ,cAAA,CAAe,CAAA;EACvB,SAAA,WAAoB,CAAA;EACpB,GAAA,CAAI,MAAA,EAAQ,CAAA,GAAI,OAAA;EAFR;EAIR,eAAA,CAAgB,MAAA,EAAQ,CAAA,EAAG,IAAA,QAAY,OAAA;AAAA;AAAA,iBAGzB,YAAA,yBAAqC,OAAA;EACnD,OAAA,EAAS,CAAA;EACT,SAAA,WAAoB,CAAA;AAAA,IAClB,WAAA,CAAY,CAAA;;;;UC3BC,WAAA;EACf,IAAA;EACA,GAAA;EACA,GAAA;EACA,GAAA;EACA,IAAA;EACA,KAAA;AAAA;AAAA,KAGU,YAAA,YAAwB,WAAW;AAAA,UAE9B,OAAA,WAAkB,YAAA,GAAe,YAAA;EDMzB;ECJvB,GAAA;EDKoB;ECHpB,KAAA,EAAO,CAAA;AAAA;;KAIJ,SAAA,qBAA8B,CAAA,6CAC/B,CAAA,GAAI,SAAA,CAAU,CAAA;AAAA,KAGb,YAAA,WAAuB,WAAA,IAAe,SAAA,CAAU,OAAA,CAAQ,CAAA,OAAQ,CAAA;AAAA,KAEzD,aAAA,WAAwB,YAAA,IAAgB,CAAA,kBAChD,SAAA,CAAU,CAAA,IACV,CAAA,SAAU,WAAA,GACR,YAAA,CAAa,CAAA;;KAIP,KAAA,WAAgB,YAAA,KAAiB,aAAA,CAAc,CAAA,2BAEtD,MAAA,UAAgB,aAAA,CAAc,CAAA;;;iBCxBnB,cAAA,iBAA+B,MAAA,SAAe,YAAA,GAC5D,SAAA,UACA,QAAA,EAAU,CAAA,iBACK,CAAA,GAAI,OAAA,CAAQ,CAAA,CAAE,CAAA;AAAA,iBAUf,aAAA,WAAwB,MAAA,SAAe,OAAA,GACrD,QAAA,EAAU,CAAA,EACV,MAAA,UACA,IAAA,gBAAoB,CAAA,GAAI,CAAA,CAAE,CAAA,mBAAoB,WAAA,GAAc,WAAA;AFdjC;AAAA,iBEqCb,YAAA,CAAa,GAAA,UAAa,MAAA,GAAS,MAAM;AAAA,iBAUzC,CAAA,WAAY,YAAA,EAAc,OAAA,EAAS,OAAA,CAAQ,CAAA,MAAO,IAAA,EAAM,KAAA,CAAM,CAAA;;;iBC9B9D,YAAA,CAAa,KAAA,UAAe,OAAA,GAAU,IAAA,CAAK,mBAAmB;AAAA,iBAI9D,UAAA,CAAW,KAAA,EAAO,IAAA,WAAe,OAAA,GAAU,IAAA,CAAK,qBAAqB;AAAA,iBAIrE,kBAAA,CACd,KAAA,UACA,IAAA,EAAM,IAAA,CAAK,sBAAA,EACX,OAAA,GAAU,IAAA,CAAK,yBAAyB;AAAA,iBAK1B,UAAA,CAAW,KAAA,YAAiB,OAAA,GAAU,IAAA,CAAK,iBAAiB;AAAA,UAM3D,kBAAA,SAA2B,IAAA,CAAK,mBAAmB;;EAElE,MAAA;AAAA;AHrCF;;;;;AAAA,iBG6CgB,WAAA,CAAY,KAAA,UAAe,OAAA,GAAS,kBAAuB;;;;;;AHjD3E;;cINa,OAAA;;2BAySZ,OAAA;IAAA"}
|