@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).
|
|
39
|
-
* the opt-in off, today's table,
|
|
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;
|
package/dist/i18n/I18nRoutes.js
CHANGED
|
@@ -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
|
|
4
|
-
import { useTr as
|
|
5
|
-
import { LanguagesDialogs as
|
|
6
|
-
import { ADD_LANGUAGE_DIALOG as
|
|
7
|
-
import { LanguagesTab as
|
|
8
|
-
import { languageProgress as
|
|
9
|
-
import { ProductsTab as
|
|
10
|
-
import { ReviewTab as
|
|
11
|
-
import { useLanguagesData as
|
|
12
|
-
import { useWaitingCount as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { PageHeader as
|
|
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
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
languages:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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__ */
|
|
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__ */
|
|
41
|
+
/* @__PURE__ */ y(C, {
|
|
40
42
|
variant: "compact",
|
|
41
|
-
title:
|
|
42
|
-
description:
|
|
43
|
-
primary: /* @__PURE__ */ x
|
|
44
|
-
onClick: () =>
|
|
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__ */
|
|
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:
|
|
52
|
+
label: T("i18n.v3.exportWords", "Export translations"),
|
|
56
53
|
icon: e,
|
|
57
|
-
onSelect: () =>
|
|
54
|
+
onSelect: () => j(a)
|
|
58
55
|
}],
|
|
59
|
-
moreLabel:
|
|
56
|
+
moreLabel: T("i18n.v3.more", "More for languages")
|
|
60
57
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
ariaLabel:
|
|
63
|
-
activeId:
|
|
64
|
-
tabs:
|
|
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:
|
|
67
|
-
href:
|
|
68
|
-
badge:
|
|
63
|
+
label: L[e],
|
|
64
|
+
href: k.tab(e),
|
|
65
|
+
badge: R[e]
|
|
69
66
|
}))
|
|
70
67
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ y("div", {
|
|
72
69
|
className: "pt-4",
|
|
73
|
-
children:
|
|
74
|
-
languages:
|
|
75
|
-
sourceName:
|
|
76
|
-
onReviewed:
|
|
77
|
-
}) : /* @__PURE__ */
|
|
78
|
-
data:
|
|
79
|
-
progress:
|
|
80
|
-
links:
|
|
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__ */
|
|
85
|
-
links:
|
|
86
|
-
products:
|
|
87
|
-
languages:
|
|
81
|
+
/* @__PURE__ */ y(r, {
|
|
82
|
+
links: k,
|
|
83
|
+
products: A.products,
|
|
84
|
+
languages: P
|
|
88
85
|
})
|
|
89
86
|
]
|
|
90
87
|
});
|
|
91
88
|
}
|
|
92
|
-
export {
|
|
89
|
+
export { w as LanguagesPage };
|
package/dist/i18n/v2/model.d.ts
CHANGED
|
@@ -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. */
|