@burdenoff/microfe-i18n 2026.624.1 → 2026.625.1
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/i18n/pages/ImportExportPage.js +358 -319
- package/dist/i18n/pages/LanguagesListPage.js +120 -88
- package/dist/i18n/pages/LocaleConfigPage.js +269 -243
- package/dist/i18n/pages/ProductsListPage.js +147 -84
- package/dist/i18n/pages/ProgressDashboardPage.js +340 -283
- package/dist/i18n/pages/ReviewQueuePage.js +186 -149
- package/dist/i18n/pages/TranslationEditorPage.js +166 -115
- package/dist/node_modules/lucide-react/dist/esm/icons/boxes.js +54 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +11 -0
- package/package.json +2 -2
|
@@ -6,174 +6,206 @@ import { useI18n as i } from "../providers/I18nProvider.js";
|
|
|
6
6
|
import { useI18nStore as a } from "../store/i18nStore.js";
|
|
7
7
|
import { useState as o } from "react";
|
|
8
8
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
import { CTAOverflowMenu as u, EmphasisPanel as d, GlassCard as f, GradientText as p, ShowMore as m } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/i18n/pages/ImportExportPage.tsx
|
|
10
|
-
var
|
|
11
|
-
let { t:
|
|
11
|
+
var h = ({ mode: h }) => {
|
|
12
|
+
let { t: g } = i(), _ = (e, t, n) => g(e, t, n), { importState: v, startImport: y, resetImport: b } = a(), [x, S] = o("json"), [C, w] = o(null), T = (e) => {
|
|
13
|
+
let t = e.target.files?.[0];
|
|
14
|
+
t && w(t);
|
|
15
|
+
}, E = () => {
|
|
16
|
+
C && (y(x, "job-123"), console.log("Starting import:", C.name, x));
|
|
17
|
+
}, D = () => {
|
|
18
|
+
console.log("Starting export:", x);
|
|
19
|
+
}, O = "w-full rounded-lg border border-border-seam bg-bg-elevated px-3 py-2 text-sm text-text-primary focus:border-action-primary-bg focus-visible:shadow-[var(--shadow-focus)] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]", k = "size-4 rounded border-border-seam text-primary focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]", A = /* @__PURE__ */ l(s, { children: [
|
|
20
|
+
/* @__PURE__ */ c("option", {
|
|
21
|
+
value: "json",
|
|
22
|
+
children: _("i18n.shared.format.json", "JSON (i18next nested)")
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ c("option", {
|
|
25
|
+
value: "csv",
|
|
26
|
+
children: _("i18n.shared.format.csv", "CSV")
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ c("option", {
|
|
29
|
+
value: "xlsx",
|
|
30
|
+
children: _("i18n.shared.format.xlsx", "Excel (XLSX)")
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ c("option", {
|
|
33
|
+
value: "po",
|
|
34
|
+
children: _("i18n.shared.format.po", "Gettext (PO)")
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ c("option", {
|
|
37
|
+
value: "xliff",
|
|
38
|
+
children: _("i18n.shared.format.xliff", "XLIFF")
|
|
39
|
+
})
|
|
40
|
+
] });
|
|
12
41
|
return /* @__PURE__ */ l("div", {
|
|
13
|
-
className: "
|
|
42
|
+
className: "min-h-full w-full bg-bg-surface",
|
|
14
43
|
children: [/* @__PURE__ */ c("div", {
|
|
15
|
-
className: "border-b border-border-
|
|
16
|
-
children: /* @__PURE__ */
|
|
17
|
-
className: "flex items-center gap-
|
|
18
|
-
children:
|
|
19
|
-
className: "
|
|
20
|
-
children:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})
|
|
44
|
+
className: "border-b border-border-seam bg-bg-surface px-6 py-6 sm:px-8 lg:px-10",
|
|
45
|
+
children: /* @__PURE__ */ l("div", {
|
|
46
|
+
className: "mx-auto flex max-w-2xl items-center gap-4",
|
|
47
|
+
children: [/* @__PURE__ */ c("div", {
|
|
48
|
+
className: "flex size-11 shrink-0 items-center justify-center rounded-xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
|
|
49
|
+
children: c(h === "import" ? r : t, {
|
|
50
|
+
className: "size-5",
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
})
|
|
53
|
+
}), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
|
|
54
|
+
className: "text-2xl font-bold tracking-tight text-text-primary",
|
|
55
|
+
children: h === "import" ? /* @__PURE__ */ l(s, { children: [
|
|
56
|
+
/* @__PURE__ */ c(p, { children: _("i18n.import.title.verb", "Import") }),
|
|
57
|
+
" ",
|
|
58
|
+
_("i18n.import.title.noun", "Translations")
|
|
59
|
+
] }) : /* @__PURE__ */ l(s, { children: [
|
|
60
|
+
/* @__PURE__ */ c(p, { children: _("i18n.export.title.verb", "Export") }),
|
|
61
|
+
" ",
|
|
62
|
+
_("i18n.export.title.noun", "Translations")
|
|
63
|
+
] })
|
|
64
|
+
}), /* @__PURE__ */ c("p", {
|
|
65
|
+
className: "mt-0.5 text-sm text-text-secondary",
|
|
66
|
+
children: h === "import" ? _("i18n.import.subtitle", "Bring translations in from a file") : _("i18n.export.subtitle", "Download translations in your chosen format")
|
|
67
|
+
})] })]
|
|
25
68
|
})
|
|
26
69
|
}), /* @__PURE__ */ c("div", {
|
|
27
|
-
className: "
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
className: "
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
className: "
|
|
36
|
-
children: f("i18n.import.fields.format", "Select Format")
|
|
37
|
-
}), /* @__PURE__ */ l("select", {
|
|
38
|
-
id: "import-format",
|
|
39
|
-
value: g,
|
|
40
|
-
onChange: (e) => _(e.target.value),
|
|
41
|
-
className: "w-full rounded-md border border-border-subtle bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
70
|
+
className: "mx-auto max-w-2xl px-6 py-8 sm:px-8 lg:px-10",
|
|
71
|
+
children: h === "import" ? /* @__PURE__ */ l("div", {
|
|
72
|
+
className: "space-y-6",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ c(f, {
|
|
75
|
+
treatment: "plain",
|
|
76
|
+
className: "border-border-seam p-6",
|
|
77
|
+
children: /* @__PURE__ */ l("div", {
|
|
78
|
+
className: "space-y-6",
|
|
42
79
|
children: [
|
|
43
|
-
/* @__PURE__ */ c("
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */ c("
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children:
|
|
58
|
-
}),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}),
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}),
|
|
129
|
-
/* @__PURE__ */ c("option", {
|
|
130
|
-
value: "billing",
|
|
131
|
-
children: "Billing"
|
|
132
|
-
}),
|
|
133
|
-
/* @__PURE__ */ c("option", {
|
|
134
|
-
value: "calendar",
|
|
135
|
-
children: "Calendar"
|
|
136
|
-
})
|
|
137
|
-
]
|
|
138
|
-
})] })]
|
|
139
|
-
}),
|
|
140
|
-
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
141
|
-
htmlFor: "import-target-language",
|
|
142
|
-
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
143
|
-
children: f("i18n.import.fields.targetLanguage", "Target Language")
|
|
144
|
-
}), /* @__PURE__ */ l("select", {
|
|
145
|
-
id: "import-target-language",
|
|
146
|
-
className: "w-full rounded-md border border-border-subtle bg-surface-elevated px-3 py-2 text-sm text-content-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary",
|
|
147
|
-
children: [
|
|
148
|
-
/* @__PURE__ */ c("option", {
|
|
149
|
-
value: "es-ES",
|
|
150
|
-
children: f("i18n.shared.language.esEs", "Spanish (es-ES)")
|
|
151
|
-
}),
|
|
152
|
-
/* @__PURE__ */ c("option", {
|
|
153
|
-
value: "fr-FR",
|
|
154
|
-
children: f("i18n.shared.language.frFr", "French (fr-FR)")
|
|
80
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
81
|
+
htmlFor: "import-format",
|
|
82
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
83
|
+
children: _("i18n.import.fields.format", "Select Format")
|
|
84
|
+
}), /* @__PURE__ */ c("select", {
|
|
85
|
+
id: "import-format",
|
|
86
|
+
value: x,
|
|
87
|
+
onChange: (e) => S(e.target.value),
|
|
88
|
+
className: O,
|
|
89
|
+
children: A
|
|
90
|
+
})] }),
|
|
91
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
92
|
+
htmlFor: "import-upload-file",
|
|
93
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
94
|
+
children: _("i18n.import.fields.uploadFile", "Upload File")
|
|
95
|
+
}), /* @__PURE__ */ l("div", {
|
|
96
|
+
className: "relative rounded-lg border-2 border-dashed border-border-seam bg-bg-surface p-8 text-center transition-colors hover:border-action-primary-bg",
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ c("input", {
|
|
99
|
+
id: "import-upload-file",
|
|
100
|
+
type: "file",
|
|
101
|
+
"aria-label": _("i18n.import.fields.uploadFile", "Upload File"),
|
|
102
|
+
onChange: T,
|
|
103
|
+
accept: ".json,.csv,.xlsx,.po,.xliff",
|
|
104
|
+
className: "absolute inset-0 cursor-pointer opacity-0"
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ c(r, {
|
|
107
|
+
className: "mx-auto mb-4 size-12 text-text-tertiary",
|
|
108
|
+
"aria-hidden": "true"
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ c("p", {
|
|
111
|
+
className: "mb-1 text-sm font-medium text-text-primary",
|
|
112
|
+
children: C ? C.name : _("i18n.import.fields.dropzonePlaceholder", "Drop file here or click to browse")
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ c("p", {
|
|
115
|
+
className: "text-xs text-text-tertiary",
|
|
116
|
+
children: _("i18n.import.fields.supportedFormats", "Supported formats: JSON, CSV, XLSX, PO, XLIFF")
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
})] }),
|
|
120
|
+
/* @__PURE__ */ l("div", {
|
|
121
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
122
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
123
|
+
htmlFor: "import-product",
|
|
124
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
125
|
+
children: _("i18n.import.fields.product", "Product")
|
|
126
|
+
}), /* @__PURE__ */ l("select", {
|
|
127
|
+
id: "import-product",
|
|
128
|
+
className: O,
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ c("option", {
|
|
131
|
+
value: "workspaces",
|
|
132
|
+
children: "Workspaces"
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ c("option", {
|
|
135
|
+
value: "tenant",
|
|
136
|
+
children: "Tenant"
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ c("option", {
|
|
139
|
+
value: "botlit",
|
|
140
|
+
children: "Botlit"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
144
|
+
htmlFor: "import-module",
|
|
145
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
146
|
+
children: _("i18n.import.fields.module", "Module")
|
|
147
|
+
}), /* @__PURE__ */ l("select", {
|
|
148
|
+
id: "import-module",
|
|
149
|
+
className: O,
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ c("option", {
|
|
152
|
+
value: "auth",
|
|
153
|
+
children: "Auth"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ c("option", {
|
|
156
|
+
value: "billing",
|
|
157
|
+
children: "Billing"
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ c("option", {
|
|
160
|
+
value: "calendar",
|
|
161
|
+
children: "Calendar"
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
})] })]
|
|
155
165
|
}),
|
|
156
|
-
/* @__PURE__ */ c("
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
166
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
167
|
+
htmlFor: "import-target-language",
|
|
168
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
169
|
+
children: _("i18n.import.fields.targetLanguage", "Target Language")
|
|
170
|
+
}), /* @__PURE__ */ l("select", {
|
|
171
|
+
id: "import-target-language",
|
|
172
|
+
className: O,
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ c("option", {
|
|
175
|
+
value: "es-ES",
|
|
176
|
+
children: _("i18n.shared.language.esEs", "Spanish (es-ES)")
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ c("option", {
|
|
179
|
+
value: "fr-FR",
|
|
180
|
+
children: _("i18n.shared.language.frFr", "French (fr-FR)")
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ c("option", {
|
|
183
|
+
value: "de-DE",
|
|
184
|
+
children: _("i18n.shared.language.deDe", "German (de-DE)")
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
})] })
|
|
160
188
|
]
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
189
|
+
})
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ c(m, {
|
|
192
|
+
collapsedHeight: 0,
|
|
193
|
+
label: _("i18n.import.options.show", "Import options"),
|
|
194
|
+
children: /* @__PURE__ */ l("div", {
|
|
195
|
+
className: "space-y-2 pt-4",
|
|
164
196
|
children: [
|
|
165
197
|
/* @__PURE__ */ l("div", {
|
|
166
198
|
className: "flex items-center gap-2",
|
|
167
199
|
children: [/* @__PURE__ */ c("input", {
|
|
168
200
|
type: "checkbox",
|
|
169
201
|
id: "create-namespaces",
|
|
170
|
-
"aria-label":
|
|
202
|
+
"aria-label": _("i18n.import.options.createNamespaces", "Create missing namespaces automatically"),
|
|
171
203
|
defaultChecked: !0,
|
|
172
|
-
className:
|
|
204
|
+
className: k
|
|
173
205
|
}), /* @__PURE__ */ c("label", {
|
|
174
206
|
htmlFor: "create-namespaces",
|
|
175
|
-
className: "text-sm text-
|
|
176
|
-
children:
|
|
207
|
+
className: "text-sm text-text-primary",
|
|
208
|
+
children: _("i18n.import.options.createNamespaces", "Create missing namespaces automatically")
|
|
177
209
|
})]
|
|
178
210
|
}),
|
|
179
211
|
/* @__PURE__ */ l("div", {
|
|
@@ -181,13 +213,13 @@ var u = ({ mode: u }) => {
|
|
|
181
213
|
children: [/* @__PURE__ */ c("input", {
|
|
182
214
|
type: "checkbox",
|
|
183
215
|
id: "update-existing",
|
|
184
|
-
"aria-label":
|
|
216
|
+
"aria-label": _("i18n.import.options.updateExisting", "Update existing translations"),
|
|
185
217
|
defaultChecked: !0,
|
|
186
|
-
className:
|
|
218
|
+
className: k
|
|
187
219
|
}), /* @__PURE__ */ c("label", {
|
|
188
220
|
htmlFor: "update-existing",
|
|
189
|
-
className: "text-sm text-
|
|
190
|
-
children:
|
|
221
|
+
className: "text-sm text-text-primary",
|
|
222
|
+
children: _("i18n.import.options.updateExisting", "Update existing translations")
|
|
191
223
|
})]
|
|
192
224
|
}),
|
|
193
225
|
/* @__PURE__ */ l("div", {
|
|
@@ -195,199 +227,206 @@ var u = ({ mode: u }) => {
|
|
|
195
227
|
children: [/* @__PURE__ */ c("input", {
|
|
196
228
|
type: "checkbox",
|
|
197
229
|
id: "skip-errors",
|
|
198
|
-
"aria-label":
|
|
199
|
-
className:
|
|
230
|
+
"aria-label": _("i18n.import.options.skipErrors", "Skip validation errors (import valid only)"),
|
|
231
|
+
className: k
|
|
200
232
|
}), /* @__PURE__ */ c("label", {
|
|
201
233
|
htmlFor: "skip-errors",
|
|
202
|
-
className: "text-sm text-
|
|
203
|
-
children:
|
|
234
|
+
className: "text-sm text-text-primary",
|
|
235
|
+
children: _("i18n.import.options.skipErrors", "Skip validation errors (import valid only)")
|
|
204
236
|
})]
|
|
205
237
|
})
|
|
206
238
|
]
|
|
207
|
-
}),
|
|
208
|
-
p.jobId && /* @__PURE__ */ l("div", {
|
|
209
|
-
className: "rounded-lg border border-border-subtle bg-surface-elevated p-4",
|
|
210
|
-
children: [
|
|
211
|
-
/* @__PURE__ */ l("div", {
|
|
212
|
-
className: "mb-2 flex items-center justify-between text-sm",
|
|
213
|
-
children: [/* @__PURE__ */ c("span", {
|
|
214
|
-
className: "text-content-primary",
|
|
215
|
-
children: f("i18n.import.progress.title", "Import Progress")
|
|
216
|
-
}), /* @__PURE__ */ l("span", {
|
|
217
|
-
className: "text-content-tertiary",
|
|
218
|
-
children: [p.progress, "%"]
|
|
219
|
-
})]
|
|
220
|
-
}),
|
|
221
|
-
/* @__PURE__ */ c("div", {
|
|
222
|
-
className: "h-2 overflow-hidden rounded-full bg-surface",
|
|
223
|
-
children: /* @__PURE__ */ c("div", {
|
|
224
|
-
className: "h-full bg-accent-primary transition-all",
|
|
225
|
-
style: { width: `${p.progress}%` }
|
|
226
|
-
})
|
|
227
|
-
}),
|
|
228
|
-
p.errors.length > 0 && /* @__PURE__ */ c("div", {
|
|
229
|
-
className: "mt-3 space-y-1",
|
|
230
|
-
children: p.errors.map((t) => /* @__PURE__ */ l("div", {
|
|
231
|
-
className: "flex items-start gap-2 text-xs text-error",
|
|
232
|
-
children: [/* @__PURE__ */ c(e, { className: "mt-0.5 size-3 flex-shrink-0" }), /* @__PURE__ */ c("span", { children: t.message })]
|
|
233
|
-
}, `${t.row ?? "x"}:${t.key ?? "x"}:${t.field ?? "x"}:${t.message}`))
|
|
234
|
-
})
|
|
235
|
-
]
|
|
236
|
-
}),
|
|
237
|
-
/* @__PURE__ */ l("div", {
|
|
238
|
-
className: "flex items-center gap-3",
|
|
239
|
-
children: [/* @__PURE__ */ l("button", {
|
|
240
|
-
type: "button",
|
|
241
|
-
onClick: () => {
|
|
242
|
-
v && (m(g, "job-123"), console.log("Starting import:", v.name, g));
|
|
243
|
-
},
|
|
244
|
-
disabled: !v,
|
|
245
|
-
className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover disabled:opacity-50",
|
|
246
|
-
children: [/* @__PURE__ */ c(r, { className: "size-4" }), f("i18n.import.actions.start", "Start Import")]
|
|
247
|
-
}), p.jobId && /* @__PURE__ */ c("button", {
|
|
248
|
-
type: "button",
|
|
249
|
-
onClick: h,
|
|
250
|
-
className: "rounded-md border border-border-subtle bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
|
|
251
|
-
children: f("i18n.import.actions.reset", "Reset")
|
|
252
|
-
})]
|
|
253
239
|
})
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
/* @__PURE__ */ c("
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}),
|
|
280
|
-
/* @__PURE__ */ c("option", {
|
|
281
|
-
value: "po",
|
|
282
|
-
children: f("i18n.shared.format.po", "Gettext (PO)")
|
|
283
|
-
}),
|
|
284
|
-
/* @__PURE__ */ c("option", {
|
|
285
|
-
value: "xliff",
|
|
286
|
-
children: f("i18n.shared.format.xliff", "XLIFF")
|
|
240
|
+
}),
|
|
241
|
+
v.jobId && /* @__PURE__ */ l(f, {
|
|
242
|
+
treatment: "metric",
|
|
243
|
+
className: "border-border-seam p-4",
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ l("div", {
|
|
246
|
+
className: "mb-2 flex items-center justify-between text-sm",
|
|
247
|
+
children: [/* @__PURE__ */ c("span", {
|
|
248
|
+
className: "text-text-primary",
|
|
249
|
+
children: _("i18n.import.progress.title", "Import Progress")
|
|
250
|
+
}), /* @__PURE__ */ l("span", {
|
|
251
|
+
className: "text-text-tertiary tabular-nums",
|
|
252
|
+
children: [v.progress, "%"]
|
|
253
|
+
})]
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ c("div", {
|
|
256
|
+
className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
257
|
+
role: "progressbar",
|
|
258
|
+
"aria-valuenow": v.progress,
|
|
259
|
+
"aria-valuemin": 0,
|
|
260
|
+
"aria-valuemax": 100,
|
|
261
|
+
"aria-label": _("i18n.import.progress.title", "Import Progress"),
|
|
262
|
+
children: /* @__PURE__ */ c("div", {
|
|
263
|
+
className: "h-full rounded-full bg-action-primary-bg shadow-[var(--shadow-glow)] transition-all",
|
|
264
|
+
style: { width: `${v.progress}%` }
|
|
287
265
|
})
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
266
|
+
}),
|
|
267
|
+
v.errors.length > 0 && /* @__PURE__ */ c("div", {
|
|
268
|
+
className: "mt-3 space-y-1",
|
|
269
|
+
children: v.errors.map((t) => /* @__PURE__ */ l("div", {
|
|
270
|
+
className: "flex items-start gap-2 text-xs text-status-danger-text",
|
|
271
|
+
children: [/* @__PURE__ */ c(e, {
|
|
272
|
+
className: "mt-0.5 size-3 flex-shrink-0",
|
|
273
|
+
"aria-hidden": "true"
|
|
274
|
+
}), /* @__PURE__ */ c("span", { children: t.message })]
|
|
275
|
+
}, `${t.row ?? "x"}:${t.key ?? "x"}:${t.field ?? "x"}:${t.message}`))
|
|
276
|
+
})
|
|
277
|
+
]
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ c(u, {
|
|
280
|
+
align: "start",
|
|
281
|
+
primary: {
|
|
282
|
+
label: _("i18n.import.actions.start", "Start Import"),
|
|
283
|
+
onSelect: E,
|
|
284
|
+
disabled: !C,
|
|
285
|
+
icon: /* @__PURE__ */ c(r, {
|
|
286
|
+
className: "size-4",
|
|
287
|
+
"aria-hidden": "true"
|
|
288
|
+
})
|
|
289
|
+
},
|
|
290
|
+
actions: v.jobId ? [{
|
|
291
|
+
label: _("i18n.import.actions.reset", "Reset"),
|
|
292
|
+
onSelect: b
|
|
293
|
+
}] : []
|
|
294
|
+
})
|
|
295
|
+
]
|
|
296
|
+
}) : /* @__PURE__ */ l("div", {
|
|
297
|
+
className: "space-y-6",
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ c(f, {
|
|
300
|
+
treatment: "plain",
|
|
301
|
+
className: "border-border-seam p-6",
|
|
302
|
+
children: /* @__PURE__ */ l("div", {
|
|
303
|
+
className: "space-y-6",
|
|
292
304
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
293
|
-
htmlFor: "export-
|
|
294
|
-
className: "mb-2 block text-sm font-medium text-
|
|
295
|
-
children:
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
-
id: "export-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
305
|
+
htmlFor: "export-format",
|
|
306
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
307
|
+
children: _("i18n.export.fields.format", "Export Format")
|
|
308
|
+
}), /* @__PURE__ */ c("select", {
|
|
309
|
+
id: "export-format",
|
|
310
|
+
value: x,
|
|
311
|
+
onChange: (e) => S(e.target.value),
|
|
312
|
+
className: O,
|
|
313
|
+
children: A
|
|
314
|
+
})] }), /* @__PURE__ */ l("div", {
|
|
315
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
316
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
317
|
+
htmlFor: "export-product",
|
|
318
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
319
|
+
children: _("i18n.export.fields.product", "Product")
|
|
320
|
+
}), /* @__PURE__ */ l("select", {
|
|
321
|
+
id: "export-product",
|
|
322
|
+
className: O,
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ c("option", {
|
|
325
|
+
value: "",
|
|
326
|
+
children: _("i18n.export.fields.product.all", "All Products")
|
|
327
|
+
}),
|
|
328
|
+
/* @__PURE__ */ c("option", {
|
|
329
|
+
value: "workspaces",
|
|
330
|
+
children: "Workspaces"
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ c("option", {
|
|
333
|
+
value: "tenant",
|
|
334
|
+
children: "Tenant"
|
|
335
|
+
})
|
|
336
|
+
]
|
|
337
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
338
|
+
htmlFor: "export-language",
|
|
339
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
340
|
+
children: _("i18n.export.fields.language", "Language")
|
|
341
|
+
}), /* @__PURE__ */ l("select", {
|
|
342
|
+
id: "export-language",
|
|
343
|
+
className: O,
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ c("option", {
|
|
346
|
+
value: "",
|
|
347
|
+
children: _("i18n.export.fields.language.all", "All Languages")
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ c("option", {
|
|
350
|
+
value: "es-ES",
|
|
351
|
+
children: _("i18n.export.fields.language.spanish", "Spanish")
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ c("option", {
|
|
354
|
+
value: "fr-FR",
|
|
355
|
+
children: _("i18n.export.fields.language.french", "French")
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
})] })]
|
|
359
|
+
})]
|
|
360
|
+
})
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ c(m, {
|
|
363
|
+
collapsedHeight: 0,
|
|
364
|
+
label: _("i18n.export.options.show", "Export options"),
|
|
365
|
+
children: /* @__PURE__ */ l("div", {
|
|
366
|
+
className: "space-y-2 pt-4",
|
|
338
367
|
children: [/* @__PURE__ */ l("div", {
|
|
339
368
|
className: "flex items-center gap-2",
|
|
340
369
|
children: [/* @__PURE__ */ c("input", {
|
|
341
370
|
type: "checkbox",
|
|
342
371
|
id: "include-metadata",
|
|
343
|
-
"aria-label":
|
|
344
|
-
className:
|
|
372
|
+
"aria-label": _("i18n.export.options.includeMetadata", "Include metadata"),
|
|
373
|
+
className: k
|
|
345
374
|
}), /* @__PURE__ */ c("label", {
|
|
346
375
|
htmlFor: "include-metadata",
|
|
347
|
-
className: "text-sm text-
|
|
348
|
-
children:
|
|
376
|
+
className: "text-sm text-text-primary",
|
|
377
|
+
children: _("i18n.export.options.includeMetadata", "Include metadata")
|
|
349
378
|
})]
|
|
350
379
|
}), /* @__PURE__ */ l("div", {
|
|
351
380
|
className: "flex items-center gap-2",
|
|
352
381
|
children: [/* @__PURE__ */ c("input", {
|
|
353
382
|
type: "checkbox",
|
|
354
383
|
id: "published-only",
|
|
355
|
-
"aria-label":
|
|
384
|
+
"aria-label": _("i18n.export.options.publishedOnly", "Published translations only"),
|
|
356
385
|
defaultChecked: !0,
|
|
357
|
-
className:
|
|
386
|
+
className: k
|
|
358
387
|
}), /* @__PURE__ */ c("label", {
|
|
359
388
|
htmlFor: "published-only",
|
|
360
|
-
className: "text-sm text-
|
|
361
|
-
children:
|
|
389
|
+
className: "text-sm text-text-primary",
|
|
390
|
+
children: _("i18n.export.options.publishedOnly", "Published translations only")
|
|
362
391
|
})]
|
|
363
392
|
})]
|
|
364
|
-
}),
|
|
365
|
-
/* @__PURE__ */ l("div", {
|
|
366
|
-
className: "flex items-start gap-3 rounded-lg bg-accent-primary/10 p-4",
|
|
367
|
-
children: [/* @__PURE__ */ c(n, { className: "size-5 flex-shrink-0 text-accent-primary" }), /* @__PURE__ */ l("div", {
|
|
368
|
-
className: "text-sm",
|
|
369
|
-
children: [/* @__PURE__ */ c("p", {
|
|
370
|
-
className: "font-medium text-accent-primary",
|
|
371
|
-
children: f("i18n.export.preview.title", "Export Preview")
|
|
372
|
-
}), /* @__PURE__ */ c("p", {
|
|
373
|
-
className: "mt-1 text-content-secondary",
|
|
374
|
-
children: f("i18n.export.preview.description", "Approximately 1,245 translation keys will be exported based on your selection.")
|
|
375
|
-
})]
|
|
376
|
-
})]
|
|
377
|
-
}),
|
|
378
|
-
/* @__PURE__ */ l("button", {
|
|
379
|
-
type: "button",
|
|
380
|
-
onClick: () => {
|
|
381
|
-
console.log("Starting export:", g);
|
|
382
|
-
},
|
|
383
|
-
className: "flex items-center gap-2 rounded-md bg-accent-primary px-4 py-2 text-sm font-medium text-white hover:bg-accent-primary-hover",
|
|
384
|
-
children: [/* @__PURE__ */ c(t, { className: "size-4" }), f("i18n.export.actions.start", "Export Translations")]
|
|
385
393
|
})
|
|
386
|
-
|
|
387
|
-
|
|
394
|
+
}),
|
|
395
|
+
/* @__PURE__ */ l(d, {
|
|
396
|
+
className: "flex items-start gap-3",
|
|
397
|
+
children: [/* @__PURE__ */ c("div", {
|
|
398
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
|
|
399
|
+
children: /* @__PURE__ */ c(n, {
|
|
400
|
+
className: "size-5",
|
|
401
|
+
"aria-hidden": "true"
|
|
402
|
+
})
|
|
403
|
+
}), /* @__PURE__ */ l("div", {
|
|
404
|
+
className: "text-sm",
|
|
405
|
+
children: [/* @__PURE__ */ c("p", {
|
|
406
|
+
className: "font-medium text-text-primary",
|
|
407
|
+
children: _("i18n.export.preview.title", "Export Preview")
|
|
408
|
+
}), /* @__PURE__ */ c("p", {
|
|
409
|
+
className: "mt-1 text-text-secondary",
|
|
410
|
+
children: _("i18n.export.preview.description", "Approximately 1,245 translation keys will be exported based on your selection.")
|
|
411
|
+
})]
|
|
412
|
+
})]
|
|
413
|
+
}),
|
|
414
|
+
/* @__PURE__ */ c(u, {
|
|
415
|
+
align: "start",
|
|
416
|
+
primary: {
|
|
417
|
+
label: _("i18n.export.actions.start", "Export Translations"),
|
|
418
|
+
onSelect: D,
|
|
419
|
+
icon: /* @__PURE__ */ c(t, {
|
|
420
|
+
className: "size-4",
|
|
421
|
+
"aria-hidden": "true"
|
|
422
|
+
})
|
|
423
|
+
},
|
|
424
|
+
actions: []
|
|
425
|
+
})
|
|
426
|
+
]
|
|
388
427
|
})
|
|
389
428
|
})]
|
|
390
429
|
});
|
|
391
430
|
};
|
|
392
431
|
//#endregion
|
|
393
|
-
export {
|
|
432
|
+
export { h as ImportExportPage };
|