@schukai/monster 4.43.2 → 4.43.3

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.
@@ -13,17 +13,17 @@
13
13
  import { instanceSymbol } from "../../constants.mjs";
14
14
  import { addAttributeToken } from "../../dom/attributes.mjs";
15
15
  import {
16
- ATTRIBUTE_ERRORMESSAGE,
17
- ATTRIBUTE_ROLE,
16
+ ATTRIBUTE_ERRORMESSAGE,
17
+ ATTRIBUTE_ROLE,
18
18
  } from "../../dom/constants.mjs";
19
19
  import { CustomControl } from "../../dom/customcontrol.mjs";
20
20
  import {
21
- CustomElement,
22
- updaterTransformerMethodsSymbol,
21
+ CustomElement,
22
+ updaterTransformerMethodsSymbol,
23
23
  } from "../../dom/customelement.mjs";
24
24
  import {
25
- assembleMethodSymbol,
26
- registerCustomElement,
25
+ assembleMethodSymbol,
26
+ registerCustomElement,
27
27
  } from "../../dom/customelement.mjs";
28
28
  import { findTargetElementFromEvent } from "../../dom/events.mjs";
29
29
  import { isFunction, isObject } from "../../types/is.mjs";
@@ -87,226 +87,226 @@ const detectedLanguagesSymbol = Symbol("detectedLanguages");
87
87
  * @summary A beautiful LocalePicker that can make your life easier and also looks good.
88
88
  */
89
89
  class LocalePicker extends CustomElement {
90
- /**
91
- * This method is called by the `instanceof` operator.
92
- * @returns {symbol}
93
- */
94
- static get [instanceSymbol]() {
95
- return Symbol.for(
96
- "@schukai/monster/components/accessibility/locale-picker@@instance",
97
- );
98
- }
99
-
100
- /**
101
- * Initializes the component.
102
- * @return {LocalePicker}
103
- */
104
- [assembleMethodSymbol]() {
105
- super[assembleMethodSymbol]();
106
- initControlReferences.call(this);
107
- initEventHandler.call(this);
108
-
109
- return this;
110
- }
111
-
112
- /**
113
- * To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
114
- * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
115
- *
116
- * The individual configuration values can be found in the table.
117
- *
118
- * @property {Object} templates Template definitions
119
- * @property {string} templates.main Main template
120
- * @property {Object} labels Label definitions
121
- * @property {string} labels.headline Headline
122
- * @property {string} labels.text Text
123
- * @property {string} labels.button-label Button label
124
- * @property {string} labels.button-no-thanks Button no thanks
125
- * @property {string} labels.headline-other Headline other languages
126
- * @property {Function} callbacks.getTranslation Callback to get the translation for the labels
127
- * @property {Object} features Features
128
- * @property {boolean} features.removeOnSelected Remove the element when a language is selected
129
- * @property {boolean} features.showAlways Show the element always
130
- * @property {boolean} disabled Disabled state
131
- */
132
- get defaults() {
133
- return Object.assign({}, super.defaults, {
134
- templates: {
135
- main: getTemplate(),
136
- },
137
- labels: {
138
- headline: "Welcome to our Website",
139
- text: "This page is currently displayed in ${currentLabel}. However, we also offer this page in your preferred language. Would you like to switch?",
140
- "button-label": "Switch to ${preferred.label}",
141
- "button-no-thanks": "No, thanks",
142
- "headline-other": "Other languages",
143
- },
144
-
145
- callbacks: {
146
- getTranslation: getTranslations,
147
- },
148
-
149
- disabled: false,
150
- features: {
151
- removeOnSelected: false,
152
- showAlways: false,
153
- },
154
- });
155
- }
156
-
157
- /**
158
- * Private method that provides a mapping of transformer methods keyed by their names.
159
- * These transformer methods define custom transformations for given input values.
160
- *
161
- * @private
162
- * @return {Object} An object containing transformer methods for internal use.
163
- */
164
- [updaterTransformerMethodsSymbol]() {
165
- return {
166
- "replace-placeholder": (value) => {
167
- const formatter = new Formatter(this[detectedLanguagesSymbol]);
168
- return formatter.format(value);
169
- },
170
- };
171
- }
172
-
173
- /**
174
- * Lifecycle method that is called when the custom element is appended into a document-connected element.
175
- * Invokes the parent class's connectedCallback method and retrieves the user's preferred language.
176
- * Hides or shows the picker depending on the user's language and stored session.
177
- *
178
- * @return {void}
179
- */
180
- connectedCallback() {
181
- super.connectedCallback();
182
-
183
- this[detectedLanguagesSymbol] = detectUserLanguagePreference();
184
-
185
- if (
186
- !isObject(this[detectedLanguagesSymbol]?.preferred) &&
187
- this.getOption("features.showAlways") !== true
188
- ) {
189
- this.hide();
190
-
191
- if (this.getOption("features.removeOnSelected")) {
192
- this.remove();
193
- }
194
- return;
195
- }
196
-
197
- if (!isObject(this[detectedLanguagesSymbol]?.preferred)) {
198
- this[detectedLanguagesSymbol].preferred = {
199
- fullLang: "en",
200
- baseLang: "en",
201
- label: "English",
202
- };
203
- }
204
-
205
- const stored = sessionStorage.getItem(buildStorageKey.call(this));
206
- if (stored && this.getOption("features.showAlways") !== true) {
207
- if (this.getOption("features.removeOnSelected")) {
208
- this.remove();
209
- }
210
- return;
211
- }
212
-
213
- this.show();
214
-
215
- if (
216
- this[otherLanguagesElementSymbol] instanceof HTMLElement &&
217
- this[detectedLanguagesSymbol].offerable &&
218
- this[detectedLanguagesSymbol].offerable.length > 1
219
- ) {
220
- this[otherLanguagesElementSymbol].classList.remove("hidden");
221
- this[otherLanguagesElementSymbol].setOption(
222
- "mapping.labelTemplate",
223
- "${label}",
224
- );
225
- this[otherLanguagesElementSymbol].setOption(
226
- "mapping.valueTemplate",
227
- "${href}",
228
- );
229
- this[otherLanguagesElementSymbol].importOptions(
230
- this[detectedLanguagesSymbol]?.offerable || [],
231
- );
232
- }
233
-
234
- if (
235
- this[detectedLanguagesSymbol].offerable &&
236
- this[detectedLanguagesSymbol].offerable.length > 0
237
- ) {
238
- const getTranslationCallback = this.getOption("callbacks.getTranslation");
239
- if (isFunction(getTranslationCallback)) {
240
- const translations = getTranslationCallback(
241
- this[detectedLanguagesSymbol].offerable[0].baseLang,
242
- );
243
-
244
- this.setOption("labels", translations.labels);
245
- if (this[otherLanguagesElementSymbol]) {
246
- this[otherLanguagesElementSymbol].setOption(
247
- "labels.select-an-option",
248
- translations.selectAnOption,
249
- );
250
- }
251
- }
252
- }
253
- }
254
-
255
- /**
256
- * Resets the locale picker by removing the stored value from the local storage.
257
- *
258
- * @returns {LocalePicker}
259
- */
260
- reset() {
261
- sessionStorage.removeItem(buildStorageKey.call(this));
262
- this.show();
263
- return this;
264
- }
265
-
266
- /**
267
- * Hides the locale picker.
268
- *
269
- * @returns {LocalePicker}
270
- */
271
- hide() {
272
- this.style.display = "none";
273
-
274
- if (!this[localePickerElementSymbol]) {
275
- return this;
276
- }
277
-
278
- this[localePickerElementSymbol].style.display = "none";
279
- return this;
280
- }
281
-
282
- /**
283
- * Shows the locale picker.
284
- * @returns {LocalePicker}
285
- */
286
- show() {
287
- this.style.display = "block";
288
-
289
- if (!this[localePickerElementSymbol]) {
290
- return this;
291
- }
292
-
293
- this[localePickerElementSymbol].style.display = "block";
294
- return this;
295
- }
296
-
297
- /**
298
- * @return {string}
299
- */
300
- static getTag() {
301
- return "monster-locale-picker";
302
- }
303
-
304
- /**
305
- * @return {CSSStyleSheet[]}
306
- */
307
- static getCSSStyleSheet() {
308
- return [LocalePickerStyleSheet];
309
- }
90
+ /**
91
+ * This method is called by the `instanceof` operator.
92
+ * @returns {symbol}
93
+ */
94
+ static get [instanceSymbol]() {
95
+ return Symbol.for(
96
+ "@schukai/monster/components/accessibility/locale-picker@@instance",
97
+ );
98
+ }
99
+
100
+ /**
101
+ * Initializes the component.
102
+ * @return {LocalePicker}
103
+ */
104
+ [assembleMethodSymbol]() {
105
+ super[assembleMethodSymbol]();
106
+ initControlReferences.call(this);
107
+ initEventHandler.call(this);
108
+
109
+ return this;
110
+ }
111
+
112
+ /**
113
+ * To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
114
+ * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
115
+ *
116
+ * The individual configuration values can be found in the table.
117
+ *
118
+ * @property {Object} templates Template definitions
119
+ * @property {string} templates.main Main template
120
+ * @property {Object} labels Label definitions
121
+ * @property {string} labels.headline Headline
122
+ * @property {string} labels.text Text
123
+ * @property {string} labels.button-label Button label
124
+ * @property {string} labels.button-no-thanks Button no thanks
125
+ * @property {string} labels.headline-other Headline other languages
126
+ * @property {Function} callbacks.getTranslation Callback to get the translation for the labels
127
+ * @property {Object} features Features
128
+ * @property {boolean} features.removeOnSelected Remove the element when a language is selected
129
+ * @property {boolean} features.showAlways Show the element always
130
+ * @property {boolean} disabled Disabled state
131
+ */
132
+ get defaults() {
133
+ return Object.assign({}, super.defaults, {
134
+ templates: {
135
+ main: getTemplate(),
136
+ },
137
+ labels: {
138
+ headline: "Welcome to our Website",
139
+ text: "This page is currently displayed in ${currentLabel}. However, we also offer this page in your preferred language. Would you like to switch?",
140
+ "button-label": "Switch to ${preferred.label}",
141
+ "button-no-thanks": "No, thanks",
142
+ "headline-other": "Other languages",
143
+ },
144
+
145
+ callbacks: {
146
+ getTranslation: getTranslations,
147
+ },
148
+
149
+ disabled: false,
150
+ features: {
151
+ removeOnSelected: false,
152
+ showAlways: false,
153
+ },
154
+ });
155
+ }
156
+
157
+ /**
158
+ * Private method that provides a mapping of transformer methods keyed by their names.
159
+ * These transformer methods define custom transformations for given input values.
160
+ *
161
+ * @private
162
+ * @return {Object} An object containing transformer methods for internal use.
163
+ */
164
+ [updaterTransformerMethodsSymbol]() {
165
+ return {
166
+ "replace-placeholder": (value) => {
167
+ const formatter = new Formatter(this[detectedLanguagesSymbol]);
168
+ return formatter.format(value);
169
+ },
170
+ };
171
+ }
172
+
173
+ /**
174
+ * Lifecycle method that is called when the custom element is appended into a document-connected element.
175
+ * Invokes the parent class's connectedCallback method and retrieves the user's preferred language.
176
+ * Hides or shows the picker depending on the user's language and stored session.
177
+ *
178
+ * @return {void}
179
+ */
180
+ connectedCallback() {
181
+ super.connectedCallback();
182
+
183
+ this[detectedLanguagesSymbol] = detectUserLanguagePreference();
184
+
185
+ if (
186
+ !isObject(this[detectedLanguagesSymbol]?.preferred) &&
187
+ this.getOption("features.showAlways") !== true
188
+ ) {
189
+ this.hide();
190
+
191
+ if (this.getOption("features.removeOnSelected")) {
192
+ this.remove();
193
+ }
194
+ return;
195
+ }
196
+
197
+ if (!isObject(this[detectedLanguagesSymbol]?.preferred)) {
198
+ this[detectedLanguagesSymbol].preferred = {
199
+ fullLang: "en",
200
+ baseLang: "en",
201
+ label: "English",
202
+ };
203
+ }
204
+
205
+ const stored = sessionStorage.getItem(buildStorageKey.call(this));
206
+ if (stored && this.getOption("features.showAlways") !== true) {
207
+ if (this.getOption("features.removeOnSelected")) {
208
+ this.remove();
209
+ }
210
+ return;
211
+ }
212
+
213
+ this.show();
214
+
215
+ if (
216
+ this[otherLanguagesElementSymbol] instanceof HTMLElement &&
217
+ this[detectedLanguagesSymbol].offerable &&
218
+ this[detectedLanguagesSymbol].offerable.length > 1
219
+ ) {
220
+ this[otherLanguagesElementSymbol].classList.remove("hidden");
221
+ this[otherLanguagesElementSymbol].setOption(
222
+ "mapping.labelTemplate",
223
+ "${label}",
224
+ );
225
+ this[otherLanguagesElementSymbol].setOption(
226
+ "mapping.valueTemplate",
227
+ "${href}",
228
+ );
229
+ this[otherLanguagesElementSymbol].importOptions(
230
+ this[detectedLanguagesSymbol]?.offerable || [],
231
+ );
232
+ }
233
+
234
+ if (
235
+ this[detectedLanguagesSymbol].offerable &&
236
+ this[detectedLanguagesSymbol].offerable.length > 0
237
+ ) {
238
+ const getTranslationCallback = this.getOption("callbacks.getTranslation");
239
+ if (isFunction(getTranslationCallback)) {
240
+ const translations = getTranslationCallback(
241
+ this[detectedLanguagesSymbol].offerable[0].baseLang,
242
+ );
243
+
244
+ this.setOption("labels", translations.labels);
245
+ if (this[otherLanguagesElementSymbol]) {
246
+ this[otherLanguagesElementSymbol].setOption(
247
+ "labels.select-an-option",
248
+ translations.selectAnOption,
249
+ );
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ /**
256
+ * Resets the locale picker by removing the stored value from the local storage.
257
+ *
258
+ * @returns {LocalePicker}
259
+ */
260
+ reset() {
261
+ sessionStorage.removeItem(buildStorageKey.call(this));
262
+ this.show();
263
+ return this;
264
+ }
265
+
266
+ /**
267
+ * Hides the locale picker.
268
+ *
269
+ * @returns {LocalePicker}
270
+ */
271
+ hide() {
272
+ this.style.display = "none";
273
+
274
+ if (!this[localePickerElementSymbol]) {
275
+ return this;
276
+ }
277
+
278
+ this[localePickerElementSymbol].style.display = "none";
279
+ return this;
280
+ }
281
+
282
+ /**
283
+ * Shows the locale picker.
284
+ * @returns {LocalePicker}
285
+ */
286
+ show() {
287
+ this.style.display = "block";
288
+
289
+ if (!this[localePickerElementSymbol]) {
290
+ return this;
291
+ }
292
+
293
+ this[localePickerElementSymbol].style.display = "block";
294
+ return this;
295
+ }
296
+
297
+ /**
298
+ * @return {string}
299
+ */
300
+ static getTag() {
301
+ return "monster-locale-picker";
302
+ }
303
+
304
+ /**
305
+ * @return {CSSStyleSheet[]}
306
+ */
307
+ static getCSSStyleSheet() {
308
+ return [LocalePickerStyleSheet];
309
+ }
310
310
  }
311
311
 
312
312
  /**
@@ -315,21 +315,21 @@ class LocalePicker extends CustomElement {
315
315
  * Initializes references to all relevant elements in the picker.
316
316
  */
317
317
  function initControlReferences() {
318
- this[localePickerElementSymbol] = this.shadowRoot.querySelector(
319
- `[${ATTRIBUTE_ROLE}="control"]`,
320
- );
318
+ this[localePickerElementSymbol] = this.shadowRoot.querySelector(
319
+ `[${ATTRIBUTE_ROLE}="control"]`,
320
+ );
321
321
 
322
- this[otherLanguagesElementSymbol] = this.shadowRoot.querySelector(
323
- `[${ATTRIBUTE_ROLE}="other-languages"]`,
324
- );
322
+ this[otherLanguagesElementSymbol] = this.shadowRoot.querySelector(
323
+ `[${ATTRIBUTE_ROLE}="other-languages"]`,
324
+ );
325
325
 
326
- this[buttonNoThanksElementSymbol] = this.shadowRoot.querySelector(
327
- `[${ATTRIBUTE_ROLE}="button-no-thanks"]`,
328
- );
326
+ this[buttonNoThanksElementSymbol] = this.shadowRoot.querySelector(
327
+ `[${ATTRIBUTE_ROLE}="button-no-thanks"]`,
328
+ );
329
329
 
330
- this[buttonLanguageElementSymbol] = this.shadowRoot.querySelector(
331
- `[${ATTRIBUTE_ROLE}="button-language"]`,
332
- );
330
+ this[buttonLanguageElementSymbol] = this.shadowRoot.querySelector(
331
+ `[${ATTRIBUTE_ROLE}="button-language"]`,
332
+ );
333
333
  }
334
334
 
335
335
  /**
@@ -338,65 +338,65 @@ function initControlReferences() {
338
338
  * Initializes all event handlers for the picker.
339
339
  */
340
340
  function initEventHandler() {
341
- const self = this;
342
- const element = this[localePickerElementSymbol];
343
-
344
- const type = "click";
345
-
346
- element.addEventListener(type, function (event) {
347
- const callback = self.getOption("actions.click");
348
-
349
- fireCustomEvent(self, "monster-locale-picker-clicked", {
350
- element: self,
351
- });
352
-
353
- if (!isFunction(callback)) {
354
- return;
355
- }
356
-
357
- const element = findTargetElementFromEvent(
358
- event,
359
- ATTRIBUTE_ROLE,
360
- "control",
361
- );
362
-
363
- if (!(element instanceof Node && self.hasNode(element))) {
364
- return;
365
- }
366
-
367
- callback.call(self, event);
368
- });
369
-
370
- this[buttonNoThanksElementSymbol].setOption("actions.click", () => {
371
- sessionStorage.setItem(buildStorageKey.call(this), "1");
372
- this.hide();
373
- if (this.getOption("features.removeOnSelected")) {
374
- this.remove();
375
- }
376
- });
377
-
378
- this[buttonLanguageElementSymbol].setOption("actions.click", () => {
379
- sessionStorage.setItem(buildStorageKey.call(this), "1");
380
- window.location.href = this[detectedLanguagesSymbol].offerable?.[0]?.href;
381
- });
382
-
383
- this[otherLanguagesElementSymbol].addEventListener("change", (event) => {
384
- const element = findTargetElementFromEvent(
385
- event,
386
- ATTRIBUTE_ROLE,
387
- "other-languages",
388
- );
389
-
390
- if (element) {
391
- const selected = element?.value;
392
- if (selected) {
393
- sessionStorage.setItem(buildStorageKey.call(this), "1");
394
- window.location.href = selected;
395
- }
396
- }
397
- });
398
-
399
- return this;
341
+ const self = this;
342
+ const element = this[localePickerElementSymbol];
343
+
344
+ const type = "click";
345
+
346
+ element.addEventListener(type, function (event) {
347
+ const callback = self.getOption("actions.click");
348
+
349
+ fireCustomEvent(self, "monster-locale-picker-clicked", {
350
+ element: self,
351
+ });
352
+
353
+ if (!isFunction(callback)) {
354
+ return;
355
+ }
356
+
357
+ const element = findTargetElementFromEvent(
358
+ event,
359
+ ATTRIBUTE_ROLE,
360
+ "control",
361
+ );
362
+
363
+ if (!(element instanceof Node && self.hasNode(element))) {
364
+ return;
365
+ }
366
+
367
+ callback.call(self, event);
368
+ });
369
+
370
+ this[buttonNoThanksElementSymbol].setOption("actions.click", () => {
371
+ sessionStorage.setItem(buildStorageKey.call(this), "1");
372
+ this.hide();
373
+ if (this.getOption("features.removeOnSelected")) {
374
+ this.remove();
375
+ }
376
+ });
377
+
378
+ this[buttonLanguageElementSymbol].setOption("actions.click", () => {
379
+ sessionStorage.setItem(buildStorageKey.call(this), "1");
380
+ window.location.href = this[detectedLanguagesSymbol].offerable?.[0]?.href;
381
+ });
382
+
383
+ this[otherLanguagesElementSymbol].addEventListener("change", (event) => {
384
+ const element = findTargetElementFromEvent(
385
+ event,
386
+ ATTRIBUTE_ROLE,
387
+ "other-languages",
388
+ );
389
+
390
+ if (element) {
391
+ const selected = element?.value;
392
+ if (selected) {
393
+ sessionStorage.setItem(buildStorageKey.call(this), "1");
394
+ window.location.href = selected;
395
+ }
396
+ }
397
+ });
398
+
399
+ return this;
400
400
  }
401
401
 
402
402
  /**
@@ -405,7 +405,7 @@ function initEventHandler() {
405
405
  * Builds the session storage key for the picker.
406
406
  */
407
407
  function buildStorageKey() {
408
- return "locale-picker-" + this[detectedLanguagesSymbol].current;
408
+ return "locale-picker-" + this[detectedLanguagesSymbol].current;
409
409
  }
410
410
 
411
411
  /**
@@ -415,244 +415,244 @@ function buildStorageKey() {
415
415
  * Returns translations for the given language.
416
416
  */
417
417
  function getTranslations(lang) {
418
- const map = {
419
- en: {
420
- headline: "Welcome to our Website",
421
- text: "This page is currently displayed in ${currentLabel}. However, we also offer this page in your preferred language. Would you like to switch?",
422
- "button-label": "Switch to ${preferred.label}",
423
- "button-no-thanks": "No, thanks",
424
- "headline-other": "Other languages",
425
- },
426
- de: {
427
- headline: "Willkommen auf unserer Webseite",
428
- text: "Diese Seite wird aktuell auf ${currentLabel} angezeigt. Wir bieten jedoch auch diese Seite in Ihrer bevorzugten Sprache an. Möchten Sie wechseln?",
429
- "button-label": "Wechseln zu ${preferred.label}",
430
- "button-no-thanks": "Nein, danke",
431
- "headline-other": "Andere Sprachen",
432
- },
433
- fr: {
434
- headline: "Bienvenue sur notre site web",
435
- text: "Cette page est actuellement affichée en ${currentLabel}. Cependant, nous proposons également cette page dans votre langue préférée. Souhaitez-vous changer?",
436
- "button-label": "Changer pour ${preferred.label}",
437
- "button-no-thanks": "Non, merci",
438
- "headline-other": "Autres langues",
439
- },
440
- es: {
441
- headline: "Bienvenido a nuestro sitio web",
442
- text: "Esta página se muestra actualmente en ${currentLabel}. Sin embargo, también ofrecemos esta página en su idioma preferido. ¿Le gustaría cambiar?",
443
- "button-label": "Cambiar a ${preferred.label}",
444
- "button-no-thanks": "No, gracias",
445
- "headline-other": "Otros idiomas",
446
- },
447
- it: {
448
- headline: "Benvenuti sul nostro sito web",
449
- text: "Questa pagina è attualmente visualizzata in ${currentLabel}. Tuttavia, offriamo anche questa pagina nella tua lingua preferita. Vuoi cambiare?",
450
- "button-label": "Cambia nella ${preferred.label}",
451
- "button-no-thanks": "No, grazie",
452
- "headline-other": "Altre lingue",
453
- },
454
- pt: {
455
- headline: "Bem-vindo ao nosso site",
456
- text: "Esta página está atualmente exibida em ${currentLabel}. No entanto, também oferecemos esta página no seu idioma preferido. Gostaria de mudar?",
457
- "button-label": "Mudar para ${preferred.label}",
458
- "button-no-thanks": "Não, obrigado",
459
- "headline-other": "Outros idiomas",
460
- },
461
- nl: {
462
- headline: "Welkom op onze website",
463
- text: "Deze pagina wordt momenteel weergegeven in ${currentLabel}. We bieden deze pagina echter ook aan in uw voorkeurstaal. Wilt u overschakelen?",
464
- "button-label": "Overschakelen naar ${preferred.label}",
465
- "button-no-thanks": "Nee, bedankt",
466
- "headline-other": "Andere talen",
467
- },
468
- pl: {
469
- headline: "Witamy na naszej stronie",
470
- text: "Ta strona jest obecnie wyświetlana po ${currentLabel}. Oferujemy jednak również tę stronę w Twoim preferowanym języku. Czy chcesz przełączyć?",
471
- "button-label": "Przełącz na ${preferred.label}",
472
- "button-no-thanks": "Nie, dziękuję",
473
- "headline-other": "Inne języki",
474
- },
475
- ru: {
476
- headline: "Добро пожаловать на наш сайт",
477
- text: "Эта страница в настоящее время отображается на ${currentLabel}. Однако мы также предлагаем эту страницу на вашем предпочтительном языке. Хотите переключиться?",
478
- "button-label": "Переключиться на ${preferred.label}",
479
- "button-no-thanks": "Нет, спасибо",
480
- "headline-other": "Другие языки",
481
- },
482
- cs: {
483
- headline: "Vítejte na našem webu",
484
- text: "Tato stránka je aktuálně zobrazena v ${currentLabel}. Nabízíme však tuto stránku také ve vašem preferovaném jazyce. Chcete přejít?",
485
- "button-label": "Přejít na ${preferred.label}",
486
- "button-no-thanks": "Ne, děkuji",
487
- "headline-other": "Další jazyky",
488
- },
489
- sk: {
490
- headline: "Vitajte na našej webovej stránke",
491
- text: "Táto stránka je v súčasnosti zobrazená v ${currentLabel}. Ponúkame však túto stránku aj vo vašom preferovanom jazyku. Chcete prejsť?",
492
- "button-label": "Prepnúť na ${preferred.label}",
493
- "button-no-thanks": "Nie, ďakujem",
494
- "headline-other": "Iné jazyky",
495
- },
496
-
497
- bg: {
498
- headline: "Добре дошли на нашия уебсайт",
499
- text: "Тази страница в момента се показва на ${currentLabel}. Въпреки това, предлагаме също тази страница на Вашия предпочитан език. Желаете ли да превключите?",
500
- "button-label": "Превключете на ${preferred.label}",
501
- "button-no-thanks": "Не, благодаря",
502
- "headline-other": "Други езици",
503
- },
504
- hr: {
505
- headline: "Dobrodošli na našu web stranicu",
506
- text: "Ova stranica trenutno je prikazana na ${currentLabel}. Međutim, nudimo i ovu stranicu na vašem preferiranom jeziku. Želite li prebaciti?",
507
- "button-label": "Prebaci na ${preferred.label}",
508
- "button-no-thanks": "Ne, hvala",
509
- "headline-other": "Drugi jezici",
510
- },
511
- fi: {
512
- headline: "Tervetuloa verkkosivustollemme",
513
- text: "Tämä sivu on tällä hetkellä näkyvissä ${currentLabel}. Tarjoamme kuitenkin tätä sivua myös suosimallasi kielellä. Haluaisitko vaihtaa?",
514
- "button-label": "Vaihda ${preferred.label}",
515
- "button-no-thanks": "Ei kiitos",
516
- "headline-other": "Muut kielet",
517
- },
518
- sv: {
519
- headline: "Välkommen till vår webbplats",
520
- text: "Denna sida visas för närvarande på ${currentLabel}. Vi erbjuder dock även denna sida på ditt föredragna språk. Skulle du vilja byta?",
521
- "button-label": "Byt till ${preferred.label}",
522
- "button-no-thanks": "Nej tack",
523
- "headline-other": "Andra språk",
524
- },
525
- el: {
526
- headline: "Καλώς ήρθατε στην ιστοσελίδα μας",
527
- text: "Αυτή η σελίδα εμφανίζεται προς το παρόν στα ${currentLabel}. Ωστόσο, προσφέρουμε επίσης αυτή τη σελίδα στην προτιμώμενη γλώσσα σας. Θα θέλατε να αλλάξετε;",
528
- "button-label": "Αλλαγή σε ${preferred.label}",
529
- "button-no-thanks": "Όχι, ευχαριστώ",
530
- "headline-other": "Άλλες γλώσσες",
531
- },
532
- hu: {
533
- headline: "Üdvözöljük weboldalunkon",
534
- text: "Ez az oldal jelenleg ${currentLabel} nyelven jelenik meg. Azonban kínáljuk ezt az oldalt a preferált nyelvén is. Szeretne váltani?",
535
- "button-label": "Váltás ${preferred.label} nyelvre",
536
- "button-no-thanks": "Nem, köszönöm",
537
- "headline-other": "További nyelvek",
538
- },
539
- ro: {
540
- headline: "Bine ați venit pe site-ul nostru",
541
- text: "Această pagină este afișată în prezent în ${currentLabel}. Totuși, oferim de asemenea această pagină în limba dumneavoastră preferată. Doriți să schimbați?",
542
- "button-label": "Schimbați în ${preferred.label}",
543
- "button-no-thanks": "Nu, mulțumesc",
544
- "headline-other": "Alte limbi",
545
- },
546
- da: {
547
- headline: "Velkommen til vores hjemmeside",
548
- text: "Denne side vises i øjeblikket på ${currentLabel}. Vi tilbyder dog også denne side på dit foretrukne sprog. Vil du skifte?",
549
- "button-label": "Skift til ${preferred.label}",
550
- "button-no-thanks": "Nej tak",
551
- "headline-other": "Andre sprog",
552
- },
553
- no: {
554
- headline: "Velkommen til vår nettside",
555
- text: "Denne siden vises for øyeblikket på ${currentLabel}. Vi tilbyr imidlertid også denne siden på ditt foretrukne språk. Ønsker du å bytte?",
556
- "button-label": "Bytt til ${preferred.label}",
557
- "button-no-thanks": "Nei, takk",
558
- "headline-other": "Andre språk",
559
- },
560
- hi: {
561
- headline: "हमारी वेबसाइट पर आपका स्वागत है",
562
- text: "यह पृष्ठ वर्तमान में ${currentLabel} में प्रदर्शित हो रहा है। हालांकि, हम इस पृष्ठ को आपकी पसंदीदा भाषा में भी प्रदान करते हैं। क्या आप स्विच करना चाहेंगे?",
563
- "button-label": "${preferred.label} में स्विच करें",
564
- "button-no-thanks": "नहीं, धन्यवाद",
565
- "headline-other": "अन्य भाषाएँ",
566
- },
567
- bn: {
568
- headline: "আমাদের ওয়েবসাইটে আপনাকে স্বাগতম",
569
- text: "এই পৃষ্ঠাটি বর্তমানে ${currentLabel} প্রদর্শিত হচ্ছে। তবে, আমরা এই পৃষ্ঠাটি আপনার পছন্দের ভাষায়ও অফার করি। আপনি কি সুইচ করতে চান?",
570
- "button-label": "${preferred.label}-এ সুইচ করুন",
571
- "button-no-thanks": "না, ধন্যবাদ",
572
- "headline-other": "অন্যান্য ভাষাসমূহ",
573
- },
574
- ta: {
575
- headline: "எங்கள் இணையதளத்திற்கு வருக",
576
- text: "இந்த பக்கம் தற்போது ${currentLabel} என்ற மொழியில் காட்சியளிக்கப்படுகிறது. எனினும், நாங்கள் இந்த பக்கத்தை உங்கள் விருப்ப மொழியிலும் வழங்குகிறோம். நீங்கள் மாற்ற விரும்புகிறீர்களா?",
577
- "button-label": "${preferred.label}-க்கு மாற்றவும்",
578
- "button-no-thanks": "இல்லை, நன்றி",
579
- "headline-other": "மற்ற மொழிகள்",
580
- },
581
- te: {
582
- headline: "మా వెబ్‌సైట్‌కు స్వాగతం",
583
- text: "ఈ పేజీ ప్రస్తుతం ${currentLabel}లో ప్రదర్శితం అవుతున్నది. అయితే, మేము ఈ పేజీని మీ ఇష్టపడే భాషలో కూడా అందిస్తున్నాము. మీరు మార్చాలనుకుంటున్నారా?",
584
- "button-label": "${preferred.label}కి మార్చండి",
585
- "button-no-thanks": "కాదు, ధన్యవాదాలు",
586
- "headline-other": "ఇతర భాషలు",
587
- },
588
- mr: {
589
- headline: "आपले आमच्या वेबसाइटवर स्वागत आहे",
590
- text: "हे पान सध्या ${currentLabel}मध्ये दाखविले जात आहे. परंतु, आम्ही हे पान आपल्या पसंतीच्या भाषेतही देत आहोत. आपण स्विच करू इच्छिता का?",
591
- "button-label": "${preferred.label}मध्ये स्विच करा",
592
- "button-no-thanks": "नाही, धन्यवाद",
593
- "headline-other": "इतर भाषा",
594
- },
595
- zh: {
596
- headline: "欢迎访问我们的网站",
597
- text: "本页面当前显示为${currentLabel}。然而,我们还提供您偏好的语言版本。您想切换吗?",
598
- "button-label": "切换到${preferred.label}",
599
- "button-no-thanks": "不,谢谢",
600
- "headline-other": "其他语言",
601
- },
602
- ja: {
603
- headline: "私たちのウェブサイトへようこそ",
604
- text: "このページは現在${currentLabel}で表示されています。しかし、私たちはあなたの好みの言語でこのページを提供しています。切り替えますか?",
605
- "button-label": "${preferred.label}に切り替える",
606
- "button-no-thanks": "いいえ、結構です",
607
- "headline-other": "他の言語",
608
- },
609
- };
610
-
611
- const selectAnOption = {
612
- en: "Select a language",
613
- de: "Wählen Sie eine Sprache",
614
- fr: "Sélectionnez une langue",
615
- es: "Seleccione un idioma",
616
- it: "Seleziona una lingua",
617
- pt: "Selecione um idioma",
618
- nl: "Selecteer een taal",
619
- pl: "Wybierz język",
620
- ru: "Выберите язык",
621
- cs: "Vyberte jazyk",
622
- sk: "Vyberte jazyk",
623
- bg: "Изберете език",
624
- hr: "Odaberite jezik",
625
- fi: "Valitse kieli",
626
- sv: "Välj ett språk",
627
- el: "Επιλέξτε γλώσσα",
628
- hu: "Válasszon egy nyelvet",
629
- ro: "Selectați o limbă",
630
- da: "Vælg et sprog",
631
- no: "Velg et språk",
632
- hi: "एक भाषा चुनें",
633
- bn: "একটি ভাষা নির্বাচন করুন",
634
- ta: "ஒரு மொழியைத் தேர்ந்தெடுக்கவும்",
635
- te: "భాషను ఎంచుకోండి",
636
- mr: "एक भाषा निवडा",
637
- zh: "选择一种语言",
638
- ja: "言語を選択してください",
639
- };
640
-
641
- const result = {};
642
-
643
- if (map[lang]) {
644
- result["labels"] = map[lang];
645
- } else {
646
- result["labels"] = map["en"];
647
- }
648
-
649
- if (selectAnOption[lang]) {
650
- result["selectAnOption"] = selectAnOption[lang];
651
- } else {
652
- result["selectAnOption"] = selectAnOption["en"];
653
- }
654
-
655
- return result;
418
+ const map = {
419
+ en: {
420
+ headline: "Welcome to our Website",
421
+ text: "This page is currently displayed in ${currentLabel}. However, we also offer this page in your preferred language. Would you like to switch?",
422
+ "button-label": "Switch to ${preferred.label}",
423
+ "button-no-thanks": "No, thanks",
424
+ "headline-other": "Other languages",
425
+ },
426
+ de: {
427
+ headline: "Willkommen auf unserer Webseite",
428
+ text: "Diese Seite wird aktuell auf ${currentLabel} angezeigt. Wir bieten jedoch auch diese Seite in Ihrer bevorzugten Sprache an. Möchten Sie wechseln?",
429
+ "button-label": "Wechseln zu ${preferred.label}",
430
+ "button-no-thanks": "Nein, danke",
431
+ "headline-other": "Andere Sprachen",
432
+ },
433
+ fr: {
434
+ headline: "Bienvenue sur notre site web",
435
+ text: "Cette page est actuellement affichée en ${currentLabel}. Cependant, nous proposons également cette page dans votre langue préférée. Souhaitez-vous changer?",
436
+ "button-label": "Changer pour ${preferred.label}",
437
+ "button-no-thanks": "Non, merci",
438
+ "headline-other": "Autres langues",
439
+ },
440
+ es: {
441
+ headline: "Bienvenido a nuestro sitio web",
442
+ text: "Esta página se muestra actualmente en ${currentLabel}. Sin embargo, también ofrecemos esta página en su idioma preferido. ¿Le gustaría cambiar?",
443
+ "button-label": "Cambiar a ${preferred.label}",
444
+ "button-no-thanks": "No, gracias",
445
+ "headline-other": "Otros idiomas",
446
+ },
447
+ it: {
448
+ headline: "Benvenuti sul nostro sito web",
449
+ text: "Questa pagina è attualmente visualizzata in ${currentLabel}. Tuttavia, offriamo anche questa pagina nella tua lingua preferita. Vuoi cambiare?",
450
+ "button-label": "Cambia nella ${preferred.label}",
451
+ "button-no-thanks": "No, grazie",
452
+ "headline-other": "Altre lingue",
453
+ },
454
+ pt: {
455
+ headline: "Bem-vindo ao nosso site",
456
+ text: "Esta página está atualmente exibida em ${currentLabel}. No entanto, também oferecemos esta página no seu idioma preferido. Gostaria de mudar?",
457
+ "button-label": "Mudar para ${preferred.label}",
458
+ "button-no-thanks": "Não, obrigado",
459
+ "headline-other": "Outros idiomas",
460
+ },
461
+ nl: {
462
+ headline: "Welkom op onze website",
463
+ text: "Deze pagina wordt momenteel weergegeven in ${currentLabel}. We bieden deze pagina echter ook aan in uw voorkeurstaal. Wilt u overschakelen?",
464
+ "button-label": "Overschakelen naar ${preferred.label}",
465
+ "button-no-thanks": "Nee, bedankt",
466
+ "headline-other": "Andere talen",
467
+ },
468
+ pl: {
469
+ headline: "Witamy na naszej stronie",
470
+ text: "Ta strona jest obecnie wyświetlana po ${currentLabel}. Oferujemy jednak również tę stronę w Twoim preferowanym języku. Czy chcesz przełączyć?",
471
+ "button-label": "Przełącz na ${preferred.label}",
472
+ "button-no-thanks": "Nie, dziękuję",
473
+ "headline-other": "Inne języki",
474
+ },
475
+ ru: {
476
+ headline: "Добро пожаловать на наш сайт",
477
+ text: "Эта страница в настоящее время отображается на ${currentLabel}. Однако мы также предлагаем эту страницу на вашем предпочтительном языке. Хотите переключиться?",
478
+ "button-label": "Переключиться на ${preferred.label}",
479
+ "button-no-thanks": "Нет, спасибо",
480
+ "headline-other": "Другие языки",
481
+ },
482
+ cs: {
483
+ headline: "Vítejte na našem webu",
484
+ text: "Tato stránka je aktuálně zobrazena v ${currentLabel}. Nabízíme však tuto stránku také ve vašem preferovaném jazyce. Chcete přejít?",
485
+ "button-label": "Přejít na ${preferred.label}",
486
+ "button-no-thanks": "Ne, děkuji",
487
+ "headline-other": "Další jazyky",
488
+ },
489
+ sk: {
490
+ headline: "Vitajte na našej webovej stránke",
491
+ text: "Táto stránka je v súčasnosti zobrazená v ${currentLabel}. Ponúkame však túto stránku aj vo vašom preferovanom jazyku. Chcete prejsť?",
492
+ "button-label": "Prepnúť na ${preferred.label}",
493
+ "button-no-thanks": "Nie, ďakujem",
494
+ "headline-other": "Iné jazyky",
495
+ },
496
+
497
+ bg: {
498
+ headline: "Добре дошли на нашия уебсайт",
499
+ text: "Тази страница в момента се показва на ${currentLabel}. Въпреки това, предлагаме също тази страница на Вашия предпочитан език. Желаете ли да превключите?",
500
+ "button-label": "Превключете на ${preferred.label}",
501
+ "button-no-thanks": "Не, благодаря",
502
+ "headline-other": "Други езици",
503
+ },
504
+ hr: {
505
+ headline: "Dobrodošli na našu web stranicu",
506
+ text: "Ova stranica trenutno je prikazana na ${currentLabel}. Međutim, nudimo i ovu stranicu na vašem preferiranom jeziku. Želite li prebaciti?",
507
+ "button-label": "Prebaci na ${preferred.label}",
508
+ "button-no-thanks": "Ne, hvala",
509
+ "headline-other": "Drugi jezici",
510
+ },
511
+ fi: {
512
+ headline: "Tervetuloa verkkosivustollemme",
513
+ text: "Tämä sivu on tällä hetkellä näkyvissä ${currentLabel}. Tarjoamme kuitenkin tätä sivua myös suosimallasi kielellä. Haluaisitko vaihtaa?",
514
+ "button-label": "Vaihda ${preferred.label}",
515
+ "button-no-thanks": "Ei kiitos",
516
+ "headline-other": "Muut kielet",
517
+ },
518
+ sv: {
519
+ headline: "Välkommen till vår webbplats",
520
+ text: "Denna sida visas för närvarande på ${currentLabel}. Vi erbjuder dock även denna sida på ditt föredragna språk. Skulle du vilja byta?",
521
+ "button-label": "Byt till ${preferred.label}",
522
+ "button-no-thanks": "Nej tack",
523
+ "headline-other": "Andra språk",
524
+ },
525
+ el: {
526
+ headline: "Καλώς ήρθατε στην ιστοσελίδα μας",
527
+ text: "Αυτή η σελίδα εμφανίζεται προς το παρόν στα ${currentLabel}. Ωστόσο, προσφέρουμε επίσης αυτή τη σελίδα στην προτιμώμενη γλώσσα σας. Θα θέλατε να αλλάξετε;",
528
+ "button-label": "Αλλαγή σε ${preferred.label}",
529
+ "button-no-thanks": "Όχι, ευχαριστώ",
530
+ "headline-other": "Άλλες γλώσσες",
531
+ },
532
+ hu: {
533
+ headline: "Üdvözöljük weboldalunkon",
534
+ text: "Ez az oldal jelenleg ${currentLabel} nyelven jelenik meg. Azonban kínáljuk ezt az oldalt a preferált nyelvén is. Szeretne váltani?",
535
+ "button-label": "Váltás ${preferred.label} nyelvre",
536
+ "button-no-thanks": "Nem, köszönöm",
537
+ "headline-other": "További nyelvek",
538
+ },
539
+ ro: {
540
+ headline: "Bine ați venit pe site-ul nostru",
541
+ text: "Această pagină este afișată în prezent în ${currentLabel}. Totuși, oferim de asemenea această pagină în limba dumneavoastră preferată. Doriți să schimbați?",
542
+ "button-label": "Schimbați în ${preferred.label}",
543
+ "button-no-thanks": "Nu, mulțumesc",
544
+ "headline-other": "Alte limbi",
545
+ },
546
+ da: {
547
+ headline: "Velkommen til vores hjemmeside",
548
+ text: "Denne side vises i øjeblikket på ${currentLabel}. Vi tilbyder dog også denne side på dit foretrukne sprog. Vil du skifte?",
549
+ "button-label": "Skift til ${preferred.label}",
550
+ "button-no-thanks": "Nej tak",
551
+ "headline-other": "Andre sprog",
552
+ },
553
+ no: {
554
+ headline: "Velkommen til vår nettside",
555
+ text: "Denne siden vises for øyeblikket på ${currentLabel}. Vi tilbyr imidlertid også denne siden på ditt foretrukne språk. Ønsker du å bytte?",
556
+ "button-label": "Bytt til ${preferred.label}",
557
+ "button-no-thanks": "Nei, takk",
558
+ "headline-other": "Andre språk",
559
+ },
560
+ hi: {
561
+ headline: "हमारी वेबसाइट पर आपका स्वागत है",
562
+ text: "यह पृष्ठ वर्तमान में ${currentLabel} में प्रदर्शित हो रहा है। हालांकि, हम इस पृष्ठ को आपकी पसंदीदा भाषा में भी प्रदान करते हैं। क्या आप स्विच करना चाहेंगे?",
563
+ "button-label": "${preferred.label} में स्विच करें",
564
+ "button-no-thanks": "नहीं, धन्यवाद",
565
+ "headline-other": "अन्य भाषाएँ",
566
+ },
567
+ bn: {
568
+ headline: "আমাদের ওয়েবসাইটে আপনাকে স্বাগতম",
569
+ text: "এই পৃষ্ঠাটি বর্তমানে ${currentLabel} প্রদর্শিত হচ্ছে। তবে, আমরা এই পৃষ্ঠাটি আপনার পছন্দের ভাষায়ও অফার করি। আপনি কি সুইচ করতে চান?",
570
+ "button-label": "${preferred.label}-এ সুইচ করুন",
571
+ "button-no-thanks": "না, ধন্যবাদ",
572
+ "headline-other": "অন্যান্য ভাষাসমূহ",
573
+ },
574
+ ta: {
575
+ headline: "எங்கள் இணையதளத்திற்கு வருக",
576
+ text: "இந்த பக்கம் தற்போது ${currentLabel} என்ற மொழியில் காட்சியளிக்கப்படுகிறது. எனினும், நாங்கள் இந்த பக்கத்தை உங்கள் விருப்ப மொழியிலும் வழங்குகிறோம். நீங்கள் மாற்ற விரும்புகிறீர்களா?",
577
+ "button-label": "${preferred.label}-க்கு மாற்றவும்",
578
+ "button-no-thanks": "இல்லை, நன்றி",
579
+ "headline-other": "மற்ற மொழிகள்",
580
+ },
581
+ te: {
582
+ headline: "మా వెబ్‌సైట్‌కు స్వాగతం",
583
+ text: "ఈ పేజీ ప్రస్తుతం ${currentLabel}లో ప్రదర్శితం అవుతున్నది. అయితే, మేము ఈ పేజీని మీ ఇష్టపడే భాషలో కూడా అందిస్తున్నాము. మీరు మార్చాలనుకుంటున్నారా?",
584
+ "button-label": "${preferred.label}కి మార్చండి",
585
+ "button-no-thanks": "కాదు, ధన్యవాదాలు",
586
+ "headline-other": "ఇతర భాషలు",
587
+ },
588
+ mr: {
589
+ headline: "आपले आमच्या वेबसाइटवर स्वागत आहे",
590
+ text: "हे पान सध्या ${currentLabel}मध्ये दाखविले जात आहे. परंतु, आम्ही हे पान आपल्या पसंतीच्या भाषेतही देत आहोत. आपण स्विच करू इच्छिता का?",
591
+ "button-label": "${preferred.label}मध्ये स्विच करा",
592
+ "button-no-thanks": "नाही, धन्यवाद",
593
+ "headline-other": "इतर भाषा",
594
+ },
595
+ zh: {
596
+ headline: "欢迎访问我们的网站",
597
+ text: "本页面当前显示为${currentLabel}。然而,我们还提供您偏好的语言版本。您想切换吗?",
598
+ "button-label": "切换到${preferred.label}",
599
+ "button-no-thanks": "不,谢谢",
600
+ "headline-other": "其他语言",
601
+ },
602
+ ja: {
603
+ headline: "私たちのウェブサイトへようこそ",
604
+ text: "このページは現在${currentLabel}で表示されています。しかし、私たちはあなたの好みの言語でこのページを提供しています。切り替えますか?",
605
+ "button-label": "${preferred.label}に切り替える",
606
+ "button-no-thanks": "いいえ、結構です",
607
+ "headline-other": "他の言語",
608
+ },
609
+ };
610
+
611
+ const selectAnOption = {
612
+ en: "Select a language",
613
+ de: "Wählen Sie eine Sprache",
614
+ fr: "Sélectionnez une langue",
615
+ es: "Seleccione un idioma",
616
+ it: "Seleziona una lingua",
617
+ pt: "Selecione um idioma",
618
+ nl: "Selecteer een taal",
619
+ pl: "Wybierz język",
620
+ ru: "Выберите язык",
621
+ cs: "Vyberte jazyk",
622
+ sk: "Vyberte jazyk",
623
+ bg: "Изберете език",
624
+ hr: "Odaberite jezik",
625
+ fi: "Valitse kieli",
626
+ sv: "Välj ett språk",
627
+ el: "Επιλέξτε γλώσσα",
628
+ hu: "Válasszon egy nyelvet",
629
+ ro: "Selectați o limbă",
630
+ da: "Vælg et sprog",
631
+ no: "Velg et språk",
632
+ hi: "एक भाषा चुनें",
633
+ bn: "একটি ভাষা নির্বাচন করুন",
634
+ ta: "ஒரு மொழியைத் தேர்ந்தெடுக்கவும்",
635
+ te: "భాషను ఎంచుకోండి",
636
+ mr: "एक भाषा निवडा",
637
+ zh: "选择一种语言",
638
+ ja: "言語を選択してください",
639
+ };
640
+
641
+ const result = {};
642
+
643
+ if (map[lang]) {
644
+ result["labels"] = map[lang];
645
+ } else {
646
+ result["labels"] = map["en"];
647
+ }
648
+
649
+ if (selectAnOption[lang]) {
650
+ result["selectAnOption"] = selectAnOption[lang];
651
+ } else {
652
+ result["selectAnOption"] = selectAnOption["en"];
653
+ }
654
+
655
+ return result;
656
656
  }
657
657
 
658
658
  /**
@@ -661,8 +661,8 @@ function getTranslations(lang) {
661
661
  * Returns the template for the component.
662
662
  */
663
663
  function getTemplate() {
664
- // language=HTML
665
- return `
664
+ // language=HTML
665
+ return `
666
666
  <div data-monster-role="control" part="control">
667
667
  <h2 data-monster-role="headline" part="headline" data-monster-replace="path:labels.headline"></h2>
668
668
  <p part="text" data-monster-replace="path:labels.text | call:replace-placeholder"></p>