@burdenoff/microfe-i18n 2026.525.1 → 2026.527.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 +27 -2
- package/dist/i18n/pages/LanguagesListPage.js +7 -2
- package/dist/i18n/pages/LocaleConfigPage.js +32 -0
- package/dist/i18n/pages/ProductsListPage.js +5 -2
- package/dist/i18n/pages/ProgressDashboardPage.js +3 -0
- package/dist/i18n/pages/ReviewQueuePage.js +72 -62
- package/dist/i18n/pages/TranslationEditorPage.js +14 -3
- package/dist/i18n/providers/I18nProvider.js +7 -7
- package/package.json +1 -1
|
@@ -31,9 +31,11 @@ var u = ({ mode: u }) => {
|
|
|
31
31
|
className: "space-y-6",
|
|
32
32
|
children: [
|
|
33
33
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
34
|
+
htmlFor: "import-format",
|
|
34
35
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
35
36
|
children: f("i18n.import.fields.format", "Select Format")
|
|
36
37
|
}), /* @__PURE__ */ l("select", {
|
|
38
|
+
id: "import-format",
|
|
37
39
|
value: g,
|
|
38
40
|
onChange: (e) => _(e.target.value),
|
|
39
41
|
className: "w-full rounded-md border border-border 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",
|
|
@@ -61,13 +63,16 @@ var u = ({ mode: u }) => {
|
|
|
61
63
|
]
|
|
62
64
|
})] }),
|
|
63
65
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
66
|
+
htmlFor: "import-upload-file",
|
|
64
67
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
65
68
|
children: f("i18n.import.fields.uploadFile", "Upload File")
|
|
66
69
|
}), /* @__PURE__ */ l("div", {
|
|
67
70
|
className: "relative rounded-lg border-2 border-dashed border-border bg-surface p-8 text-center transition-colors hover:border-accent-primary",
|
|
68
71
|
children: [
|
|
69
72
|
/* @__PURE__ */ c("input", {
|
|
73
|
+
id: "import-upload-file",
|
|
70
74
|
type: "file",
|
|
75
|
+
"aria-label": f("i18n.import.fields.uploadFile", "Upload File"),
|
|
71
76
|
onChange: (e) => {
|
|
72
77
|
let t = e.target.files?.[0];
|
|
73
78
|
t && y(t);
|
|
@@ -89,9 +94,11 @@ var u = ({ mode: u }) => {
|
|
|
89
94
|
/* @__PURE__ */ l("div", {
|
|
90
95
|
className: "grid grid-cols-2 gap-4",
|
|
91
96
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
97
|
+
htmlFor: "import-product",
|
|
92
98
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
93
99
|
children: f("i18n.import.fields.product", "Product")
|
|
94
100
|
}), /* @__PURE__ */ l("select", {
|
|
101
|
+
id: "import-product",
|
|
95
102
|
className: "w-full rounded-md border border-border 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",
|
|
96
103
|
children: [
|
|
97
104
|
/* @__PURE__ */ c("option", {
|
|
@@ -108,9 +115,11 @@ var u = ({ mode: u }) => {
|
|
|
108
115
|
})
|
|
109
116
|
]
|
|
110
117
|
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
118
|
+
htmlFor: "import-module",
|
|
111
119
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
112
120
|
children: f("i18n.import.fields.module", "Module")
|
|
113
121
|
}), /* @__PURE__ */ l("select", {
|
|
122
|
+
id: "import-module",
|
|
114
123
|
className: "w-full rounded-md border border-border 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",
|
|
115
124
|
children: [
|
|
116
125
|
/* @__PURE__ */ c("option", {
|
|
@@ -129,9 +138,11 @@ var u = ({ mode: u }) => {
|
|
|
129
138
|
})] })]
|
|
130
139
|
}),
|
|
131
140
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
141
|
+
htmlFor: "import-target-language",
|
|
132
142
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
133
143
|
children: f("i18n.import.fields.targetLanguage", "Target Language")
|
|
134
144
|
}), /* @__PURE__ */ l("select", {
|
|
145
|
+
id: "import-target-language",
|
|
135
146
|
className: "w-full rounded-md border border-border 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",
|
|
136
147
|
children: [
|
|
137
148
|
/* @__PURE__ */ c("option", {
|
|
@@ -156,6 +167,7 @@ var u = ({ mode: u }) => {
|
|
|
156
167
|
children: [/* @__PURE__ */ c("input", {
|
|
157
168
|
type: "checkbox",
|
|
158
169
|
id: "create-namespaces",
|
|
170
|
+
"aria-label": f("i18n.import.options.createNamespaces", "Create missing namespaces automatically"),
|
|
159
171
|
defaultChecked: !0,
|
|
160
172
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
161
173
|
}), /* @__PURE__ */ c("label", {
|
|
@@ -169,6 +181,7 @@ var u = ({ mode: u }) => {
|
|
|
169
181
|
children: [/* @__PURE__ */ c("input", {
|
|
170
182
|
type: "checkbox",
|
|
171
183
|
id: "update-existing",
|
|
184
|
+
"aria-label": f("i18n.import.options.updateExisting", "Update existing translations"),
|
|
172
185
|
defaultChecked: !0,
|
|
173
186
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
174
187
|
}), /* @__PURE__ */ c("label", {
|
|
@@ -182,6 +195,7 @@ var u = ({ mode: u }) => {
|
|
|
182
195
|
children: [/* @__PURE__ */ c("input", {
|
|
183
196
|
type: "checkbox",
|
|
184
197
|
id: "skip-errors",
|
|
198
|
+
"aria-label": f("i18n.import.options.skipErrors", "Skip validation errors (import valid only)"),
|
|
185
199
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
186
200
|
}), /* @__PURE__ */ c("label", {
|
|
187
201
|
htmlFor: "skip-errors",
|
|
@@ -213,16 +227,17 @@ var u = ({ mode: u }) => {
|
|
|
213
227
|
}),
|
|
214
228
|
p.errors.length > 0 && /* @__PURE__ */ c("div", {
|
|
215
229
|
className: "mt-3 space-y-1",
|
|
216
|
-
children: p.errors.map((t
|
|
230
|
+
children: p.errors.map((t) => /* @__PURE__ */ l("div", {
|
|
217
231
|
className: "flex items-start gap-2 text-xs text-error",
|
|
218
232
|
children: [/* @__PURE__ */ c(e, { className: "mt-0.5 size-3 flex-shrink-0" }), /* @__PURE__ */ c("span", { children: t.message })]
|
|
219
|
-
},
|
|
233
|
+
}, `${t.row ?? "x"}:${t.key ?? "x"}:${t.field ?? "x"}:${t.message}`))
|
|
220
234
|
})
|
|
221
235
|
]
|
|
222
236
|
}),
|
|
223
237
|
/* @__PURE__ */ l("div", {
|
|
224
238
|
className: "flex items-center gap-3",
|
|
225
239
|
children: [/* @__PURE__ */ l("button", {
|
|
240
|
+
type: "button",
|
|
226
241
|
onClick: () => {
|
|
227
242
|
v && (m(g, "job-123"), console.log("Starting import:", v.name, g));
|
|
228
243
|
},
|
|
@@ -230,6 +245,7 @@ var u = ({ mode: u }) => {
|
|
|
230
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",
|
|
231
246
|
children: [/* @__PURE__ */ c(r, { className: "size-4" }), f("i18n.import.actions.start", "Start Import")]
|
|
232
247
|
}), p.jobId && /* @__PURE__ */ c("button", {
|
|
248
|
+
type: "button",
|
|
233
249
|
onClick: h,
|
|
234
250
|
className: "rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
|
|
235
251
|
children: f("i18n.import.actions.reset", "Reset")
|
|
@@ -240,9 +256,11 @@ var u = ({ mode: u }) => {
|
|
|
240
256
|
className: "space-y-6",
|
|
241
257
|
children: [
|
|
242
258
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
259
|
+
htmlFor: "export-format",
|
|
243
260
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
244
261
|
children: f("i18n.export.fields.format", "Export Format")
|
|
245
262
|
}), /* @__PURE__ */ l("select", {
|
|
263
|
+
id: "export-format",
|
|
246
264
|
value: g,
|
|
247
265
|
onChange: (e) => _(e.target.value),
|
|
248
266
|
className: "w-full rounded-md border border-border 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",
|
|
@@ -272,9 +290,11 @@ var u = ({ mode: u }) => {
|
|
|
272
290
|
/* @__PURE__ */ l("div", {
|
|
273
291
|
className: "grid grid-cols-2 gap-4",
|
|
274
292
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
293
|
+
htmlFor: "export-product",
|
|
275
294
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
276
295
|
children: f("i18n.export.fields.product", "Product")
|
|
277
296
|
}), /* @__PURE__ */ l("select", {
|
|
297
|
+
id: "export-product",
|
|
278
298
|
className: "w-full rounded-md border border-border 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",
|
|
279
299
|
children: [
|
|
280
300
|
/* @__PURE__ */ c("option", {
|
|
@@ -291,9 +311,11 @@ var u = ({ mode: u }) => {
|
|
|
291
311
|
})
|
|
292
312
|
]
|
|
293
313
|
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
314
|
+
htmlFor: "export-language",
|
|
294
315
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
295
316
|
children: f("i18n.export.fields.language", "Language")
|
|
296
317
|
}), /* @__PURE__ */ l("select", {
|
|
318
|
+
id: "export-language",
|
|
297
319
|
className: "w-full rounded-md border border-border 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",
|
|
298
320
|
children: [
|
|
299
321
|
/* @__PURE__ */ c("option", {
|
|
@@ -318,6 +340,7 @@ var u = ({ mode: u }) => {
|
|
|
318
340
|
children: [/* @__PURE__ */ c("input", {
|
|
319
341
|
type: "checkbox",
|
|
320
342
|
id: "include-metadata",
|
|
343
|
+
"aria-label": f("i18n.export.options.includeMetadata", "Include metadata"),
|
|
321
344
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
322
345
|
}), /* @__PURE__ */ c("label", {
|
|
323
346
|
htmlFor: "include-metadata",
|
|
@@ -329,6 +352,7 @@ var u = ({ mode: u }) => {
|
|
|
329
352
|
children: [/* @__PURE__ */ c("input", {
|
|
330
353
|
type: "checkbox",
|
|
331
354
|
id: "published-only",
|
|
355
|
+
"aria-label": f("i18n.export.options.publishedOnly", "Published translations only"),
|
|
332
356
|
defaultChecked: !0,
|
|
333
357
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
334
358
|
}), /* @__PURE__ */ c("label", {
|
|
@@ -352,6 +376,7 @@ var u = ({ mode: u }) => {
|
|
|
352
376
|
})]
|
|
353
377
|
}),
|
|
354
378
|
/* @__PURE__ */ l("button", {
|
|
379
|
+
type: "button",
|
|
355
380
|
onClick: () => {
|
|
356
381
|
console.log("Starting export:", g);
|
|
357
382
|
},
|
|
@@ -40,6 +40,7 @@ var c = () => {
|
|
|
40
40
|
children: l("i18n.languages.title", "Languages")
|
|
41
41
|
})]
|
|
42
42
|
}), /* @__PURE__ */ s("button", {
|
|
43
|
+
type: "button",
|
|
43
44
|
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",
|
|
44
45
|
children: [/* @__PURE__ */ o(t, { className: "size-4" }), l("i18n.languages.actions.add", "Add Language")]
|
|
45
46
|
})]
|
|
@@ -54,6 +55,7 @@ var c = () => {
|
|
|
54
55
|
className: "relative flex-1",
|
|
55
56
|
children: [/* @__PURE__ */ o(n, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-content-secondary" }), /* @__PURE__ */ o("input", {
|
|
56
57
|
type: "text",
|
|
58
|
+
"aria-label": l("i18n.languages.filters.searchAriaLabel", "Search languages"),
|
|
57
59
|
placeholder: l("i18n.languages.filters.searchPlaceholder", "Search languages..."),
|
|
58
60
|
value: p,
|
|
59
61
|
onChange: (e) => g(e.target.value),
|
|
@@ -61,6 +63,7 @@ var c = () => {
|
|
|
61
63
|
})]
|
|
62
64
|
}),
|
|
63
65
|
/* @__PURE__ */ s("select", {
|
|
66
|
+
"aria-label": l("i18n.languages.filters.status.label", "Filter by status"),
|
|
64
67
|
value: u.status,
|
|
65
68
|
onChange: (e) => d({ status: e.target.value }),
|
|
66
69
|
className: "rounded-md border border-border 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",
|
|
@@ -80,6 +83,7 @@ var c = () => {
|
|
|
80
83
|
]
|
|
81
84
|
}),
|
|
82
85
|
/* @__PURE__ */ s("select", {
|
|
86
|
+
"aria-label": l("i18n.languages.filters.direction.label", "Filter by direction"),
|
|
83
87
|
value: u.direction,
|
|
84
88
|
onChange: (e) => d({ direction: e.target.value }),
|
|
85
89
|
className: "rounded-md border border-border 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",
|
|
@@ -105,9 +109,10 @@ var c = () => {
|
|
|
105
109
|
className: "flex-1 overflow-auto p-6",
|
|
106
110
|
children: /* @__PURE__ */ o("div", {
|
|
107
111
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
108
|
-
children: h.map((e) => /* @__PURE__ */ o("
|
|
112
|
+
children: h.map((e) => /* @__PURE__ */ o("button", {
|
|
113
|
+
type: "button",
|
|
109
114
|
onClick: () => f(e),
|
|
110
|
-
className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-4 transition-all hover:border-accent-primary hover:shadow-md",
|
|
115
|
+
className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-4 text-left transition-all hover:border-accent-primary hover:shadow-md",
|
|
111
116
|
children: /* @__PURE__ */ s("div", {
|
|
112
117
|
className: "flex items-start justify-between",
|
|
113
118
|
children: [/* @__PURE__ */ s("div", {
|
|
@@ -62,9 +62,11 @@ var o = () => {
|
|
|
62
62
|
}), /* @__PURE__ */ a("div", {
|
|
63
63
|
className: "flex items-center gap-2",
|
|
64
64
|
children: [/* @__PURE__ */ a("button", {
|
|
65
|
+
type: "button",
|
|
65
66
|
className: "flex items-center gap-2 rounded-md border border-error bg-surface px-4 py-2 text-sm font-medium text-error hover:bg-error/10",
|
|
66
67
|
children: [/* @__PURE__ */ i(n, { className: "size-4" }), "Delete Language"]
|
|
67
68
|
}), /* @__PURE__ */ a("button", {
|
|
69
|
+
type: "button",
|
|
68
70
|
onClick: () => {
|
|
69
71
|
console.log("Saving locale config:", o);
|
|
70
72
|
},
|
|
@@ -87,37 +89,49 @@ var o = () => {
|
|
|
87
89
|
className: "grid grid-cols-2 gap-4",
|
|
88
90
|
children: [
|
|
89
91
|
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
92
|
+
htmlFor: "locale-language-code",
|
|
90
93
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
91
94
|
children: "Language Code"
|
|
92
95
|
}), /* @__PURE__ */ i("input", {
|
|
96
|
+
id: "locale-language-code",
|
|
93
97
|
type: "text",
|
|
98
|
+
"aria-label": "Language Code",
|
|
94
99
|
value: o.code,
|
|
95
100
|
onChange: (e) => c("code", e.target.value),
|
|
96
101
|
className: "w-full rounded-md border border-border 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"
|
|
97
102
|
})] }),
|
|
98
103
|
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
104
|
+
htmlFor: "locale-name",
|
|
99
105
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
100
106
|
children: "Name"
|
|
101
107
|
}), /* @__PURE__ */ i("input", {
|
|
108
|
+
id: "locale-name",
|
|
102
109
|
type: "text",
|
|
110
|
+
"aria-label": "Name",
|
|
103
111
|
value: o.name,
|
|
104
112
|
onChange: (e) => c("name", e.target.value),
|
|
105
113
|
className: "w-full rounded-md border border-border 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"
|
|
106
114
|
})] }),
|
|
107
115
|
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
116
|
+
htmlFor: "locale-native-name",
|
|
108
117
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
109
118
|
children: "Native Name"
|
|
110
119
|
}), /* @__PURE__ */ i("input", {
|
|
120
|
+
id: "locale-native-name",
|
|
111
121
|
type: "text",
|
|
122
|
+
"aria-label": "Native Name",
|
|
112
123
|
value: o.nativeName,
|
|
113
124
|
onChange: (e) => c("nativeName", e.target.value),
|
|
114
125
|
className: "w-full rounded-md border border-border 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"
|
|
115
126
|
})] }),
|
|
116
127
|
/* @__PURE__ */ a("div", { children: [/* @__PURE__ */ i("label", {
|
|
128
|
+
htmlFor: "locale-region",
|
|
117
129
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
118
130
|
children: "Region"
|
|
119
131
|
}), /* @__PURE__ */ i("input", {
|
|
132
|
+
id: "locale-region",
|
|
120
133
|
type: "text",
|
|
134
|
+
"aria-label": "Region",
|
|
121
135
|
value: o.region,
|
|
122
136
|
onChange: (e) => c("region", e.target.value),
|
|
123
137
|
className: "w-full rounded-md border border-border 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"
|
|
@@ -129,6 +143,7 @@ var o = () => {
|
|
|
129
143
|
children: [/* @__PURE__ */ i("input", {
|
|
130
144
|
type: "checkbox",
|
|
131
145
|
id: "is-default",
|
|
146
|
+
"aria-label": "Set as default language",
|
|
132
147
|
checked: o.isDefault,
|
|
133
148
|
onChange: (e) => c("isDefault", e.target.checked),
|
|
134
149
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
@@ -150,6 +165,7 @@ var o = () => {
|
|
|
150
165
|
type: "radio",
|
|
151
166
|
id: "ltr",
|
|
152
167
|
name: "direction",
|
|
168
|
+
"aria-label": "LTR (Left to Right)",
|
|
153
169
|
checked: o.direction === "ltr",
|
|
154
170
|
onChange: () => c("direction", "ltr"),
|
|
155
171
|
className: "size-4 border-border text-accent-primary focus:ring-accent-primary"
|
|
@@ -164,6 +180,7 @@ var o = () => {
|
|
|
164
180
|
type: "radio",
|
|
165
181
|
id: "rtl",
|
|
166
182
|
name: "direction",
|
|
183
|
+
"aria-label": "RTL (Right to Left)",
|
|
167
184
|
checked: o.direction === "rtl",
|
|
168
185
|
onChange: () => c("direction", "rtl"),
|
|
169
186
|
className: "size-4 border-border text-accent-primary focus:ring-accent-primary"
|
|
@@ -206,12 +223,14 @@ var o = () => {
|
|
|
206
223
|
e === "es" ? "Spanish (es)" : "English (en)"
|
|
207
224
|
]
|
|
208
225
|
}), /* @__PURE__ */ i("button", {
|
|
226
|
+
type: "button",
|
|
209
227
|
className: "text-xs text-error hover:underline",
|
|
210
228
|
children: "Remove"
|
|
211
229
|
})]
|
|
212
230
|
})
|
|
213
231
|
}, e)),
|
|
214
232
|
/* @__PURE__ */ i("button", {
|
|
233
|
+
type: "button",
|
|
215
234
|
className: "w-full rounded-lg border-2 border-dashed border-border bg-surface p-3 text-sm text-content-secondary transition-colors hover:border-accent-primary hover:text-accent-primary",
|
|
216
235
|
children: "+ Add Fallback Language"
|
|
217
236
|
})
|
|
@@ -227,6 +246,7 @@ var o = () => {
|
|
|
227
246
|
children: [/* @__PURE__ */ i("input", {
|
|
228
247
|
type: "checkbox",
|
|
229
248
|
id: `plural-${e}`,
|
|
249
|
+
"aria-label": `Plural form: ${e}`,
|
|
230
250
|
checked: t,
|
|
231
251
|
onChange: (t) => l(e, t.target.checked),
|
|
232
252
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
@@ -245,11 +265,14 @@ var o = () => {
|
|
|
245
265
|
children: [
|
|
246
266
|
/* @__PURE__ */ a("div", { children: [
|
|
247
267
|
/* @__PURE__ */ i("label", {
|
|
268
|
+
htmlFor: "locale-date-format",
|
|
248
269
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
249
270
|
children: "Date Format"
|
|
250
271
|
}),
|
|
251
272
|
/* @__PURE__ */ i("input", {
|
|
273
|
+
id: "locale-date-format",
|
|
252
274
|
type: "text",
|
|
275
|
+
"aria-label": "Date Format",
|
|
253
276
|
value: o.dateFormat,
|
|
254
277
|
onChange: (e) => c("dateFormat", e.target.value),
|
|
255
278
|
className: "w-full rounded-md border border-border 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"
|
|
@@ -261,11 +284,14 @@ var o = () => {
|
|
|
261
284
|
] }),
|
|
262
285
|
/* @__PURE__ */ a("div", { children: [
|
|
263
286
|
/* @__PURE__ */ i("label", {
|
|
287
|
+
htmlFor: "locale-time-format",
|
|
264
288
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
265
289
|
children: "Time Format"
|
|
266
290
|
}),
|
|
267
291
|
/* @__PURE__ */ i("input", {
|
|
292
|
+
id: "locale-time-format",
|
|
268
293
|
type: "text",
|
|
294
|
+
"aria-label": "Time Format",
|
|
269
295
|
value: o.timeFormat,
|
|
270
296
|
onChange: (e) => c("timeFormat", e.target.value),
|
|
271
297
|
className: "w-full rounded-md border border-border 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"
|
|
@@ -277,11 +303,14 @@ var o = () => {
|
|
|
277
303
|
] }),
|
|
278
304
|
/* @__PURE__ */ a("div", { children: [
|
|
279
305
|
/* @__PURE__ */ i("label", {
|
|
306
|
+
htmlFor: "locale-number-format",
|
|
280
307
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
281
308
|
children: "Number Format"
|
|
282
309
|
}),
|
|
283
310
|
/* @__PURE__ */ i("input", {
|
|
311
|
+
id: "locale-number-format",
|
|
284
312
|
type: "text",
|
|
313
|
+
"aria-label": "Number Format",
|
|
285
314
|
value: o.numberFormat,
|
|
286
315
|
onChange: (e) => c("numberFormat", e.target.value),
|
|
287
316
|
className: "w-full rounded-md border border-border 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"
|
|
@@ -293,11 +322,14 @@ var o = () => {
|
|
|
293
322
|
] }),
|
|
294
323
|
/* @__PURE__ */ a("div", { children: [
|
|
295
324
|
/* @__PURE__ */ i("label", {
|
|
325
|
+
htmlFor: "locale-currency-code",
|
|
296
326
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
297
327
|
children: "Currency Code"
|
|
298
328
|
}),
|
|
299
329
|
/* @__PURE__ */ i("input", {
|
|
330
|
+
id: "locale-currency-code",
|
|
300
331
|
type: "text",
|
|
332
|
+
"aria-label": "Currency Code",
|
|
301
333
|
value: o.currencyCode,
|
|
302
334
|
onChange: (e) => c("currencyCode", e.target.value),
|
|
303
335
|
className: "w-full rounded-md border border-border 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"
|
|
@@ -61,6 +61,7 @@ var l = () => {
|
|
|
61
61
|
children: u("i18n.products.title", "Products")
|
|
62
62
|
})]
|
|
63
63
|
}), /* @__PURE__ */ c("button", {
|
|
64
|
+
type: "button",
|
|
64
65
|
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",
|
|
65
66
|
children: [/* @__PURE__ */ s(n, { className: "size-4" }), u("i18n.products.actions.add", "Add Product")]
|
|
66
67
|
})]
|
|
@@ -72,6 +73,7 @@ var l = () => {
|
|
|
72
73
|
className: "relative",
|
|
73
74
|
children: [/* @__PURE__ */ s(r, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-content-secondary" }), /* @__PURE__ */ s("input", {
|
|
74
75
|
type: "text",
|
|
76
|
+
"aria-label": u("i18n.products.search.ariaLabel", "Search products"),
|
|
75
77
|
placeholder: u("i18n.products.search.placeholder", "Search products..."),
|
|
76
78
|
value: f,
|
|
77
79
|
onChange: (e) => p(e.target.value),
|
|
@@ -83,9 +85,10 @@ var l = () => {
|
|
|
83
85
|
className: "flex-1 overflow-auto p-6",
|
|
84
86
|
children: /* @__PURE__ */ s("div", {
|
|
85
87
|
className: "space-y-4",
|
|
86
|
-
children: m.map((t) => /* @__PURE__ */ s("
|
|
88
|
+
children: m.map((t) => /* @__PURE__ */ s("button", {
|
|
89
|
+
type: "button",
|
|
87
90
|
onClick: () => d(t),
|
|
88
|
-
className: "cursor-pointer rounded-lg border border-border bg-surface-elevated p-6 transition-all hover:border-accent-primary hover:shadow-md",
|
|
91
|
+
className: "block w-full cursor-pointer rounded-lg border border-border bg-surface-elevated p-6 text-left transition-all hover:border-accent-primary hover:shadow-md",
|
|
89
92
|
children: /* @__PURE__ */ s("div", {
|
|
90
93
|
className: "flex items-start justify-between",
|
|
91
94
|
children: /* @__PURE__ */ c("div", {
|
|
@@ -23,9 +23,11 @@ var s = () => {
|
|
|
23
23
|
}), /* @__PURE__ */ o("div", {
|
|
24
24
|
className: "flex items-center gap-2",
|
|
25
25
|
children: [/* @__PURE__ */ o("button", {
|
|
26
|
+
type: "button",
|
|
26
27
|
className: "flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
|
|
27
28
|
children: [/* @__PURE__ */ a(t, { className: "size-4" }), c("i18n.progress.actions.generateReport", "Generate Report")]
|
|
28
29
|
}), /* @__PURE__ */ o("button", {
|
|
30
|
+
type: "button",
|
|
29
31
|
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",
|
|
30
32
|
children: [/* @__PURE__ */ a(e, { className: "size-4" }), c("i18n.progress.actions.export", "Export")]
|
|
31
33
|
})]
|
|
@@ -86,6 +88,7 @@ var s = () => {
|
|
|
86
88
|
children: [/* @__PURE__ */ a("input", {
|
|
87
89
|
type: "checkbox",
|
|
88
90
|
id: "show-percentages",
|
|
91
|
+
"aria-label": c("i18n.progress.filters.showPercentages", "Show Percentages"),
|
|
89
92
|
checked: l.showPercentages,
|
|
90
93
|
onChange: (e) => u({ showPercentages: e.target.checked }),
|
|
91
94
|
className: "size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CircleCheckBig as e } from "../../node_modules/lucide-react/dist/esm/icons/circle-check-big.js";
|
|
2
2
|
import { CircleX as t } from "../../node_modules/lucide-react/dist/esm/icons/circle-x.js";
|
|
3
3
|
import { MessageSquare as n } from "../../node_modules/lucide-react/dist/esm/icons/message-square.js";
|
|
4
|
-
import {
|
|
5
|
-
import { Fragment as
|
|
4
|
+
import { useRef as r, useState as i } from "react";
|
|
5
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
//#region src/i18n/pages/ReviewQueuePage.tsx
|
|
7
|
-
var
|
|
8
|
-
let [
|
|
7
|
+
var c = () => {
|
|
8
|
+
let [c, l] = i([]), u = r(!1), d = [
|
|
9
9
|
{
|
|
10
10
|
id: "1",
|
|
11
11
|
key: "auth.signIn.emailLabel",
|
|
@@ -33,84 +33,88 @@ var s = () => {
|
|
|
33
33
|
submittedBy: "hans@example.com",
|
|
34
34
|
submittedAt: "1 day ago"
|
|
35
35
|
}
|
|
36
|
-
],
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
console.log(`${e} translations:`,
|
|
36
|
+
], f = (e) => {
|
|
37
|
+
l((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
38
|
+
}, p = (e) => {
|
|
39
|
+
console.log(`${e} translations:`, c), l([]);
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ s("div", {
|
|
42
42
|
className: "flex h-full flex-col",
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ o("div", {
|
|
45
45
|
className: "border-b border-border bg-surface-elevated p-6",
|
|
46
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ s("div", {
|
|
47
47
|
className: "flex items-center justify-between",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ s("div", {
|
|
49
49
|
className: "flex items-center gap-3",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ o(e, { className: "size-6 text-accent-primary" }), /* @__PURE__ */ o("h1", {
|
|
51
51
|
className: "text-2xl font-semibold text-content-primary",
|
|
52
52
|
children: "Review Queue"
|
|
53
53
|
})]
|
|
54
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ o("div", {
|
|
55
55
|
className: "flex items-center gap-2",
|
|
56
|
-
children:
|
|
57
|
-
|
|
56
|
+
children: c.length > 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ s("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
onClick: () => p("approve"),
|
|
58
59
|
className: "flex items-center gap-2 rounded-md bg-success px-4 py-2 text-sm font-medium text-white hover:bg-success/90",
|
|
59
60
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ o(e, { className: "size-4" }),
|
|
61
62
|
"Approve Selected (",
|
|
62
|
-
|
|
63
|
+
c.length,
|
|
63
64
|
")"
|
|
64
65
|
]
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
-
|
|
66
|
+
}), /* @__PURE__ */ s("button", {
|
|
67
|
+
type: "button",
|
|
68
|
+
onClick: () => p("reject"),
|
|
67
69
|
className: "flex items-center gap-2 rounded-md bg-error px-4 py-2 text-sm font-medium text-white hover:bg-error/90",
|
|
68
70
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ o(t, { className: "size-4" }),
|
|
70
72
|
"Reject Selected (",
|
|
71
|
-
|
|
73
|
+
c.length,
|
|
72
74
|
")"
|
|
73
75
|
]
|
|
74
76
|
})] })
|
|
75
77
|
})]
|
|
76
78
|
})
|
|
77
79
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ o("div", {
|
|
79
81
|
className: "border-b border-border bg-surface p-4",
|
|
80
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ s("div", {
|
|
81
83
|
className: "flex items-center gap-4",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ s("select", {
|
|
85
|
+
"aria-label": "Filter by review status",
|
|
83
86
|
className: "rounded-md border border-border 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",
|
|
84
87
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ o("option", {
|
|
86
89
|
value: "pending",
|
|
87
90
|
children: "Pending Review"
|
|
88
91
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ o("option", {
|
|
90
93
|
value: "my-assignments",
|
|
91
94
|
children: "My Assignments"
|
|
92
95
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ o("option", {
|
|
94
97
|
value: "all",
|
|
95
98
|
children: "All"
|
|
96
99
|
})
|
|
97
100
|
]
|
|
98
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ s("select", {
|
|
102
|
+
"aria-label": "Filter by language",
|
|
99
103
|
className: "rounded-md border border-border 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",
|
|
100
104
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ o("option", {
|
|
102
106
|
value: "all",
|
|
103
107
|
children: "All Languages"
|
|
104
108
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ o("option", {
|
|
106
110
|
value: "es-ES",
|
|
107
111
|
children: "Spanish"
|
|
108
112
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ o("option", {
|
|
110
114
|
value: "fr-FR",
|
|
111
115
|
children: "French"
|
|
112
116
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ o("option", {
|
|
114
118
|
value: "de-DE",
|
|
115
119
|
children: "German"
|
|
116
120
|
})
|
|
@@ -118,51 +122,52 @@ var s = () => {
|
|
|
118
122
|
})]
|
|
119
123
|
})
|
|
120
124
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ s("div", {
|
|
122
126
|
className: "flex-1 overflow-auto p-6",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ o("div", {
|
|
124
128
|
className: "space-y-4",
|
|
125
|
-
children:
|
|
129
|
+
children: d.map((r) => /* @__PURE__ */ o("div", {
|
|
126
130
|
className: "rounded-lg border border-border bg-surface-elevated p-6 transition-all hover:border-accent-primary",
|
|
127
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ s("div", {
|
|
128
132
|
className: "flex items-start gap-4",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ o("input", {
|
|
130
134
|
type: "checkbox",
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
"aria-label": `Select translation ${r.key}`,
|
|
136
|
+
checked: c.includes(r.id),
|
|
137
|
+
onChange: () => f(r.id),
|
|
133
138
|
className: "mt-1 size-4 rounded border-border text-accent-primary focus:ring-accent-primary"
|
|
134
|
-
}), /* @__PURE__ */
|
|
139
|
+
}), /* @__PURE__ */ s("div", {
|
|
135
140
|
className: "flex-1",
|
|
136
141
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ o("div", {
|
|
138
143
|
className: "mb-3 flex items-start justify-between",
|
|
139
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h3", {
|
|
140
145
|
className: "font-medium text-content-primary",
|
|
141
146
|
children: r.key
|
|
142
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ o("span", {
|
|
143
148
|
className: "mt-1 inline-block rounded bg-accent-primary/10 px-2 py-0.5 text-xs font-medium text-accent-primary",
|
|
144
149
|
children: r.languageCode
|
|
145
150
|
})] })
|
|
146
151
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ s("div", {
|
|
148
153
|
className: "space-y-3",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
|
|
150
155
|
className: "mb-1 text-xs font-medium text-content-tertiary",
|
|
151
156
|
children: "Source"
|
|
152
|
-
}), /* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ o("p", {
|
|
153
158
|
className: "text-sm text-content-secondary",
|
|
154
159
|
children: r.sourceValue
|
|
155
|
-
})] }), /* @__PURE__ */
|
|
160
|
+
})] }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
|
|
156
161
|
className: "mb-1 text-xs font-medium text-content-tertiary",
|
|
157
162
|
children: "Target"
|
|
158
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ o("p", {
|
|
159
164
|
className: "text-sm text-content-primary",
|
|
160
165
|
children: r.targetValue
|
|
161
166
|
})] })]
|
|
162
167
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ s("div", {
|
|
164
169
|
className: "mt-4 flex items-center justify-between",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ s("p", {
|
|
166
171
|
className: "text-xs text-content-tertiary",
|
|
167
172
|
children: [
|
|
168
173
|
"Submitted by ",
|
|
@@ -170,21 +175,26 @@ var s = () => {
|
|
|
170
175
|
" • ",
|
|
171
176
|
r.submittedAt
|
|
172
177
|
]
|
|
173
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ s("div", {
|
|
174
179
|
className: "flex items-center gap-2",
|
|
175
180
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
|
|
181
|
+
/* @__PURE__ */ s("button", {
|
|
182
|
+
type: "button",
|
|
183
|
+
onClick: () => {
|
|
184
|
+
u.current = !0;
|
|
185
|
+
},
|
|
178
186
|
className: "flex items-center gap-1 rounded-md border border-border bg-surface px-3 py-1.5 text-xs font-medium text-content-primary hover:bg-surface-elevated",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ o(n, { className: "size-3" }), "Add Notes"]
|
|
180
188
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ s("button", {
|
|
190
|
+
type: "button",
|
|
182
191
|
className: "flex items-center gap-1 rounded-md bg-success px-3 py-1.5 text-xs font-medium text-white hover:bg-success/90",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ o(e, { className: "size-3" }), "Approve"]
|
|
184
193
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ s("button", {
|
|
195
|
+
type: "button",
|
|
186
196
|
className: "flex items-center gap-1 rounded-md bg-error px-3 py-1.5 text-xs font-medium text-white hover:bg-error/90",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ o(t, { className: "size-3" }), "Reject"]
|
|
188
198
|
})
|
|
189
199
|
]
|
|
190
200
|
})]
|
|
@@ -193,11 +203,11 @@ var s = () => {
|
|
|
193
203
|
})]
|
|
194
204
|
})
|
|
195
205
|
}, r.id))
|
|
196
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ s("div", {
|
|
197
207
|
className: "mt-6 text-center text-sm text-content-tertiary",
|
|
198
208
|
children: [
|
|
199
209
|
"Showing ",
|
|
200
|
-
|
|
210
|
+
d.length,
|
|
201
211
|
" of 47 pending reviews"
|
|
202
212
|
]
|
|
203
213
|
})]
|
|
@@ -206,4 +216,4 @@ var s = () => {
|
|
|
206
216
|
});
|
|
207
217
|
};
|
|
208
218
|
//#endregion
|
|
209
|
-
export {
|
|
219
|
+
export { c as ReviewQueuePage };
|
|
@@ -37,11 +37,13 @@ var u = () => {
|
|
|
37
37
|
className: "flex items-center gap-2",
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ c("button", {
|
|
40
|
+
type: "button",
|
|
40
41
|
onClick: _,
|
|
41
42
|
className: `rounded-md border px-3 py-2 text-sm font-medium transition-colors ${p ? "border-accent-primary bg-accent-primary/10 text-accent-primary" : "border-border bg-surface text-content-secondary hover:bg-surface-elevated"}`,
|
|
42
43
|
children: d("i18n.editor.actions.pluralForms", "Plural Forms")
|
|
43
44
|
}),
|
|
44
45
|
/* @__PURE__ */ c("button", {
|
|
46
|
+
type: "button",
|
|
45
47
|
onClick: v,
|
|
46
48
|
className: `rounded-md border px-3 py-2 text-sm font-medium transition-colors ${m ? "border-accent-primary bg-accent-primary/10 text-accent-primary" : "border-border bg-surface text-content-secondary hover:bg-surface-elevated"}`,
|
|
47
49
|
children: d("i18n.editor.actions.suggestions", "Suggestions")
|
|
@@ -166,6 +168,7 @@ var u = () => {
|
|
|
166
168
|
children: [/* @__PURE__ */ l("div", {
|
|
167
169
|
className: "mb-2 flex items-center justify-between",
|
|
168
170
|
children: [/* @__PURE__ */ c("label", {
|
|
171
|
+
htmlFor: "editor-translation-value",
|
|
169
172
|
className: "text-sm font-medium text-content-primary",
|
|
170
173
|
children: d("i18n.editor.fields.translationValue", "Translation Value")
|
|
171
174
|
}), /* @__PURE__ */ c("span", {
|
|
@@ -176,6 +179,8 @@ var u = () => {
|
|
|
176
179
|
})
|
|
177
180
|
})]
|
|
178
181
|
}), /* @__PURE__ */ c("textarea", {
|
|
182
|
+
id: "editor-translation-value",
|
|
183
|
+
"aria-label": d("i18n.editor.fields.translationValue", "Translation Value"),
|
|
179
184
|
value: b,
|
|
180
185
|
onChange: (e) => x(e.target.value),
|
|
181
186
|
placeholder: d("i18n.editor.fields.translationPlaceholder", "Enter translation..."),
|
|
@@ -187,9 +192,12 @@ var u = () => {
|
|
|
187
192
|
/* @__PURE__ */ l("div", {
|
|
188
193
|
className: "mb-6",
|
|
189
194
|
children: [/* @__PURE__ */ c("label", {
|
|
195
|
+
htmlFor: "editor-notes",
|
|
190
196
|
className: "mb-2 block text-sm font-medium text-content-primary",
|
|
191
197
|
children: d("i18n.editor.fields.notes", "Translation Notes")
|
|
192
198
|
}), /* @__PURE__ */ c("textarea", {
|
|
199
|
+
id: "editor-notes",
|
|
200
|
+
"aria-label": d("i18n.editor.fields.notes", "Translation Notes"),
|
|
193
201
|
value: S,
|
|
194
202
|
onChange: (e) => C(e.target.value),
|
|
195
203
|
placeholder: d("i18n.editor.fields.notesPlaceholder", "Add notes for reviewers..."),
|
|
@@ -200,9 +208,11 @@ var u = () => {
|
|
|
200
208
|
/* @__PURE__ */ l("div", {
|
|
201
209
|
className: "flex items-center gap-3",
|
|
202
210
|
children: [/* @__PURE__ */ l("button", {
|
|
211
|
+
type: "button",
|
|
203
212
|
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",
|
|
204
213
|
children: [/* @__PURE__ */ c(r, { className: "size-4" }), d("i18n.editor.actions.saveDraft", "Save Draft")]
|
|
205
214
|
}), /* @__PURE__ */ l("button", {
|
|
215
|
+
type: "button",
|
|
206
216
|
className: "flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-content-primary hover:bg-surface-elevated",
|
|
207
217
|
children: [/* @__PURE__ */ c(i, { className: "size-4" }), d("i18n.editor.actions.submitForReview", "Submit for Review")]
|
|
208
218
|
})]
|
|
@@ -222,8 +232,9 @@ var u = () => {
|
|
|
222
232
|
}, {
|
|
223
233
|
value: "Accede a tu cuenta",
|
|
224
234
|
similarity: 87
|
|
225
|
-
}].map((e
|
|
226
|
-
|
|
235
|
+
}].map((e) => /* @__PURE__ */ l("button", {
|
|
236
|
+
type: "button",
|
|
237
|
+
className: "block w-full cursor-pointer rounded-md border border-border bg-surface p-3 text-left transition-all hover:border-accent-primary",
|
|
227
238
|
onClick: () => x(e.value),
|
|
228
239
|
children: [/* @__PURE__ */ c("p", {
|
|
229
240
|
className: "text-sm text-content-primary",
|
|
@@ -232,7 +243,7 @@ var u = () => {
|
|
|
232
243
|
className: "mt-1 text-xs text-content-tertiary",
|
|
233
244
|
children: d("i18n.editor.suggestions.match", "{{similarity}}% match", { similarity: e.similarity })
|
|
234
245
|
})]
|
|
235
|
-
},
|
|
246
|
+
}, e.value))
|
|
236
247
|
})]
|
|
237
248
|
})]
|
|
238
249
|
})
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { interpolateFallback as e } from "../utils/i18n.js";
|
|
2
|
-
import { createContext as t,
|
|
2
|
+
import { createContext as t, use as n, useCallback as r, useMemo as i } from "react";
|
|
3
3
|
import { MemoryRouter as a } from "react-router-dom";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
5
|
//#region src/i18n/providers/I18nProvider.tsx
|
|
6
6
|
var s = t(null), c = () => {
|
|
7
|
-
let e =
|
|
7
|
+
let e = n(s);
|
|
8
8
|
if (!e) throw Error("useI18n must be used within I18nProvider");
|
|
9
9
|
return e;
|
|
10
|
-
}, l = ({ children: t, basePath:
|
|
11
|
-
let _ =
|
|
12
|
-
basePath:
|
|
10
|
+
}, l = ({ children: t, basePath: n, navigate: c, currentUser: l, tenantId: u, apiGatewayUrl: d, authToken: f, translations: p, onLanguageChange: m, onTranslationPublish: h, defaultView: g }) => {
|
|
11
|
+
let _ = r((t, n, r) => e(p?.[t] ?? n ?? t, r), [p]), v = i(() => ({
|
|
12
|
+
basePath: n,
|
|
13
13
|
navigate: c,
|
|
14
14
|
currentUser: l,
|
|
15
15
|
tenantId: u,
|
|
@@ -23,7 +23,7 @@ var s = t(null), c = () => {
|
|
|
23
23
|
}), [
|
|
24
24
|
d,
|
|
25
25
|
f,
|
|
26
|
-
|
|
26
|
+
n,
|
|
27
27
|
l,
|
|
28
28
|
g,
|
|
29
29
|
c,
|
|
@@ -33,7 +33,7 @@ var s = t(null), c = () => {
|
|
|
33
33
|
u,
|
|
34
34
|
p
|
|
35
35
|
]);
|
|
36
|
-
return
|
|
36
|
+
return n ? /* @__PURE__ */ o(s.Provider, {
|
|
37
37
|
value: v,
|
|
38
38
|
children: t
|
|
39
39
|
}) : /* @__PURE__ */ o(s.Provider, {
|