@progressive-development/pd-page 0.1.54 → 0.1.56
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 +6 -2
- package/src/PdContactUs.js +11 -10
- package/src/PdMenu.js +3 -2
- package/src/generated/locale/be.js +20 -0
- package/src/generated/locale/en.js +20 -0
- package/src/generated/locale-codes.js +25 -0
- package/xliff/be.xlf +42 -0
- package/xliff/en.xlf +35 -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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Progressive development page helper, teaser, menu, footer.",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.56",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
"test": "web-test-runner --coverage",
|
|
15
15
|
"test:watch": "web-test-runner --watch",
|
|
16
16
|
"storybook": "npm run analyze -- --exclude dist && web-dev-server -c .storybook/server.mjs",
|
|
17
|
-
"storybook:build": "npm run analyze -- --exclude dist && build-storybook"
|
|
17
|
+
"storybook:build": "npm run analyze -- --exclude dist && build-storybook",
|
|
18
|
+
"localizeExtract": "lit-localize extract",
|
|
19
|
+
"localizeBuild": "lit-localize build"
|
|
18
20
|
},
|
|
19
21
|
"dependencies": {
|
|
22
|
+
"@lit/localize": "^0.11.4",
|
|
20
23
|
"@progressive-development/pd-contact": "^0.1.28",
|
|
21
24
|
"@progressive-development/pd-dialog": "^0.1.31",
|
|
22
25
|
"@progressive-development/pd-forms": "^0.1.33",
|
|
@@ -27,6 +30,7 @@
|
|
|
27
30
|
},
|
|
28
31
|
"devDependencies": {
|
|
29
32
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
33
|
+
"@lit/localize-tools": "^0.6.9",
|
|
30
34
|
"@open-wc/eslint-config": "^4.3.0",
|
|
31
35
|
"@open-wc/testing": "next",
|
|
32
36
|
"@web/dev-server": "^0.1.30",
|
package/src/PdContactUs.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 '@progressive-development/pd-forms/pd-form-container.js';
|
|
@@ -104,20 +105,20 @@ export class PdContactUs extends LitElement {
|
|
|
104
105
|
|
|
105
106
|
constructor() {
|
|
106
107
|
super();
|
|
108
|
+
updateWhenLocaleChanges(this);
|
|
107
109
|
this.contact = {};
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
render() {
|
|
111
113
|
return html`
|
|
112
114
|
<div class="content-block">
|
|
113
|
-
<h2
|
|
114
|
-
|
|
115
|
+
<h2>${msg('Kontakt',{desc: '#contactus.title#',})}</h2>
|
|
115
116
|
<div class="contact-block">
|
|
116
117
|
<div class="left-content">
|
|
117
118
|
<pd-contact
|
|
118
119
|
class="company-contact"
|
|
119
120
|
.contact="${this.contact}"
|
|
120
|
-
addressTitle="Adresse"
|
|
121
|
+
addressTitle="${msg('Adresse',{desc: '#contactus.address.title#',})}"
|
|
121
122
|
summary
|
|
122
123
|
></pd-contact>
|
|
123
124
|
</div>
|
|
@@ -128,7 +129,7 @@ export class PdContactUs extends LitElement {
|
|
|
128
129
|
<pd-input
|
|
129
130
|
id="nameInputId"
|
|
130
131
|
class="quarter3"
|
|
131
|
-
placeHolder="Name"
|
|
132
|
+
placeHolder="${msg('Name',{desc: '#contactus.address.name#',})}"
|
|
132
133
|
valueName="name"
|
|
133
134
|
autoCompleteName="full-name"
|
|
134
135
|
required
|
|
@@ -139,7 +140,7 @@ export class PdContactUs extends LitElement {
|
|
|
139
140
|
<pd-input
|
|
140
141
|
id="mailInputId"
|
|
141
142
|
class="quarter3"
|
|
142
|
-
placeHolder="Email"
|
|
143
|
+
placeHolder="${msg('Email',{desc: '#contactus.address.email#',})}"
|
|
143
144
|
valueName="mail"
|
|
144
145
|
autoCompleteName="email"
|
|
145
146
|
name="email"
|
|
@@ -152,7 +153,7 @@ export class PdContactUs extends LitElement {
|
|
|
152
153
|
<pd-input
|
|
153
154
|
id="phoneInputId"
|
|
154
155
|
class="quarter3"
|
|
155
|
-
placeHolder="Telefon"
|
|
156
|
+
placeHolder="${msg('Telefon',{desc: '#contactus.address.phone#',})}"
|
|
156
157
|
valueName="phone"
|
|
157
158
|
field-type="phone"
|
|
158
159
|
autoCompleteName="tel"
|
|
@@ -164,7 +165,7 @@ export class PdContactUs extends LitElement {
|
|
|
164
165
|
<pd-input-area
|
|
165
166
|
id="msgInputId"
|
|
166
167
|
class="quarter3-area"
|
|
167
|
-
placeHolder="Nachricht"
|
|
168
|
+
placeHolder="${msg('Nachricht',{desc: '#contactus.address.message#',})}"
|
|
168
169
|
rows="15"
|
|
169
170
|
required
|
|
170
171
|
valueName="msg"
|
|
@@ -172,7 +173,7 @@ export class PdContactUs extends LitElement {
|
|
|
172
173
|
</pd-form-row>
|
|
173
174
|
|
|
174
175
|
<pd-form-row>
|
|
175
|
-
<pd-button class="quarter3" text="Absenden" @click="${this._sendMail}" primary></pd-button>
|
|
176
|
+
<pd-button class="quarter3" text="${msg('Absenden',{desc: '#contactus.address.send#',})}" @click="${this._sendMail}" primary></pd-button>
|
|
176
177
|
</pd-form-row>
|
|
177
178
|
|
|
178
179
|
</pd-form-container>
|
|
@@ -205,11 +206,11 @@ export class PdContactUs extends LitElement {
|
|
|
205
206
|
const name = this.shadowRoot.getElementById('nameInputId').value;
|
|
206
207
|
const email = this.shadowRoot.getElementById('mailInputId').value;
|
|
207
208
|
const phone = this.shadowRoot.getElementById('phoneInputId').value;
|
|
208
|
-
const
|
|
209
|
+
const msg1 = this.shadowRoot.getElementById('msgInputId').value;
|
|
209
210
|
this.dispatchEvent(
|
|
210
211
|
new CustomEvent('send-contact-request', {
|
|
211
212
|
detail: {
|
|
212
|
-
msgObj: { name, email, phone,
|
|
213
|
+
msgObj: { name, email, phone, msg1 },
|
|
213
214
|
},
|
|
214
215
|
})
|
|
215
216
|
);
|
package/src/PdMenu.js
CHANGED
|
@@ -184,6 +184,7 @@ export class PdMenu extends LitElement {
|
|
|
184
184
|
|
|
185
185
|
static get properties() {
|
|
186
186
|
return {
|
|
187
|
+
activeRoute: { type: String },
|
|
187
188
|
menuItems: { type: Array },
|
|
188
189
|
topMenuItems: { type: Array },
|
|
189
190
|
// At the moment needed for scroll to pistion => Refactor possible?
|
|
@@ -197,7 +198,7 @@ export class PdMenu extends LitElement {
|
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
constructor() {
|
|
200
|
-
super();
|
|
201
|
+
super();
|
|
201
202
|
this.menuItems = [];
|
|
202
203
|
this.topMenuItems = [];
|
|
203
204
|
this._activeSecIndex = 0;
|
|
@@ -271,7 +272,7 @@ export class PdMenu extends LitElement {
|
|
|
271
272
|
${items.map(
|
|
272
273
|
(item, index) => html`
|
|
273
274
|
<li
|
|
274
|
-
class="item ${checkActiveClass && this._activeSecIndex === index + 1
|
|
275
|
+
class="item ${(checkActiveClass && this._activeSecIndex === index + 1) || (item.route && item.route === this.activeRoute)
|
|
275
276
|
? 'active'
|
|
276
277
|
: ''}"
|
|
277
278
|
data-key="${item.key}"
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
's0830a1e0d2456d9b': `Type uw bericht hier`,
|
|
13
|
+
'sab1114a5f102dedc': `Telefoon Nummer`,
|
|
14
|
+
'sc7dbfe3251f9a8db': `Verzenden`,
|
|
15
|
+
'sd1f44f1a8bc20e67': `Email`,
|
|
16
|
+
'sdd2fffdf86bf5b6e': `Adres`,
|
|
17
|
+
'sef49aec68fd1dc66': `Naam`,
|
|
18
|
+
'sfb4410b48e95fa73': `Contacteer ons`,
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
'sfb4410b48e95fa73': `Kontakt`,
|
|
13
|
+
'sdd2fffdf86bf5b6e': `Adresse`,
|
|
14
|
+
'sef49aec68fd1dc66': `Name`,
|
|
15
|
+
'sd1f44f1a8bc20e67': `Email`,
|
|
16
|
+
'sab1114a5f102dedc': `Telefon`,
|
|
17
|
+
's0830a1e0d2456d9b': `Nachricht`,
|
|
18
|
+
'sc7dbfe3251f9a8db': `Absenden`,
|
|
19
|
+
};
|
|
20
|
+
|
|
@@ -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,42 @@
|
|
|
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="sd1f44f1a8bc20e67">
|
|
6
|
+
<source>Email</source>
|
|
7
|
+
<target>Email</target>
|
|
8
|
+
<note from="lit-localize">#contactus.address.email#</note>
|
|
9
|
+
</trans-unit>
|
|
10
|
+
<trans-unit id="s0830a1e0d2456d9b">
|
|
11
|
+
<source>Nachricht</source>
|
|
12
|
+
<target>Type uw bericht hier</target>
|
|
13
|
+
<note from="lit-localize">#contactus.address.message#</note>
|
|
14
|
+
</trans-unit>
|
|
15
|
+
<trans-unit id="sef49aec68fd1dc66">
|
|
16
|
+
<source>Name</source>
|
|
17
|
+
<target>Naam</target>
|
|
18
|
+
<note from="lit-localize">#contactus.address.name#</note>
|
|
19
|
+
</trans-unit>
|
|
20
|
+
<trans-unit id="sab1114a5f102dedc">
|
|
21
|
+
<source>Telefon</source>
|
|
22
|
+
<target>Telefoon Nummer</target>
|
|
23
|
+
<note from="lit-localize">#contactus.address.phone#</note>
|
|
24
|
+
</trans-unit>
|
|
25
|
+
<trans-unit id="sc7dbfe3251f9a8db">
|
|
26
|
+
<source>Absenden</source>
|
|
27
|
+
<target>Verzenden</target>
|
|
28
|
+
<note from="lit-localize">#contactus.address.send#</note>
|
|
29
|
+
</trans-unit>
|
|
30
|
+
<trans-unit id="sdd2fffdf86bf5b6e">
|
|
31
|
+
<source>Adresse</source>
|
|
32
|
+
<target>Adres</target>
|
|
33
|
+
<note from="lit-localize">#contactus.address.title#</note>
|
|
34
|
+
</trans-unit>
|
|
35
|
+
<trans-unit id="sfb4410b48e95fa73">
|
|
36
|
+
<source>Kontakt</source>
|
|
37
|
+
<target>Contacteer ons</target>
|
|
38
|
+
<note from="lit-localize">#contactus.title#</note>
|
|
39
|
+
</trans-unit>
|
|
40
|
+
</body>
|
|
41
|
+
</file>
|
|
42
|
+
</xliff>
|
package/xliff/en.xlf
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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="sd1f44f1a8bc20e67">
|
|
6
|
+
<source>Email</source>
|
|
7
|
+
<note from="lit-localize">#contactus.address.email#</note>
|
|
8
|
+
</trans-unit>
|
|
9
|
+
<trans-unit id="s0830a1e0d2456d9b">
|
|
10
|
+
<source>Nachricht</source>
|
|
11
|
+
<note from="lit-localize">#contactus.address.message#</note>
|
|
12
|
+
</trans-unit>
|
|
13
|
+
<trans-unit id="sef49aec68fd1dc66">
|
|
14
|
+
<source>Name</source>
|
|
15
|
+
<note from="lit-localize">#contactus.address.name#</note>
|
|
16
|
+
</trans-unit>
|
|
17
|
+
<trans-unit id="sab1114a5f102dedc">
|
|
18
|
+
<source>Telefon</source>
|
|
19
|
+
<note from="lit-localize">#contactus.address.phone#</note>
|
|
20
|
+
</trans-unit>
|
|
21
|
+
<trans-unit id="sc7dbfe3251f9a8db">
|
|
22
|
+
<source>Absenden</source>
|
|
23
|
+
<note from="lit-localize">#contactus.address.send#</note>
|
|
24
|
+
</trans-unit>
|
|
25
|
+
<trans-unit id="sdd2fffdf86bf5b6e">
|
|
26
|
+
<source>Adresse</source>
|
|
27
|
+
<note from="lit-localize">#contactus.address.title#</note>
|
|
28
|
+
</trans-unit>
|
|
29
|
+
<trans-unit id="sfb4410b48e95fa73">
|
|
30
|
+
<source>Kontakt</source>
|
|
31
|
+
<note from="lit-localize">#contactus.title#</note>
|
|
32
|
+
</trans-unit>
|
|
33
|
+
</body>
|
|
34
|
+
</file>
|
|
35
|
+
</xliff>
|