@burdenoff/microfe-i18n 2026.625.1 → 2026.626.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 +95 -96
- package/dist/i18n/pages/LanguagesListPage.js +72 -40
- package/dist/i18n/pages/LocaleConfigPage.js +85 -57
- package/dist/i18n/pages/ProductsListPage.js +26 -25
- package/dist/i18n/pages/ProgressDashboardPage.js +126 -101
- package/dist/i18n/pages/ReviewQueuePage.js +55 -24
- package/dist/i18n/pages/TranslationEditorPage.js +106 -78
- package/package.json +2 -2
|
@@ -3,10 +3,10 @@ import { CircleX as t } from "../../node_modules/lucide-react/dist/esm/icons/cir
|
|
|
3
3
|
import { MessageSquare as n } from "../../node_modules/lucide-react/dist/esm/icons/message-square.js";
|
|
4
4
|
import { useRef as r, useState as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
import { CTAOverflowMenu as s, EmphasisPanel as c, GlassCard as l, GradientText as u, IllustratedEmptyState as d } from "@burdenoff/fe-libs/ui";
|
|
6
|
+
import { CTAOverflowMenu as s, EmphasisPanel as c, GlassCard as l, GradientText as u, IllustratedEmptyState as d, NextSteps as f, PagePurpose as p } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/i18n/pages/ReviewQueuePage.tsx
|
|
8
|
-
var
|
|
9
|
-
let [
|
|
8
|
+
var m = () => {
|
|
9
|
+
let [m, h] = i([]), g = r(!1), _ = [
|
|
10
10
|
{
|
|
11
11
|
id: "1",
|
|
12
12
|
key: "auth.signIn.emailLabel",
|
|
@@ -34,11 +34,11 @@ var f = () => {
|
|
|
34
34
|
submittedBy: "hans@example.com",
|
|
35
35
|
submittedAt: "1 day ago"
|
|
36
36
|
}
|
|
37
|
-
],
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
console.log(`${e} translations:`,
|
|
41
|
-
},
|
|
37
|
+
], v = (e) => {
|
|
38
|
+
h((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
39
|
+
}, y = (e) => {
|
|
40
|
+
console.log(`${e} translations:`, m), h([]);
|
|
41
|
+
}, b = "rounded-lg border border-border-seam bg-bg-elevated px-3 py-2.5 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)]", x = m.length > 0;
|
|
42
42
|
return /* @__PURE__ */ o("div", {
|
|
43
43
|
className: "min-h-full w-full bg-bg-surface",
|
|
44
44
|
children: [/* @__PURE__ */ a("div", {
|
|
@@ -60,19 +60,19 @@ var f = () => {
|
|
|
60
60
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
61
61
|
children: "Approve or reject submitted translations"
|
|
62
62
|
})] })]
|
|
63
|
-
}),
|
|
63
|
+
}), x && /* @__PURE__ */ a(s, {
|
|
64
64
|
primary: {
|
|
65
|
-
label: `Approve Selected (${
|
|
66
|
-
onSelect: () =>
|
|
65
|
+
label: `Approve Selected (${m.length})`,
|
|
66
|
+
onSelect: () => y("approve"),
|
|
67
67
|
icon: /* @__PURE__ */ a(e, {
|
|
68
68
|
className: "size-4",
|
|
69
69
|
"aria-hidden": "true"
|
|
70
70
|
})
|
|
71
71
|
},
|
|
72
72
|
actions: [{
|
|
73
|
-
label: `Reject Selected (${
|
|
73
|
+
label: `Reject Selected (${m.length})`,
|
|
74
74
|
onSelect: () => {
|
|
75
|
-
window.confirm(`Reject ${
|
|
75
|
+
window.confirm(`Reject ${m.length} selected translation(s)?`) && y("reject");
|
|
76
76
|
},
|
|
77
77
|
intent: "destructive",
|
|
78
78
|
icon: /* @__PURE__ */ a(t, {
|
|
@@ -85,6 +85,36 @@ var f = () => {
|
|
|
85
85
|
}), /* @__PURE__ */ o("div", {
|
|
86
86
|
className: "mx-auto max-w-screen-xl space-y-6 px-6 py-8 sm:px-8 lg:px-10",
|
|
87
87
|
children: [
|
|
88
|
+
/* @__PURE__ */ a(p, { children: "This is the quality gate before a translation goes live. Submitted translations land here so a reviewer can compare each one against its source string, then approve it (which publishes it to that locale) or reject it back to the translator with notes. Select several at once to approve or reject them in bulk and keep the backlog moving." }),
|
|
89
|
+
/* @__PURE__ */ a(f, {
|
|
90
|
+
storageKey: "i18n-review",
|
|
91
|
+
steps: [
|
|
92
|
+
{
|
|
93
|
+
id: "select-all",
|
|
94
|
+
label: "Select everything in view",
|
|
95
|
+
description: "Tick every pending translation so you can act on the whole batch at once.",
|
|
96
|
+
done: _.length > 0 && m.length === _.length,
|
|
97
|
+
onClick: () => h(_.map((e) => e.id))
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "approve-batch",
|
|
101
|
+
label: "Approve the selected translations",
|
|
102
|
+
description: "Publish the ones you've checked to their locales in a single action.",
|
|
103
|
+
onClick: () => {
|
|
104
|
+
m.length > 0 && y("approve");
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "review-item",
|
|
109
|
+
label: "Compare each translation against its source",
|
|
110
|
+
description: "Scan source vs. target below and add notes before approving or rejecting an individual entry.",
|
|
111
|
+
onClick: () => document.getElementById("i18n-review-queue")?.scrollIntoView({
|
|
112
|
+
behavior: "smooth",
|
|
113
|
+
block: "start"
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}),
|
|
88
118
|
/* @__PURE__ */ o(c, {
|
|
89
119
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
90
120
|
children: [/* @__PURE__ */ o("div", {
|
|
@@ -106,7 +136,7 @@ var f = () => {
|
|
|
106
136
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
107
137
|
children: [/* @__PURE__ */ o("select", {
|
|
108
138
|
"aria-label": "Filter by review status",
|
|
109
|
-
className:
|
|
139
|
+
className: b,
|
|
110
140
|
children: [
|
|
111
141
|
/* @__PURE__ */ a("option", {
|
|
112
142
|
value: "pending",
|
|
@@ -123,7 +153,7 @@ var f = () => {
|
|
|
123
153
|
]
|
|
124
154
|
}), /* @__PURE__ */ o("select", {
|
|
125
155
|
"aria-label": "Filter by language",
|
|
126
|
-
className:
|
|
156
|
+
className: b,
|
|
127
157
|
children: [
|
|
128
158
|
/* @__PURE__ */ a("option", {
|
|
129
159
|
value: "all",
|
|
@@ -145,14 +175,15 @@ var f = () => {
|
|
|
145
175
|
})]
|
|
146
176
|
})]
|
|
147
177
|
}),
|
|
148
|
-
|
|
178
|
+
_.length === 0 && /* @__PURE__ */ a(d, {
|
|
149
179
|
illustration: "empty-notifications",
|
|
150
180
|
title: "Nothing to review",
|
|
151
181
|
description: "All caught up — there are no translations waiting for review."
|
|
152
182
|
}),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
183
|
+
_.length > 0 && /* @__PURE__ */ o("div", {
|
|
184
|
+
id: "i18n-review-queue",
|
|
185
|
+
className: "scroll-mt-6 space-y-4",
|
|
186
|
+
children: [_.map((r) => /* @__PURE__ */ a(l, {
|
|
156
187
|
treatment: "insight",
|
|
157
188
|
className: "border-border-seam p-6",
|
|
158
189
|
children: /* @__PURE__ */ o("div", {
|
|
@@ -160,8 +191,8 @@ var f = () => {
|
|
|
160
191
|
children: [/* @__PURE__ */ a("input", {
|
|
161
192
|
type: "checkbox",
|
|
162
193
|
"aria-label": `Select translation ${r.key}`,
|
|
163
|
-
checked:
|
|
164
|
-
onChange: () =>
|
|
194
|
+
checked: m.includes(r.id),
|
|
195
|
+
onChange: () => v(r.id),
|
|
165
196
|
className: "mt-1 size-4 rounded border-border-seam text-primary focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]"
|
|
166
197
|
}), /* @__PURE__ */ o("div", {
|
|
167
198
|
className: "flex-1",
|
|
@@ -217,7 +248,7 @@ var f = () => {
|
|
|
217
248
|
actions: [{
|
|
218
249
|
label: "Add Notes",
|
|
219
250
|
onSelect: () => {
|
|
220
|
-
|
|
251
|
+
g.current = !0;
|
|
221
252
|
},
|
|
222
253
|
icon: /* @__PURE__ */ a(n, {
|
|
223
254
|
className: "size-4",
|
|
@@ -243,7 +274,7 @@ var f = () => {
|
|
|
243
274
|
className: "text-center text-sm text-text-tertiary",
|
|
244
275
|
children: [
|
|
245
276
|
"Showing ",
|
|
246
|
-
|
|
277
|
+
_.length,
|
|
247
278
|
" of 47 pending reviews"
|
|
248
279
|
]
|
|
249
280
|
})]
|
|
@@ -253,4 +284,4 @@ var f = () => {
|
|
|
253
284
|
});
|
|
254
285
|
};
|
|
255
286
|
//#endregion
|
|
256
|
-
export {
|
|
287
|
+
export { m as ReviewQueuePage };
|
|
@@ -7,23 +7,23 @@ import { useI18n as a } from "../providers/I18nProvider.js";
|
|
|
7
7
|
import { useI18nStore as o } from "../store/i18nStore.js";
|
|
8
8
|
import { useState as s } from "react";
|
|
9
9
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
|
-
import { CTAOverflowMenu as u,
|
|
10
|
+
import { CTAOverflowMenu as u, EmphasisPanel as d, GlassCard as f, GradientText as p, NextSteps as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/i18n/pages/TranslationEditorPage.tsx
|
|
12
|
-
var
|
|
13
|
-
let { t:
|
|
12
|
+
var g = () => {
|
|
13
|
+
let { t: g } = a(), _ = (e, t, n) => g(e, t, n), { editorMode: v, showPlurals: y, showSuggestions: b, comparisonLanguage: x, setEditorMode: S, togglePlurals: C, toggleSuggestions: w, setComparisonLanguage: T } = o(), [E, D] = s(""), [O, k] = s(""), A = {
|
|
14
14
|
id: "key-1",
|
|
15
15
|
key: "auth.signIn.title",
|
|
16
16
|
defaultValue: "Sign in to your account",
|
|
17
17
|
description: "Login page title",
|
|
18
18
|
characterLimit: 50,
|
|
19
19
|
placeholders: []
|
|
20
|
-
},
|
|
20
|
+
}, j = [{
|
|
21
21
|
value: "Inicia sesión en tu cuenta",
|
|
22
22
|
similarity: 95
|
|
23
23
|
}, {
|
|
24
24
|
value: "Accede a tu cuenta",
|
|
25
25
|
similarity: 87
|
|
26
|
-
}],
|
|
26
|
+
}], M = (e) => `rounded-lg border px-3 py-2 text-sm font-medium transition-colors ${e ? "border-action-primary-bg bg-action-primary-bg/10 text-primary" : "border-border-seam bg-bg-elevated text-text-secondary hover:bg-bg-sunken"}`, N = "w-full rounded-lg border border-border-seam bg-bg-surface p-3 text-sm text-text-primary placeholder:text-text-tertiary 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)]", P = "w-full appearance-none rounded-lg border border-border-seam bg-bg-elevated py-2 pl-10 pr-10 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)]";
|
|
27
27
|
return /* @__PURE__ */ l("div", {
|
|
28
28
|
className: "flex h-full flex-col bg-bg-surface",
|
|
29
29
|
children: [
|
|
@@ -44,40 +44,40 @@ var p = () => {
|
|
|
44
44
|
children: [
|
|
45
45
|
"Translation",
|
|
46
46
|
" ",
|
|
47
|
-
/* @__PURE__ */ c(
|
|
47
|
+
/* @__PURE__ */ c(p, { children: _("i18n.editor.title.noun", "Editor") })
|
|
48
48
|
]
|
|
49
49
|
}), /* @__PURE__ */ c("p", {
|
|
50
50
|
className: "mt-1 text-sm text-text-secondary",
|
|
51
|
-
children:
|
|
51
|
+
children: A.key
|
|
52
52
|
})] })]
|
|
53
53
|
}), /* @__PURE__ */ l("div", {
|
|
54
54
|
className: "flex flex-wrap items-center gap-2",
|
|
55
55
|
children: [
|
|
56
56
|
/* @__PURE__ */ c("button", {
|
|
57
57
|
type: "button",
|
|
58
|
-
onClick:
|
|
59
|
-
"aria-pressed":
|
|
60
|
-
className:
|
|
61
|
-
children:
|
|
58
|
+
onClick: C,
|
|
59
|
+
"aria-pressed": y,
|
|
60
|
+
className: M(y),
|
|
61
|
+
children: _("i18n.editor.actions.pluralForms", "Plural Forms")
|
|
62
62
|
}),
|
|
63
63
|
/* @__PURE__ */ c("button", {
|
|
64
64
|
type: "button",
|
|
65
|
-
onClick:
|
|
66
|
-
"aria-pressed":
|
|
67
|
-
className:
|
|
68
|
-
children:
|
|
65
|
+
onClick: w,
|
|
66
|
+
"aria-pressed": b,
|
|
67
|
+
className: M(b),
|
|
68
|
+
children: _("i18n.editor.actions.suggestions", "Suggestions")
|
|
69
69
|
}),
|
|
70
70
|
/* @__PURE__ */ l("select", {
|
|
71
|
-
value:
|
|
72
|
-
"aria-label":
|
|
73
|
-
onChange: (e) =>
|
|
71
|
+
value: v,
|
|
72
|
+
"aria-label": _("i18n.editor.mode.label", "Editor mode"),
|
|
73
|
+
onChange: (e) => S(e.target.value),
|
|
74
74
|
className: "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)]",
|
|
75
75
|
children: [/* @__PURE__ */ c("option", {
|
|
76
76
|
value: "simple",
|
|
77
|
-
children:
|
|
77
|
+
children: _("i18n.editor.mode.simple", "Simple")
|
|
78
78
|
}), /* @__PURE__ */ c("option", {
|
|
79
79
|
value: "advanced",
|
|
80
|
-
children:
|
|
80
|
+
children: _("i18n.editor.mode.advanced", "Advanced")
|
|
81
81
|
})]
|
|
82
82
|
})
|
|
83
83
|
]
|
|
@@ -89,24 +89,24 @@ var p = () => {
|
|
|
89
89
|
children: /* @__PURE__ */ l("div", {
|
|
90
90
|
className: "mx-auto flex max-w-screen-2xl items-center gap-2 text-sm text-text-secondary",
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */ c("span", { children:
|
|
92
|
+
/* @__PURE__ */ c("span", { children: _("i18n.editor.breadcrumb.product", "Workspaces") }),
|
|
93
93
|
/* @__PURE__ */ c(e, {
|
|
94
94
|
className: "size-4 -rotate-90",
|
|
95
95
|
"aria-hidden": "true"
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */ c("span", { children:
|
|
97
|
+
/* @__PURE__ */ c("span", { children: _("i18n.editor.breadcrumb.module", "Auth") }),
|
|
98
98
|
/* @__PURE__ */ c(e, {
|
|
99
99
|
className: "size-4 -rotate-90",
|
|
100
100
|
"aria-hidden": "true"
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */ c("span", { children:
|
|
102
|
+
/* @__PURE__ */ c("span", { children: _("i18n.editor.breadcrumb.namespace", "signIn") }),
|
|
103
103
|
/* @__PURE__ */ c(e, {
|
|
104
104
|
className: "size-4 -rotate-90",
|
|
105
105
|
"aria-hidden": "true"
|
|
106
106
|
}),
|
|
107
107
|
/* @__PURE__ */ c("span", {
|
|
108
108
|
className: "text-text-primary",
|
|
109
|
-
children:
|
|
109
|
+
children: A.key
|
|
110
110
|
})
|
|
111
111
|
]
|
|
112
112
|
})
|
|
@@ -116,16 +116,47 @@ var p = () => {
|
|
|
116
116
|
children: [/* @__PURE__ */ c("div", {
|
|
117
117
|
className: "flex flex-1 flex-col overflow-auto",
|
|
118
118
|
children: /* @__PURE__ */ l("div", {
|
|
119
|
-
className: "mx-auto w-full max-w-3xl p-6 sm:p-8",
|
|
119
|
+
className: "mx-auto w-full max-w-3xl space-y-6 p-6 sm:p-8",
|
|
120
120
|
children: [
|
|
121
|
+
/* @__PURE__ */ c(h, { children: _("i18n.editor.purpose", "This is where the actual translating happens for one key at a time. You see the original (source) string, type its translation for the chosen target language, and can compare it side-by-side with another locale, reuse machine suggestions, and add plural forms. Save a draft while you work, then submit it for review when it's ready to be approved and published.") }),
|
|
122
|
+
/* @__PURE__ */ c(m, {
|
|
123
|
+
storageKey: "i18n-editor",
|
|
124
|
+
steps: [
|
|
125
|
+
{
|
|
126
|
+
id: "compare-source",
|
|
127
|
+
label: _("i18n.editor.next.compare", "Compare against the source language"),
|
|
128
|
+
description: _("i18n.editor.next.compare.desc", "Show the English original next to your translation to keep meaning and length aligned."),
|
|
129
|
+
done: !!x,
|
|
130
|
+
onClick: () => T("en")
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "use-suggestions",
|
|
134
|
+
label: _("i18n.editor.next.suggestions", "Open translation suggestions"),
|
|
135
|
+
description: _("i18n.editor.next.suggestions.desc", "Reuse close matches from memory instead of translating from scratch."),
|
|
136
|
+
done: b,
|
|
137
|
+
onClick: () => {
|
|
138
|
+
b || w();
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "add-plurals",
|
|
143
|
+
label: _("i18n.editor.next.plurals", "Add plural forms if the string counts things"),
|
|
144
|
+
description: _("i18n.editor.next.plurals.desc", "Provide one/other (and locale-specific) variants so counts read naturally."),
|
|
145
|
+
done: y,
|
|
146
|
+
onClick: () => {
|
|
147
|
+
y || C();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
121
152
|
/* @__PURE__ */ l("div", {
|
|
122
|
-
className: "
|
|
153
|
+
className: "flex flex-col gap-4 sm:flex-row",
|
|
123
154
|
children: [/* @__PURE__ */ l("div", {
|
|
124
155
|
className: "flex-1",
|
|
125
156
|
children: [/* @__PURE__ */ c("label", {
|
|
126
157
|
htmlFor: "editor-target-language",
|
|
127
158
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
128
|
-
children:
|
|
159
|
+
children: _("i18n.editor.fields.targetLanguage", "Target Language")
|
|
129
160
|
}), /* @__PURE__ */ l("div", {
|
|
130
161
|
className: "relative",
|
|
131
162
|
children: [
|
|
@@ -135,19 +166,19 @@ var p = () => {
|
|
|
135
166
|
}),
|
|
136
167
|
/* @__PURE__ */ l("select", {
|
|
137
168
|
id: "editor-target-language",
|
|
138
|
-
className:
|
|
169
|
+
className: P,
|
|
139
170
|
children: [
|
|
140
171
|
/* @__PURE__ */ c("option", {
|
|
141
172
|
value: "es-ES",
|
|
142
|
-
children:
|
|
173
|
+
children: _("i18n.shared.language.esEs", "Spanish (es-ES)")
|
|
143
174
|
}),
|
|
144
175
|
/* @__PURE__ */ c("option", {
|
|
145
176
|
value: "fr-FR",
|
|
146
|
-
children:
|
|
177
|
+
children: _("i18n.shared.language.frFr", "French (fr-FR)")
|
|
147
178
|
}),
|
|
148
179
|
/* @__PURE__ */ c("option", {
|
|
149
180
|
value: "de-DE",
|
|
150
|
-
children:
|
|
181
|
+
children: _("i18n.shared.language.deDe", "German (de-DE)")
|
|
151
182
|
})
|
|
152
183
|
]
|
|
153
184
|
}),
|
|
@@ -162,7 +193,7 @@ var p = () => {
|
|
|
162
193
|
children: [/* @__PURE__ */ c("label", {
|
|
163
194
|
htmlFor: "editor-compare-language",
|
|
164
195
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
165
|
-
children:
|
|
196
|
+
children: _("i18n.editor.fields.compareWith", "Compare With")
|
|
166
197
|
}), /* @__PURE__ */ l("div", {
|
|
167
198
|
className: "relative",
|
|
168
199
|
children: [
|
|
@@ -172,15 +203,15 @@ var p = () => {
|
|
|
172
203
|
}),
|
|
173
204
|
/* @__PURE__ */ l("select", {
|
|
174
205
|
id: "editor-compare-language",
|
|
175
|
-
value:
|
|
176
|
-
onChange: (e) =>
|
|
177
|
-
className:
|
|
206
|
+
value: x || "",
|
|
207
|
+
onChange: (e) => T(e.target.value || null),
|
|
208
|
+
className: P,
|
|
178
209
|
children: [/* @__PURE__ */ c("option", {
|
|
179
210
|
value: "",
|
|
180
|
-
children:
|
|
211
|
+
children: _("i18n.shared.empty.none", "None")
|
|
181
212
|
}), /* @__PURE__ */ c("option", {
|
|
182
213
|
value: "en",
|
|
183
|
-
children:
|
|
214
|
+
children: _("i18n.shared.language.en", "English (en)")
|
|
184
215
|
})]
|
|
185
216
|
}),
|
|
186
217
|
/* @__PURE__ */ c(e, {
|
|
@@ -191,70 +222,67 @@ var p = () => {
|
|
|
191
222
|
})]
|
|
192
223
|
})]
|
|
193
224
|
}),
|
|
194
|
-
|
|
225
|
+
x && /* @__PURE__ */ l(f, {
|
|
195
226
|
treatment: "plain",
|
|
196
|
-
className: "
|
|
227
|
+
className: "border-border-seam p-4",
|
|
197
228
|
children: [
|
|
198
229
|
/* @__PURE__ */ c("p", {
|
|
199
230
|
className: "mb-2 text-sm font-medium text-text-primary",
|
|
200
|
-
children:
|
|
231
|
+
children: _("i18n.editor.comparison.sourceLanguage", "English (Source)")
|
|
201
232
|
}),
|
|
202
233
|
/* @__PURE__ */ c("p", {
|
|
203
234
|
className: "text-sm text-text-secondary",
|
|
204
|
-
children:
|
|
235
|
+
children: A.defaultValue
|
|
205
236
|
}),
|
|
206
237
|
/* @__PURE__ */ l("div", {
|
|
207
238
|
className: "mt-3 flex flex-wrap items-center gap-4 text-xs text-text-tertiary",
|
|
208
|
-
children: [/* @__PURE__ */ c("span", { children:
|
|
239
|
+
children: [/* @__PURE__ */ c("span", { children: _("i18n.editor.comparison.characterLimit", "Character limit: {{limit}}", { limit: A.characterLimit }) }), /* @__PURE__ */ c("span", { children: _("i18n.editor.comparison.placeholders", "Placeholders: none") })]
|
|
209
240
|
})
|
|
210
241
|
]
|
|
211
242
|
}),
|
|
212
|
-
/* @__PURE__ */ l(
|
|
213
|
-
className: "
|
|
243
|
+
/* @__PURE__ */ l(d, {
|
|
244
|
+
className: "p-5",
|
|
214
245
|
children: [/* @__PURE__ */ l("div", {
|
|
215
246
|
className: "mb-2 flex items-center justify-between",
|
|
216
247
|
children: [/* @__PURE__ */ c("label", {
|
|
217
248
|
htmlFor: "editor-translation-value",
|
|
218
249
|
className: "text-sm font-medium text-text-primary",
|
|
219
|
-
children:
|
|
250
|
+
children: _("i18n.editor.fields.translationValue", "Translation Value")
|
|
220
251
|
}), /* @__PURE__ */ c("span", {
|
|
221
252
|
className: "text-xs text-text-tertiary tabular-nums",
|
|
222
|
-
children:
|
|
223
|
-
current:
|
|
224
|
-
limit:
|
|
253
|
+
children: _("i18n.editor.fields.characterCount", "{{current}}/{{limit}}", {
|
|
254
|
+
current: E.length,
|
|
255
|
+
limit: A.characterLimit
|
|
225
256
|
})
|
|
226
257
|
})]
|
|
227
258
|
}), /* @__PURE__ */ c("textarea", {
|
|
228
259
|
id: "editor-translation-value",
|
|
229
|
-
"aria-label":
|
|
230
|
-
value:
|
|
231
|
-
onChange: (e) =>
|
|
232
|
-
placeholder:
|
|
233
|
-
maxLength:
|
|
234
|
-
className:
|
|
260
|
+
"aria-label": _("i18n.editor.fields.translationValue", "Translation Value"),
|
|
261
|
+
value: E,
|
|
262
|
+
onChange: (e) => D(e.target.value),
|
|
263
|
+
placeholder: _("i18n.editor.fields.translationPlaceholder", "Enter translation..."),
|
|
264
|
+
maxLength: A.characterLimit,
|
|
265
|
+
className: N,
|
|
235
266
|
rows: 4
|
|
236
267
|
})]
|
|
237
268
|
}),
|
|
238
|
-
/* @__PURE__ */ l("div", {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
rows: 3
|
|
252
|
-
})]
|
|
253
|
-
}),
|
|
269
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
270
|
+
htmlFor: "editor-notes",
|
|
271
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
272
|
+
children: _("i18n.editor.fields.notes", "Translation Notes")
|
|
273
|
+
}), /* @__PURE__ */ c("textarea", {
|
|
274
|
+
id: "editor-notes",
|
|
275
|
+
"aria-label": _("i18n.editor.fields.notes", "Translation Notes"),
|
|
276
|
+
value: O,
|
|
277
|
+
onChange: (e) => k(e.target.value),
|
|
278
|
+
placeholder: _("i18n.editor.fields.notesPlaceholder", "Add notes for reviewers..."),
|
|
279
|
+
className: N,
|
|
280
|
+
rows: 3
|
|
281
|
+
})] }),
|
|
254
282
|
/* @__PURE__ */ c(u, {
|
|
255
283
|
align: "start",
|
|
256
284
|
primary: {
|
|
257
|
-
label:
|
|
285
|
+
label: _("i18n.editor.actions.saveDraft", "Save Draft"),
|
|
258
286
|
onSelect: () => void 0,
|
|
259
287
|
icon: /* @__PURE__ */ c(r, {
|
|
260
288
|
className: "size-4",
|
|
@@ -262,7 +290,7 @@ var p = () => {
|
|
|
262
290
|
})
|
|
263
291
|
},
|
|
264
292
|
actions: [{
|
|
265
|
-
label:
|
|
293
|
+
label: _("i18n.editor.actions.submitForReview", "Submit for Review"),
|
|
266
294
|
onSelect: () => void 0,
|
|
267
295
|
icon: /* @__PURE__ */ c(i, {
|
|
268
296
|
className: "size-4",
|
|
@@ -272,26 +300,26 @@ var p = () => {
|
|
|
272
300
|
})
|
|
273
301
|
]
|
|
274
302
|
})
|
|
275
|
-
}),
|
|
303
|
+
}), b && /* @__PURE__ */ l("aside", {
|
|
276
304
|
className: "hidden w-80 shrink-0 overflow-auto border-l border-border-seam bg-bg-elevated p-6 lg:block",
|
|
277
305
|
children: [/* @__PURE__ */ c("h2", {
|
|
278
306
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
279
|
-
children:
|
|
307
|
+
children: _("i18n.editor.suggestions.title", "Suggestions")
|
|
280
308
|
}), /* @__PURE__ */ c("div", {
|
|
281
309
|
className: "space-y-3",
|
|
282
|
-
children:
|
|
310
|
+
children: j.map((e) => /* @__PURE__ */ c(f, {
|
|
283
311
|
treatment: "plain",
|
|
284
312
|
className: "border-border-seam",
|
|
285
313
|
children: /* @__PURE__ */ l("button", {
|
|
286
314
|
type: "button",
|
|
287
315
|
className: "block w-full cursor-pointer rounded-[inherit] p-3 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
|
|
288
|
-
onClick: () =>
|
|
316
|
+
onClick: () => D(e.value),
|
|
289
317
|
children: [/* @__PURE__ */ c("p", {
|
|
290
318
|
className: "text-sm text-text-primary",
|
|
291
319
|
children: e.value
|
|
292
320
|
}), /* @__PURE__ */ c("p", {
|
|
293
321
|
className: "mt-1 text-xs text-text-tertiary tabular-nums",
|
|
294
|
-
children:
|
|
322
|
+
children: _("i18n.editor.suggestions.match", "{{similarity}}% match", { similarity: e.similarity })
|
|
295
323
|
})]
|
|
296
324
|
})
|
|
297
325
|
}, e.value))
|
|
@@ -302,4 +330,4 @@ var p = () => {
|
|
|
302
330
|
});
|
|
303
331
|
};
|
|
304
332
|
//#endregion
|
|
305
|
-
export {
|
|
333
|
+
export { g as TranslationEditorPage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-i18n",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.626.1",
|
|
4
4
|
"description": "Internationalization (i18n) micro-frontend module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"format:check": "prettier --check \"src/**/*.{ts,tsx}\""
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@burdenoff/fe-libs": "2026.625.3",
|
|
38
37
|
"@apollo/client": "^3.12.4",
|
|
38
|
+
"@burdenoff/fe-libs": "2026.625.5",
|
|
39
39
|
"graphql": "^16.10.0",
|
|
40
40
|
"lucide-react": "^0.468.0",
|
|
41
41
|
"react": "^19.0.0",
|