@burdenoff/microfe-i18n 2026.828.1 → 2026.925.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/I18nRoot.js +52 -40
- package/dist/i18n/hooks/useTr.js +9 -0
- package/dist/i18n/pages/ImportExportPage.js +86 -86
- package/dist/i18n/pages/LanguagesListPage.js +44 -44
- package/dist/i18n/pages/LocaleConfigPage.js +183 -181
- package/dist/i18n/pages/ProductsListPage.js +24 -24
- package/dist/i18n/pages/ProgressDashboardPage.js +54 -54
- package/dist/i18n/pages/ReviewQueuePage.js +114 -112
- package/dist/i18n/pages/TranslationEditorPage.js +74 -74
- package/dist/i18n/providers/I18nProvider.js +35 -34
- package/dist/i18n/translations/en.js +372 -0
- package/dist/i18n.js +4 -3
- package/package.json +4 -2
package/dist/i18n/I18nRoot.js
CHANGED
|
@@ -7,97 +7,109 @@ import { Settings as a } from "../node_modules/lucide-react/dist/esm/icons/setti
|
|
|
7
7
|
import { TrendingUp as o } from "../node_modules/lucide-react/dist/esm/icons/trending-up.js";
|
|
8
8
|
import { Upload as s } from "../node_modules/lucide-react/dist/esm/icons/upload.js";
|
|
9
9
|
import { I18nProvider as c } from "./providers/I18nProvider.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { useTr as l } from "./hooks/useTr.js";
|
|
11
|
+
import { I18nRoutes as u } from "./I18nRoutes.js";
|
|
12
|
+
import { useEffect as d } from "react";
|
|
13
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
14
|
+
import { FeatureFlagProvider as p } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
14
15
|
//#region src/i18n/I18nRoot.tsx
|
|
15
|
-
var
|
|
16
|
-
let
|
|
17
|
-
return
|
|
18
|
-
if (
|
|
16
|
+
var m = ({ basePath: c, registerNavItems: p, registerFooterItems: m }) => {
|
|
17
|
+
let h = l(), g = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
18
|
+
return d(() => {
|
|
19
|
+
if (p) return p([
|
|
19
20
|
{
|
|
20
21
|
id: "i18n-languages",
|
|
21
|
-
label: "Languages",
|
|
22
|
-
path:
|
|
23
|
-
icon: /* @__PURE__ */
|
|
22
|
+
label: h("i18n.nav.languages", "Languages"),
|
|
23
|
+
path: g(c, "languages"),
|
|
24
|
+
icon: /* @__PURE__ */ f(n, { size: 20 }),
|
|
24
25
|
order: 10,
|
|
25
26
|
group: "i18n"
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
29
|
id: "i18n-products",
|
|
29
|
-
label: "Products",
|
|
30
|
-
path:
|
|
31
|
-
icon: /* @__PURE__ */
|
|
30
|
+
label: h("i18n.nav.products", "Products"),
|
|
31
|
+
path: g(c, "products"),
|
|
32
|
+
icon: /* @__PURE__ */ f(r, { size: 20 }),
|
|
32
33
|
order: 20,
|
|
33
34
|
group: "i18n"
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
37
|
id: "i18n-editor",
|
|
37
|
-
label: "Translation Editor",
|
|
38
|
-
path:
|
|
39
|
-
icon: /* @__PURE__ */
|
|
38
|
+
label: h("i18n.nav.translationEditor", "Translation Editor"),
|
|
39
|
+
path: g(c, "editor"),
|
|
40
|
+
icon: /* @__PURE__ */ f(i, { size: 20 }),
|
|
40
41
|
order: 30,
|
|
41
42
|
group: "i18n"
|
|
42
43
|
},
|
|
43
44
|
{
|
|
44
45
|
id: "i18n-progress",
|
|
45
|
-
label: "Progress",
|
|
46
|
-
path:
|
|
47
|
-
icon: /* @__PURE__ */
|
|
46
|
+
label: h("i18n.nav.progress", "Progress"),
|
|
47
|
+
path: g(c, "progress"),
|
|
48
|
+
icon: /* @__PURE__ */ f(o, { size: 20 }),
|
|
48
49
|
order: 40,
|
|
49
50
|
group: "i18n"
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
53
|
id: "i18n-review",
|
|
53
|
-
label: "Review Queue",
|
|
54
|
-
path:
|
|
55
|
-
icon: /* @__PURE__ */
|
|
54
|
+
label: h("i18n.nav.reviewQueue", "Review Queue"),
|
|
55
|
+
path: g(c, "review"),
|
|
56
|
+
icon: /* @__PURE__ */ f(e, { size: 20 }),
|
|
56
57
|
order: 50,
|
|
57
58
|
group: "i18n"
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
id: "i18n-import",
|
|
61
|
-
label: "Import",
|
|
62
|
-
path:
|
|
63
|
-
icon: /* @__PURE__ */
|
|
62
|
+
label: h("i18n.nav.import", "Import"),
|
|
63
|
+
path: g(c, "import"),
|
|
64
|
+
icon: /* @__PURE__ */ f(s, { size: 20 }),
|
|
64
65
|
order: 60,
|
|
65
66
|
group: "i18n"
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
69
|
id: "i18n-export",
|
|
69
|
-
label: "Export",
|
|
70
|
-
path:
|
|
71
|
-
icon: /* @__PURE__ */
|
|
70
|
+
label: h("i18n.nav.export", "Export"),
|
|
71
|
+
path: g(c, "export"),
|
|
72
|
+
icon: /* @__PURE__ */ f(t, { size: 20 }),
|
|
72
73
|
order: 70,
|
|
73
74
|
group: "i18n"
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
77
|
id: "i18n-locales",
|
|
77
|
-
label: "Locale Settings",
|
|
78
|
-
path:
|
|
79
|
-
icon: /* @__PURE__ */
|
|
78
|
+
label: h("i18n.nav.localeSettings", "Locale Settings"),
|
|
79
|
+
path: g(c, "locales"),
|
|
80
|
+
icon: /* @__PURE__ */ f(a, { size: 20 }),
|
|
80
81
|
order: 80,
|
|
81
82
|
group: "i18n"
|
|
82
83
|
}
|
|
83
84
|
]);
|
|
84
|
-
}, [
|
|
85
|
-
|
|
85
|
+
}, [
|
|
86
|
+
p,
|
|
87
|
+
c,
|
|
88
|
+
h
|
|
89
|
+
]), d(() => {
|
|
90
|
+
if (m) return m([{
|
|
86
91
|
id: "i18n-status",
|
|
87
|
-
label: "I18n Ready",
|
|
92
|
+
label: h("i18n.footer.status", "I18n Ready"),
|
|
88
93
|
type: "status",
|
|
89
94
|
order: 10,
|
|
90
95
|
section: "left"
|
|
91
96
|
}]);
|
|
92
|
-
}, [h]), /* @__PURE__ */
|
|
97
|
+
}, [m, h]), /* @__PURE__ */ f(u, {});
|
|
98
|
+
}, h = (e) => {
|
|
99
|
+
let { registerNavItems: t, registerFooterItems: n, basePath: r = "/" } = e;
|
|
100
|
+
return /* @__PURE__ */ f(p, {
|
|
93
101
|
workspaceId: null,
|
|
94
102
|
gateway: "global",
|
|
95
103
|
defaultEnabled: !0,
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
...
|
|
98
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ f(c, {
|
|
105
|
+
...e,
|
|
106
|
+
children: /* @__PURE__ */ f(m, {
|
|
107
|
+
basePath: r,
|
|
108
|
+
registerNavItems: t,
|
|
109
|
+
registerFooterItems: n
|
|
110
|
+
})
|
|
99
111
|
})
|
|
100
112
|
});
|
|
101
113
|
};
|
|
102
114
|
//#endregion
|
|
103
|
-
export {
|
|
115
|
+
export { h as I18nRoot };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useI18n as e } from "../providers/I18nProvider.js";
|
|
2
|
+
import { useCallback as t } from "react";
|
|
3
|
+
//#region src/i18n/hooks/useTr.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let { t: n } = e();
|
|
6
|
+
return t((e, t, r) => n(e, t, r), [n]);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as useTr };
|
|
@@ -2,40 +2,40 @@ import { CircleAlert as e } from "../../node_modules/lucide-react/dist/esm/icons
|
|
|
2
2
|
import { Download as t } from "../../node_modules/lucide-react/dist/esm/icons/download.js";
|
|
3
3
|
import { FileText as n } from "../../node_modules/lucide-react/dist/esm/icons/file-text.js";
|
|
4
4
|
import { Upload as r } from "../../node_modules/lucide-react/dist/esm/icons/upload.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useTr as i } from "../hooks/useTr.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
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";
|
|
10
10
|
//#region src/i18n/pages/ImportExportPage.tsx
|
|
11
11
|
var g = ({ mode: g }) => {
|
|
12
|
-
let
|
|
12
|
+
let _ = i(), { importState: v, startImport: y, resetImport: b } = a(), [x, S] = o("json"), [C, w] = o(null), T = (e) => {
|
|
13
13
|
let t = e.target.files?.[0];
|
|
14
|
-
t &&
|
|
14
|
+
t && w(t);
|
|
15
|
+
}, E = () => {
|
|
16
|
+
C && (y(x, "job-123"), console.log("Starting import:", C.name, x));
|
|
15
17
|
}, D = () => {
|
|
16
|
-
|
|
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: [
|
|
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
20
|
/* @__PURE__ */ c("option", {
|
|
21
21
|
value: "json",
|
|
22
|
-
children:
|
|
22
|
+
children: _("i18n.shared.format.json", "JSON (i18next nested)")
|
|
23
23
|
}),
|
|
24
24
|
/* @__PURE__ */ c("option", {
|
|
25
25
|
value: "csv",
|
|
26
|
-
children:
|
|
26
|
+
children: _("i18n.shared.format.csv", "CSV")
|
|
27
27
|
}),
|
|
28
28
|
/* @__PURE__ */ c("option", {
|
|
29
29
|
value: "xlsx",
|
|
30
|
-
children:
|
|
30
|
+
children: _("i18n.shared.format.xlsx", "Excel (XLSX)")
|
|
31
31
|
}),
|
|
32
32
|
/* @__PURE__ */ c("option", {
|
|
33
33
|
value: "po",
|
|
34
|
-
children:
|
|
34
|
+
children: _("i18n.shared.format.po", "Gettext (PO)")
|
|
35
35
|
}),
|
|
36
36
|
/* @__PURE__ */ c("option", {
|
|
37
37
|
value: "xliff",
|
|
38
|
-
children:
|
|
38
|
+
children: _("i18n.shared.format.xliff", "XLIFF")
|
|
39
39
|
})
|
|
40
40
|
] });
|
|
41
41
|
return /* @__PURE__ */ l("div", {
|
|
@@ -53,22 +53,22 @@ var g = ({ mode: g }) => {
|
|
|
53
53
|
}), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
|
|
54
54
|
className: "text-2xl font-bold tracking-tight text-text-primary",
|
|
55
55
|
children: g === "import" ? /* @__PURE__ */ l(s, { children: [
|
|
56
|
-
/* @__PURE__ */ c(p, { children:
|
|
56
|
+
/* @__PURE__ */ c(p, { children: _("i18n.import.title.verb", "Import") }),
|
|
57
57
|
" ",
|
|
58
|
-
|
|
58
|
+
_("i18n.import.title.noun", "Translations")
|
|
59
59
|
] }) : /* @__PURE__ */ l(s, { children: [
|
|
60
|
-
/* @__PURE__ */ c(p, { children:
|
|
60
|
+
/* @__PURE__ */ c(p, { children: _("i18n.export.title.verb", "Export") }),
|
|
61
61
|
" ",
|
|
62
|
-
|
|
62
|
+
_("i18n.export.title.noun", "Translations")
|
|
63
63
|
] })
|
|
64
64
|
}), /* @__PURE__ */ c("p", {
|
|
65
65
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
66
|
-
children: g === "import" ?
|
|
66
|
+
children: g === "import" ? _("i18n.import.subtitle", "Bring translations in from a file") : _("i18n.export.subtitle", "Download translations in your chosen format")
|
|
67
67
|
})] })]
|
|
68
68
|
})
|
|
69
69
|
}), /* @__PURE__ */ l("div", {
|
|
70
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" ?
|
|
71
|
+
children: [/* @__PURE__ */ c(m, { children: g === "import" ? _("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.") : _("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
72
|
className: "space-y-6",
|
|
73
73
|
children: [
|
|
74
74
|
/* @__PURE__ */ c(f, {
|
|
@@ -80,26 +80,26 @@ var g = ({ mode: g }) => {
|
|
|
80
80
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
81
81
|
htmlFor: "import-format",
|
|
82
82
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
83
|
-
children:
|
|
83
|
+
children: _("i18n.import.fields.format", "Select Format")
|
|
84
84
|
}), /* @__PURE__ */ c("select", {
|
|
85
85
|
id: "import-format",
|
|
86
|
-
value:
|
|
87
|
-
onChange: (e) =>
|
|
88
|
-
className:
|
|
89
|
-
children:
|
|
86
|
+
value: x,
|
|
87
|
+
onChange: (e) => S(e.target.value),
|
|
88
|
+
className: O,
|
|
89
|
+
children: A
|
|
90
90
|
})] }),
|
|
91
91
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
92
92
|
htmlFor: "import-upload-file",
|
|
93
93
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
94
|
-
children:
|
|
94
|
+
children: _("i18n.import.fields.uploadFile", "Upload File")
|
|
95
95
|
}), /* @__PURE__ */ l("div", {
|
|
96
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
97
|
children: [
|
|
98
98
|
/* @__PURE__ */ c("input", {
|
|
99
99
|
id: "import-upload-file",
|
|
100
100
|
type: "file",
|
|
101
|
-
"aria-label":
|
|
102
|
-
onChange:
|
|
101
|
+
"aria-label": _("i18n.import.fields.uploadFile", "Upload File"),
|
|
102
|
+
onChange: T,
|
|
103
103
|
accept: ".json,.csv,.xlsx,.po,.xliff",
|
|
104
104
|
className: "absolute inset-0 cursor-pointer opacity-0"
|
|
105
105
|
}),
|
|
@@ -109,11 +109,11 @@ var g = ({ mode: g }) => {
|
|
|
109
109
|
}),
|
|
110
110
|
/* @__PURE__ */ c("p", {
|
|
111
111
|
className: "mb-1 text-sm font-medium text-text-primary",
|
|
112
|
-
children:
|
|
112
|
+
children: C ? C.name : _("i18n.import.fields.dropzonePlaceholder", "Drop file here or click to browse")
|
|
113
113
|
}),
|
|
114
114
|
/* @__PURE__ */ c("p", {
|
|
115
115
|
className: "text-xs text-text-tertiary",
|
|
116
|
-
children:
|
|
116
|
+
children: _("i18n.import.fields.supportedFormats", "Supported formats: JSON, CSV, XLSX, PO, XLIFF")
|
|
117
117
|
})
|
|
118
118
|
]
|
|
119
119
|
})] }),
|
|
@@ -122,10 +122,10 @@ var g = ({ mode: g }) => {
|
|
|
122
122
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
123
123
|
htmlFor: "import-product",
|
|
124
124
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
125
|
-
children:
|
|
125
|
+
children: _("i18n.import.fields.product", "Product")
|
|
126
126
|
}), /* @__PURE__ */ l("select", {
|
|
127
127
|
id: "import-product",
|
|
128
|
-
className:
|
|
128
|
+
className: O,
|
|
129
129
|
children: [
|
|
130
130
|
/* @__PURE__ */ c("option", {
|
|
131
131
|
value: "workspaces",
|
|
@@ -137,16 +137,16 @@ var g = ({ mode: g }) => {
|
|
|
137
137
|
}),
|
|
138
138
|
/* @__PURE__ */ c("option", {
|
|
139
139
|
value: "botlit",
|
|
140
|
-
children: "
|
|
140
|
+
children: "BotManor"
|
|
141
141
|
})
|
|
142
142
|
]
|
|
143
143
|
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
144
144
|
htmlFor: "import-module",
|
|
145
145
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
146
|
-
children:
|
|
146
|
+
children: _("i18n.import.fields.module", "Module")
|
|
147
147
|
}), /* @__PURE__ */ l("select", {
|
|
148
148
|
id: "import-module",
|
|
149
|
-
className:
|
|
149
|
+
className: O,
|
|
150
150
|
children: [
|
|
151
151
|
/* @__PURE__ */ c("option", {
|
|
152
152
|
value: "auth",
|
|
@@ -166,22 +166,22 @@ var g = ({ mode: g }) => {
|
|
|
166
166
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
167
167
|
htmlFor: "import-target-language",
|
|
168
168
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
169
|
-
children:
|
|
169
|
+
children: _("i18n.import.fields.targetLanguage", "Target Language")
|
|
170
170
|
}), /* @__PURE__ */ l("select", {
|
|
171
171
|
id: "import-target-language",
|
|
172
|
-
className:
|
|
172
|
+
className: O,
|
|
173
173
|
children: [
|
|
174
174
|
/* @__PURE__ */ c("option", {
|
|
175
175
|
value: "es-ES",
|
|
176
|
-
children:
|
|
176
|
+
children: _("i18n.shared.language.esEs", "Spanish (es-ES)")
|
|
177
177
|
}),
|
|
178
178
|
/* @__PURE__ */ c("option", {
|
|
179
179
|
value: "fr-FR",
|
|
180
|
-
children:
|
|
180
|
+
children: _("i18n.shared.language.frFr", "French (fr-FR)")
|
|
181
181
|
}),
|
|
182
182
|
/* @__PURE__ */ c("option", {
|
|
183
183
|
value: "de-DE",
|
|
184
|
-
children:
|
|
184
|
+
children: _("i18n.shared.language.deDe", "German (de-DE)")
|
|
185
185
|
})
|
|
186
186
|
]
|
|
187
187
|
})] })
|
|
@@ -190,7 +190,7 @@ var g = ({ mode: g }) => {
|
|
|
190
190
|
}),
|
|
191
191
|
/* @__PURE__ */ c(h, {
|
|
192
192
|
collapsedHeight: 0,
|
|
193
|
-
label:
|
|
193
|
+
label: _("i18n.import.options.show", "Import options"),
|
|
194
194
|
children: /* @__PURE__ */ l("div", {
|
|
195
195
|
className: "space-y-2 pt-4",
|
|
196
196
|
children: [
|
|
@@ -199,13 +199,13 @@ var g = ({ mode: g }) => {
|
|
|
199
199
|
children: [/* @__PURE__ */ c("input", {
|
|
200
200
|
type: "checkbox",
|
|
201
201
|
id: "create-namespaces",
|
|
202
|
-
"aria-label":
|
|
202
|
+
"aria-label": _("i18n.import.options.createNamespaces", "Create missing namespaces automatically"),
|
|
203
203
|
defaultChecked: !0,
|
|
204
|
-
className:
|
|
204
|
+
className: k
|
|
205
205
|
}), /* @__PURE__ */ c("label", {
|
|
206
206
|
htmlFor: "create-namespaces",
|
|
207
207
|
className: "text-sm text-text-primary",
|
|
208
|
-
children:
|
|
208
|
+
children: _("i18n.import.options.createNamespaces", "Create missing namespaces automatically")
|
|
209
209
|
})]
|
|
210
210
|
}),
|
|
211
211
|
/* @__PURE__ */ l("div", {
|
|
@@ -213,13 +213,13 @@ var g = ({ mode: g }) => {
|
|
|
213
213
|
children: [/* @__PURE__ */ c("input", {
|
|
214
214
|
type: "checkbox",
|
|
215
215
|
id: "update-existing",
|
|
216
|
-
"aria-label":
|
|
216
|
+
"aria-label": _("i18n.import.options.updateExisting", "Update existing translations"),
|
|
217
217
|
defaultChecked: !0,
|
|
218
|
-
className:
|
|
218
|
+
className: k
|
|
219
219
|
}), /* @__PURE__ */ c("label", {
|
|
220
220
|
htmlFor: "update-existing",
|
|
221
221
|
className: "text-sm text-text-primary",
|
|
222
|
-
children:
|
|
222
|
+
children: _("i18n.import.options.updateExisting", "Update existing translations")
|
|
223
223
|
})]
|
|
224
224
|
}),
|
|
225
225
|
/* @__PURE__ */ l("div", {
|
|
@@ -227,45 +227,45 @@ var g = ({ mode: g }) => {
|
|
|
227
227
|
children: [/* @__PURE__ */ c("input", {
|
|
228
228
|
type: "checkbox",
|
|
229
229
|
id: "skip-errors",
|
|
230
|
-
"aria-label":
|
|
231
|
-
className:
|
|
230
|
+
"aria-label": _("i18n.import.options.skipErrors", "Skip validation errors (import valid only)"),
|
|
231
|
+
className: k
|
|
232
232
|
}), /* @__PURE__ */ c("label", {
|
|
233
233
|
htmlFor: "skip-errors",
|
|
234
234
|
className: "text-sm text-text-primary",
|
|
235
|
-
children:
|
|
235
|
+
children: _("i18n.import.options.skipErrors", "Skip validation errors (import valid only)")
|
|
236
236
|
})]
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
})
|
|
240
240
|
}),
|
|
241
|
-
|
|
241
|
+
v.jobId && /* @__PURE__ */ l(d, {
|
|
242
242
|
className: "p-4",
|
|
243
243
|
children: [
|
|
244
244
|
/* @__PURE__ */ l("div", {
|
|
245
245
|
className: "mb-2 flex items-center justify-between text-sm",
|
|
246
246
|
children: [/* @__PURE__ */ c("span", {
|
|
247
247
|
className: "text-text-primary",
|
|
248
|
-
children:
|
|
248
|
+
children: _("i18n.import.progress.title", "Import Progress")
|
|
249
249
|
}), /* @__PURE__ */ l("span", {
|
|
250
250
|
className: "text-text-tertiary tabular-nums",
|
|
251
|
-
children: [
|
|
251
|
+
children: [v.progress, "%"]
|
|
252
252
|
})]
|
|
253
253
|
}),
|
|
254
254
|
/* @__PURE__ */ c("div", {
|
|
255
255
|
className: "h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
256
256
|
role: "progressbar",
|
|
257
|
-
"aria-valuenow":
|
|
257
|
+
"aria-valuenow": v.progress,
|
|
258
258
|
"aria-valuemin": 0,
|
|
259
259
|
"aria-valuemax": 100,
|
|
260
|
-
"aria-label":
|
|
260
|
+
"aria-label": _("i18n.import.progress.title", "Import Progress"),
|
|
261
261
|
children: /* @__PURE__ */ c("div", {
|
|
262
262
|
className: "h-full rounded-full bg-action-primary-bg shadow-[var(--shadow-glow)] transition-all",
|
|
263
|
-
style: { width: `${
|
|
263
|
+
style: { width: `${v.progress}%` }
|
|
264
264
|
})
|
|
265
265
|
}),
|
|
266
|
-
|
|
266
|
+
v.errors.length > 0 && /* @__PURE__ */ c("div", {
|
|
267
267
|
className: "mt-3 space-y-1",
|
|
268
|
-
children:
|
|
268
|
+
children: v.errors.map((t) => /* @__PURE__ */ l("div", {
|
|
269
269
|
className: "flex items-start gap-2 text-xs text-status-danger-text",
|
|
270
270
|
children: [/* @__PURE__ */ c(e, {
|
|
271
271
|
className: "mt-0.5 size-3 flex-shrink-0",
|
|
@@ -278,17 +278,17 @@ var g = ({ mode: g }) => {
|
|
|
278
278
|
/* @__PURE__ */ c(u, {
|
|
279
279
|
align: "start",
|
|
280
280
|
primary: {
|
|
281
|
-
label:
|
|
282
|
-
onSelect:
|
|
283
|
-
disabled: !
|
|
281
|
+
label: _("i18n.import.actions.start", "Start Import"),
|
|
282
|
+
onSelect: E,
|
|
283
|
+
disabled: !C,
|
|
284
284
|
icon: /* @__PURE__ */ c(r, {
|
|
285
285
|
className: "size-4",
|
|
286
286
|
"aria-hidden": "true"
|
|
287
287
|
})
|
|
288
288
|
},
|
|
289
|
-
actions:
|
|
290
|
-
label:
|
|
291
|
-
onSelect:
|
|
289
|
+
actions: v.jobId ? [{
|
|
290
|
+
label: _("i18n.import.actions.reset", "Reset"),
|
|
291
|
+
onSelect: b
|
|
292
292
|
}] : []
|
|
293
293
|
})
|
|
294
294
|
]
|
|
@@ -303,26 +303,26 @@ var g = ({ mode: g }) => {
|
|
|
303
303
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
304
304
|
htmlFor: "export-format",
|
|
305
305
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
306
|
-
children:
|
|
306
|
+
children: _("i18n.export.fields.format", "Export Format")
|
|
307
307
|
}), /* @__PURE__ */ c("select", {
|
|
308
308
|
id: "export-format",
|
|
309
|
-
value:
|
|
310
|
-
onChange: (e) =>
|
|
311
|
-
className:
|
|
312
|
-
children:
|
|
309
|
+
value: x,
|
|
310
|
+
onChange: (e) => S(e.target.value),
|
|
311
|
+
className: O,
|
|
312
|
+
children: A
|
|
313
313
|
})] }), /* @__PURE__ */ l("div", {
|
|
314
314
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
315
315
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
316
316
|
htmlFor: "export-product",
|
|
317
317
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
318
|
-
children:
|
|
318
|
+
children: _("i18n.export.fields.product", "Product")
|
|
319
319
|
}), /* @__PURE__ */ l("select", {
|
|
320
320
|
id: "export-product",
|
|
321
|
-
className:
|
|
321
|
+
className: O,
|
|
322
322
|
children: [
|
|
323
323
|
/* @__PURE__ */ c("option", {
|
|
324
324
|
value: "",
|
|
325
|
-
children:
|
|
325
|
+
children: _("i18n.export.fields.product.all", "All Products")
|
|
326
326
|
}),
|
|
327
327
|
/* @__PURE__ */ c("option", {
|
|
328
328
|
value: "workspaces",
|
|
@@ -336,22 +336,22 @@ var g = ({ mode: g }) => {
|
|
|
336
336
|
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
337
337
|
htmlFor: "export-language",
|
|
338
338
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
339
|
-
children:
|
|
339
|
+
children: _("i18n.export.fields.language", "Language")
|
|
340
340
|
}), /* @__PURE__ */ l("select", {
|
|
341
341
|
id: "export-language",
|
|
342
|
-
className:
|
|
342
|
+
className: O,
|
|
343
343
|
children: [
|
|
344
344
|
/* @__PURE__ */ c("option", {
|
|
345
345
|
value: "",
|
|
346
|
-
children:
|
|
346
|
+
children: _("i18n.export.fields.language.all", "All Languages")
|
|
347
347
|
}),
|
|
348
348
|
/* @__PURE__ */ c("option", {
|
|
349
349
|
value: "es-ES",
|
|
350
|
-
children:
|
|
350
|
+
children: _("i18n.export.fields.language.spanish", "Spanish")
|
|
351
351
|
}),
|
|
352
352
|
/* @__PURE__ */ c("option", {
|
|
353
353
|
value: "fr-FR",
|
|
354
|
-
children:
|
|
354
|
+
children: _("i18n.export.fields.language.french", "French")
|
|
355
355
|
})
|
|
356
356
|
]
|
|
357
357
|
})] })]
|
|
@@ -360,7 +360,7 @@ var g = ({ mode: g }) => {
|
|
|
360
360
|
}),
|
|
361
361
|
/* @__PURE__ */ c(h, {
|
|
362
362
|
collapsedHeight: 0,
|
|
363
|
-
label:
|
|
363
|
+
label: _("i18n.export.options.show", "Export options"),
|
|
364
364
|
children: /* @__PURE__ */ l("div", {
|
|
365
365
|
className: "space-y-2 pt-4",
|
|
366
366
|
children: [/* @__PURE__ */ l("div", {
|
|
@@ -368,25 +368,25 @@ var g = ({ mode: g }) => {
|
|
|
368
368
|
children: [/* @__PURE__ */ c("input", {
|
|
369
369
|
type: "checkbox",
|
|
370
370
|
id: "include-metadata",
|
|
371
|
-
"aria-label":
|
|
372
|
-
className:
|
|
371
|
+
"aria-label": _("i18n.export.options.includeMetadata", "Include metadata"),
|
|
372
|
+
className: k
|
|
373
373
|
}), /* @__PURE__ */ c("label", {
|
|
374
374
|
htmlFor: "include-metadata",
|
|
375
375
|
className: "text-sm text-text-primary",
|
|
376
|
-
children:
|
|
376
|
+
children: _("i18n.export.options.includeMetadata", "Include metadata")
|
|
377
377
|
})]
|
|
378
378
|
}), /* @__PURE__ */ l("div", {
|
|
379
379
|
className: "flex items-center gap-2",
|
|
380
380
|
children: [/* @__PURE__ */ c("input", {
|
|
381
381
|
type: "checkbox",
|
|
382
382
|
id: "published-only",
|
|
383
|
-
"aria-label":
|
|
383
|
+
"aria-label": _("i18n.export.options.publishedOnly", "Published translations only"),
|
|
384
384
|
defaultChecked: !0,
|
|
385
|
-
className:
|
|
385
|
+
className: k
|
|
386
386
|
}), /* @__PURE__ */ c("label", {
|
|
387
387
|
htmlFor: "published-only",
|
|
388
388
|
className: "text-sm text-text-primary",
|
|
389
|
-
children:
|
|
389
|
+
children: _("i18n.export.options.publishedOnly", "Published translations only")
|
|
390
390
|
})]
|
|
391
391
|
})]
|
|
392
392
|
})
|
|
@@ -403,18 +403,18 @@ var g = ({ mode: g }) => {
|
|
|
403
403
|
className: "text-sm",
|
|
404
404
|
children: [/* @__PURE__ */ c("p", {
|
|
405
405
|
className: "font-medium text-text-primary",
|
|
406
|
-
children:
|
|
406
|
+
children: _("i18n.export.preview.title", "Export Preview")
|
|
407
407
|
}), /* @__PURE__ */ c("p", {
|
|
408
408
|
className: "mt-1 text-text-secondary",
|
|
409
|
-
children:
|
|
409
|
+
children: _("i18n.export.preview.description", "Approximately 1,245 translation keys will be exported based on your selection.")
|
|
410
410
|
})]
|
|
411
411
|
})]
|
|
412
412
|
}),
|
|
413
413
|
/* @__PURE__ */ c(u, {
|
|
414
414
|
align: "start",
|
|
415
415
|
primary: {
|
|
416
|
-
label:
|
|
417
|
-
onSelect:
|
|
416
|
+
label: _("i18n.export.actions.start", "Export Translations"),
|
|
417
|
+
onSelect: D,
|
|
418
418
|
icon: /* @__PURE__ */ c(t, {
|
|
419
419
|
className: "size-4",
|
|
420
420
|
"aria-hidden": "true"
|