@progressive-development/pd-wizard 0.0.50 → 0.0.52
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/lit-localize.json +18 -0
- package/package.json +7 -3
- package/src/PdWizard.js +6 -4
- package/src/generated/locale/be.js +17 -0
- package/src/generated/locale/en.js +17 -0
- package/src/generated/locale-codes.js +25 -0
- package/xliff/be.xlf +27 -0
- package/xliff/en.xlf +24 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
|
|
3
|
+
"sourceLocale": "de",
|
|
4
|
+
"targetLocales": ["en", "be"],
|
|
5
|
+
"inputFiles": [
|
|
6
|
+
"src/**/*.js"
|
|
7
|
+
],
|
|
8
|
+
"output": {
|
|
9
|
+
"mode": "runtime",
|
|
10
|
+
"localeCodesModule": "src/generated/locale-codes.js",
|
|
11
|
+
"outputDir": "src/generated/locale"
|
|
12
|
+
|
|
13
|
+
},
|
|
14
|
+
"interchange": {
|
|
15
|
+
"format": "xliff",
|
|
16
|
+
"xliffDir": "./xliff/"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"order",
|
|
15
15
|
"steps"
|
|
16
16
|
],
|
|
17
|
-
"version": "0.0.
|
|
17
|
+
"version": "0.0.52",
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"module": "index.js",
|
|
20
20
|
"scripts": {
|
|
@@ -25,14 +25,18 @@
|
|
|
25
25
|
"test": "web-test-runner --coverage",
|
|
26
26
|
"test:watch": "web-test-runner --watch",
|
|
27
27
|
"storybook": "npm run analyze -- --exclude dist && web-dev-server -c .storybook/server.mjs",
|
|
28
|
-
"storybook:build": "npm run analyze -- --exclude dist && build-storybook"
|
|
28
|
+
"storybook:build": "npm run analyze -- --exclude dist && build-storybook",
|
|
29
|
+
"localizeExtract": "lit-localize extract",
|
|
30
|
+
"localizeBuild": "lit-localize build"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"@
|
|
33
|
+
"@lit/localize": "^0.11.2",
|
|
34
|
+
"@progressive-development/pd-forms": "0.0.59",
|
|
32
35
|
"lit": "^2.0.2"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
38
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
39
|
+
"@lit/localize-tools": "^0.6.1",
|
|
36
40
|
"@open-wc/eslint-config": "^4.3.0",
|
|
37
41
|
"@open-wc/testing": "next",
|
|
38
42
|
"@web/dev-server": "^0.1.28",
|
package/src/PdWizard.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { LitElement, html, css } from 'lit';
|
|
7
|
+
import { msg, updateWhenLocaleChanges } from '@lit/localize';
|
|
7
8
|
|
|
8
9
|
import '@progressive-development/pd-forms/pd-button.js';
|
|
9
10
|
import './PdSteps.js';
|
|
@@ -186,6 +187,7 @@ export class PdWizard extends LitElement {
|
|
|
186
187
|
|
|
187
188
|
constructor() {
|
|
188
189
|
super();
|
|
190
|
+
updateWhenLocaleChanges(this);
|
|
189
191
|
this.currentNumber = -99;
|
|
190
192
|
this.wizardSteps = [];
|
|
191
193
|
this.roundedFullContent = false;
|
|
@@ -238,7 +240,7 @@ export class PdWizard extends LitElement {
|
|
|
238
240
|
? html`
|
|
239
241
|
<pd-button
|
|
240
242
|
@click="${this._previousStep}"
|
|
241
|
-
text="
|
|
243
|
+
text="${msg('Zurück', {desc: '#pd.wizard.back#'})}"
|
|
242
244
|
style="visibility: ${this.currentNumber === 1
|
|
243
245
|
? 'hidden'
|
|
244
246
|
: 'visible'};"
|
|
@@ -247,14 +249,14 @@ export class PdWizard extends LitElement {
|
|
|
247
249
|
this.wizardSteps[this.currentNumber - 1].next !== false
|
|
248
250
|
? html`<pd-button
|
|
249
251
|
@click="${this._nextStep}"
|
|
250
|
-
text="
|
|
252
|
+
text="${msg('Weiter', {desc: '#pd.wizard.next#'})}"
|
|
251
253
|
></pd-button>`
|
|
252
254
|
: ''}
|
|
253
255
|
${this.currentNumber === this.wizardSteps.length
|
|
254
256
|
? html`<pd-button
|
|
255
257
|
primary
|
|
256
258
|
@click="${this._submit}"
|
|
257
|
-
text="
|
|
259
|
+
text="${msg('Absenden', {desc: '#pd.wizard.submit#'})}"
|
|
258
260
|
></pd-button>`
|
|
259
261
|
: ''}
|
|
260
262
|
`
|
|
@@ -280,7 +282,7 @@ export class PdWizard extends LitElement {
|
|
|
280
282
|
|
|
281
283
|
_closeWizard() {
|
|
282
284
|
// eslint-disable-next-line no-restricted-globals
|
|
283
|
-
const r = confirm('
|
|
285
|
+
const r = confirm(msg('Bisherige Eingaben gehen verloren! Auftrag dennoch abbrechen?', {desc: '#pd.wizard.abort#'}));
|
|
284
286
|
if (r === true) {
|
|
285
287
|
this.dispatchEvent(new CustomEvent('close-wizard'));
|
|
286
288
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not modify this file by hand!
|
|
3
|
+
// Re-generate this file by running lit-localize
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/* eslint-disable no-irregular-whitespace */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
|
+
|
|
11
|
+
export const templates = {
|
|
12
|
+
'sc1f0eaf2390bc10b': `Volgende`,
|
|
13
|
+
'sc7dbfe3251f9a8db': `Order`,
|
|
14
|
+
'sd2792907114a0eac': `Terug`,
|
|
15
|
+
'sf28e356f66b07af9': `Eerdere inzendingen gaan verloren! Bestelling toch annuleren?`,
|
|
16
|
+
};
|
|
17
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not modify this file by hand!
|
|
3
|
+
// Re-generate this file by running lit-localize
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/* eslint-disable no-irregular-whitespace */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
|
+
|
|
11
|
+
export const templates = {
|
|
12
|
+
'sf28e356f66b07af9': `Data will be lost, abort current order?`,
|
|
13
|
+
'sd2792907114a0eac': `Zurück`,
|
|
14
|
+
'sc1f0eaf2390bc10b': `Weiter`,
|
|
15
|
+
'sc7dbfe3251f9a8db': `Absenden`,
|
|
16
|
+
};
|
|
17
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Do not modify this file by hand!
|
|
2
|
+
// Re-generate this file by running lit-localize.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The locale code that templates in this source code are written in.
|
|
6
|
+
*/
|
|
7
|
+
export const sourceLocale = `de`;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The other locale codes that this application is localized into. Sorted
|
|
11
|
+
* lexicographically.
|
|
12
|
+
*/
|
|
13
|
+
export const targetLocales = [
|
|
14
|
+
`be`,
|
|
15
|
+
`en`,
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* All valid project locale codes. Sorted lexicographically.
|
|
20
|
+
*/
|
|
21
|
+
export const allLocales = [
|
|
22
|
+
`be`,
|
|
23
|
+
`de`,
|
|
24
|
+
`en`,
|
|
25
|
+
];
|
package/xliff/be.xlf
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
3
|
+
<file target-language="be" source-language="de" original="lit-localize-inputs" datatype="plaintext">
|
|
4
|
+
<body>
|
|
5
|
+
<trans-unit id="sf28e356f66b07af9">
|
|
6
|
+
<source>Bisherige Eingaben gehen verloren! Auftrag dennoch abbrechen?</source>
|
|
7
|
+
<target>Eerdere inzendingen gaan verloren! Bestelling toch annuleren?</target>
|
|
8
|
+
<note>#pd.wizard.abort#</note>
|
|
9
|
+
</trans-unit>
|
|
10
|
+
<trans-unit id="sd2792907114a0eac">
|
|
11
|
+
<source>Zurück</source>
|
|
12
|
+
<target>Terug</target>
|
|
13
|
+
<note>#pd.wizard.back#</note>
|
|
14
|
+
</trans-unit>
|
|
15
|
+
<trans-unit id="sc1f0eaf2390bc10b">
|
|
16
|
+
<source>Weiter</source>
|
|
17
|
+
<target>Volgende</target>
|
|
18
|
+
<note>#pd.wizard.next#</note>
|
|
19
|
+
</trans-unit>
|
|
20
|
+
<trans-unit id="sc7dbfe3251f9a8db">
|
|
21
|
+
<source>Absenden</source>
|
|
22
|
+
<target>Order</target>
|
|
23
|
+
<note>#pd.wizard.submit#</note>
|
|
24
|
+
</trans-unit>
|
|
25
|
+
</body>
|
|
26
|
+
</file>
|
|
27
|
+
</xliff>
|
package/xliff/en.xlf
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
3
|
+
<file target-language="en" source-language="de" original="lit-localize-inputs" datatype="plaintext">
|
|
4
|
+
<body>
|
|
5
|
+
<trans-unit id="sf28e356f66b07af9">
|
|
6
|
+
<source>Bisherige Eingaben gehen verloren! Auftrag dennoch abbrechen?</source>
|
|
7
|
+
<target>Data will be lost, abort current order?</target>
|
|
8
|
+
<note>#pd.wizard.abort#</note>
|
|
9
|
+
</trans-unit>
|
|
10
|
+
<trans-unit id="sd2792907114a0eac">
|
|
11
|
+
<source>Zurück</source>
|
|
12
|
+
<note>#pd.wizard.back#</note>
|
|
13
|
+
</trans-unit>
|
|
14
|
+
<trans-unit id="sc1f0eaf2390bc10b">
|
|
15
|
+
<source>Weiter</source>
|
|
16
|
+
<note>#pd.wizard.next#</note>
|
|
17
|
+
</trans-unit>
|
|
18
|
+
<trans-unit id="sc7dbfe3251f9a8db">
|
|
19
|
+
<source>Absenden</source>
|
|
20
|
+
<note>#pd.wizard.submit#</note>
|
|
21
|
+
</trans-unit>
|
|
22
|
+
</body>
|
|
23
|
+
</file>
|
|
24
|
+
</xliff>
|