@burdenoff/microfe-i18n 2026.625.2 → 2026.731.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.
|
@@ -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,
|
|
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 p = () => {
|
|
|
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 p = () => {
|
|
|
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,7 +85,36 @@ var p = () => {
|
|
|
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(
|
|
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
|
+
}),
|
|
89
118
|
/* @__PURE__ */ o(c, {
|
|
90
119
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
91
120
|
children: [/* @__PURE__ */ o("div", {
|
|
@@ -107,7 +136,7 @@ var p = () => {
|
|
|
107
136
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
108
137
|
children: [/* @__PURE__ */ o("select", {
|
|
109
138
|
"aria-label": "Filter by review status",
|
|
110
|
-
className:
|
|
139
|
+
className: b,
|
|
111
140
|
children: [
|
|
112
141
|
/* @__PURE__ */ a("option", {
|
|
113
142
|
value: "pending",
|
|
@@ -124,7 +153,7 @@ var p = () => {
|
|
|
124
153
|
]
|
|
125
154
|
}), /* @__PURE__ */ o("select", {
|
|
126
155
|
"aria-label": "Filter by language",
|
|
127
|
-
className:
|
|
156
|
+
className: b,
|
|
128
157
|
children: [
|
|
129
158
|
/* @__PURE__ */ a("option", {
|
|
130
159
|
value: "all",
|
|
@@ -146,14 +175,15 @@ var p = () => {
|
|
|
146
175
|
})]
|
|
147
176
|
})]
|
|
148
177
|
}),
|
|
149
|
-
|
|
178
|
+
_.length === 0 && /* @__PURE__ */ a(d, {
|
|
150
179
|
illustration: "empty-notifications",
|
|
151
180
|
title: "Nothing to review",
|
|
152
181
|
description: "All caught up — there are no translations waiting for review."
|
|
153
182
|
}),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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, {
|
|
157
187
|
treatment: "insight",
|
|
158
188
|
className: "border-border-seam p-6",
|
|
159
189
|
children: /* @__PURE__ */ o("div", {
|
|
@@ -161,8 +191,8 @@ var p = () => {
|
|
|
161
191
|
children: [/* @__PURE__ */ a("input", {
|
|
162
192
|
type: "checkbox",
|
|
163
193
|
"aria-label": `Select translation ${r.key}`,
|
|
164
|
-
checked:
|
|
165
|
-
onChange: () =>
|
|
194
|
+
checked: m.includes(r.id),
|
|
195
|
+
onChange: () => v(r.id),
|
|
166
196
|
className: "mt-1 size-4 rounded border-border-seam text-primary focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]"
|
|
167
197
|
}), /* @__PURE__ */ o("div", {
|
|
168
198
|
className: "flex-1",
|
|
@@ -218,7 +248,7 @@ var p = () => {
|
|
|
218
248
|
actions: [{
|
|
219
249
|
label: "Add Notes",
|
|
220
250
|
onSelect: () => {
|
|
221
|
-
|
|
251
|
+
g.current = !0;
|
|
222
252
|
},
|
|
223
253
|
icon: /* @__PURE__ */ a(n, {
|
|
224
254
|
className: "size-4",
|
|
@@ -244,7 +274,7 @@ var p = () => {
|
|
|
244
274
|
className: "text-center text-sm text-text-tertiary",
|
|
245
275
|
children: [
|
|
246
276
|
"Showing ",
|
|
247
|
-
|
|
277
|
+
_.length,
|
|
248
278
|
" of 47 pending reviews"
|
|
249
279
|
]
|
|
250
280
|
})]
|
|
@@ -254,4 +284,4 @@ var p = () => {
|
|
|
254
284
|
});
|
|
255
285
|
};
|
|
256
286
|
//#endregion
|
|
257
|
-
export {
|
|
287
|
+
export { m as ReviewQueuePage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-i18n",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.731.1",
|
|
4
4
|
"description": "Internationalization (i18n) micro-frontend module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"main": "./dist/i18n.js",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"dev": "vite",
|
|
19
|
-
"build": "vite build",
|
|
20
|
-
"build:types": "tsc && vite build",
|
|
19
|
+
"build": "bash scripts/build-limits.sh --gate vite build",
|
|
20
|
+
"build:types": "tsc && bash scripts/build-limits.sh --gate vite build",
|
|
21
21
|
"lint": "eslint .",
|
|
22
22
|
"lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
|
|
23
23
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
24
|
-
"type:check": "tsc --noEmit",
|
|
25
|
-
"sanity": "bun run codegen && bun run lint:sanity && bun run format && bun run type:check && bun run build",
|
|
24
|
+
"type:check": "bash scripts/build-limits.sh tsc --noEmit",
|
|
25
|
+
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run codegen && bun run lint:sanity && bun run format && bun run type:check && bun run build'",
|
|
26
26
|
"schema:pull": "echo \"No GraphQL operations — skipping schema:pull\"",
|
|
27
27
|
"codegen": "echo \"No GraphQL operations — skipping codegen\"",
|
|
28
28
|
"codegen:all": "echo \"No GraphQL operations — skipping codegen:all\"",
|