@kopexa/i18n 1.0.0 → 2.0.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/dist/chunk-4W4HQAV4.mjs +51 -0
- package/dist/chunk-AHLIMUNW.mjs +52 -0
- package/dist/chunk-GYM3ORE3.mjs +27 -0
- package/dist/{chunk-R2PSHCC4.mjs → chunk-MK65PTG2.mjs} +11 -2
- package/dist/chunk-UGR6M3DF.mjs +24 -0
- package/dist/hooks/use-built-in-messages.d.mts +6 -0
- package/dist/hooks/use-built-in-messages.d.ts +6 -0
- package/dist/hooks/use-built-in-messages.js +156 -0
- package/dist/hooks/use-built-in-messages.mjs +11 -0
- package/dist/i18n.js +142 -9
- package/dist/i18n.mjs +5 -1
- package/dist/index.js +140 -7
- package/dist/index.mjs +5 -1
- package/dist/lang/de.d.mts +47 -0
- package/dist/lang/de.d.ts +47 -0
- package/dist/lang/de.js +48 -0
- package/dist/lang/de.mjs +7 -0
- package/dist/lang/en.d.mts +46 -0
- package/dist/lang/en.d.ts +46 -0
- package/dist/lang/en.js +47 -0
- package/dist/lang/en.mjs +7 -0
- package/dist/loaders/index.d.mts +6 -0
- package/dist/loaders/index.d.ts +6 -0
- package/dist/loaders/index.js +139 -0
- package/dist/loaders/index.mjs +9 -0
- package/package.json +2 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lang/en.json
|
|
4
|
+
var en_default = {
|
|
5
|
+
"editor.controlref.appearance": "Appearance",
|
|
6
|
+
"editor.controlref.border": "Border",
|
|
7
|
+
"editor.controlref.cancel": "Cancel",
|
|
8
|
+
"editor.controlref.change_control": "Change Control",
|
|
9
|
+
"editor.controlref.clear": "Clear",
|
|
10
|
+
"editor.controlref.control": "Control",
|
|
11
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
12
|
+
"editor.controlref.controls": "Controls",
|
|
13
|
+
"editor.controlref.display_options": "Display options",
|
|
14
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
15
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
16
|
+
"editor.controlref.live_preview": "Live preview",
|
|
17
|
+
"editor.controlref.map_control": "Map Control",
|
|
18
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
19
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
20
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
21
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
22
|
+
"editor.controlref.no_results": "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
23
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
24
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
25
|
+
"editor.controlref.radius": "Radius",
|
|
26
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
27
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
28
|
+
"editor.controlref.search_controls": "Search controls\u2026",
|
|
29
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
30
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory\u2026",
|
|
31
|
+
"editor.controlref.searching": "Searching\u2026",
|
|
32
|
+
"editor.controlref.selected": "Selected",
|
|
33
|
+
"editor.controlref.settings": "Settings",
|
|
34
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
35
|
+
"editor.controlref.shadow": "Shadow",
|
|
36
|
+
"editor.controlref.show_description": "Show Description",
|
|
37
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
38
|
+
"editor.controlref.show_status": "Show Status",
|
|
39
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
40
|
+
"editor.controlref.spacing": "Spacing",
|
|
41
|
+
"editor.controlref.unmap": "Unmap",
|
|
42
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
43
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
44
|
+
"editor.controlref.variant": "Variant",
|
|
45
|
+
"editor.controlref.variant_card": "Card",
|
|
46
|
+
"editor.controlref.variant_chip": "Chip"
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
en_default
|
|
51
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lang/de.json
|
|
4
|
+
var de_default = {
|
|
5
|
+
"editor.controlref.appearance": "Darstellung",
|
|
6
|
+
"editor.controlref.border": "Rahmen",
|
|
7
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
8
|
+
"editor.controlref.change_control": "Kontrolle \xE4ndern",
|
|
9
|
+
"editor.controlref.clear": "Zur\xFCcksetzen",
|
|
10
|
+
"editor.controlref.control": "Kontrolle",
|
|
11
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
12
|
+
"editor.controlref.controls": "Kontrollen",
|
|
13
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
14
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
15
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
16
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
17
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgew\xE4hlt",
|
|
18
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden f\xFCr \u201E{query}\u201C. Dieser Chip kann unzugeordnet bleiben.",
|
|
19
|
+
"editor.controlref.radius": "Radius",
|
|
20
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
21
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
22
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen\u2026",
|
|
23
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
24
|
+
"editor.controlref.searching": "Suche l\xE4uft\u2026",
|
|
25
|
+
"editor.controlref.selected": "Ausgew\xE4hlt",
|
|
26
|
+
"editor.controlref.settings": "Einstellungen",
|
|
27
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
28
|
+
"editor.controlref.shadow": "Schatten",
|
|
29
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
30
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
31
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
32
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
33
|
+
"editor.controlref.spacing": "Abstand",
|
|
34
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
35
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
36
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
37
|
+
"editor.controlref.variant": "Variante",
|
|
38
|
+
"editor.controlref.variant_card": "Karte",
|
|
39
|
+
"editor.controlref.variant_chip": "Chip",
|
|
40
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
41
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
42
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde m\xF6glicherweise gel\xF6scht oder Sie haben keinen Zugriff mehr. Bitte w\xE4hlen Sie eine andere Kontrolle aus.",
|
|
43
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut ausw\xE4hlen.",
|
|
44
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory \u2026",
|
|
45
|
+
"editor.controlref.error_timeout": "Zeit\xFCberschreitung bei der Anfrage",
|
|
46
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
47
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
de_default
|
|
52
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
de_default
|
|
4
|
+
} from "./chunk-AHLIMUNW.mjs";
|
|
5
|
+
import {
|
|
6
|
+
en_default
|
|
7
|
+
} from "./chunk-4W4HQAV4.mjs";
|
|
8
|
+
|
|
9
|
+
// src/loaders/index.ts
|
|
10
|
+
var CACHE = /* @__PURE__ */ new Map();
|
|
11
|
+
function norm(locale) {
|
|
12
|
+
return (locale != null ? locale : "en").toLowerCase();
|
|
13
|
+
}
|
|
14
|
+
async function loadBuiltinMessages(locale) {
|
|
15
|
+
const key = norm(locale);
|
|
16
|
+
if (CACHE.has(key)) return CACHE.get(key);
|
|
17
|
+
const prom = (async () => {
|
|
18
|
+
if (!key.startsWith("de")) return en_default;
|
|
19
|
+
return { ...en_default, ...de_default };
|
|
20
|
+
})();
|
|
21
|
+
CACHE.set(key, prom);
|
|
22
|
+
return prom;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
loadBuiltinMessages
|
|
27
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
useBuiltInMessages
|
|
4
|
+
} from "./chunk-UGR6M3DF.mjs";
|
|
2
5
|
import {
|
|
3
6
|
useMessages
|
|
4
7
|
} from "./chunk-TYEI7NWI.mjs";
|
|
@@ -19,10 +22,16 @@ var I18nProvider = (props) => {
|
|
|
19
22
|
} = props;
|
|
20
23
|
const intl = useSafeIntl();
|
|
21
24
|
const locale = (localeProp || intl.locale || "en").toLowerCase();
|
|
25
|
+
const builtInMessages = useBuiltInMessages(locale);
|
|
22
26
|
const messages = useMessages(locale, loaderFn);
|
|
23
27
|
const mergedMessages = useMemo(() => {
|
|
24
|
-
return {
|
|
25
|
-
|
|
28
|
+
return {
|
|
29
|
+
...defaultMessages,
|
|
30
|
+
...intl.messages,
|
|
31
|
+
...builtInMessages,
|
|
32
|
+
...messages
|
|
33
|
+
};
|
|
34
|
+
}, [intl, messages, builtInMessages, defaultMessages]);
|
|
26
35
|
return /* @__PURE__ */ jsx(
|
|
27
36
|
IntlProvider,
|
|
28
37
|
{
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
loadBuiltinMessages
|
|
4
|
+
} from "./chunk-GYM3ORE3.mjs";
|
|
5
|
+
|
|
6
|
+
// src/hooks/use-built-in-messages.ts
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
function useBuiltInMessages(locale) {
|
|
9
|
+
const [msgs, setMsgs] = useState({});
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
let cancelled = false;
|
|
12
|
+
loadBuiltinMessages(locale).then((m) => {
|
|
13
|
+
if (!cancelled) setMsgs(m);
|
|
14
|
+
});
|
|
15
|
+
return () => {
|
|
16
|
+
cancelled = true;
|
|
17
|
+
};
|
|
18
|
+
}, [locale]);
|
|
19
|
+
return msgs;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
useBuiltInMessages
|
|
24
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/hooks/use-built-in-messages.ts
|
|
23
|
+
var use_built_in_messages_exports = {};
|
|
24
|
+
__export(use_built_in_messages_exports, {
|
|
25
|
+
useBuiltInMessages: () => useBuiltInMessages
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(use_built_in_messages_exports);
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
|
|
30
|
+
// src/lang/de.json
|
|
31
|
+
var de_default = {
|
|
32
|
+
"editor.controlref.appearance": "Darstellung",
|
|
33
|
+
"editor.controlref.border": "Rahmen",
|
|
34
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
35
|
+
"editor.controlref.change_control": "Kontrolle \xE4ndern",
|
|
36
|
+
"editor.controlref.clear": "Zur\xFCcksetzen",
|
|
37
|
+
"editor.controlref.control": "Kontrolle",
|
|
38
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
39
|
+
"editor.controlref.controls": "Kontrollen",
|
|
40
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
41
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
42
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
43
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
44
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgew\xE4hlt",
|
|
45
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden f\xFCr \u201E{query}\u201C. Dieser Chip kann unzugeordnet bleiben.",
|
|
46
|
+
"editor.controlref.radius": "Radius",
|
|
47
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
48
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
49
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen\u2026",
|
|
50
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
51
|
+
"editor.controlref.searching": "Suche l\xE4uft\u2026",
|
|
52
|
+
"editor.controlref.selected": "Ausgew\xE4hlt",
|
|
53
|
+
"editor.controlref.settings": "Einstellungen",
|
|
54
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
55
|
+
"editor.controlref.shadow": "Schatten",
|
|
56
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
57
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
58
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
59
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
60
|
+
"editor.controlref.spacing": "Abstand",
|
|
61
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
62
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
63
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
64
|
+
"editor.controlref.variant": "Variante",
|
|
65
|
+
"editor.controlref.variant_card": "Karte",
|
|
66
|
+
"editor.controlref.variant_chip": "Chip",
|
|
67
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
68
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
69
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde m\xF6glicherweise gel\xF6scht oder Sie haben keinen Zugriff mehr. Bitte w\xE4hlen Sie eine andere Kontrolle aus.",
|
|
70
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut ausw\xE4hlen.",
|
|
71
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory \u2026",
|
|
72
|
+
"editor.controlref.error_timeout": "Zeit\xFCberschreitung bei der Anfrage",
|
|
73
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
74
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// src/lang/en.json
|
|
78
|
+
var en_default = {
|
|
79
|
+
"editor.controlref.appearance": "Appearance",
|
|
80
|
+
"editor.controlref.border": "Border",
|
|
81
|
+
"editor.controlref.cancel": "Cancel",
|
|
82
|
+
"editor.controlref.change_control": "Change Control",
|
|
83
|
+
"editor.controlref.clear": "Clear",
|
|
84
|
+
"editor.controlref.control": "Control",
|
|
85
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
86
|
+
"editor.controlref.controls": "Controls",
|
|
87
|
+
"editor.controlref.display_options": "Display options",
|
|
88
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
89
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
90
|
+
"editor.controlref.live_preview": "Live preview",
|
|
91
|
+
"editor.controlref.map_control": "Map Control",
|
|
92
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
93
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
94
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
95
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
96
|
+
"editor.controlref.no_results": "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
97
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
98
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
99
|
+
"editor.controlref.radius": "Radius",
|
|
100
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
101
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
102
|
+
"editor.controlref.search_controls": "Search controls\u2026",
|
|
103
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
104
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory\u2026",
|
|
105
|
+
"editor.controlref.searching": "Searching\u2026",
|
|
106
|
+
"editor.controlref.selected": "Selected",
|
|
107
|
+
"editor.controlref.settings": "Settings",
|
|
108
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
109
|
+
"editor.controlref.shadow": "Shadow",
|
|
110
|
+
"editor.controlref.show_description": "Show Description",
|
|
111
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
112
|
+
"editor.controlref.show_status": "Show Status",
|
|
113
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
114
|
+
"editor.controlref.spacing": "Spacing",
|
|
115
|
+
"editor.controlref.unmap": "Unmap",
|
|
116
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
117
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
118
|
+
"editor.controlref.variant": "Variant",
|
|
119
|
+
"editor.controlref.variant_card": "Card",
|
|
120
|
+
"editor.controlref.variant_chip": "Chip"
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// src/loaders/index.ts
|
|
124
|
+
var CACHE = /* @__PURE__ */ new Map();
|
|
125
|
+
function norm(locale) {
|
|
126
|
+
return (locale != null ? locale : "en").toLowerCase();
|
|
127
|
+
}
|
|
128
|
+
async function loadBuiltinMessages(locale) {
|
|
129
|
+
const key = norm(locale);
|
|
130
|
+
if (CACHE.has(key)) return CACHE.get(key);
|
|
131
|
+
const prom = (async () => {
|
|
132
|
+
if (!key.startsWith("de")) return en_default;
|
|
133
|
+
return { ...en_default, ...de_default };
|
|
134
|
+
})();
|
|
135
|
+
CACHE.set(key, prom);
|
|
136
|
+
return prom;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/hooks/use-built-in-messages.ts
|
|
140
|
+
function useBuiltInMessages(locale) {
|
|
141
|
+
const [msgs, setMsgs] = (0, import_react.useState)({});
|
|
142
|
+
(0, import_react.useEffect)(() => {
|
|
143
|
+
let cancelled = false;
|
|
144
|
+
loadBuiltinMessages(locale).then((m) => {
|
|
145
|
+
if (!cancelled) setMsgs(m);
|
|
146
|
+
});
|
|
147
|
+
return () => {
|
|
148
|
+
cancelled = true;
|
|
149
|
+
};
|
|
150
|
+
}, [locale]);
|
|
151
|
+
return msgs;
|
|
152
|
+
}
|
|
153
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
154
|
+
0 && (module.exports = {
|
|
155
|
+
useBuiltInMessages
|
|
156
|
+
});
|
package/dist/i18n.js
CHANGED
|
@@ -25,12 +25,139 @@ __export(i18n_exports, {
|
|
|
25
25
|
I18nProvider: () => I18nProvider
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(i18n_exports);
|
|
28
|
-
var
|
|
28
|
+
var import_react4 = require("react");
|
|
29
29
|
var import_react_intl2 = require("react-intl");
|
|
30
30
|
|
|
31
|
-
// src/hooks/use-messages.ts
|
|
31
|
+
// src/hooks/use-built-in-messages.ts
|
|
32
32
|
var import_react = require("react");
|
|
33
33
|
|
|
34
|
+
// src/lang/de.json
|
|
35
|
+
var de_default = {
|
|
36
|
+
"editor.controlref.appearance": "Darstellung",
|
|
37
|
+
"editor.controlref.border": "Rahmen",
|
|
38
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
39
|
+
"editor.controlref.change_control": "Kontrolle \xE4ndern",
|
|
40
|
+
"editor.controlref.clear": "Zur\xFCcksetzen",
|
|
41
|
+
"editor.controlref.control": "Kontrolle",
|
|
42
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
43
|
+
"editor.controlref.controls": "Kontrollen",
|
|
44
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
45
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
46
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
47
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
48
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgew\xE4hlt",
|
|
49
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden f\xFCr \u201E{query}\u201C. Dieser Chip kann unzugeordnet bleiben.",
|
|
50
|
+
"editor.controlref.radius": "Radius",
|
|
51
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
52
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
53
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen\u2026",
|
|
54
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
55
|
+
"editor.controlref.searching": "Suche l\xE4uft\u2026",
|
|
56
|
+
"editor.controlref.selected": "Ausgew\xE4hlt",
|
|
57
|
+
"editor.controlref.settings": "Einstellungen",
|
|
58
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
59
|
+
"editor.controlref.shadow": "Schatten",
|
|
60
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
61
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
62
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
63
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
64
|
+
"editor.controlref.spacing": "Abstand",
|
|
65
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
66
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
67
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
68
|
+
"editor.controlref.variant": "Variante",
|
|
69
|
+
"editor.controlref.variant_card": "Karte",
|
|
70
|
+
"editor.controlref.variant_chip": "Chip",
|
|
71
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
72
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
73
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde m\xF6glicherweise gel\xF6scht oder Sie haben keinen Zugriff mehr. Bitte w\xE4hlen Sie eine andere Kontrolle aus.",
|
|
74
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut ausw\xE4hlen.",
|
|
75
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory \u2026",
|
|
76
|
+
"editor.controlref.error_timeout": "Zeit\xFCberschreitung bei der Anfrage",
|
|
77
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
78
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// src/lang/en.json
|
|
82
|
+
var en_default = {
|
|
83
|
+
"editor.controlref.appearance": "Appearance",
|
|
84
|
+
"editor.controlref.border": "Border",
|
|
85
|
+
"editor.controlref.cancel": "Cancel",
|
|
86
|
+
"editor.controlref.change_control": "Change Control",
|
|
87
|
+
"editor.controlref.clear": "Clear",
|
|
88
|
+
"editor.controlref.control": "Control",
|
|
89
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
90
|
+
"editor.controlref.controls": "Controls",
|
|
91
|
+
"editor.controlref.display_options": "Display options",
|
|
92
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
93
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
94
|
+
"editor.controlref.live_preview": "Live preview",
|
|
95
|
+
"editor.controlref.map_control": "Map Control",
|
|
96
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
97
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
98
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
99
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
100
|
+
"editor.controlref.no_results": "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
101
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
102
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
103
|
+
"editor.controlref.radius": "Radius",
|
|
104
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
105
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
106
|
+
"editor.controlref.search_controls": "Search controls\u2026",
|
|
107
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
108
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory\u2026",
|
|
109
|
+
"editor.controlref.searching": "Searching\u2026",
|
|
110
|
+
"editor.controlref.selected": "Selected",
|
|
111
|
+
"editor.controlref.settings": "Settings",
|
|
112
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
113
|
+
"editor.controlref.shadow": "Shadow",
|
|
114
|
+
"editor.controlref.show_description": "Show Description",
|
|
115
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
116
|
+
"editor.controlref.show_status": "Show Status",
|
|
117
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
118
|
+
"editor.controlref.spacing": "Spacing",
|
|
119
|
+
"editor.controlref.unmap": "Unmap",
|
|
120
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
121
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
122
|
+
"editor.controlref.variant": "Variant",
|
|
123
|
+
"editor.controlref.variant_card": "Card",
|
|
124
|
+
"editor.controlref.variant_chip": "Chip"
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// src/loaders/index.ts
|
|
128
|
+
var CACHE = /* @__PURE__ */ new Map();
|
|
129
|
+
function norm(locale) {
|
|
130
|
+
return (locale != null ? locale : "en").toLowerCase();
|
|
131
|
+
}
|
|
132
|
+
async function loadBuiltinMessages(locale) {
|
|
133
|
+
const key = norm(locale);
|
|
134
|
+
if (CACHE.has(key)) return CACHE.get(key);
|
|
135
|
+
const prom = (async () => {
|
|
136
|
+
if (!key.startsWith("de")) return en_default;
|
|
137
|
+
return { ...en_default, ...de_default };
|
|
138
|
+
})();
|
|
139
|
+
CACHE.set(key, prom);
|
|
140
|
+
return prom;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// src/hooks/use-built-in-messages.ts
|
|
144
|
+
function useBuiltInMessages(locale) {
|
|
145
|
+
const [msgs, setMsgs] = (0, import_react.useState)({});
|
|
146
|
+
(0, import_react.useEffect)(() => {
|
|
147
|
+
let cancelled = false;
|
|
148
|
+
loadBuiltinMessages(locale).then((m) => {
|
|
149
|
+
if (!cancelled) setMsgs(m);
|
|
150
|
+
});
|
|
151
|
+
return () => {
|
|
152
|
+
cancelled = true;
|
|
153
|
+
};
|
|
154
|
+
}, [locale]);
|
|
155
|
+
return msgs;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// src/hooks/use-messages.ts
|
|
159
|
+
var import_react2 = require("react");
|
|
160
|
+
|
|
34
161
|
// src/const.ts
|
|
35
162
|
var DEFAULT_LOCALE_STATE = {
|
|
36
163
|
locale: "en",
|
|
@@ -39,8 +166,8 @@ var DEFAULT_LOCALE_STATE = {
|
|
|
39
166
|
|
|
40
167
|
// src/hooks/use-messages.ts
|
|
41
168
|
var useMessages = (locale, loaderFn) => {
|
|
42
|
-
const [localeState, setLocaleState] = (0,
|
|
43
|
-
(0,
|
|
169
|
+
const [localeState, setLocaleState] = (0, import_react2.useState)(DEFAULT_LOCALE_STATE);
|
|
170
|
+
(0, import_react2.useEffect)(() => {
|
|
44
171
|
if (!localeState.messages || locale !== localeState.locale) {
|
|
45
172
|
let current = true;
|
|
46
173
|
loaderFn == null ? void 0 : loaderFn(locale).then((messages) => {
|
|
@@ -60,11 +187,11 @@ var useMessages = (locale, loaderFn) => {
|
|
|
60
187
|
};
|
|
61
188
|
|
|
62
189
|
// src/hooks/use-safe-intl.ts
|
|
63
|
-
var
|
|
190
|
+
var import_react3 = require("react");
|
|
64
191
|
var import_react_intl = require("react-intl");
|
|
65
192
|
var cache = (0, import_react_intl.createIntlCache)();
|
|
66
193
|
var useSafeIntl = () => {
|
|
67
|
-
const context = (0,
|
|
194
|
+
const context = (0, import_react3.useContext)(import_react_intl.IntlContext);
|
|
68
195
|
if (!context) {
|
|
69
196
|
return (0, import_react_intl.createIntl)(DEFAULT_LOCALE_STATE, cache);
|
|
70
197
|
}
|
|
@@ -82,10 +209,16 @@ var I18nProvider = (props) => {
|
|
|
82
209
|
} = props;
|
|
83
210
|
const intl = useSafeIntl();
|
|
84
211
|
const locale = (localeProp || intl.locale || "en").toLowerCase();
|
|
212
|
+
const builtInMessages = useBuiltInMessages(locale);
|
|
85
213
|
const messages = useMessages(locale, loaderFn);
|
|
86
|
-
const mergedMessages = (0,
|
|
87
|
-
return {
|
|
88
|
-
|
|
214
|
+
const mergedMessages = (0, import_react4.useMemo)(() => {
|
|
215
|
+
return {
|
|
216
|
+
...defaultMessages,
|
|
217
|
+
...intl.messages,
|
|
218
|
+
...builtInMessages,
|
|
219
|
+
...messages
|
|
220
|
+
};
|
|
221
|
+
}, [intl, messages, builtInMessages, defaultMessages]);
|
|
89
222
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
223
|
import_react_intl2.IntlProvider,
|
|
91
224
|
{
|
package/dist/i18n.mjs
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import {
|
|
4
4
|
I18nProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MK65PTG2.mjs";
|
|
6
|
+
import "./chunk-UGR6M3DF.mjs";
|
|
7
|
+
import "./chunk-GYM3ORE3.mjs";
|
|
8
|
+
import "./chunk-AHLIMUNW.mjs";
|
|
9
|
+
import "./chunk-4W4HQAV4.mjs";
|
|
6
10
|
import "./chunk-TYEI7NWI.mjs";
|
|
7
11
|
import "./chunk-DWCWMJZD.mjs";
|
|
8
12
|
import "./chunk-DRJHB4YN.mjs";
|
package/dist/index.js
CHANGED
|
@@ -47,14 +47,141 @@ var useSafeIntl = () => {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
// src/i18n.tsx
|
|
50
|
-
var
|
|
50
|
+
var import_react4 = require("react");
|
|
51
51
|
var import_react_intl2 = require("react-intl");
|
|
52
52
|
|
|
53
|
-
// src/hooks/use-messages.ts
|
|
53
|
+
// src/hooks/use-built-in-messages.ts
|
|
54
54
|
var import_react2 = require("react");
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
|
|
56
|
+
// src/lang/de.json
|
|
57
|
+
var de_default = {
|
|
58
|
+
"editor.controlref.appearance": "Darstellung",
|
|
59
|
+
"editor.controlref.border": "Rahmen",
|
|
60
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
61
|
+
"editor.controlref.change_control": "Kontrolle \xE4ndern",
|
|
62
|
+
"editor.controlref.clear": "Zur\xFCcksetzen",
|
|
63
|
+
"editor.controlref.control": "Kontrolle",
|
|
64
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
65
|
+
"editor.controlref.controls": "Kontrollen",
|
|
66
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
67
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
68
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
69
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
70
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgew\xE4hlt",
|
|
71
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden f\xFCr \u201E{query}\u201C. Dieser Chip kann unzugeordnet bleiben.",
|
|
72
|
+
"editor.controlref.radius": "Radius",
|
|
73
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
74
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
75
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen\u2026",
|
|
76
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
77
|
+
"editor.controlref.searching": "Suche l\xE4uft\u2026",
|
|
78
|
+
"editor.controlref.selected": "Ausgew\xE4hlt",
|
|
79
|
+
"editor.controlref.settings": "Einstellungen",
|
|
80
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
81
|
+
"editor.controlref.shadow": "Schatten",
|
|
82
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
83
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
84
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
85
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
86
|
+
"editor.controlref.spacing": "Abstand",
|
|
87
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
88
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
89
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
90
|
+
"editor.controlref.variant": "Variante",
|
|
91
|
+
"editor.controlref.variant_card": "Karte",
|
|
92
|
+
"editor.controlref.variant_chip": "Chip",
|
|
93
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
94
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
95
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde m\xF6glicherweise gel\xF6scht oder Sie haben keinen Zugriff mehr. Bitte w\xE4hlen Sie eine andere Kontrolle aus.",
|
|
96
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut ausw\xE4hlen.",
|
|
97
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory \u2026",
|
|
98
|
+
"editor.controlref.error_timeout": "Zeit\xFCberschreitung bei der Anfrage",
|
|
99
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
100
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// src/lang/en.json
|
|
104
|
+
var en_default = {
|
|
105
|
+
"editor.controlref.appearance": "Appearance",
|
|
106
|
+
"editor.controlref.border": "Border",
|
|
107
|
+
"editor.controlref.cancel": "Cancel",
|
|
108
|
+
"editor.controlref.change_control": "Change Control",
|
|
109
|
+
"editor.controlref.clear": "Clear",
|
|
110
|
+
"editor.controlref.control": "Control",
|
|
111
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
112
|
+
"editor.controlref.controls": "Controls",
|
|
113
|
+
"editor.controlref.display_options": "Display options",
|
|
114
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
115
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
116
|
+
"editor.controlref.live_preview": "Live preview",
|
|
117
|
+
"editor.controlref.map_control": "Map Control",
|
|
118
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
119
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
120
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
121
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
122
|
+
"editor.controlref.no_results": "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
123
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
124
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
125
|
+
"editor.controlref.radius": "Radius",
|
|
126
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
127
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
128
|
+
"editor.controlref.search_controls": "Search controls\u2026",
|
|
129
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
130
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory\u2026",
|
|
131
|
+
"editor.controlref.searching": "Searching\u2026",
|
|
132
|
+
"editor.controlref.selected": "Selected",
|
|
133
|
+
"editor.controlref.settings": "Settings",
|
|
134
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
135
|
+
"editor.controlref.shadow": "Shadow",
|
|
136
|
+
"editor.controlref.show_description": "Show Description",
|
|
137
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
138
|
+
"editor.controlref.show_status": "Show Status",
|
|
139
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
140
|
+
"editor.controlref.spacing": "Spacing",
|
|
141
|
+
"editor.controlref.unmap": "Unmap",
|
|
142
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
143
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
144
|
+
"editor.controlref.variant": "Variant",
|
|
145
|
+
"editor.controlref.variant_card": "Card",
|
|
146
|
+
"editor.controlref.variant_chip": "Chip"
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// src/loaders/index.ts
|
|
150
|
+
var CACHE = /* @__PURE__ */ new Map();
|
|
151
|
+
function norm(locale) {
|
|
152
|
+
return (locale != null ? locale : "en").toLowerCase();
|
|
153
|
+
}
|
|
154
|
+
async function loadBuiltinMessages(locale) {
|
|
155
|
+
const key = norm(locale);
|
|
156
|
+
if (CACHE.has(key)) return CACHE.get(key);
|
|
157
|
+
const prom = (async () => {
|
|
158
|
+
if (!key.startsWith("de")) return en_default;
|
|
159
|
+
return { ...en_default, ...de_default };
|
|
160
|
+
})();
|
|
161
|
+
CACHE.set(key, prom);
|
|
162
|
+
return prom;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// src/hooks/use-built-in-messages.ts
|
|
166
|
+
function useBuiltInMessages(locale) {
|
|
167
|
+
const [msgs, setMsgs] = (0, import_react2.useState)({});
|
|
57
168
|
(0, import_react2.useEffect)(() => {
|
|
169
|
+
let cancelled = false;
|
|
170
|
+
loadBuiltinMessages(locale).then((m) => {
|
|
171
|
+
if (!cancelled) setMsgs(m);
|
|
172
|
+
});
|
|
173
|
+
return () => {
|
|
174
|
+
cancelled = true;
|
|
175
|
+
};
|
|
176
|
+
}, [locale]);
|
|
177
|
+
return msgs;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// src/hooks/use-messages.ts
|
|
181
|
+
var import_react3 = require("react");
|
|
182
|
+
var useMessages = (locale, loaderFn) => {
|
|
183
|
+
const [localeState, setLocaleState] = (0, import_react3.useState)(DEFAULT_LOCALE_STATE);
|
|
184
|
+
(0, import_react3.useEffect)(() => {
|
|
58
185
|
if (!localeState.messages || locale !== localeState.locale) {
|
|
59
186
|
let current = true;
|
|
60
187
|
loaderFn == null ? void 0 : loaderFn(locale).then((messages) => {
|
|
@@ -84,10 +211,16 @@ var I18nProvider = (props) => {
|
|
|
84
211
|
} = props;
|
|
85
212
|
const intl = useSafeIntl();
|
|
86
213
|
const locale = (localeProp || intl.locale || "en").toLowerCase();
|
|
214
|
+
const builtInMessages = useBuiltInMessages(locale);
|
|
87
215
|
const messages = useMessages(locale, loaderFn);
|
|
88
|
-
const mergedMessages = (0,
|
|
89
|
-
return {
|
|
90
|
-
|
|
216
|
+
const mergedMessages = (0, import_react4.useMemo)(() => {
|
|
217
|
+
return {
|
|
218
|
+
...defaultMessages,
|
|
219
|
+
...intl.messages,
|
|
220
|
+
...builtInMessages,
|
|
221
|
+
...messages
|
|
222
|
+
};
|
|
223
|
+
}, [intl, messages, builtInMessages, defaultMessages]);
|
|
91
224
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
92
225
|
import_react_intl2.IntlProvider,
|
|
93
226
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
I18nProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MK65PTG2.mjs";
|
|
5
|
+
import "./chunk-UGR6M3DF.mjs";
|
|
6
|
+
import "./chunk-GYM3ORE3.mjs";
|
|
7
|
+
import "./chunk-AHLIMUNW.mjs";
|
|
8
|
+
import "./chunk-4W4HQAV4.mjs";
|
|
5
9
|
import "./chunk-TYEI7NWI.mjs";
|
|
6
10
|
import {
|
|
7
11
|
useSafeIntl
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var de = {
|
|
2
|
+
"editor.controlref.appearance": "Darstellung",
|
|
3
|
+
"editor.controlref.border": "Rahmen",
|
|
4
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
5
|
+
"editor.controlref.change_control": "Kontrolle ändern",
|
|
6
|
+
"editor.controlref.clear": "Zurücksetzen",
|
|
7
|
+
"editor.controlref.control": "Kontrolle",
|
|
8
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
9
|
+
"editor.controlref.controls": "Kontrollen",
|
|
10
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
11
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
12
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
13
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
14
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgewählt",
|
|
15
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden für „{query}“. Dieser Chip kann unzugeordnet bleiben.",
|
|
16
|
+
"editor.controlref.radius": "Radius",
|
|
17
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
18
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
19
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen…",
|
|
20
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
21
|
+
"editor.controlref.searching": "Suche läuft…",
|
|
22
|
+
"editor.controlref.selected": "Ausgewählt",
|
|
23
|
+
"editor.controlref.settings": "Einstellungen",
|
|
24
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
25
|
+
"editor.controlref.shadow": "Schatten",
|
|
26
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
27
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
28
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
29
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
30
|
+
"editor.controlref.spacing": "Abstand",
|
|
31
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
32
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
33
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
34
|
+
"editor.controlref.variant": "Variante",
|
|
35
|
+
"editor.controlref.variant_card": "Karte",
|
|
36
|
+
"editor.controlref.variant_chip": "Chip",
|
|
37
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
38
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
39
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde möglicherweise gelöscht oder Sie haben keinen Zugriff mehr. Bitte wählen Sie eine andere Kontrolle aus.",
|
|
40
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut auswählen.",
|
|
41
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory …",
|
|
42
|
+
"editor.controlref.error_timeout": "Zeitüberschreitung bei der Anfrage",
|
|
43
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
44
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { de as default };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var de = {
|
|
2
|
+
"editor.controlref.appearance": "Darstellung",
|
|
3
|
+
"editor.controlref.border": "Rahmen",
|
|
4
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
5
|
+
"editor.controlref.change_control": "Kontrolle ändern",
|
|
6
|
+
"editor.controlref.clear": "Zurücksetzen",
|
|
7
|
+
"editor.controlref.control": "Kontrolle",
|
|
8
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
9
|
+
"editor.controlref.controls": "Kontrollen",
|
|
10
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
11
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
12
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
13
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
14
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgewählt",
|
|
15
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden für „{query}“. Dieser Chip kann unzugeordnet bleiben.",
|
|
16
|
+
"editor.controlref.radius": "Radius",
|
|
17
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
18
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
19
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen…",
|
|
20
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
21
|
+
"editor.controlref.searching": "Suche läuft…",
|
|
22
|
+
"editor.controlref.selected": "Ausgewählt",
|
|
23
|
+
"editor.controlref.settings": "Einstellungen",
|
|
24
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
25
|
+
"editor.controlref.shadow": "Schatten",
|
|
26
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
27
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
28
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
29
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
30
|
+
"editor.controlref.spacing": "Abstand",
|
|
31
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
32
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
33
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
34
|
+
"editor.controlref.variant": "Variante",
|
|
35
|
+
"editor.controlref.variant_card": "Karte",
|
|
36
|
+
"editor.controlref.variant_chip": "Chip",
|
|
37
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
38
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
39
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde möglicherweise gelöscht oder Sie haben keinen Zugriff mehr. Bitte wählen Sie eine andere Kontrolle aus.",
|
|
40
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut auswählen.",
|
|
41
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory …",
|
|
42
|
+
"editor.controlref.error_timeout": "Zeitüberschreitung bei der Anfrage",
|
|
43
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
44
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { de as default };
|
package/dist/lang/de.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lang/de.json
|
|
4
|
+
var de_default = {
|
|
5
|
+
"editor.controlref.appearance": "Darstellung",
|
|
6
|
+
"editor.controlref.border": "Rahmen",
|
|
7
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
8
|
+
"editor.controlref.change_control": "Kontrolle \xE4ndern",
|
|
9
|
+
"editor.controlref.clear": "Zur\xFCcksetzen",
|
|
10
|
+
"editor.controlref.control": "Kontrolle",
|
|
11
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
12
|
+
"editor.controlref.controls": "Kontrollen",
|
|
13
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
14
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
15
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
16
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
17
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgew\xE4hlt",
|
|
18
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden f\xFCr \u201E{query}\u201C. Dieser Chip kann unzugeordnet bleiben.",
|
|
19
|
+
"editor.controlref.radius": "Radius",
|
|
20
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
21
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
22
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen\u2026",
|
|
23
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
24
|
+
"editor.controlref.searching": "Suche l\xE4uft\u2026",
|
|
25
|
+
"editor.controlref.selected": "Ausgew\xE4hlt",
|
|
26
|
+
"editor.controlref.settings": "Einstellungen",
|
|
27
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
28
|
+
"editor.controlref.shadow": "Schatten",
|
|
29
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
30
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
31
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
32
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
33
|
+
"editor.controlref.spacing": "Abstand",
|
|
34
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
35
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
36
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
37
|
+
"editor.controlref.variant": "Variante",
|
|
38
|
+
"editor.controlref.variant_card": "Karte",
|
|
39
|
+
"editor.controlref.variant_chip": "Chip",
|
|
40
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
41
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
42
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde m\xF6glicherweise gel\xF6scht oder Sie haben keinen Zugriff mehr. Bitte w\xE4hlen Sie eine andere Kontrolle aus.",
|
|
43
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut ausw\xE4hlen.",
|
|
44
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory \u2026",
|
|
45
|
+
"editor.controlref.error_timeout": "Zeit\xFCberschreitung bei der Anfrage",
|
|
46
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
47
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
48
|
+
};
|
package/dist/lang/de.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var en = {
|
|
2
|
+
"editor.controlref.appearance": "Appearance",
|
|
3
|
+
"editor.controlref.border": "Border",
|
|
4
|
+
"editor.controlref.cancel": "Cancel",
|
|
5
|
+
"editor.controlref.change_control": "Change Control",
|
|
6
|
+
"editor.controlref.clear": "Clear",
|
|
7
|
+
"editor.controlref.control": "Control",
|
|
8
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
9
|
+
"editor.controlref.controls": "Controls",
|
|
10
|
+
"editor.controlref.display_options": "Display options",
|
|
11
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
12
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
13
|
+
"editor.controlref.live_preview": "Live preview",
|
|
14
|
+
"editor.controlref.map_control": "Map Control",
|
|
15
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
16
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
17
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
18
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
19
|
+
"editor.controlref.no_results": "No controls found for “{query}”. You can keep this chip unmapped.",
|
|
20
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
21
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
22
|
+
"editor.controlref.radius": "Radius",
|
|
23
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
24
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
25
|
+
"editor.controlref.search_controls": "Search controls…",
|
|
26
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
27
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory…",
|
|
28
|
+
"editor.controlref.searching": "Searching…",
|
|
29
|
+
"editor.controlref.selected": "Selected",
|
|
30
|
+
"editor.controlref.settings": "Settings",
|
|
31
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
32
|
+
"editor.controlref.shadow": "Shadow",
|
|
33
|
+
"editor.controlref.show_description": "Show Description",
|
|
34
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
35
|
+
"editor.controlref.show_status": "Show Status",
|
|
36
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
37
|
+
"editor.controlref.spacing": "Spacing",
|
|
38
|
+
"editor.controlref.unmap": "Unmap",
|
|
39
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
40
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
41
|
+
"editor.controlref.variant": "Variant",
|
|
42
|
+
"editor.controlref.variant_card": "Card",
|
|
43
|
+
"editor.controlref.variant_chip": "Chip"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { en as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var en = {
|
|
2
|
+
"editor.controlref.appearance": "Appearance",
|
|
3
|
+
"editor.controlref.border": "Border",
|
|
4
|
+
"editor.controlref.cancel": "Cancel",
|
|
5
|
+
"editor.controlref.change_control": "Change Control",
|
|
6
|
+
"editor.controlref.clear": "Clear",
|
|
7
|
+
"editor.controlref.control": "Control",
|
|
8
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
9
|
+
"editor.controlref.controls": "Controls",
|
|
10
|
+
"editor.controlref.display_options": "Display options",
|
|
11
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
12
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
13
|
+
"editor.controlref.live_preview": "Live preview",
|
|
14
|
+
"editor.controlref.map_control": "Map Control",
|
|
15
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
16
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
17
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
18
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
19
|
+
"editor.controlref.no_results": "No controls found for “{query}”. You can keep this chip unmapped.",
|
|
20
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
21
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
22
|
+
"editor.controlref.radius": "Radius",
|
|
23
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
24
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
25
|
+
"editor.controlref.search_controls": "Search controls…",
|
|
26
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
27
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory…",
|
|
28
|
+
"editor.controlref.searching": "Searching…",
|
|
29
|
+
"editor.controlref.selected": "Selected",
|
|
30
|
+
"editor.controlref.settings": "Settings",
|
|
31
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
32
|
+
"editor.controlref.shadow": "Shadow",
|
|
33
|
+
"editor.controlref.show_description": "Show Description",
|
|
34
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
35
|
+
"editor.controlref.show_status": "Show Status",
|
|
36
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
37
|
+
"editor.controlref.spacing": "Spacing",
|
|
38
|
+
"editor.controlref.unmap": "Unmap",
|
|
39
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
40
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
41
|
+
"editor.controlref.variant": "Variant",
|
|
42
|
+
"editor.controlref.variant_card": "Card",
|
|
43
|
+
"editor.controlref.variant_chip": "Chip"
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { en as default };
|
package/dist/lang/en.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lang/en.json
|
|
4
|
+
var en_default = {
|
|
5
|
+
"editor.controlref.appearance": "Appearance",
|
|
6
|
+
"editor.controlref.border": "Border",
|
|
7
|
+
"editor.controlref.cancel": "Cancel",
|
|
8
|
+
"editor.controlref.change_control": "Change Control",
|
|
9
|
+
"editor.controlref.clear": "Clear",
|
|
10
|
+
"editor.controlref.control": "Control",
|
|
11
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
12
|
+
"editor.controlref.controls": "Controls",
|
|
13
|
+
"editor.controlref.display_options": "Display options",
|
|
14
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
15
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
16
|
+
"editor.controlref.live_preview": "Live preview",
|
|
17
|
+
"editor.controlref.map_control": "Map Control",
|
|
18
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
19
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
20
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
21
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
22
|
+
"editor.controlref.no_results": "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
23
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
24
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
25
|
+
"editor.controlref.radius": "Radius",
|
|
26
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
27
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
28
|
+
"editor.controlref.search_controls": "Search controls\u2026",
|
|
29
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
30
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory\u2026",
|
|
31
|
+
"editor.controlref.searching": "Searching\u2026",
|
|
32
|
+
"editor.controlref.selected": "Selected",
|
|
33
|
+
"editor.controlref.settings": "Settings",
|
|
34
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
35
|
+
"editor.controlref.shadow": "Shadow",
|
|
36
|
+
"editor.controlref.show_description": "Show Description",
|
|
37
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
38
|
+
"editor.controlref.show_status": "Show Status",
|
|
39
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
40
|
+
"editor.controlref.spacing": "Spacing",
|
|
41
|
+
"editor.controlref.unmap": "Unmap",
|
|
42
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
43
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
44
|
+
"editor.controlref.variant": "Variant",
|
|
45
|
+
"editor.controlref.variant_card": "Card",
|
|
46
|
+
"editor.controlref.variant_chip": "Chip"
|
|
47
|
+
};
|
package/dist/lang/en.mjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/loaders/index.ts
|
|
22
|
+
var loaders_exports = {};
|
|
23
|
+
__export(loaders_exports, {
|
|
24
|
+
loadBuiltinMessages: () => loadBuiltinMessages
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(loaders_exports);
|
|
27
|
+
|
|
28
|
+
// src/lang/de.json
|
|
29
|
+
var de_default = {
|
|
30
|
+
"editor.controlref.appearance": "Darstellung",
|
|
31
|
+
"editor.controlref.border": "Rahmen",
|
|
32
|
+
"editor.controlref.cancel": "Abbrechen",
|
|
33
|
+
"editor.controlref.change_control": "Kontrolle \xE4ndern",
|
|
34
|
+
"editor.controlref.clear": "Zur\xFCcksetzen",
|
|
35
|
+
"editor.controlref.control": "Kontrolle",
|
|
36
|
+
"editor.controlref.control_with_title": "Kontrolle: {title}",
|
|
37
|
+
"editor.controlref.controls": "Kontrollen",
|
|
38
|
+
"editor.controlref.display_options": "Anzeigeoptionen",
|
|
39
|
+
"editor.controlref.live_preview": "Live-Vorschau",
|
|
40
|
+
"editor.controlref.map_control": "Kontrolle zuordnen",
|
|
41
|
+
"editor.controlref.map_control_aria": "Kontrolle zuordnen",
|
|
42
|
+
"editor.controlref.no_control_selected": "Keine Kontrolle ausgew\xE4hlt",
|
|
43
|
+
"editor.controlref.no_results": "Keine Kontrollen gefunden f\xFCr \u201E{query}\u201C. Dieser Chip kann unzugeordnet bleiben.",
|
|
44
|
+
"editor.controlref.radius": "Radius",
|
|
45
|
+
"editor.controlref.results_count": "{count, plural, one {# Ergebnis} other {# Ergebnisse}}",
|
|
46
|
+
"editor.controlref.save_settings": "Einstellungen speichern",
|
|
47
|
+
"editor.controlref.search_controls": "Kontrollen durchsuchen\u2026",
|
|
48
|
+
"editor.controlref.search_hint": "Beginnen Sie zu tippen, um nach ID, Titel oder Status zu suchen.",
|
|
49
|
+
"editor.controlref.searching": "Suche l\xE4uft\u2026",
|
|
50
|
+
"editor.controlref.selected": "Ausgew\xE4hlt",
|
|
51
|
+
"editor.controlref.settings": "Einstellungen",
|
|
52
|
+
"editor.controlref.settings_dialog_description": "Darstellung und Details der Kontrollreferenz anpassen.",
|
|
53
|
+
"editor.controlref.shadow": "Schatten",
|
|
54
|
+
"editor.controlref.show_description": "Beschreibung anzeigen",
|
|
55
|
+
"editor.controlref.show_implementations": "Umsetzungen anzeigen",
|
|
56
|
+
"editor.controlref.show_status": "Status anzeigen",
|
|
57
|
+
"editor.controlref.show_status_indicator": "Status-Indikator anzeigen",
|
|
58
|
+
"editor.controlref.spacing": "Abstand",
|
|
59
|
+
"editor.controlref.unmap": "Zuordnung aufheben",
|
|
60
|
+
"editor.controlref.unmapped_control": "Nicht zugeordnete Kontrolle",
|
|
61
|
+
"editor.controlref.updated_at": "Aktualisiert am {date}",
|
|
62
|
+
"editor.controlref.variant": "Variante",
|
|
63
|
+
"editor.controlref.variant_card": "Karte",
|
|
64
|
+
"editor.controlref.variant_chip": "Chip",
|
|
65
|
+
"editor.controlref.outdated_badge": "Es ist eine neuere Revision vorhanden",
|
|
66
|
+
"editor.controlref.missing_badge": "Kontrolle existiert nicht mehr",
|
|
67
|
+
"editor.controlref.missing_callout": "Die aktuell zugeordnete Kontrolle wurde nicht gefunden. Sie wurde m\xF6glicherweise gel\xF6scht oder Sie haben keinen Zugriff mehr. Bitte w\xE4hlen Sie eine andere Kontrolle aus.",
|
|
68
|
+
"editor.controlref.outdated_callout": "Es gibt eine neuere Revision der aktuell zugeordneten Kontrolle. Aktualisieren Sie auf die neueste Version, indem Sie sie unten erneut ausw\xE4hlen.",
|
|
69
|
+
"editor.controlref.search_placeholder": "z. B. CTRL-001, Asset Inventory \u2026",
|
|
70
|
+
"editor.controlref.error_timeout": "Zeit\xFCberschreitung bei der Anfrage",
|
|
71
|
+
"editor.controlref.error_loading": "Kontrollen konnten nicht geladen werden",
|
|
72
|
+
"editor.controlref.show_status_indicator_aria": "Status-Indikator anzeigen"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// src/lang/en.json
|
|
76
|
+
var en_default = {
|
|
77
|
+
"editor.controlref.appearance": "Appearance",
|
|
78
|
+
"editor.controlref.border": "Border",
|
|
79
|
+
"editor.controlref.cancel": "Cancel",
|
|
80
|
+
"editor.controlref.change_control": "Change Control",
|
|
81
|
+
"editor.controlref.clear": "Clear",
|
|
82
|
+
"editor.controlref.control": "Control",
|
|
83
|
+
"editor.controlref.control_with_title": "Control: {title}",
|
|
84
|
+
"editor.controlref.controls": "Controls",
|
|
85
|
+
"editor.controlref.display_options": "Display options",
|
|
86
|
+
"editor.controlref.error_loading": "Failed to load controls",
|
|
87
|
+
"editor.controlref.error_timeout": "The request timed out. Please try again.",
|
|
88
|
+
"editor.controlref.live_preview": "Live preview",
|
|
89
|
+
"editor.controlref.map_control": "Map Control",
|
|
90
|
+
"editor.controlref.map_control_aria": "Map control",
|
|
91
|
+
"editor.controlref.missing_badge": "Control no longer exists",
|
|
92
|
+
"editor.controlref.missing_callout": "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
93
|
+
"editor.controlref.no_control_selected": "No control selected",
|
|
94
|
+
"editor.controlref.no_results": "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
95
|
+
"editor.controlref.outdated_badge": "A newer revision exists",
|
|
96
|
+
"editor.controlref.outdated_callout": "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
97
|
+
"editor.controlref.radius": "Radius",
|
|
98
|
+
"editor.controlref.results_count": "{count, plural, one {# result} other {# results}}",
|
|
99
|
+
"editor.controlref.save_settings": "Save Settings",
|
|
100
|
+
"editor.controlref.search_controls": "Search controls\u2026",
|
|
101
|
+
"editor.controlref.search_hint": "Start typing to search by ID, title or status.",
|
|
102
|
+
"editor.controlref.search_placeholder": "e.g. CTRL-001, Asset Inventory\u2026",
|
|
103
|
+
"editor.controlref.searching": "Searching\u2026",
|
|
104
|
+
"editor.controlref.selected": "Selected",
|
|
105
|
+
"editor.controlref.settings": "Settings",
|
|
106
|
+
"editor.controlref.settings_dialog_description": "Customize the appearance and details of the control reference.",
|
|
107
|
+
"editor.controlref.shadow": "Shadow",
|
|
108
|
+
"editor.controlref.show_description": "Show Description",
|
|
109
|
+
"editor.controlref.show_implementations": "Show Implementations",
|
|
110
|
+
"editor.controlref.show_status": "Show Status",
|
|
111
|
+
"editor.controlref.show_status_indicator": "Show status indicator",
|
|
112
|
+
"editor.controlref.spacing": "Spacing",
|
|
113
|
+
"editor.controlref.unmap": "Unmap",
|
|
114
|
+
"editor.controlref.unmapped_control": "Unmapped Control",
|
|
115
|
+
"editor.controlref.updated_at": "Updated {date}",
|
|
116
|
+
"editor.controlref.variant": "Variant",
|
|
117
|
+
"editor.controlref.variant_card": "Card",
|
|
118
|
+
"editor.controlref.variant_chip": "Chip"
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// src/loaders/index.ts
|
|
122
|
+
var CACHE = /* @__PURE__ */ new Map();
|
|
123
|
+
function norm(locale) {
|
|
124
|
+
return (locale != null ? locale : "en").toLowerCase();
|
|
125
|
+
}
|
|
126
|
+
async function loadBuiltinMessages(locale) {
|
|
127
|
+
const key = norm(locale);
|
|
128
|
+
if (CACHE.has(key)) return CACHE.get(key);
|
|
129
|
+
const prom = (async () => {
|
|
130
|
+
if (!key.startsWith("de")) return en_default;
|
|
131
|
+
return { ...en_default, ...de_default };
|
|
132
|
+
})();
|
|
133
|
+
CACHE.set(key, prom);
|
|
134
|
+
return prom;
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
loadBuiltinMessages
|
|
139
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopexa/i18n",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "i18n provider for kopexa apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react": ">=19.0.0-rc.0",
|
|
29
29
|
"react-dom": ">=19.0.0-rc.0",
|
|
30
30
|
"motion": ">=12.23.6",
|
|
31
|
-
"@kopexa/theme": "2.
|
|
31
|
+
"@kopexa/theme": "2.1.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"react-intl": "^7.1.11",
|