@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.
@@ -1,12 +1,13 @@
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 { useRef as r, useState as i } from "react";
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, NextSteps as f, PagePurpose as p } from "@burdenoff/fe-libs/ui";
4
+ import { useTr as r } from "../hooks/useTr.js";
5
+ import { useRef as i, useState as a } from "react";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
+ import { CTAOverflowMenu as c, EmphasisPanel as l, GlassCard as u, GradientText as d, IllustratedEmptyState as f, NextSteps as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
7
8
  //#region src/i18n/pages/ReviewQueuePage.tsx
8
- var m = () => {
9
- let [m, h] = i([]), g = r(!1), _ = [
9
+ var h = () => {
10
+ let h = r(), [g, _] = a([]), v = i(!1), y = [
10
11
  {
11
12
  id: "1",
12
13
  key: "auth.signIn.emailLabel",
@@ -34,80 +35,84 @@ var m = () => {
34
35
  submittedBy: "hans@example.com",
35
36
  submittedAt: "1 day ago"
36
37
  }
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
- return /* @__PURE__ */ o("div", {
38
+ ], b = (e) => {
39
+ _((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
40
+ }, x = (e) => {
41
+ console.log(`${e} translations:`, g), _([]);
42
+ }, S = "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)]", C = g.length > 0;
43
+ return /* @__PURE__ */ s("div", {
43
44
  className: "min-h-full w-full bg-bg-surface",
44
- children: [/* @__PURE__ */ a("div", {
45
+ children: [/* @__PURE__ */ o("div", {
45
46
  className: "border-b border-border-seam bg-bg-surface px-6 py-6 sm:px-8 lg:px-10",
46
- children: /* @__PURE__ */ o("div", {
47
+ children: /* @__PURE__ */ s("div", {
47
48
  className: "mx-auto flex max-w-screen-xl flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
48
- children: [/* @__PURE__ */ o("div", {
49
+ children: [/* @__PURE__ */ s("div", {
49
50
  className: "flex items-center gap-4",
50
- children: [/* @__PURE__ */ a("div", {
51
+ children: [/* @__PURE__ */ o("div", {
51
52
  className: "flex size-11 shrink-0 items-center justify-center rounded-xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
52
- children: /* @__PURE__ */ a(e, {
53
+ children: /* @__PURE__ */ o(e, {
53
54
  className: "size-5",
54
55
  "aria-hidden": "true"
55
56
  })
56
- }), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ o("h1", {
57
+ }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ s("h1", {
57
58
  className: "text-2xl font-bold tracking-tight text-text-primary",
58
- children: ["Review ", /* @__PURE__ */ a(u, { children: "Queue" })]
59
- }), /* @__PURE__ */ a("p", {
59
+ children: [
60
+ h("i18n.review.title", "Review"),
61
+ " ",
62
+ /* @__PURE__ */ o(d, { children: h("i18n.editor.title.noun", "Queue") })
63
+ ]
64
+ }), /* @__PURE__ */ o("p", {
60
65
  className: "mt-0.5 text-sm text-text-secondary",
61
- children: "Approve or reject submitted translations"
66
+ children: h("i18n.review.subtitle", "Approve or reject submitted translations")
62
67
  })] })]
63
- }), x && /* @__PURE__ */ a(s, {
68
+ }), C && /* @__PURE__ */ o(c, {
64
69
  primary: {
65
- label: `Approve Selected (${m.length})`,
66
- onSelect: () => y("approve"),
67
- icon: /* @__PURE__ */ a(e, {
70
+ label: h("i18n.review.actions.approveSelected", "Approve Selected ({{count}})", { count: g.length }),
71
+ onSelect: () => x("approve"),
72
+ icon: /* @__PURE__ */ o(e, {
68
73
  className: "size-4",
69
74
  "aria-hidden": "true"
70
75
  })
71
76
  },
72
77
  actions: [{
73
- label: `Reject Selected (${m.length})`,
78
+ label: h("i18n.review.actions.rejectSelected", "Reject Selected ({{count}})", { count: g.length }),
74
79
  onSelect: () => {
75
- window.confirm(`Reject ${m.length} selected translation(s)?`) && y("reject");
80
+ window.confirm(h("i18n.review.confirm.rejectSelected", "Reject {{count}} selected translation(s)?", { count: g.length })) && x("reject");
76
81
  },
77
82
  intent: "destructive",
78
- icon: /* @__PURE__ */ a(t, {
83
+ icon: /* @__PURE__ */ o(t, {
79
84
  className: "size-4",
80
85
  "aria-hidden": "true"
81
86
  })
82
87
  }]
83
88
  })]
84
89
  })
85
- }), /* @__PURE__ */ o("div", {
90
+ }), /* @__PURE__ */ s("div", {
86
91
  className: "mx-auto max-w-screen-xl space-y-6 px-6 py-8 sm:px-8 lg:px-10",
87
92
  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, {
93
+ /* @__PURE__ */ o(m, { children: h("i18n.review.purpose", "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.") }),
94
+ /* @__PURE__ */ o(p, {
90
95
  storageKey: "i18n-review",
91
96
  steps: [
92
97
  {
93
98
  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))
99
+ label: h("i18n.review.next.selectAll", "Select everything in view"),
100
+ description: h("i18n.review.next.selectAllDesc", "Tick every pending translation so you can act on the whole batch at once."),
101
+ done: y.length > 0 && g.length === y.length,
102
+ onClick: () => _(y.map((e) => e.id))
98
103
  },
99
104
  {
100
105
  id: "approve-batch",
101
- label: "Approve the selected translations",
102
- description: "Publish the ones you've checked to their locales in a single action.",
106
+ label: h("i18n.review.next.approveBatch", "Approve the selected translations"),
107
+ description: h("i18n.review.next.approveBatchDesc", "Publish the ones you've checked to their locales in a single action."),
103
108
  onClick: () => {
104
- m.length > 0 && y("approve");
109
+ g.length > 0 && x("approve");
105
110
  }
106
111
  },
107
112
  {
108
113
  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.",
114
+ label: h("i18n.review.next.reviewItem", "Compare each translation against its source"),
115
+ description: h("i18n.review.next.reviewItemDesc", "Scan source vs. target below and add notes before approving or rejecting an individual entry."),
111
116
  onClick: () => document.getElementById("i18n-review-queue")?.scrollIntoView({
112
117
  behavior: "smooth",
113
118
  block: "start"
@@ -115,152 +120,150 @@ var m = () => {
115
120
  }
116
121
  ]
117
122
  }),
118
- /* @__PURE__ */ o(c, {
123
+ /* @__PURE__ */ s(l, {
119
124
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
120
- children: [/* @__PURE__ */ o("div", {
125
+ children: [/* @__PURE__ */ s("div", {
121
126
  className: "flex items-center gap-4",
122
- children: [/* @__PURE__ */ a("div", {
127
+ children: [/* @__PURE__ */ o("div", {
123
128
  className: "flex size-14 shrink-0 items-center justify-center rounded-2xl bg-action-primary-bg/10 text-primary shadow-elevation-1",
124
- children: /* @__PURE__ */ a(e, {
129
+ children: /* @__PURE__ */ o(e, {
125
130
  className: "size-7",
126
131
  "aria-hidden": "true"
127
132
  })
128
- }), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
133
+ }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
129
134
  className: "text-sm font-medium text-text-secondary",
130
- children: "Pending review"
131
- }), /* @__PURE__ */ a("p", {
135
+ children: h("i18n.review.summary.label", "Pending review")
136
+ }), /* @__PURE__ */ o("p", {
132
137
  className: "text-4xl font-bold tracking-tight text-text-primary tabular-nums",
133
- children: "47"
138
+ children: 47
134
139
  })] })]
135
- }), /* @__PURE__ */ o("div", {
140
+ }), /* @__PURE__ */ s("div", {
136
141
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
137
- children: [/* @__PURE__ */ o("select", {
138
- "aria-label": "Filter by review status",
139
- className: b,
142
+ children: [/* @__PURE__ */ s("select", {
143
+ "aria-label": h("i18n.review.filters.status.label", "Filter by review status"),
144
+ className: S,
140
145
  children: [
141
- /* @__PURE__ */ a("option", {
146
+ /* @__PURE__ */ o("option", {
142
147
  value: "pending",
143
- children: "Pending Review"
148
+ children: h("i18n.review.filters.status.pending", "Pending Review")
144
149
  }),
145
- /* @__PURE__ */ a("option", {
150
+ /* @__PURE__ */ o("option", {
146
151
  value: "my-assignments",
147
- children: "My Assignments"
152
+ children: h("i18n.review.filters.status.myAssignments", "My Assignments")
148
153
  }),
149
- /* @__PURE__ */ a("option", {
154
+ /* @__PURE__ */ o("option", {
150
155
  value: "all",
151
- children: "All"
156
+ children: h("i18n.review.filters.status.all", "All")
152
157
  })
153
158
  ]
154
- }), /* @__PURE__ */ o("select", {
155
- "aria-label": "Filter by language",
156
- className: b,
159
+ }), /* @__PURE__ */ s("select", {
160
+ "aria-label": h("i18n.review.filters.language.label", "Filter by language"),
161
+ className: S,
157
162
  children: [
158
- /* @__PURE__ */ a("option", {
163
+ /* @__PURE__ */ o("option", {
159
164
  value: "all",
160
- children: "All Languages"
165
+ children: h("i18n.review.filters.language.all", "All Languages")
161
166
  }),
162
- /* @__PURE__ */ a("option", {
167
+ /* @__PURE__ */ o("option", {
163
168
  value: "es-ES",
164
- children: "Spanish"
169
+ children: h("i18n.review.filters.language.spanish", "Spanish")
165
170
  }),
166
- /* @__PURE__ */ a("option", {
171
+ /* @__PURE__ */ o("option", {
167
172
  value: "fr-FR",
168
- children: "French"
173
+ children: h("i18n.review.filters.language.french", "French")
169
174
  }),
170
- /* @__PURE__ */ a("option", {
175
+ /* @__PURE__ */ o("option", {
171
176
  value: "de-DE",
172
- children: "German"
177
+ children: h("i18n.review.filters.language.german", "German")
173
178
  })
174
179
  ]
175
180
  })]
176
181
  })]
177
182
  }),
178
- _.length === 0 && /* @__PURE__ */ a(d, {
183
+ y.length === 0 && /* @__PURE__ */ o(f, {
179
184
  illustration: "empty-notifications",
180
- title: "Nothing to review",
181
- description: "All caught up — there are no translations waiting for review."
185
+ title: h("i18n.review.empty.title", "Nothing to review"),
186
+ description: h("i18n.review.empty.description", "All caught up — there are no translations waiting for review.")
182
187
  }),
183
- _.length > 0 && /* @__PURE__ */ o("div", {
188
+ y.length > 0 && /* @__PURE__ */ s("div", {
184
189
  id: "i18n-review-queue",
185
190
  className: "scroll-mt-6 space-y-4",
186
- children: [_.map((r) => /* @__PURE__ */ a(l, {
191
+ children: [y.map((r) => /* @__PURE__ */ o(u, {
187
192
  treatment: "insight",
188
193
  className: "border-border-seam p-6",
189
- children: /* @__PURE__ */ o("div", {
194
+ children: /* @__PURE__ */ s("div", {
190
195
  className: "flex items-start gap-4",
191
- children: [/* @__PURE__ */ a("input", {
196
+ children: [/* @__PURE__ */ o("input", {
192
197
  type: "checkbox",
193
- "aria-label": `Select translation ${r.key}`,
194
- checked: m.includes(r.id),
195
- onChange: () => v(r.id),
198
+ "aria-label": h("i18n.review.card.selectAria", "Select translation {{key}}", { key: r.key }),
199
+ checked: g.includes(r.id),
200
+ onChange: () => b(r.id),
196
201
  className: "mt-1 size-4 rounded border-border-seam text-primary focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]"
197
- }), /* @__PURE__ */ o("div", {
202
+ }), /* @__PURE__ */ s("div", {
198
203
  className: "flex-1",
199
204
  children: [
200
- /* @__PURE__ */ a("div", {
205
+ /* @__PURE__ */ o("div", {
201
206
  className: "mb-3 flex items-start justify-between gap-2",
202
- children: /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h3", {
207
+ children: /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("h3", {
203
208
  className: "font-medium text-text-primary",
204
209
  children: r.key
205
- }), /* @__PURE__ */ o("span", {
210
+ }), /* @__PURE__ */ s("span", {
206
211
  className: "mt-1 inline-flex items-center gap-1.5 rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary",
207
- children: [/* @__PURE__ */ a("span", {
212
+ children: [/* @__PURE__ */ o("span", {
208
213
  className: "size-1.5 rounded-full bg-status-warning-text motion-safe:animate-vc-glow-pulse",
209
214
  "aria-hidden": "true"
210
215
  }), r.languageCode]
211
216
  })] })
212
217
  }),
213
- /* @__PURE__ */ o("div", {
218
+ /* @__PURE__ */ s("div", {
214
219
  className: "space-y-3",
215
- children: [/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
220
+ children: [/* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
216
221
  className: "mb-1 text-xs font-medium text-text-tertiary",
217
- children: "Source"
218
- }), /* @__PURE__ */ a("p", {
222
+ children: h("i18n.review.card.source", "Source")
223
+ }), /* @__PURE__ */ o("p", {
219
224
  className: "text-sm text-text-secondary",
220
225
  children: r.sourceValue
221
- })] }), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("p", {
226
+ })] }), /* @__PURE__ */ s("div", { children: [/* @__PURE__ */ o("p", {
222
227
  className: "mb-1 text-xs font-medium text-text-tertiary",
223
- children: "Target"
224
- }), /* @__PURE__ */ a("p", {
228
+ children: h("i18n.review.card.target", "Target")
229
+ }), /* @__PURE__ */ o("p", {
225
230
  className: "text-sm text-text-primary",
226
231
  children: r.targetValue
227
232
  })] })]
228
233
  }),
229
- /* @__PURE__ */ o("div", {
234
+ /* @__PURE__ */ s("div", {
230
235
  className: "mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
231
236
  children: [/* @__PURE__ */ o("p", {
232
237
  className: "text-xs text-text-tertiary",
233
- children: [
234
- "Submitted by ",
235
- r.submittedBy,
236
- " • ",
237
- r.submittedAt
238
- ]
239
- }), /* @__PURE__ */ a(s, {
238
+ children: h("i18n.review.card.submittedBy", "Submitted by {{name}} • {{time}}", {
239
+ name: r.submittedBy,
240
+ time: r.submittedAt
241
+ })
242
+ }), /* @__PURE__ */ o(c, {
240
243
  primary: {
241
- label: "Approve",
244
+ label: h("i18n.review.card.actions.approve", "Approve"),
242
245
  onSelect: () => void 0,
243
- icon: /* @__PURE__ */ a(e, {
246
+ icon: /* @__PURE__ */ o(e, {
244
247
  className: "size-4",
245
248
  "aria-hidden": "true"
246
249
  })
247
250
  },
248
251
  actions: [{
249
- label: "Add Notes",
252
+ label: h("i18n.review.card.actions.addNotes", "Add Notes"),
250
253
  onSelect: () => {
251
- g.current = !0;
254
+ v.current = !0;
252
255
  },
253
- icon: /* @__PURE__ */ a(n, {
256
+ icon: /* @__PURE__ */ o(n, {
254
257
  className: "size-4",
255
258
  "aria-hidden": "true"
256
259
  })
257
260
  }, {
258
- label: "Reject",
261
+ label: h("i18n.review.card.actions.reject", "Reject"),
259
262
  onSelect: () => {
260
- window.confirm(`Reject translation "${r.key}"?`);
263
+ window.confirm(h("i18n.review.card.confirm.reject", "Reject translation \"{{key}}\"?", { key: r.key }));
261
264
  },
262
265
  intent: "destructive",
263
- icon: /* @__PURE__ */ a(t, {
266
+ icon: /* @__PURE__ */ o(t, {
264
267
  className: "size-4",
265
268
  "aria-hidden": "true"
266
269
  })
@@ -272,11 +275,10 @@ var m = () => {
272
275
  })
273
276
  }, r.id)), /* @__PURE__ */ o("p", {
274
277
  className: "text-center text-sm text-text-tertiary",
275
- children: [
276
- "Showing ",
277
- _.length,
278
- " of 47 pending reviews"
279
- ]
278
+ children: h("i18n.review.list.showing", "Showing {{visible}} of {{total}} pending reviews", {
279
+ visible: y.length,
280
+ total: 47
281
+ })
280
282
  })]
281
283
  })
282
284
  ]
@@ -284,4 +286,4 @@ var m = () => {
284
286
  });
285
287
  };
286
288
  //#endregion
287
- export { m as ReviewQueuePage };
289
+ export { h as ReviewQueuePage };