@burdenoff/microfe-i18n 2026.624.1 → 2026.625.2
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 +359 -321
- package/dist/i18n/pages/LanguagesListPage.js +150 -86
- package/dist/i18n/pages/LocaleConfigPage.js +297 -243
- package/dist/i18n/pages/ProductsListPage.js +148 -84
- package/dist/i18n/pages/ProgressDashboardPage.js +365 -283
- package/dist/i18n/pages/ReviewQueuePage.js +187 -149
- package/dist/i18n/pages/TranslationEditorPage.js +205 -126
- 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, PagePurpose as m, ShowMore as h } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/i18n/pages/ImportExportPage.tsx
|
|
10
|
-
var
|
|
11
|
-
let { t:
|
|
11
|
+
var g = ({ mode: g }) => {
|
|
12
|
+
let { t: _ } = i(), v = (e, t, n) => _(e, t, n), { importState: y, startImport: b, resetImport: x } = a(), [S, C] = o("json"), [w, T] = o(null), E = (e) => {
|
|
13
|
+
let t = e.target.files?.[0];
|
|
14
|
+
t && T(t);
|
|
15
|
+
}, D = () => {
|
|
16
|
+
w && (b(S, "job-123"), console.log("Starting import:", w.name, S));
|
|
17
|
+
}, O = () => {
|
|
18
|
+
console.log("Starting export:", S);
|
|
19
|
+
}, k = "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)]", A = "size-4 rounded border-border-seam text-primary focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]", j = /* @__PURE__ */ l(s, { children: [
|
|
20
|
+
/* @__PURE__ */ c("option", {
|
|
21
|
+
value: "json",
|
|
22
|
+
children: v("i18n.shared.format.json", "JSON (i18next nested)")
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ c("option", {
|
|
25
|
+
value: "csv",
|
|
26
|
+
children: v("i18n.shared.format.csv", "CSV")
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ c("option", {
|
|
29
|
+
value: "xlsx",
|
|
30
|
+
children: v("i18n.shared.format.xlsx", "Excel (XLSX)")
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ c("option", {
|
|
33
|
+
value: "po",
|
|
34
|
+
children: v("i18n.shared.format.po", "Gettext (PO)")
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ c("option", {
|
|
37
|
+
value: "xliff",
|
|
38
|
+
children: v("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(g === "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: g === "import" ? /* @__PURE__ */ l(s, { children: [
|
|
56
|
+
/* @__PURE__ */ c(p, { children: v("i18n.import.title.verb", "Import") }),
|
|
57
|
+
" ",
|
|
58
|
+
v("i18n.import.title.noun", "Translations")
|
|
59
|
+
] }) : /* @__PURE__ */ l(s, { children: [
|
|
60
|
+
/* @__PURE__ */ c(p, { children: v("i18n.export.title.verb", "Export") }),
|
|
61
|
+
" ",
|
|
62
|
+
v("i18n.export.title.noun", "Translations")
|
|
63
|
+
] })
|
|
64
|
+
}), /* @__PURE__ */ c("p", {
|
|
65
|
+
className: "mt-0.5 text-sm text-text-secondary",
|
|
66
|
+
children: g === "import" ? v("i18n.import.subtitle", "Bring translations in from a file") : v("i18n.export.subtitle", "Download translations in your chosen format")
|
|
67
|
+
})] })]
|
|
25
68
|
})
|
|
26
|
-
}), /* @__PURE__ */
|
|
27
|
-
className: "
|
|
28
|
-
children: /* @__PURE__ */ c("div", {
|
|
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",
|
|
69
|
+
}), /* @__PURE__ */ l("div", {
|
|
70
|
+
className: "mx-auto max-w-2xl space-y-6 px-6 py-8 sm:px-8 lg:px-10",
|
|
71
|
+
children: [/* @__PURE__ */ c(m, { children: g === "import" ? v("i18n.import.purpose", "Bring existing translations into the system in bulk instead of typing them key by key. Upload a JSON, CSV, XLSX, PO, or XLIFF file exported from another tool or returned by a translation vendor, map it to the right product, module, and target language, and the keys and values are created or updated for you.") : v("i18n.export.purpose", "Pull translations out of the system as a downloadable file — to hand off to an external translation vendor, feed your app's build, or back up a locale. Choose a format and filter by product and language to export exactly the set of keys you need.") }), g === "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: v("i18n.import.fields.format", "Select Format")
|
|
84
|
+
}), /* @__PURE__ */ c("select", {
|
|
85
|
+
id: "import-format",
|
|
86
|
+
value: S,
|
|
87
|
+
onChange: (e) => C(e.target.value),
|
|
88
|
+
className: k,
|
|
89
|
+
children: j
|
|
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: v("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": v("i18n.import.fields.uploadFile", "Upload File"),
|
|
102
|
+
onChange: E,
|
|
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: w ? w.name : v("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: v("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: v("i18n.import.fields.product", "Product")
|
|
126
|
+
}), /* @__PURE__ */ l("select", {
|
|
127
|
+
id: "import-product",
|
|
128
|
+
className: k,
|
|
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: v("i18n.import.fields.module", "Module")
|
|
147
|
+
}), /* @__PURE__ */ l("select", {
|
|
148
|
+
id: "import-module",
|
|
149
|
+
className: k,
|
|
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: v("i18n.import.fields.targetLanguage", "Target Language")
|
|
170
|
+
}), /* @__PURE__ */ l("select", {
|
|
171
|
+
id: "import-target-language",
|
|
172
|
+
className: k,
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ c("option", {
|
|
175
|
+
value: "es-ES",
|
|
176
|
+
children: v("i18n.shared.language.esEs", "Spanish (es-ES)")
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ c("option", {
|
|
179
|
+
value: "fr-FR",
|
|
180
|
+
children: v("i18n.shared.language.frFr", "French (fr-FR)")
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ c("option", {
|
|
183
|
+
value: "de-DE",
|
|
184
|
+
children: v("i18n.shared.language.deDe", "German (de-DE)")
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
})] })
|
|
160
188
|
]
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
189
|
+
})
|
|
190
|
+
}),
|
|
191
|
+
/* @__PURE__ */ c(h, {
|
|
192
|
+
collapsedHeight: 0,
|
|
193
|
+
label: v("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": v("i18n.import.options.createNamespaces", "Create missing namespaces automatically"),
|
|
171
203
|
defaultChecked: !0,
|
|
172
|
-
className:
|
|
204
|
+
className: A
|
|
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: v("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": v("i18n.import.options.updateExisting", "Update existing translations"),
|
|
185
217
|
defaultChecked: !0,
|
|
186
|
-
className:
|
|
218
|
+
className: A
|
|
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: v("i18n.import.options.updateExisting", "Update existing translations")
|
|
191
223
|
})]
|
|
192
224
|
}),
|
|
193
225
|
/* @__PURE__ */ l("div", {
|
|
@@ -195,199 +227,205 @@ 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": v("i18n.import.options.skipErrors", "Skip validation errors (import valid only)"),
|
|
231
|
+
className: A
|
|
200
232
|
}), /* @__PURE__ */ c("label", {
|
|
201
233
|
htmlFor: "skip-errors",
|
|
202
|
-
className: "text-sm text-
|
|
203
|
-
children:
|
|
204
|
-
})]
|
|
205
|
-
})
|
|
206
|
-
]
|
|
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, "%"]
|
|
234
|
+
className: "text-sm text-text-primary",
|
|
235
|
+
children: v("i18n.import.options.skipErrors", "Skip validation errors (import valid only)")
|
|
219
236
|
})]
|
|
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
237
|
})
|
|
235
238
|
]
|
|
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
|
-
|
|
277
|
-
|
|
278
|
-
children: f("i18n.shared.format.xlsx", "Excel (XLSX)")
|
|
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
|
+
y.jobId && /* @__PURE__ */ l(d, {
|
|
242
|
+
className: "p-4",
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ l("div", {
|
|
245
|
+
className: "mb-2 flex items-center justify-between text-sm",
|
|
246
|
+
children: [/* @__PURE__ */ c("span", {
|
|
247
|
+
className: "text-text-primary",
|
|
248
|
+
children: v("i18n.import.progress.title", "Import Progress")
|
|
249
|
+
}), /* @__PURE__ */ l("span", {
|
|
250
|
+
className: "text-text-tertiary tabular-nums",
|
|
251
|
+
children: [y.progress, "%"]
|
|
252
|
+
})]
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ c("div", {
|
|
255
|
+
className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
256
|
+
role: "progressbar",
|
|
257
|
+
"aria-valuenow": y.progress,
|
|
258
|
+
"aria-valuemin": 0,
|
|
259
|
+
"aria-valuemax": 100,
|
|
260
|
+
"aria-label": v("i18n.import.progress.title", "Import Progress"),
|
|
261
|
+
children: /* @__PURE__ */ c("div", {
|
|
262
|
+
className: "h-full rounded-full bg-action-primary-bg shadow-[var(--shadow-glow)] transition-all",
|
|
263
|
+
style: { width: `${y.progress}%` }
|
|
287
264
|
})
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
265
|
+
}),
|
|
266
|
+
y.errors.length > 0 && /* @__PURE__ */ c("div", {
|
|
267
|
+
className: "mt-3 space-y-1",
|
|
268
|
+
children: y.errors.map((t) => /* @__PURE__ */ l("div", {
|
|
269
|
+
className: "flex items-start gap-2 text-xs text-status-danger-text",
|
|
270
|
+
children: [/* @__PURE__ */ c(e, {
|
|
271
|
+
className: "mt-0.5 size-3 flex-shrink-0",
|
|
272
|
+
"aria-hidden": "true"
|
|
273
|
+
}), /* @__PURE__ */ c("span", { children: t.message })]
|
|
274
|
+
}, `${t.row ?? "x"}:${t.key ?? "x"}:${t.field ?? "x"}:${t.message}`))
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ c(u, {
|
|
279
|
+
align: "start",
|
|
280
|
+
primary: {
|
|
281
|
+
label: v("i18n.import.actions.start", "Start Import"),
|
|
282
|
+
onSelect: D,
|
|
283
|
+
disabled: !w,
|
|
284
|
+
icon: /* @__PURE__ */ c(r, {
|
|
285
|
+
className: "size-4",
|
|
286
|
+
"aria-hidden": "true"
|
|
287
|
+
})
|
|
288
|
+
},
|
|
289
|
+
actions: y.jobId ? [{
|
|
290
|
+
label: v("i18n.import.actions.reset", "Reset"),
|
|
291
|
+
onSelect: x
|
|
292
|
+
}] : []
|
|
293
|
+
})
|
|
294
|
+
]
|
|
295
|
+
}) : /* @__PURE__ */ l("div", {
|
|
296
|
+
className: "space-y-6",
|
|
297
|
+
children: [
|
|
298
|
+
/* @__PURE__ */ c(f, {
|
|
299
|
+
treatment: "plain",
|
|
300
|
+
className: "border-border-seam p-6",
|
|
301
|
+
children: /* @__PURE__ */ l("div", {
|
|
302
|
+
className: "space-y-6",
|
|
292
303
|
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
|
-
|
|
304
|
+
htmlFor: "export-format",
|
|
305
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
306
|
+
children: v("i18n.export.fields.format", "Export Format")
|
|
307
|
+
}), /* @__PURE__ */ c("select", {
|
|
308
|
+
id: "export-format",
|
|
309
|
+
value: S,
|
|
310
|
+
onChange: (e) => C(e.target.value),
|
|
311
|
+
className: k,
|
|
312
|
+
children: j
|
|
313
|
+
})] }), /* @__PURE__ */ l("div", {
|
|
314
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
315
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
316
|
+
htmlFor: "export-product",
|
|
317
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
318
|
+
children: v("i18n.export.fields.product", "Product")
|
|
319
|
+
}), /* @__PURE__ */ l("select", {
|
|
320
|
+
id: "export-product",
|
|
321
|
+
className: k,
|
|
322
|
+
children: [
|
|
323
|
+
/* @__PURE__ */ c("option", {
|
|
324
|
+
value: "",
|
|
325
|
+
children: v("i18n.export.fields.product.all", "All Products")
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ c("option", {
|
|
328
|
+
value: "workspaces",
|
|
329
|
+
children: "Workspaces"
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ c("option", {
|
|
332
|
+
value: "tenant",
|
|
333
|
+
children: "Tenant"
|
|
334
|
+
})
|
|
335
|
+
]
|
|
336
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
337
|
+
htmlFor: "export-language",
|
|
338
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
339
|
+
children: v("i18n.export.fields.language", "Language")
|
|
340
|
+
}), /* @__PURE__ */ l("select", {
|
|
341
|
+
id: "export-language",
|
|
342
|
+
className: k,
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ c("option", {
|
|
345
|
+
value: "",
|
|
346
|
+
children: v("i18n.export.fields.language.all", "All Languages")
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ c("option", {
|
|
349
|
+
value: "es-ES",
|
|
350
|
+
children: v("i18n.export.fields.language.spanish", "Spanish")
|
|
351
|
+
}),
|
|
352
|
+
/* @__PURE__ */ c("option", {
|
|
353
|
+
value: "fr-FR",
|
|
354
|
+
children: v("i18n.export.fields.language.french", "French")
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
})] })]
|
|
358
|
+
})]
|
|
359
|
+
})
|
|
360
|
+
}),
|
|
361
|
+
/* @__PURE__ */ c(h, {
|
|
362
|
+
collapsedHeight: 0,
|
|
363
|
+
label: v("i18n.export.options.show", "Export options"),
|
|
364
|
+
children: /* @__PURE__ */ l("div", {
|
|
365
|
+
className: "space-y-2 pt-4",
|
|
338
366
|
children: [/* @__PURE__ */ l("div", {
|
|
339
367
|
className: "flex items-center gap-2",
|
|
340
368
|
children: [/* @__PURE__ */ c("input", {
|
|
341
369
|
type: "checkbox",
|
|
342
370
|
id: "include-metadata",
|
|
343
|
-
"aria-label":
|
|
344
|
-
className:
|
|
371
|
+
"aria-label": v("i18n.export.options.includeMetadata", "Include metadata"),
|
|
372
|
+
className: A
|
|
345
373
|
}), /* @__PURE__ */ c("label", {
|
|
346
374
|
htmlFor: "include-metadata",
|
|
347
|
-
className: "text-sm text-
|
|
348
|
-
children:
|
|
375
|
+
className: "text-sm text-text-primary",
|
|
376
|
+
children: v("i18n.export.options.includeMetadata", "Include metadata")
|
|
349
377
|
})]
|
|
350
378
|
}), /* @__PURE__ */ l("div", {
|
|
351
379
|
className: "flex items-center gap-2",
|
|
352
380
|
children: [/* @__PURE__ */ c("input", {
|
|
353
381
|
type: "checkbox",
|
|
354
382
|
id: "published-only",
|
|
355
|
-
"aria-label":
|
|
383
|
+
"aria-label": v("i18n.export.options.publishedOnly", "Published translations only"),
|
|
356
384
|
defaultChecked: !0,
|
|
357
|
-
className:
|
|
385
|
+
className: A
|
|
358
386
|
}), /* @__PURE__ */ c("label", {
|
|
359
387
|
htmlFor: "published-only",
|
|
360
|
-
className: "text-sm text-
|
|
361
|
-
children:
|
|
388
|
+
className: "text-sm text-text-primary",
|
|
389
|
+
children: v("i18n.export.options.publishedOnly", "Published translations only")
|
|
362
390
|
})]
|
|
363
391
|
})]
|
|
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
392
|
})
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ l(d, {
|
|
395
|
+
className: "flex items-start gap-3",
|
|
396
|
+
children: [/* @__PURE__ */ c("div", {
|
|
397
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
|
|
398
|
+
children: /* @__PURE__ */ c(n, {
|
|
399
|
+
className: "size-5",
|
|
400
|
+
"aria-hidden": "true"
|
|
401
|
+
})
|
|
402
|
+
}), /* @__PURE__ */ l("div", {
|
|
403
|
+
className: "text-sm",
|
|
404
|
+
children: [/* @__PURE__ */ c("p", {
|
|
405
|
+
className: "font-medium text-text-primary",
|
|
406
|
+
children: v("i18n.export.preview.title", "Export Preview")
|
|
407
|
+
}), /* @__PURE__ */ c("p", {
|
|
408
|
+
className: "mt-1 text-text-secondary",
|
|
409
|
+
children: v("i18n.export.preview.description", "Approximately 1,245 translation keys will be exported based on your selection.")
|
|
410
|
+
})]
|
|
411
|
+
})]
|
|
412
|
+
}),
|
|
413
|
+
/* @__PURE__ */ c(u, {
|
|
414
|
+
align: "start",
|
|
415
|
+
primary: {
|
|
416
|
+
label: v("i18n.export.actions.start", "Export Translations"),
|
|
417
|
+
onSelect: O,
|
|
418
|
+
icon: /* @__PURE__ */ c(t, {
|
|
419
|
+
className: "size-4",
|
|
420
|
+
"aria-hidden": "true"
|
|
421
|
+
})
|
|
422
|
+
},
|
|
423
|
+
actions: []
|
|
424
|
+
})
|
|
425
|
+
]
|
|
426
|
+
})]
|
|
389
427
|
})]
|
|
390
428
|
});
|
|
391
429
|
};
|
|
392
430
|
//#endregion
|
|
393
|
-
export {
|
|
431
|
+
export { g as ImportExportPage };
|