@burdenoff/microfe-i18n 2026.1129.4 → 2026.1129.5

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.
@@ -35,8 +35,9 @@ export declare function I18nRoutes({ basePath }: {
35
35
  * Locales open its tabs (the review queue opens Languages while the queue is
36
36
  * hidden). A language's address (and `locales/<code>`) opens its own page,
37
37
  * and `languages/new` opens Add language over Languages (C5b); `export` opens
38
- * Export over Languages (C5c). The editor and Import stay today's pages. With
39
- * the opt-in off, today's table, element for element.
38
+ * Export over Languages (C5c). `import` opens Languages while Import is
39
+ * hidden; the editor stays today's page. With the opt-in off, today's table,
40
+ * element for element.
40
41
  */
41
42
  export declare function I18nRouteTable({ basePath, v2, }: {
42
43
  basePath: string;
@@ -82,7 +82,7 @@ function S({ basePath: b, v2: x }) {
82
82
  }),
83
83
  /* @__PURE__ */ v(g, {
84
84
  path: "import",
85
- element: /* @__PURE__ */ v(a, { mode: "import" })
85
+ element: x ? w("languages") : /* @__PURE__ */ v(a, { mode: "import" })
86
86
  }),
87
87
  /* @__PURE__ */ v(g, {
88
88
  path: "export",
@@ -1,92 +1,89 @@
1
1
  import e from "../../node_modules/lucide-react/dist/esm/icons/download.js";
2
2
  import t from "../../node_modules/lucide-react/dist/esm/icons/plus.js";
3
- import n from "../../node_modules/lucide-react/dist/esm/icons/upload.js";
4
- import { useTr as r } from "../hooks/useTr.js";
5
- import { LanguagesDialogs as i } from "./LanguagesDialogs.js";
6
- import { ADD_LANGUAGE_DIALOG as a, EXPORT_DIALOG as o, languagesLinks as s } from "./links.js";
7
- import { LanguagesTab as c } from "./LanguagesTab.js";
8
- import { languageProgress as l, readLanguagesTab as u, shownTabs as d, sortLanguages as f } from "./model.js";
9
- import { ProductsTab as p } from "./ProductsTab.js";
10
- import { ReviewTab as m } from "./ReviewTab.js";
11
- import { useLanguagesData as h } from "./useLanguagesData.js";
12
- import { useWaitingCount as g } from "./useReviewQueue.js";
13
- import { useMemo as _ } from "react";
14
- import { useNavigate as v, useSearchParams as y } from "react-router";
15
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
16
- import { Button as S, PageTabs as C } from "@burdenoff/fe-libs/ui";
17
- import { PageHeader as w } from "@burdenoff/fe-libs/chrome";
3
+ import "../../node_modules/lucide-react/dist/esm/icons/upload.js";
4
+ import { useTr as n } from "../hooks/useTr.js";
5
+ import { LanguagesDialogs as r } from "./LanguagesDialogs.js";
6
+ import { ADD_LANGUAGE_DIALOG as i, EXPORT_DIALOG as a, languagesLinks as o } from "./links.js";
7
+ import { LanguagesTab as s } from "./LanguagesTab.js";
8
+ import { languageProgress as c, readLanguagesTab as l, shownTabs as u, sortLanguages as d } from "./model.js";
9
+ import { ProductsTab as f } from "./ProductsTab.js";
10
+ import { ReviewTab as p } from "./ReviewTab.js";
11
+ import { useLanguagesData as m } from "./useLanguagesData.js";
12
+ import { useWaitingCount as h } from "./useReviewQueue.js";
13
+ import { useMemo as g } from "react";
14
+ import { useNavigate as _, useSearchParams as v } from "react-router";
15
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
16
+ import { Button as x, PageTabs as S } from "@burdenoff/fe-libs/ui";
17
+ import { PageHeader as C } from "@burdenoff/fe-libs/chrome";
18
18
  // src/i18n/v2/LanguagesPage.tsx
19
- function T({ basePath: T }) {
20
- let E = r(), D = v(), [O, k] = y(), A = u(O.get("tab")), j = s(T), M = h(), N = (e) => {
21
- let t = new URLSearchParams(O);
22
- t.set("dialog", e), k(t);
23
- }, P = g(!1), F = _(() => l(M.coverage.byProduct), [M.coverage.byProduct]), I = _(() => f(M.languages), [M.languages]), L = {
24
- ...M,
25
- languages: I
26
- }, R = I.find((e) => e.isDefault)?.name ?? E("i18n.v3.sourceText", "Source text"), z = {
27
- languages: E("i18n.v3.tab.languages", "Languages"),
28
- products: E("i18n.v3.tab.products", "Products"),
29
- review: E("i18n.v3.tab.review", "Review queue")
30
- }, B = {
31
- languages: M.languagesLoading ? void 0 : M.languages.length,
32
- products: M.productsLoading ? void 0 : M.products.length,
33
- review: P
19
+ function w({ basePath: w }) {
20
+ let T = n();
21
+ _();
22
+ let [E, D] = v(), O = l(E.get("tab")), k = o(w), A = m(), j = (e) => {
23
+ let t = new URLSearchParams(E);
24
+ t.set("dialog", e), D(t);
25
+ }, M = h(!1), N = g(() => c(A.coverage.byProduct), [A.coverage.byProduct]), P = g(() => d(A.languages), [A.languages]), F = {
26
+ ...A,
27
+ languages: P
28
+ }, I = P.find((e) => e.isDefault)?.name ?? T("i18n.v3.sourceText", "Source text"), L = {
29
+ languages: T("i18n.v3.tab.languages", "Languages"),
30
+ products: T("i18n.v3.tab.products", "Products"),
31
+ review: T("i18n.v3.tab.review", "Review queue")
32
+ }, R = {
33
+ languages: A.languagesLoading ? void 0 : A.languages.length,
34
+ products: A.productsLoading ? void 0 : A.products.length,
35
+ review: M
34
36
  };
35
- return /* @__PURE__ */ x("div", {
37
+ return /* @__PURE__ */ b("div", {
36
38
  "data-account-pages-v2": "languages",
37
39
  className: "flex w-full min-w-0 flex-col",
38
40
  children: [
39
- /* @__PURE__ */ b(w, {
41
+ /* @__PURE__ */ y(C, {
40
42
  variant: "compact",
41
- title: E("i18n.v3.title", "Languages"),
42
- description: E("i18n.v3.purpose", "Translations for every product, and what’s waiting for review."),
43
- primary: /* @__PURE__ */ x(S, {
44
- onClick: () => N(a),
43
+ title: T("i18n.v3.title", "Languages"),
44
+ description: T("i18n.v3.purpose", "Translations for every product, and what’s waiting for review."),
45
+ primary: /* @__PURE__ */ b(x, {
46
+ onClick: () => j(i),
45
47
  "data-testid": "languages-add",
46
- children: [/* @__PURE__ */ b(t, { "aria-hidden": "true" }), E("i18n.v3.addLanguage", "Add language")]
48
+ children: [/* @__PURE__ */ y(t, { "aria-hidden": "true" }), T("i18n.v3.addLanguage", "Add language")]
47
49
  }),
48
50
  more: [{
49
- id: "import",
50
- label: E("i18n.v3.importWords", "Import translations"),
51
- icon: n,
52
- onSelect: () => D(j.importWords)
53
- }, {
54
51
  id: "export",
55
- label: E("i18n.v3.exportWords", "Export translations"),
52
+ label: T("i18n.v3.exportWords", "Export translations"),
56
53
  icon: e,
57
- onSelect: () => N(o)
54
+ onSelect: () => j(a)
58
55
  }],
59
- moreLabel: E("i18n.v3.more", "More for languages")
56
+ moreLabel: T("i18n.v3.more", "More for languages")
60
57
  }),
61
- /* @__PURE__ */ b(C, {
62
- ariaLabel: E("i18n.v3.title", "Languages"),
63
- activeId: A,
64
- tabs: d(!1).map((e) => ({
58
+ /* @__PURE__ */ y(S, {
59
+ ariaLabel: T("i18n.v3.title", "Languages"),
60
+ activeId: O,
61
+ tabs: u(!1).map((e) => ({
65
62
  id: e,
66
- label: z[e],
67
- href: j.tab(e),
68
- badge: B[e]
63
+ label: L[e],
64
+ href: k.tab(e),
65
+ badge: R[e]
69
66
  }))
70
67
  }),
71
- /* @__PURE__ */ b("div", {
68
+ /* @__PURE__ */ y("div", {
72
69
  className: "pt-4",
73
- children: A === "products" ? /* @__PURE__ */ b(p, { data: L }) : A === "review" ? /* @__PURE__ */ b(m, {
74
- languages: I,
75
- sourceName: R,
76
- onReviewed: M.coverage.reload
77
- }) : /* @__PURE__ */ b(c, {
78
- data: L,
79
- progress: F,
80
- links: j,
70
+ children: O === "products" ? /* @__PURE__ */ y(f, { data: F }) : O === "review" ? /* @__PURE__ */ y(p, {
71
+ languages: P,
72
+ sourceName: I,
73
+ onReviewed: A.coverage.reload
74
+ }) : /* @__PURE__ */ y(s, {
75
+ data: F,
76
+ progress: N,
77
+ links: k,
81
78
  reviewQueue: !1
82
79
  })
83
80
  }),
84
- /* @__PURE__ */ b(i, {
85
- links: j,
86
- products: M.products,
87
- languages: I
81
+ /* @__PURE__ */ y(r, {
82
+ links: k,
83
+ products: A.products,
84
+ languages: P
88
85
  })
89
86
  ]
90
87
  });
91
88
  }
92
- export { T as LanguagesPage };
89
+ export { w as LanguagesPage };
@@ -14,6 +14,13 @@ export type LanguagesTab = (typeof LANGUAGES_TABS)[number];
14
14
  * counts (from `translationCoverage`) still show, as plain text.
15
15
  */
16
16
  export declare const REVIEW_QUEUE_LISTS = false;
17
+ /**
18
+ * Whether the service runs import jobs. Today `createImportJob` only stores
19
+ * a pending row and nothing reads the file, so an import would stay pending
20
+ * for ever (BOFF-16785's backend list). Until it runs them, Import translations
21
+ * is hidden and `/import` opens Languages.
22
+ */
23
+ export declare const IMPORT_RUNS = false;
17
24
  /** The tabs shown: the review queue only once the service can list it. */
18
25
  export declare function shownTabs(reviewQueue: boolean): LanguagesTab[];
19
26
  /** `?tab=`; anything else, or a hidden tab, is the Languages tab. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-i18n",
3
- "version": "2026.1129.4",
3
+ "version": "2026.1129.5",
4
4
  "description": "Internationalization (i18n) micro-frontend module",
5
5
  "repository": {
6
6
  "type": "git",