@miragon/bpmn-modeler-i18n 0.2.0 → 0.2.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.
- package/dist/CustomTranslator.d.ts +70 -0
- package/dist/CustomTranslator.d.ts.map +1 -0
- package/dist/CustomTranslator.js +112 -0
- package/dist/CustomTranslator.js.map +1 -0
- package/dist/TranslateModule.d.ts +2 -85
- package/dist/TranslateModule.d.ts.map +1 -1
- package/dist/TranslateModule.js +5 -131
- package/dist/TranslateModule.js.map +1 -1
- package/dist/i18n.d.ts +10 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +10 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/languages/de/camunda-7-platform.js +3 -3
- package/dist/languages/de/camunda-7-platform.js.map +1 -1
- package/dist/languages/de/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/de/camunda-8-cloud.js +15 -0
- package/dist/languages/de/camunda-8-cloud.js.map +1 -1
- package/dist/languages/de/dmn-js.d.ts.map +1 -1
- package/dist/languages/de/dmn-js.js +9 -0
- package/dist/languages/de/dmn-js.js.map +1 -1
- package/dist/languages/de/other.d.ts.map +1 -1
- package/dist/languages/de/other.js +2 -1
- package/dist/languages/de/other.js.map +1 -1
- package/dist/languages/en/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/en/camunda-8-cloud.js +15 -0
- package/dist/languages/en/camunda-8-cloud.js.map +1 -1
- package/dist/languages/en/dmn-js.d.ts.map +1 -1
- package/dist/languages/en/dmn-js.js +9 -0
- package/dist/languages/en/dmn-js.js.map +1 -1
- package/dist/languages/en/other.d.ts.map +1 -1
- package/dist/languages/en/other.js +1 -0
- package/dist/languages/en/other.js.map +1 -1
- package/dist/languages/es/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/es/camunda-8-cloud.js +15 -0
- package/dist/languages/es/camunda-8-cloud.js.map +1 -1
- package/dist/languages/es/dmn-js.d.ts.map +1 -1
- package/dist/languages/es/dmn-js.js +9 -0
- package/dist/languages/es/dmn-js.js.map +1 -1
- package/dist/languages/es/other.d.ts.map +1 -1
- package/dist/languages/es/other.js +1 -0
- package/dist/languages/es/other.js.map +1 -1
- package/dist/languages/fr/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/fr/camunda-8-cloud.js +15 -0
- package/dist/languages/fr/camunda-8-cloud.js.map +1 -1
- package/dist/languages/fr/dmn-js.d.ts.map +1 -1
- package/dist/languages/fr/dmn-js.js +9 -0
- package/dist/languages/fr/dmn-js.js.map +1 -1
- package/dist/languages/fr/other.d.ts.map +1 -1
- package/dist/languages/fr/other.js +1 -0
- package/dist/languages/fr/other.js.map +1 -1
- package/dist/languages/index.d.ts +51 -1
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js +3 -15
- package/dist/languages/index.js.map +1 -1
- package/dist/languages/it/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/it/camunda-8-cloud.js +15 -0
- package/dist/languages/it/camunda-8-cloud.js.map +1 -1
- package/dist/languages/it/dmn-js.d.ts.map +1 -1
- package/dist/languages/it/dmn-js.js +9 -0
- package/dist/languages/it/dmn-js.js.map +1 -1
- package/dist/languages/it/other.d.ts.map +1 -1
- package/dist/languages/it/other.js +1 -0
- package/dist/languages/it/other.js.map +1 -1
- package/dist/languages/ja/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/ja/camunda-8-cloud.js +15 -0
- package/dist/languages/ja/camunda-8-cloud.js.map +1 -1
- package/dist/languages/ja/dmn-js.d.ts.map +1 -1
- package/dist/languages/ja/dmn-js.js +9 -0
- package/dist/languages/ja/dmn-js.js.map +1 -1
- package/dist/languages/ja/other.d.ts.map +1 -1
- package/dist/languages/ja/other.js +1 -0
- package/dist/languages/ja/other.js.map +1 -1
- package/dist/languages/ko/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/ko/camunda-8-cloud.js +15 -0
- package/dist/languages/ko/camunda-8-cloud.js.map +1 -1
- package/dist/languages/ko/dmn-js.d.ts.map +1 -1
- package/dist/languages/ko/dmn-js.js +9 -0
- package/dist/languages/ko/dmn-js.js.map +1 -1
- package/dist/languages/ko/other.d.ts.map +1 -1
- package/dist/languages/ko/other.js +1 -0
- package/dist/languages/ko/other.js.map +1 -1
- package/dist/languages/nl-nl/bpmn-js.js +1 -1
- package/dist/languages/nl-nl/bpmn-js.js.map +1 -1
- package/dist/languages/nl-nl/camunda-7-platform.js +41 -41
- package/dist/languages/nl-nl/camunda-7-platform.js.map +1 -1
- package/dist/languages/nl-nl/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/nl-nl/camunda-8-cloud.js +49 -34
- package/dist/languages/nl-nl/camunda-8-cloud.js.map +1 -1
- package/dist/languages/nl-nl/dmn-js.d.ts.map +1 -1
- package/dist/languages/nl-nl/dmn-js.js +11 -2
- package/dist/languages/nl-nl/dmn-js.js.map +1 -1
- package/dist/languages/nl-nl/other.d.ts.map +1 -1
- package/dist/languages/nl-nl/other.js +7 -6
- package/dist/languages/nl-nl/other.js.map +1 -1
- package/dist/languages/pt-br/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/pt-br/camunda-8-cloud.js +15 -0
- package/dist/languages/pt-br/camunda-8-cloud.js.map +1 -1
- package/dist/languages/pt-br/dmn-js.d.ts.map +1 -1
- package/dist/languages/pt-br/dmn-js.js +9 -0
- package/dist/languages/pt-br/dmn-js.js.map +1 -1
- package/dist/languages/pt-br/other.d.ts.map +1 -1
- package/dist/languages/pt-br/other.js +1 -0
- package/dist/languages/pt-br/other.js.map +1 -1
- package/dist/languages/ru/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/ru/camunda-8-cloud.js +15 -0
- package/dist/languages/ru/camunda-8-cloud.js.map +1 -1
- package/dist/languages/ru/dmn-js.d.ts.map +1 -1
- package/dist/languages/ru/dmn-js.js +9 -0
- package/dist/languages/ru/dmn-js.js.map +1 -1
- package/dist/languages/ru/other.d.ts.map +1 -1
- package/dist/languages/ru/other.js +2 -1
- package/dist/languages/ru/other.js.map +1 -1
- package/dist/languages/zh-Hans/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/zh-Hans/camunda-8-cloud.js +15 -0
- package/dist/languages/zh-Hans/camunda-8-cloud.js.map +1 -1
- package/dist/languages/zh-Hans/dmn-js.d.ts.map +1 -1
- package/dist/languages/zh-Hans/dmn-js.js +9 -0
- package/dist/languages/zh-Hans/dmn-js.js.map +1 -1
- package/dist/languages/zh-Hans/other.d.ts.map +1 -1
- package/dist/languages/zh-Hans/other.js +1 -0
- package/dist/languages/zh-Hans/other.js.map +1 -1
- package/dist/languages/zh-Hant/camunda-8-cloud.d.ts.map +1 -1
- package/dist/languages/zh-Hant/camunda-8-cloud.js +15 -0
- package/dist/languages/zh-Hant/camunda-8-cloud.js.map +1 -1
- package/dist/languages/zh-Hant/dmn-js.d.ts.map +1 -1
- package/dist/languages/zh-Hant/dmn-js.js +9 -0
- package/dist/languages/zh-Hant/dmn-js.js.map +1 -1
- package/dist/languages/zh-Hant/other.d.ts.map +1 -1
- package/dist/languages/zh-Hant/other.js +1 -0
- package/dist/languages/zh-Hant/other.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type SupportedLocale } from './languages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Translates template strings using the active language dictionary.
|
|
4
|
+
*
|
|
5
|
+
* Registered as a didi service under the `translate` key. Holds a mutable locale
|
|
6
|
+
* field that can be swapped at runtime via {@link setLanguage} — the next call to
|
|
7
|
+
* {@link translate} uses the new dictionary immediately, and any listener
|
|
8
|
+
* registered via {@link onChange} is notified so UI outside the DI container can
|
|
9
|
+
* re-render its labels.
|
|
10
|
+
*/
|
|
11
|
+
export declare class CustomTranslator {
|
|
12
|
+
static $inject: string[];
|
|
13
|
+
private locale;
|
|
14
|
+
private dictionary;
|
|
15
|
+
private readonly listeners;
|
|
16
|
+
private readonly reportedMissingKeys;
|
|
17
|
+
private readonly overrides;
|
|
18
|
+
/**
|
|
19
|
+
* Translates a template string using the active language dictionary.
|
|
20
|
+
*
|
|
21
|
+
* Falls back to the original template when no translation is found and
|
|
22
|
+
* replaces `{param}` placeholders with the values from `replacements`.
|
|
23
|
+
* Unresolved placeholders are left untouched as `{key}`.
|
|
24
|
+
*
|
|
25
|
+
* @param template The English source string used as the dictionary key.
|
|
26
|
+
* @param replacements Optional parameter map for `{key}` substitution.
|
|
27
|
+
* @returns The translated (or original) string with placeholders resolved.
|
|
28
|
+
*/
|
|
29
|
+
translate(template: string, replacements?: Record<string, string>): string;
|
|
30
|
+
private reportIfMissing;
|
|
31
|
+
/**
|
|
32
|
+
* Switches the active language dictionary and notifies subscribers.
|
|
33
|
+
*
|
|
34
|
+
* An unknown locale falls back to the default (`en`) rather than throwing.
|
|
35
|
+
* Modeler UI needs a diagram refresh to re-invoke `translate()` for already
|
|
36
|
+
* rendered elements; UI registered via {@link onChange} is notified directly.
|
|
37
|
+
*
|
|
38
|
+
* @param locale The locale code to switch to.
|
|
39
|
+
*/
|
|
40
|
+
setLanguage(locale: SupportedLocale): void;
|
|
41
|
+
/**
|
|
42
|
+
* Extends (or overrides) the bundled dictionaries with consumer-supplied
|
|
43
|
+
* entries, per locale, at runtime.
|
|
44
|
+
*
|
|
45
|
+
* A host can add keys the shared library deliberately does not ship — its own
|
|
46
|
+
* product-specific UI, engine-specific labels, internal diagnostics — or
|
|
47
|
+
* override a shared translation locally, without any of it living in this
|
|
48
|
+
* library. Consumer entries win on conflict, persist across
|
|
49
|
+
* {@link setLanguage}, and merge cumulatively across repeated calls. Active
|
|
50
|
+
* subscribers are notified so they can re-render.
|
|
51
|
+
*
|
|
52
|
+
* @param extra Locale code → additional `{ source: translation }` entries.
|
|
53
|
+
*/
|
|
54
|
+
extend(extra: Partial<Record<SupportedLocale, Record<string, string>>>): void;
|
|
55
|
+
/** Merges any consumer overrides for a locale on top of its bundled dictionary. */
|
|
56
|
+
private resolve;
|
|
57
|
+
private notify;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the currently active locale code.
|
|
60
|
+
*/
|
|
61
|
+
getLocale(): SupportedLocale;
|
|
62
|
+
/**
|
|
63
|
+
* Registers a listener invoked whenever {@link setLanguage} switches locale.
|
|
64
|
+
*
|
|
65
|
+
* @param listener Callback fired after the locale has been updated.
|
|
66
|
+
* @returns Unsubscribe function — call to stop receiving notifications.
|
|
67
|
+
*/
|
|
68
|
+
onChange(listener: () => void): () => void;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=CustomTranslator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTranslator.d.ts","sourceRoot":"","sources":["../src/CustomTranslator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;;;;;;GAQG;AACH,qBAAa,gBAAgB;IACzB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAE9B,OAAO,CAAC,MAAM,CAAyB;IAEvC,OAAO,CAAC,UAAU,CAA8C;IAEhE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IAEnD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IAKzD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgE;IAE1F;;;;;;;;;;OAUG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;IAW1E,OAAO,CAAC,eAAe;IASvB;;;;;;;;OAQG;IACH,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAM1C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAY7E,mFAAmF;IACnF,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,MAAM;IAMd;;OAEG;IACH,SAAS,IAAI,eAAe;IAI5B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;CAM7C"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { dictionaries } from './languages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Translates template strings using the active language dictionary.
|
|
4
|
+
*
|
|
5
|
+
* Registered as a didi service under the `translate` key. Holds a mutable locale
|
|
6
|
+
* field that can be swapped at runtime via {@link setLanguage} — the next call to
|
|
7
|
+
* {@link translate} uses the new dictionary immediately, and any listener
|
|
8
|
+
* registered via {@link onChange} is notified so UI outside the DI container can
|
|
9
|
+
* re-render its labels.
|
|
10
|
+
*/
|
|
11
|
+
export class CustomTranslator {
|
|
12
|
+
static $inject = [];
|
|
13
|
+
locale = 'en';
|
|
14
|
+
dictionary = dictionaries['en'];
|
|
15
|
+
listeners = new Set();
|
|
16
|
+
reportedMissingKeys = new Set();
|
|
17
|
+
// Consumer-supplied entries merged on top of the bundled dictionaries, per
|
|
18
|
+
// locale. Lets a host add its own keys (or override a shared translation)
|
|
19
|
+
// without those strings living in this library. See {@link extend}.
|
|
20
|
+
overrides = {};
|
|
21
|
+
/**
|
|
22
|
+
* Translates a template string using the active language dictionary.
|
|
23
|
+
*
|
|
24
|
+
* Falls back to the original template when no translation is found and
|
|
25
|
+
* replaces `{param}` placeholders with the values from `replacements`.
|
|
26
|
+
* Unresolved placeholders are left untouched as `{key}`.
|
|
27
|
+
*
|
|
28
|
+
* @param template The English source string used as the dictionary key.
|
|
29
|
+
* @param replacements Optional parameter map for `{key}` substitution.
|
|
30
|
+
* @returns The translated (or original) string with placeholders resolved.
|
|
31
|
+
*/
|
|
32
|
+
translate(template, replacements) {
|
|
33
|
+
this.reportIfMissing(template);
|
|
34
|
+
const translation = this.dictionary[template] || template;
|
|
35
|
+
return translation.replace(/{([^}]+)}/g, (_, key) => (replacements || {})[key] ?? `{${key}}`);
|
|
36
|
+
}
|
|
37
|
+
reportIfMissing(template) {
|
|
38
|
+
const isMissing = this.locale !== 'en' && !this.dictionary[template];
|
|
39
|
+
if (!isMissing || this.reportedMissingKeys.has(template)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.reportedMissingKeys.add(template);
|
|
43
|
+
console.log(`Missing translation [${this.locale}]: ${template}`);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Switches the active language dictionary and notifies subscribers.
|
|
47
|
+
*
|
|
48
|
+
* An unknown locale falls back to the default (`en`) rather than throwing.
|
|
49
|
+
* Modeler UI needs a diagram refresh to re-invoke `translate()` for already
|
|
50
|
+
* rendered elements; UI registered via {@link onChange} is notified directly.
|
|
51
|
+
*
|
|
52
|
+
* @param locale The locale code to switch to.
|
|
53
|
+
*/
|
|
54
|
+
setLanguage(locale) {
|
|
55
|
+
this.locale = dictionaries[locale] ? locale : 'en';
|
|
56
|
+
this.dictionary = this.resolve(this.locale);
|
|
57
|
+
this.notify();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Extends (or overrides) the bundled dictionaries with consumer-supplied
|
|
61
|
+
* entries, per locale, at runtime.
|
|
62
|
+
*
|
|
63
|
+
* A host can add keys the shared library deliberately does not ship — its own
|
|
64
|
+
* product-specific UI, engine-specific labels, internal diagnostics — or
|
|
65
|
+
* override a shared translation locally, without any of it living in this
|
|
66
|
+
* library. Consumer entries win on conflict, persist across
|
|
67
|
+
* {@link setLanguage}, and merge cumulatively across repeated calls. Active
|
|
68
|
+
* subscribers are notified so they can re-render.
|
|
69
|
+
*
|
|
70
|
+
* @param extra Locale code → additional `{ source: translation }` entries.
|
|
71
|
+
*/
|
|
72
|
+
extend(extra) {
|
|
73
|
+
for (const [locale, entries] of Object.entries(extra)) {
|
|
74
|
+
if (!entries) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const code = locale;
|
|
78
|
+
this.overrides[code] = { ...(this.overrides[code] ?? {}), ...entries };
|
|
79
|
+
}
|
|
80
|
+
this.dictionary = this.resolve(this.locale);
|
|
81
|
+
this.notify();
|
|
82
|
+
}
|
|
83
|
+
/** Merges any consumer overrides for a locale on top of its bundled dictionary. */
|
|
84
|
+
resolve(locale) {
|
|
85
|
+
const extra = this.overrides[locale];
|
|
86
|
+
return extra ? { ...dictionaries[locale], ...extra } : dictionaries[locale];
|
|
87
|
+
}
|
|
88
|
+
notify() {
|
|
89
|
+
for (const listener of this.listeners) {
|
|
90
|
+
listener();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Returns the currently active locale code.
|
|
95
|
+
*/
|
|
96
|
+
getLocale() {
|
|
97
|
+
return this.locale;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Registers a listener invoked whenever {@link setLanguage} switches locale.
|
|
101
|
+
*
|
|
102
|
+
* @param listener Callback fired after the locale has been updated.
|
|
103
|
+
* @returns Unsubscribe function — call to stop receiving notifications.
|
|
104
|
+
*/
|
|
105
|
+
onChange(listener) {
|
|
106
|
+
this.listeners.add(listener);
|
|
107
|
+
return () => {
|
|
108
|
+
this.listeners.delete(listener);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=CustomTranslator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomTranslator.js","sourceRoot":"","sources":["../src/CustomTranslator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,MAAM,sBAAsB,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,OAAO,gBAAgB;IACzB,MAAM,CAAC,OAAO,GAAa,EAAE,CAAC;IAEtB,MAAM,GAAoB,IAAI,CAAC;IAE/B,UAAU,GAA2B,YAAY,CAAC,IAAI,CAAC,CAAC;IAE/C,S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 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Custom translator for bpmn-js / dmn-js that supports runtime language switching.
|
|
3
|
-
*
|
|
4
|
-
* Exposes a shared singleton {@link i18n} and a didi module ({@link TranslateModule})
|
|
5
|
-
* that registers the same instance under the `translate` and `customTranslator`
|
|
6
|
-
* services. UI that lives outside the modeler's DI container can import {@link i18n}
|
|
7
|
-
* directly and subscribe to {@link CustomTranslator.onChange} to refresh labels when
|
|
8
|
-
* the active language changes.
|
|
9
|
-
*/
|
|
10
|
-
import { type SupportedLocale } from './languages/index.js';
|
|
11
|
-
/**
|
|
12
|
-
* Translates template strings using the active language dictionary.
|
|
13
|
-
*
|
|
14
|
-
* Registered as a didi service under the `translate` key. Holds a mutable locale
|
|
15
|
-
* field that can be swapped at runtime via {@link setLanguage} — the next call to
|
|
16
|
-
* {@link translate} uses the new dictionary immediately, and any listener
|
|
17
|
-
* registered via {@link onChange} is notified so UI outside the DI container can
|
|
18
|
-
* re-render its labels.
|
|
19
|
-
*/
|
|
20
|
-
export declare class CustomTranslator {
|
|
21
|
-
static $inject: string[];
|
|
22
|
-
private locale;
|
|
23
|
-
private dictionary;
|
|
24
|
-
private readonly listeners;
|
|
25
|
-
private readonly overrides;
|
|
26
|
-
/**
|
|
27
|
-
* Translates a template string using the active language dictionary.
|
|
28
|
-
*
|
|
29
|
-
* Falls back to the original template when no translation is found and
|
|
30
|
-
* replaces `{param}` placeholders with the values from `replacements`.
|
|
31
|
-
* Unresolved placeholders are left untouched as `{key}`.
|
|
32
|
-
*
|
|
33
|
-
* @param template The English source string used as the dictionary key.
|
|
34
|
-
* @param replacements Optional parameter map for `{key}` substitution.
|
|
35
|
-
* @returns The translated (or original) string with placeholders resolved.
|
|
36
|
-
*/
|
|
37
|
-
translate(template: string, replacements?: Record<string, string>): string;
|
|
38
|
-
/**
|
|
39
|
-
* Switches the active language dictionary and notifies subscribers.
|
|
40
|
-
*
|
|
41
|
-
* An unknown locale falls back to the default (`en`) rather than throwing.
|
|
42
|
-
* Modeler UI needs a diagram refresh to re-invoke `translate()` for already
|
|
43
|
-
* rendered elements; UI registered via {@link onChange} is notified directly.
|
|
44
|
-
*
|
|
45
|
-
* @param locale The locale code to switch to.
|
|
46
|
-
*/
|
|
47
|
-
setLanguage(locale: SupportedLocale): void;
|
|
48
|
-
/**
|
|
49
|
-
* Extends (or overrides) the bundled dictionaries with consumer-supplied
|
|
50
|
-
* entries, per locale, at runtime.
|
|
51
|
-
*
|
|
52
|
-
* A host can add keys the shared library deliberately does not ship — its own
|
|
53
|
-
* product-specific UI, engine-specific labels, internal diagnostics — or
|
|
54
|
-
* override a shared translation locally, without any of it living in this
|
|
55
|
-
* library. Consumer entries win on conflict, persist across
|
|
56
|
-
* {@link setLanguage}, and merge cumulatively across repeated calls. Active
|
|
57
|
-
* subscribers are notified so they can re-render.
|
|
58
|
-
*
|
|
59
|
-
* @param extra Locale code → additional `{ source: translation }` entries.
|
|
60
|
-
*/
|
|
61
|
-
extend(extra: Partial<Record<SupportedLocale, Record<string, string>>>): void;
|
|
62
|
-
/** Merges any consumer overrides for a locale on top of its bundled dictionary. */
|
|
63
|
-
private resolve;
|
|
64
|
-
private notify;
|
|
65
|
-
/**
|
|
66
|
-
* Returns the currently active locale code.
|
|
67
|
-
*/
|
|
68
|
-
getLocale(): SupportedLocale;
|
|
69
|
-
/**
|
|
70
|
-
* Registers a listener invoked whenever {@link setLanguage} switches locale.
|
|
71
|
-
*
|
|
72
|
-
* @param listener Callback fired after the locale has been updated.
|
|
73
|
-
* @returns Unsubscribe function — call to stop receiving notifications.
|
|
74
|
-
*/
|
|
75
|
-
onChange(listener: () => void): () => void;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Shared singleton translator used across a modeler instance.
|
|
79
|
-
*
|
|
80
|
-
* The {@link TranslateModule} below registers this same instance as the modeler's
|
|
81
|
-
* `customTranslator` / `translate` services, so every caller reads from one
|
|
82
|
-
* dictionary and reacts to one {@link CustomTranslator.setLanguage} call.
|
|
83
|
-
*/
|
|
84
|
-
export declare const i18n: CustomTranslator;
|
|
1
|
+
import type { CustomTranslator } from './CustomTranslator.js';
|
|
85
2
|
/**
|
|
86
3
|
* didi module that binds the shared {@link i18n} instance as the modeler's
|
|
87
4
|
* `customTranslator` service and exposes its `translate` method as the callable
|
|
@@ -90,6 +7,6 @@ export declare const i18n: CustomTranslator;
|
|
|
90
7
|
export declare const TranslateModule: {
|
|
91
8
|
__init__: string[];
|
|
92
9
|
customTranslator: (string | CustomTranslator)[];
|
|
93
|
-
translate: (string | ((customTranslator: CustomTranslator) => (template: string, replacements?: Record<string, string>) => string))[];
|
|
10
|
+
translate: (string | (string | ((customTranslator: CustomTranslator) => (template: string, replacements?: Record<string, string>) => string))[])[];
|
|
94
11
|
};
|
|
95
12
|
//# sourceMappingURL=TranslateModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslateModule.d.ts","sourceRoot":"","sources":["../src/TranslateModule.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TranslateModule.d.ts","sourceRoot":"","sources":["../src/TranslateModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;uDAOG,gBAAgB,MAC9B,UAAU,MAAM,EAAE,eAAe,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,MAAM;CAIhF,CAAC"}
|
package/dist/TranslateModule.js
CHANGED
|
@@ -1,127 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Custom translator for bpmn-js / dmn-js that supports runtime language switching.
|
|
3
|
-
*
|
|
4
|
-
* Exposes a shared singleton {@link i18n} and a didi module ({@link TranslateModule})
|
|
5
|
-
* that registers the same instance under the `translate` and `customTranslator`
|
|
6
|
-
* services. UI that lives outside the modeler's DI container can import {@link i18n}
|
|
7
|
-
* directly and subscribe to {@link CustomTranslator.onChange} to refresh labels when
|
|
8
|
-
* the active language changes.
|
|
9
|
-
*/
|
|
10
|
-
import { dictionaries } from './languages/index.js';
|
|
11
|
-
// Template keys already reported as missing, to avoid console spam.
|
|
12
|
-
const missingKeys = new Set();
|
|
13
|
-
/**
|
|
14
|
-
* Translates template strings using the active language dictionary.
|
|
15
|
-
*
|
|
16
|
-
* Registered as a didi service under the `translate` key. Holds a mutable locale
|
|
17
|
-
* field that can be swapped at runtime via {@link setLanguage} — the next call to
|
|
18
|
-
* {@link translate} uses the new dictionary immediately, and any listener
|
|
19
|
-
* registered via {@link onChange} is notified so UI outside the DI container can
|
|
20
|
-
* re-render its labels.
|
|
21
|
-
*/
|
|
22
|
-
export class CustomTranslator {
|
|
23
|
-
static $inject = [];
|
|
24
|
-
locale = 'en';
|
|
25
|
-
dictionary = dictionaries['en'];
|
|
26
|
-
listeners = new Set();
|
|
27
|
-
// Consumer-supplied entries merged on top of the bundled dictionaries, per
|
|
28
|
-
// locale. Lets a host add its own keys (or override a shared translation)
|
|
29
|
-
// without those strings living in this library. See {@link extend}.
|
|
30
|
-
overrides = {};
|
|
31
|
-
/**
|
|
32
|
-
* Translates a template string using the active language dictionary.
|
|
33
|
-
*
|
|
34
|
-
* Falls back to the original template when no translation is found and
|
|
35
|
-
* replaces `{param}` placeholders with the values from `replacements`.
|
|
36
|
-
* Unresolved placeholders are left untouched as `{key}`.
|
|
37
|
-
*
|
|
38
|
-
* @param template The English source string used as the dictionary key.
|
|
39
|
-
* @param replacements Optional parameter map for `{key}` substitution.
|
|
40
|
-
* @returns The translated (or original) string with placeholders resolved.
|
|
41
|
-
*/
|
|
42
|
-
translate(template, replacements) {
|
|
43
|
-
if (this.locale !== 'en' && !this.dictionary[template] && !missingKeys.has(template)) {
|
|
44
|
-
missingKeys.add(template);
|
|
45
|
-
console.log(`Missing translation [${this.locale}]: ${template}`);
|
|
46
|
-
}
|
|
47
|
-
const translation = this.dictionary[template] || template;
|
|
48
|
-
return translation.replace(/{([^}]+)}/g, (_, key) => (replacements || {})[key] ?? `{${key}}`);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Switches the active language dictionary and notifies subscribers.
|
|
52
|
-
*
|
|
53
|
-
* An unknown locale falls back to the default (`en`) rather than throwing.
|
|
54
|
-
* Modeler UI needs a diagram refresh to re-invoke `translate()` for already
|
|
55
|
-
* rendered elements; UI registered via {@link onChange} is notified directly.
|
|
56
|
-
*
|
|
57
|
-
* @param locale The locale code to switch to.
|
|
58
|
-
*/
|
|
59
|
-
setLanguage(locale) {
|
|
60
|
-
this.locale = dictionaries[locale] ? locale : 'en';
|
|
61
|
-
this.dictionary = this.resolve(this.locale);
|
|
62
|
-
this.notify();
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Extends (or overrides) the bundled dictionaries with consumer-supplied
|
|
66
|
-
* entries, per locale, at runtime.
|
|
67
|
-
*
|
|
68
|
-
* A host can add keys the shared library deliberately does not ship — its own
|
|
69
|
-
* product-specific UI, engine-specific labels, internal diagnostics — or
|
|
70
|
-
* override a shared translation locally, without any of it living in this
|
|
71
|
-
* library. Consumer entries win on conflict, persist across
|
|
72
|
-
* {@link setLanguage}, and merge cumulatively across repeated calls. Active
|
|
73
|
-
* subscribers are notified so they can re-render.
|
|
74
|
-
*
|
|
75
|
-
* @param extra Locale code → additional `{ source: translation }` entries.
|
|
76
|
-
*/
|
|
77
|
-
extend(extra) {
|
|
78
|
-
for (const [locale, entries] of Object.entries(extra)) {
|
|
79
|
-
if (!entries) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
const code = locale;
|
|
83
|
-
this.overrides[code] = { ...(this.overrides[code] ?? {}), ...entries };
|
|
84
|
-
}
|
|
85
|
-
this.dictionary = this.resolve(this.locale);
|
|
86
|
-
this.notify();
|
|
87
|
-
}
|
|
88
|
-
/** Merges any consumer overrides for a locale on top of its bundled dictionary. */
|
|
89
|
-
resolve(locale) {
|
|
90
|
-
const extra = this.overrides[locale];
|
|
91
|
-
return extra ? { ...dictionaries[locale], ...extra } : dictionaries[locale];
|
|
92
|
-
}
|
|
93
|
-
notify() {
|
|
94
|
-
for (const listener of this.listeners) {
|
|
95
|
-
listener();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Returns the currently active locale code.
|
|
100
|
-
*/
|
|
101
|
-
getLocale() {
|
|
102
|
-
return this.locale;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Registers a listener invoked whenever {@link setLanguage} switches locale.
|
|
106
|
-
*
|
|
107
|
-
* @param listener Callback fired after the locale has been updated.
|
|
108
|
-
* @returns Unsubscribe function — call to stop receiving notifications.
|
|
109
|
-
*/
|
|
110
|
-
onChange(listener) {
|
|
111
|
-
this.listeners.add(listener);
|
|
112
|
-
return () => {
|
|
113
|
-
this.listeners.delete(listener);
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Shared singleton translator used across a modeler instance.
|
|
119
|
-
*
|
|
120
|
-
* The {@link TranslateModule} below registers this same instance as the modeler's
|
|
121
|
-
* `customTranslator` / `translate` services, so every caller reads from one
|
|
122
|
-
* dictionary and reacts to one {@link CustomTranslator.setLanguage} call.
|
|
123
|
-
*/
|
|
124
|
-
export const i18n = new CustomTranslator();
|
|
1
|
+
import { i18n } from './i18n.js';
|
|
125
2
|
/**
|
|
126
3
|
* didi module that binds the shared {@link i18n} instance as the modeler's
|
|
127
4
|
* `customTranslator` service and exposes its `translate` method as the callable
|
|
@@ -132,13 +9,10 @@ export const TranslateModule = {
|
|
|
132
9
|
customTranslator: ['value', i18n],
|
|
133
10
|
translate: [
|
|
134
11
|
'factory',
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
},
|
|
12
|
+
[
|
|
13
|
+
'customTranslator',
|
|
14
|
+
(customTranslator) => (template, replacements) => customTranslator.translate(template, replacements),
|
|
15
|
+
],
|
|
140
16
|
],
|
|
141
17
|
};
|
|
142
|
-
// Make the translate factory injectable.
|
|
143
|
-
TranslateModule.translate[1].$inject = ['customTranslator'];
|
|
144
18
|
//# sourceMappingURL=TranslateModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranslateModule.js","sourceRoot":"","sources":["../src/TranslateModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TranslateModule.js","sourceRoot":"","sources":["../src/TranslateModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,QAAQ,EAAE,CAAC,kBAAkB,CAAC;IAC9B,gBAAgB,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC;IACjC,SAAS,EAAE;QACP,SAAS;QACT;YACI,kBAAkB;YAClB,CAAC,gBAAkC,EAAE,EAAE,CACnC,CAAC,QAAgB,EAAE,YAAqC,EAAU,EAAE,CAChE,gBAAgB,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;SAC7D;KACJ;CACJ,CAAC"}
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomTranslator } from './CustomTranslator.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared singleton translator used across a modeler instance.
|
|
4
|
+
*
|
|
5
|
+
* {@link TranslateModule} registers this same instance as the modeler's
|
|
6
|
+
* `customTranslator` / `translate` services, so every caller reads from one
|
|
7
|
+
* dictionary and reacts to one {@link CustomTranslator.setLanguage} call.
|
|
8
|
+
*/
|
|
9
|
+
export declare const i18n: CustomTranslator;
|
|
10
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,kBAAyB,CAAC"}
|
package/dist/i18n.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomTranslator } from './CustomTranslator.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shared singleton translator used across a modeler instance.
|
|
4
|
+
*
|
|
5
|
+
* {@link TranslateModule} registers this same instance as the modeler's
|
|
6
|
+
* `customTranslator` / `translate` services, so every caller reads from one
|
|
7
|
+
* dictionary and reacts to one {@link CustomTranslator.setLanguage} call.
|
|
8
|
+
*/
|
|
9
|
+
export const i18n = new CustomTranslator();
|
|
10
|
+
//# sourceMappingURL=i18n.js.map
|
package/dist/i18n.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* plus a didi translate module and supported-language metadata. Consumed by the
|
|
7
7
|
* Camunda Modeler i18n plugin and the Miragon BPMN Modeler.
|
|
8
8
|
*/
|
|
9
|
-
export {
|
|
9
|
+
export { CustomTranslator } from './CustomTranslator.js';
|
|
10
|
+
export { i18n } from './i18n.js';
|
|
11
|
+
export { TranslateModule } from './TranslateModule.js';
|
|
10
12
|
export { supportedLanguages, dictionaries } from './languages/index.js';
|
|
11
13
|
export type { SupportedLocale, LanguageEntry } from './languages/index.js';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* plus a didi translate module and supported-language metadata. Consumed by the
|
|
7
7
|
* Camunda Modeler i18n plugin and the Miragon BPMN Modeler.
|
|
8
8
|
*/
|
|
9
|
-
export {
|
|
9
|
+
export { CustomTranslator } from './CustomTranslator.js';
|
|
10
|
+
export { i18n } from './i18n.js';
|
|
11
|
+
export { TranslateModule } from './TranslateModule.js';
|
|
10
12
|
export { supportedLanguages, dictionaries } from './languages/index.js';
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -127,15 +127,15 @@ const translations = {
|
|
|
127
127
|
'Example data must be a JSON object literal.': 'Beispieldaten müssen ein JSON-Objektliteral sein.',
|
|
128
128
|
'Exception Flow': 'Ausnahmefluss',
|
|
129
129
|
'Expanded Subprocess': 'Aufgeklappter Teilprozess',
|
|
130
|
-
'Listener is notified for all kinds of events': '
|
|
130
|
+
'Listener is notified for all kinds of events': 'Listener wird bei allen Arten von Ereignissen benachrichtigt',
|
|
131
131
|
'Must provide a standard event': 'Muss ein Standardereignis bereitstellen',
|
|
132
132
|
'receive messages.': 'Nachrichten empfangen.',
|
|
133
133
|
'Repetition Rule': 'Wiederholungsregel',
|
|
134
134
|
'Required Rule': 'Erforderliche Regel',
|
|
135
135
|
'Show Standard Event': 'Standardereignis anzeigen',
|
|
136
136
|
'Standard Event': 'Standardereignis',
|
|
137
|
-
'Variable Listener': 'Variablen-
|
|
138
|
-
'Variable Listeners': 'Variablen-
|
|
137
|
+
'Variable Listener': 'Variablen-Listener',
|
|
138
|
+
'Variable Listeners': 'Variablen-Listener',
|
|
139
139
|
'Create new BPMN Diagram (Camunda Platform)': 'Neues BPMN-Diagramm erstellen (Camunda Platform)',
|
|
140
140
|
Copy: 'Kopieren',
|
|
141
141
|
Paste: 'Einfügen',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camunda-7-platform.js","sourceRoot":"","sources":["../../../src/languages/de/camunda-7-platform.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,YAAY,GAA2B;IACzC,cAAc,EAAE,mBAAmB;IACnC,gBAAgB,EAAE,uBAAuB;IACzC,WAAW,EAAE,oBAAoB;IACjC,cAAc,EAAE,wBAAwB;IACxC,WAAW,EAAE,iBAAiB;IAC9B,mBAAmB,EAAE,mBAAmB;IACxC,iCAAiC,EAAE,mCAAmC;IACtE,gBAAgB,EAAE,sBAAsB;IACxC,gBAAgB,EAAE,eAAe;IACjC,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,2BAA2B;IAC5C,2BAA2B,EAAE,6CAA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a,EAAE,oBAAoB;IACnC,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,iBAAiB;IAC/B,oBAAoB,EAAE,oBAAoB;IAC1C,cAAc,EAAE,kBAAkB;IAClC,yBAAyB,EAAE,0BAA0B;IACrD,0BAA0B,EAAE,0BAA0B;IACtD,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,UAAU;IACvB,gBAAgB,EAAE,wBAAwB;IAC1C,uBAAuB,EAAE,uBAAuB;IAChD,sBAAsB,EAAE,0BAA0B;IAClD,oBAAoB,EAAE,uBAAuB;IAC7C,mBAAmB,EAAE,oBAAoB;IACzC,iBAAiB,EAAE,cAAc;IACjC,aAAa,EAAE,aAAa;IAC5B,8BAA8B,EAAE,yCAAyC;IACzE,yBAAyB,EAAE,gCAAgC;IAC3D,aAAa,EAAE,gBAAgB;IAC/B,wCAAwC,EACpC,sDAAsD;IAC1D,+BAA+B,EAAE,4CAA4C;IAC7E,6CAA6C,EACzC,mDAAmD;IACvD,gBAAgB,EAAE,eAAe;IACjC,qBAAqB,EAAE,2BAA2B;IAClD,8CAA8C,EAC1C,
|
|
1
|
+
{"version":3,"file":"camunda-7-platform.js","sourceRoot":"","sources":["../../../src/languages/de/camunda-7-platform.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,YAAY,GAA2B;IACzC,cAAc,EAAE,mBAAmB;IACnC,gBAAgB,EAAE,uBAAuB;IACzC,WAAW,EAAE,oBAAoB;IACjC,cAAc,EAAE,wBAAwB;IACxC,WAAW,EAAE,iBAAiB;IAC9B,mBAAmB,EAAE,mBAAmB;IACxC,iCAAiC,EAAE,mCAAmC;IACtE,gBAAgB,EAAE,sBAAsB;IACxC,gBAAgB,EAAE,eAAe;IACjC,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,2BAA2B;IAC5C,2BAA2B,EAAE,6CAA6C;IAC1E,cAAc,EAAE,mBAAmB;IACnC,iCAAiC,EAAE,qCAAqC;IACxE,YAAY,EAAE,aA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AoB,EAAE,oBAAoB;IAC1C,cAAc,EAAE,kBAAkB;IAClC,yBAAyB,EAAE,0BAA0B;IACrD,0BAA0B,EAAE,0BAA0B;IACtD,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,UAAU;IACvB,gBAAgB,EAAE,wBAAwB;IAC1C,uBAAuB,EAAE,uBAAuB;IAChD,sBAAsB,EAAE,0BAA0B;IAClD,oBAAoB,EAAE,uBAAuB;IAC7C,mBAAmB,EAAE,oBAAoB;IACzC,iBAAiB,EAAE,cAAc;IACjC,aAAa,EAAE,aAAa;IAC5B,8BAA8B,EAAE,yCAAyC;IACzE,yBAAyB,EAAE,gCAAgC;IAC3D,aAAa,EAAE,gBAAgB;IAC/B,wCAAwC,EACpC,sDAAsD;IAC1D,+BAA+B,EAAE,4CAA4C;IAC7E,6CAA6C,EACzC,mDAAmD;IACvD,gBAAgB,EAAE,eAAe;IACjC,qBAAqB,EAAE,2BAA2B;IAClD,8CAA8C,EAC1C,8DAA8D;IAClE,+BAA+B,EAAE,yCAAyC;IAC1E,mBAAmB,EAAE,wBAAwB;IAC7C,iBAAiB,EAAE,oBAAoB;IACvC,eAAe,EAAE,qBAAqB;IACtC,qBAAqB,EAAE,2BAA2B;IAClD,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB,EAAE,oBAAoB;IACzC,oBAAoB,EAAE,oBAAoB;IAC1C,4CAA4C,EACxC,kDAAkD;IACtD,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IACjB,oBAAoB,EAAE,yBAAyB;CAClD,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camunda-8-cloud.d.ts","sourceRoot":"","sources":["../../../src/languages/de/camunda-8-cloud.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"camunda-8-cloud.d.ts","sourceRoot":"","sources":["../../../src/languages/de/camunda-8-cloud.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2fxC,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
* This file contains the translations used by the bpmn-js-properties-panel component.
|
|
3
3
|
*/
|
|
4
4
|
const translations = {
|
|
5
|
+
'Choose {configuration}': '{configuration} auswählen',
|
|
6
|
+
'Configuration not found': 'Konfiguration nicht gefunden',
|
|
7
|
+
Configurations: 'Konfigurationen',
|
|
8
|
+
'Could not load configurations': 'Konfigurationen konnten nicht geladen werden',
|
|
9
|
+
'Incompatible configuration type': 'Inkompatibler Konfigurationstyp',
|
|
10
|
+
'Loading...': 'Wird geladen...',
|
|
11
|
+
'More actions': 'Weitere Aktionen',
|
|
12
|
+
'No cluster connected': 'Kein Cluster verbunden',
|
|
13
|
+
'No compatible configurations are available in the connected cluster': 'Im verbundenen Cluster sind keine kompatiblen Konfigurationen verfügbar',
|
|
14
|
+
'Not found on cluster': 'Nicht im Cluster gefunden',
|
|
15
|
+
'Refreshing configurations...': 'Konfigurationen werden aktualisiert...',
|
|
16
|
+
Unset: 'Nicht gesetzt',
|
|
17
|
+
Upgrade: 'Upgrade durchführen',
|
|
18
|
+
'Version {version} · Requires version {minimumVersion}+': 'Version {version} · Erfordert Version {minimumVersion}+',
|
|
5
19
|
' or ': ' oder ',
|
|
6
20
|
') to identify the error. ': '), um den Fehler zu identifizieren. ',
|
|
7
21
|
') to match a specific error, or leave empty to catch any error. ': '), um einen bestimmten Fehler abzufangen, oder lassen Sie das Feld leer, um jeden Fehler abzufangen. ',
|
|
@@ -312,6 +326,7 @@ const translations = {
|
|
|
312
326
|
'Script type': 'Skripttyp',
|
|
313
327
|
Script: 'Skript',
|
|
314
328
|
'Section contains an error': 'Abschnitt enthält einen Fehler',
|
|
329
|
+
'Section contains a warning': 'Abschnitt enthält eine Warnung',
|
|
315
330
|
'Section contains edits': 'Abschnitt enthält Änderungen',
|
|
316
331
|
'Select an element to edit its properties.': 'Wählen Sie ein Element aus, um dessen Eigenschaften zu bearbeiten.',
|
|
317
332
|
'Send task documentation': 'Dokumentation zur Sendaufgabe',
|