@lmzhen/dsh-evolution-client-kit 0.40.1 → 0.42.0
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/lib/generated/i18n/evolution-merge.js +1800 -0
- package/lib/generated/i18n/evolution-settings.js +1008 -0
- package/lib/generated/i18n/evolution-skill-health.js +720 -0
- package/lib/generated/i18n/evolution-skill-history.js +800 -0
- package/lib/generated/i18n.generated.js +29 -0
- package/lib/index.js +1 -1
- package/lib/types/generated/i18n/evolution-merge.d.ts +1798 -0
- package/lib/types/generated/i18n/evolution-merge.js +1799 -0
- package/lib/types/generated/i18n/evolution-settings.d.ts +1006 -0
- package/lib/types/generated/i18n/evolution-settings.js +1007 -0
- package/lib/types/generated/i18n/evolution-skill-health.d.ts +718 -0
- package/lib/types/generated/i18n/evolution-skill-health.js +719 -0
- package/lib/types/generated/i18n/evolution-skill-history.d.ts +798 -0
- package/lib/types/generated/i18n/evolution-skill-history.js +799 -0
- package/lib/types/generated/i18n.generated.d.ts +4315 -0
- package/lib/types/generated/i18n.generated.js +19 -0
- package/lib/types/panel.d.ts +4 -6
- package/lib/types/panel.js +1 -1
- package/lib/types/seam.d.ts +6 -4
- package/lib/types/workbench-view.d.ts +2 -4
- package/package.json +22 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { dictionaries } from "./i18n/evolution-merge.js";
|
|
2
|
+
import { dictionaries as dictionaries$1 } from "./i18n/evolution-settings.js";
|
|
3
|
+
import { dictionaries as dictionaries$2 } from "./i18n/evolution-skill-health.js";
|
|
4
|
+
import { dictionaries as dictionaries$3 } from "./i18n/evolution-skill-history.js";
|
|
5
|
+
//#region lib/types/generated/i18n.generated.js
|
|
6
|
+
/**
|
|
7
|
+
* Source of truth: packages/scripts/i18n/catalog/*.json.
|
|
8
|
+
*/
|
|
9
|
+
const SUPPORTED_LOCALES = [
|
|
10
|
+
"zh",
|
|
11
|
+
"en",
|
|
12
|
+
"ja",
|
|
13
|
+
"es",
|
|
14
|
+
"fr",
|
|
15
|
+
"de",
|
|
16
|
+
"ru",
|
|
17
|
+
"pt"
|
|
18
|
+
];
|
|
19
|
+
const DICTIONARIES = {
|
|
20
|
+
"evolution-merge": dictionaries,
|
|
21
|
+
"evolution-settings": dictionaries$1,
|
|
22
|
+
"evolution-skill-health": dictionaries$2,
|
|
23
|
+
"evolution-skill-history": dictionaries$3
|
|
24
|
+
};
|
|
25
|
+
function dictionariesFor(namespace) {
|
|
26
|
+
return DICTIONARIES[namespace];
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { DICTIONARIES, SUPPORTED_LOCALES, dictionariesFor };
|
package/lib/index.js
CHANGED
|
@@ -47,7 +47,7 @@ function registerSidebarPanel(ctx, spec) {
|
|
|
47
47
|
}
|
|
48
48
|
}, spec.namespace + ": locale");
|
|
49
49
|
ctx.effect(() => injectStyles$1(typeof document === "undefined" ? void 0 : document, spec.styles.css, spec.styles.tagId), spec.namespace + ": styles");
|
|
50
|
-
const fallback = spec.dictionaries[spec.fallback ?? "en"];
|
|
50
|
+
const fallback = spec.dictionaries[spec.fallback ?? "en"] ?? spec.dictionaries.en;
|
|
51
51
|
const lookup = (key) => {
|
|
52
52
|
const own = fallback[key] ?? key;
|
|
53
53
|
if (!registered) return own;
|