From 2dd4d53786ce0582f2436e4dd063b6adbb4485f0 Mon Sep 17 00:00:00 2001 From: Billy Oliver Date: Mon, 18 Nov 2024 15:10:26 +0000 Subject: [PATCH] feat(pie-cookie-banner): WCP-000 refactorerd the locale fallback logic (#2043) * feat(pie-cookie-banner): WCP-000 refactorerd the locale fallback logic * feat(pie-cookie-banner): WCP-000 typo * feat(pie-cookie-banner): WCP-000 more tests plus removed console.log * feat(pie-cookie-banner): WCP-000 simplified logic to cater for wider audience * feat(pie-cookie-banner): WCP-000 updated documentation * feat(pie-cookie-banner): WCP-000 converted locales json files to js files * Update .changeset/cyan-candles-boil.md Co-authored-by: Jamie Maguire * feat(pie-cookie-banner): WCP-000 rebase conflict * Update .changeset/cyan-candles-boil.md Co-authored-by: Raouf * Update apps/pie-docs/src/patterns/cookie-banner/code/code.md Co-authored-by: Ben Siggery <14013357+siggerzz@users.noreply.github.com> --------- Co-authored-by: Billy Oliver Co-authored-by: Jamie Maguire Co-authored-by: Ben Siggery <14013357+siggerzz@users.noreply.github.com> Co-authored-by: Raouf --- .changeset/cyan-candles-boil.md | 6 + apps/pie-docs/component-statuses.json | 24 +++ .../src/patterns/cookie-banner/code/code.md | 33 +++- .../patterns/cookie-banner/code/props.json | 8 +- apps/pie-storybook/component-statuses.json | 24 +++ .../stories/pie-cookie-banner.stories.ts | 4 +- component-statuses.json | 24 +++ .../pie-cookie-banner/declaration.d.ts | 46 ++++++ .../pie-cookie-banner/locales/bg-bg.json | 40 ----- .../pie-cookie-banner/locales/bg.js | 40 +++++ .../pie-cookie-banner/locales/ca-es.json | 40 ----- .../pie-cookie-banner/locales/ca.js | 40 +++++ .../pie-cookie-banner/locales/da-dk.json | 40 ----- .../pie-cookie-banner/locales/da.js | 40 +++++ .../pie-cookie-banner/locales/de-de.json | 40 ----- .../pie-cookie-banner/locales/de.js | 40 +++++ .../pie-cookie-banner/locales/en-fr.js | 40 +++++ .../pie-cookie-banner/locales/en-fr.json | 40 ----- .../pie-cookie-banner/locales/en-gb.json | 40 ----- .../pie-cookie-banner/locales/en.js | 40 +++++ .../pie-cookie-banner/locales/es-es.json | 40 ----- .../pie-cookie-banner/locales/es.js | 40 +++++ .../pie-cookie-banner/locales/fr-fr.js | 40 +++++ .../pie-cookie-banner/locales/fr-fr.json | 40 ----- .../pie-cookie-banner/locales/fr.js | 40 +++++ .../pie-cookie-banner/locales/he-il.json | 40 ----- .../pie-cookie-banner/locales/he.js | 40 +++++ .../pie-cookie-banner/locales/index.js | 30 ---- .../pie-cookie-banner/locales/it-it.json | 40 ----- .../pie-cookie-banner/locales/it.js | 40 +++++ .../pie-cookie-banner/locales/nl-nl.json | 40 ----- .../pie-cookie-banner/locales/nl.js | 40 +++++ .../pie-cookie-banner/locales/pl-pl.json | 40 ----- .../pie-cookie-banner/locales/pl.js | 40 +++++ .../pie-cookie-banner/locales/sk-sk.json | 40 ----- .../pie-cookie-banner/locales/sk.js | 40 +++++ .../components/pie-cookie-banner/src/defs.ts | 69 +++++++-- .../components/pie-cookie-banner/src/index.ts | 52 +++++-- .../pie-cookie-banner-locale.spec.ts | 142 ++++++------------ 39 files changed, 856 insertions(+), 686 deletions(-) create mode 100644 .changeset/cyan-candles-boil.md create mode 100644 apps/pie-docs/component-statuses.json create mode 100644 apps/pie-storybook/component-statuses.json create mode 100644 component-statuses.json delete mode 100644 packages/components/pie-cookie-banner/locales/bg-bg.json create mode 100644 packages/components/pie-cookie-banner/locales/bg.js delete mode 100644 packages/components/pie-cookie-banner/locales/ca-es.json create mode 100644 packages/components/pie-cookie-banner/locales/ca.js delete mode 100644 packages/components/pie-cookie-banner/locales/da-dk.json create mode 100644 packages/components/pie-cookie-banner/locales/da.js delete mode 100644 packages/components/pie-cookie-banner/locales/de-de.json create mode 100644 packages/components/pie-cookie-banner/locales/de.js create mode 100644 packages/components/pie-cookie-banner/locales/en-fr.js delete mode 100644 packages/components/pie-cookie-banner/locales/en-fr.json delete mode 100644 packages/components/pie-cookie-banner/locales/en-gb.json create mode 100644 packages/components/pie-cookie-banner/locales/en.js delete mode 100644 packages/components/pie-cookie-banner/locales/es-es.json create mode 100644 packages/components/pie-cookie-banner/locales/es.js create mode 100644 packages/components/pie-cookie-banner/locales/fr-fr.js delete mode 100644 packages/components/pie-cookie-banner/locales/fr-fr.json create mode 100644 packages/components/pie-cookie-banner/locales/fr.js delete mode 100644 packages/components/pie-cookie-banner/locales/he-il.json create mode 100644 packages/components/pie-cookie-banner/locales/he.js delete mode 100644 packages/components/pie-cookie-banner/locales/index.js delete mode 100644 packages/components/pie-cookie-banner/locales/it-it.json create mode 100644 packages/components/pie-cookie-banner/locales/it.js delete mode 100644 packages/components/pie-cookie-banner/locales/nl-nl.json create mode 100644 packages/components/pie-cookie-banner/locales/nl.js delete mode 100644 packages/components/pie-cookie-banner/locales/pl-pl.json create mode 100644 packages/components/pie-cookie-banner/locales/pl.js delete mode 100644 packages/components/pie-cookie-banner/locales/sk-sk.json create mode 100644 packages/components/pie-cookie-banner/locales/sk.js diff --git a/.changeset/cyan-candles-boil.md b/.changeset/cyan-candles-boil.md new file mode 100644 index 0000000000..cfd37cb064 --- /dev/null +++ b/.changeset/cyan-candles-boil.md @@ -0,0 +1,6 @@ +--- +'@justeattakeaway/pie-cookie-banner': minor +'pie-docs': minor +--- + +[Updated] - refactored the locale fallback logic so we can cater for more combinations diff --git a/apps/pie-docs/component-statuses.json b/apps/pie-docs/component-statuses.json new file mode 100644 index 0000000000..90051f336f --- /dev/null +++ b/apps/pie-docs/component-statuses.json @@ -0,0 +1,24 @@ +{ + "pie-assistive-text": "beta", + "pie-button": "beta", + "pie-card": "beta", + "pie-checkbox": "beta", + "pie-checkbox-group": "beta", + "pie-chip": "beta", + "pie-cookie-banner": "beta", + "pie-divider": "beta", + "pie-form-label": "alpha", + "pie-icon-button": "beta", + "pie-link": "beta", + "pie-lottie-player": "alpha", + "pie-modal": "beta", + "pie-notification": "beta", + "pie-radio": "alpha", + "pie-radio-group": "alpha", + "pie-spinner": "beta", + "pie-switch": "alpha", + "pie-tag": "beta", + "pie-text-input": "beta", + "pie-textarea": "alpha", + "pie-toast": "alpha" +} \ No newline at end of file diff --git a/apps/pie-docs/src/patterns/cookie-banner/code/code.md b/apps/pie-docs/src/patterns/cookie-banner/code/code.md index 5e0a3c502c..dd36d0a73e 100644 --- a/apps/pie-docs/src/patterns/cookie-banner/code/code.md +++ b/apps/pie-docs/src/patterns/cookie-banner/code/code.md @@ -65,11 +65,40 @@ tableData: events ## Localisation -By default, the component displays its content in GB English. To display the content in another language, you need to supply a supported language and country pairing to the `language` and `country` props. You can see the currently supported locale pairings here: +By default, the component displays its content in English `en`. To display the content in another language, you need to supply a language and country pairing to the `language` and `country` props(*). + +Currently the following locale languages are supported: ```js -import allLocales from '@justeattakeaway/pie-cookie-banner/locales'; +bg (BULGARIAN) +ca (CATALAN) +da (DANISH) +de (GERMAN) +en (ENGLISH) +es (SPANISH) +he (HEBREW) +it (ITALIAN) +nl (DUTCH) +pl (POLISH) +sk (SLOVAK) ``` +And the following bespoke locales are supported (_sometimes added to accommodate specific legal wording for a particular country_): + +```js +en-fr (ENGLISH-FRANCE) +fr-fr (FRENCH-FRANCE) +``` +(*) This is the logic order for loading the locale; + +1. We attempt to load the bespoke locale for a given language/country combination, e.g. `fr-fr`. +2. We would attempt to use the locale file based on the language supplied, e.g. if you supplied language `de` & country `ch` we would use the locale file `de`, if you supplied language `fr` & country `ca` then we would use the locale file `fr`, etc. +3. If you supply an unsupported language in the language/country combination then we would attempt to use the default locale file based on the country supplied, e.g. if you supplied language `pt` & country `es` we would use the locale file `es`, if you supplied language `ru` & country `fr` then we would use the locale file `fr`, etc. +4. If both the language and country are unsupported then we would use the default of `en`. + +{% notification { + type: "information", + message: "If you wish to support a new language or combination, then create a new locale file and then extend the code to support this new language/country." +} %} ## Examples diff --git a/apps/pie-docs/src/patterns/cookie-banner/code/props.json b/apps/pie-docs/src/patterns/cookie-banner/code/props.json index e91850c77b..14d75d0b2d 100644 --- a/apps/pie-docs/src/patterns/cookie-banner/code/props.json +++ b/apps/pie-docs/src/patterns/cookie-banner/code/props.json @@ -15,8 +15,8 @@ ], [ "country", - "Any supported country, that is paired with the language [(see these supported locales)](https://github.com/justeattakeaway/pie/tree/main/packages/components/pie-cookie-banner/locales)", - "Used (with the language property) to load the localisation data for the component strings. If not provided or unsupported, the default language-country of en-gb will be used. Note this value is case-insensitive", + "2 character country code", + "Used to load the localisation data for the component strings. If not provided the default country of 'gb' will be used. Note this value is case-insensitive", { "type": "code", "item": ["\"gb\""] @@ -24,8 +24,8 @@ ], [ "language", - "Any supported language, that is paired with the country [(see these supported locales)](https://github.com/justeattakeaway/pie/tree/main/packages/components/pie-cookie-banner/locales)", - "Used (with the country property) to load the localisation data for the component strings. If not provided or unsupported, the default language of the country will be used. Note this value is case-insensitive", + "2 character language code", + "Used to load the localisation data for the component strings. If not provided the default language of the country will be used. Note this value is case-insensitive", { "type": "code", "item": ["\"en\""] diff --git a/apps/pie-storybook/component-statuses.json b/apps/pie-storybook/component-statuses.json new file mode 100644 index 0000000000..e44c90233a --- /dev/null +++ b/apps/pie-storybook/component-statuses.json @@ -0,0 +1,24 @@ +{ + "pie-assistive-text": "beta", + "pie-button": "stable", + "pie-card": "beta", + "pie-checkbox": "beta", + "pie-checkbox-group": "beta", + "pie-chip": "beta", + "pie-cookie-banner": "stable", + "pie-divider": "stable", + "pie-form-label": "alpha", + "pie-icon-button": "stable", + "pie-link": "stable", + "pie-lottie-player": "alpha", + "pie-modal": "stable", + "pie-notification": "beta", + "pie-radio": "alpha", + "pie-radio-group": "alpha", + "pie-spinner": "stable", + "pie-switch": "stable", + "pie-tag": "beta", + "pie-text-input": "beta", + "pie-textarea": "alpha", + "pie-toast": "alpha" +} \ No newline at end of file diff --git a/apps/pie-storybook/stories/pie-cookie-banner.stories.ts b/apps/pie-storybook/stories/pie-cookie-banner.stories.ts index 866b4ceb0c..d20f23d484 100644 --- a/apps/pie-storybook/stories/pie-cookie-banner.stories.ts +++ b/apps/pie-storybook/stories/pie-cookie-banner.stories.ts @@ -32,7 +32,7 @@ const cookieBannerStoryMeta: CookieBannerStoryMeta = { control: 'boolean', }, country: { - options: Object.values(Country), + options: [...Object.values(Country), 'ru', 'pt', 'ES', 'invalid'], // Expanded to allow for unsupported value tests control: 'select', description: 'Assigns the country for the component', defaultValue: { @@ -40,7 +40,7 @@ const cookieBannerStoryMeta: CookieBannerStoryMeta = { }, }, language: { - options: Object.values(Language), + options: [...Object.values(Language), 'ru', 'pt', 'CA', 'invalid'], // Expanded to allow for unsupported value tests control: 'select', description: 'Assigns the language for the component', defaultValue: { diff --git a/component-statuses.json b/component-statuses.json new file mode 100644 index 0000000000..e44c90233a --- /dev/null +++ b/component-statuses.json @@ -0,0 +1,24 @@ +{ + "pie-assistive-text": "beta", + "pie-button": "stable", + "pie-card": "beta", + "pie-checkbox": "beta", + "pie-checkbox-group": "beta", + "pie-chip": "beta", + "pie-cookie-banner": "stable", + "pie-divider": "stable", + "pie-form-label": "alpha", + "pie-icon-button": "stable", + "pie-link": "stable", + "pie-lottie-player": "alpha", + "pie-modal": "stable", + "pie-notification": "beta", + "pie-radio": "alpha", + "pie-radio-group": "alpha", + "pie-spinner": "stable", + "pie-switch": "stable", + "pie-tag": "beta", + "pie-text-input": "beta", + "pie-textarea": "alpha", + "pie-toast": "alpha" +} \ No newline at end of file diff --git a/packages/components/pie-cookie-banner/declaration.d.ts b/packages/components/pie-cookie-banner/declaration.d.ts index e198d772d0..ef31b4eacb 100644 --- a/packages/components/pie-cookie-banner/declaration.d.ts +++ b/packages/components/pie-cookie-banner/declaration.d.ts @@ -7,3 +7,49 @@ declare module '*.scss?inline' { const content: Record; export default content; } + +declare module '@justeattakeaway/pie-cookie-banner/locales/*.js' { + export interface CookieBannerLocale { + banner: { + title: string; + description: string; + cta: { + managePreferences: string; + necessaryOnly: string; + acceptAll: string; + }; + }; + preferencesManagement: { + title: string; + description: string; + all: { + title: string; + }; + necessary: { + title: string; + description: string; + }; + functional: { + title: string; + description: string; + }; + analytical: { + title: string; + description: string; + }; + personalized: { + title: string; + description: string; + }; + cta: { + save: { + label: string; + ariaLabel: string; + }; + }; + }; + } + + const locale: CookieBannerLocale; + export default locale; +} diff --git a/packages/components/pie-cookie-banner/locales/bg-bg.json b/packages/components/pie-cookie-banner/locales/bg-bg.json deleted file mode 100644 index 1279bfed85..0000000000 --- a/packages/components/pie-cookie-banner/locales/bg-bg.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Бисквитки", - "description": "Използваме наши собствени бисквитки и бисквитки на трети страни и друга технология, за да усъвършенстваме и персонализираме изживяването ти като потребител, за да оптимизираме статистиката и да показваме реклами на трети страни (прочети нашата декларация). Винаги настройваме необходимите бисквитки. Кликни върху Само необходимите, за да продължиш, без да приемаш други. Кликни върху Управление на предпочитанията, за да споделиш своите предпочитания или приеми всички.", - "cta": { - "managePreferences": "Управление на предпочитанията", - "necessaryOnly": "Само необходимите", - "acceptAll": "Приемане на всички" - } - }, - "preferencesManagement": { - "title": "Управление на предпочитанията", - "description": "Можеш да намериш цялата информация в Декларацията за бисквитки и Списъка с технологии за бисквитки.", - "all": { - "title": "Включи всички" - }, - "necessary": { - "title": "Необходими", - "description": "Тези бисквитки са необходими, за да се гарантира правилното функциониране на уебсайта и неговите свойства. Заявените от теб услуги не могат да се предоставят без тези бисквитки." - }, - "functional": { - "title": "Функционални", - "description": "Тези бисквитки позволяват на уебсайта да запомни направените от теб избори за осигуряване на по-добра функционалност и персонализирани функции." - }, - "analytical": { - "title": "Аналитични", - "description": "Тези аналитични бисквитки, включително за статистически данни, се използват за разбиране начина, по който посетителите взаимодействат с уебсайта, за да можем да измерваме и подобряваме ефективността на нашия уебсайт." - }, - "personalized": { - "title": "Персонализирани (целеви и рекламни)", - "description": "Тези маркетингови бисквитки се използват за персонализиране предоставянето на информация на теб въз основа на твоя интерес и за измерване на ефективността на такива реклами на нашия уебсайт и на уебсайтовете на рекламните ни партньори." - }, - "cta": { - "save": { - "label": "Запази", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/bg.js b/packages/components/pie-cookie-banner/locales/bg.js new file mode 100644 index 0000000000..5a3ad0f4b9 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/bg.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Бисквитки', + description: 'Използваме наши собствени бисквитки и бисквитки на трети страни и друга технология, за да усъвършенстваме и персонализираме изживяването ти като потребител, за да оптимизираме статистиката и да показваме реклами на трети страни (прочети нашата декларация). Винаги настройваме необходимите бисквитки. Кликни върху Само необходимите, за да продължиш, без да приемаш други. Кликни върху Управление на предпочитанията, за да споделиш своите предпочитания или приеми всички.', + cta: { + managePreferences: 'Управление на предпочитанията', + necessaryOnly: 'Само необходимите', + acceptAll: 'Приемане на всички', + }, + }, + preferencesManagement: { + title: 'Управление на предпочитанията', + description: 'Можеш да намериш цялата информация в Декларацията за бисквитки и Списъка с технологии за бисквитки.', + all: { + title: 'Включи всички', + }, + necessary: { + title: 'Необходими', + description: 'Тези бисквитки са необходими, за да се гарантира правилното функциониране на уебсайта и неговите свойства. Заявените от теб услуги не могат да се предоставят без тези бисквитки.', + }, + functional: { + title: 'Функционални', + description: 'Тези бисквитки позволяват на уебсайта да запомни направените от теб избори за осигуряване на по-добра функционалност и персонализирани функции.', + }, + analytical: { + title: 'Аналитични', + description: 'Тези аналитични бисквитки, включително за статистически данни, се използват за разбиране начина, по който посетителите взаимодействат с уебсайта, за да можем да измерваме и подобряваме ефективността на нашия уебсайт.', + }, + personalized: { + title: 'Персонализирани (целеви и рекламни)', + description: 'Тези маркетингови бисквитки се използват за персонализиране предоставянето на информация на теб въз основа на твоя интерес и за измерване на ефективността на такива реклами на нашия уебсайт и на уебсайтовете на рекламните ни партньори.', + }, + cta: { + save: { + label: 'Запази', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/ca-es.json b/packages/components/pie-cookie-banner/locales/ca-es.json deleted file mode 100644 index b59ee4fcc5..0000000000 --- a/packages/components/pie-cookie-banner/locales/ca-es.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Galetes", - "description": "Utilitzem galetes pròpies i de tercers, així com altres tecnologies per millorar i personalitzar la teva experiència d’usuari, optimitzar l’anàlisi i mostrar anuncis amb tercers (llegeix la nostra Declaració). Les galetes necessàries sempre estan definides. Fes clic a Només necessàries per continuar sense acceptar-ne més. Fes clic a Gestionar preferències per compartir les teves preferències o Acceptar-les totes.", - "cta": { - "managePreferences": "Gestionar preferències", - "necessaryOnly": "Només necessàries", - "acceptAll": "Acceptar-les totes" - } - }, - "preferencesManagement": { - "title": "Gestiona les teves preferències", - "description": "Pots trobar tota la informació a la Declaració de galetes i a la llista de tecnologies de galetes.", - "all": { - "title": "Activar-les totes" - }, - "necessary": { - "title": "Necessàries", - "description": "Aquestes galetes són necessàries per garantir que el lloc web i les seves característiques funcionin adequadament. Els serveis que has demanat no es poden oferir sense aquestes galetes." - }, - "functional": { - "title": "Funcionals", - "description": "Aquestes galetes permeten que el lloc web recordi les eleccions que fas per oferir-te una millor funcionalitat i característiques personals." - }, - "analytical": { - "title": "Analítiques", - "description": "Aquestes galetes analítiques, incloses les estadístiques, s’utilitzen per entendre com interaccionen els visitants amb el lloc web i per poder mesurar i millorar el rendiment del nostre lloc web." - }, - "personalized": { - "title": "Personalitzades (orientació i publicitat)", - "description": "Aquestes galetes de màrqueting s’utilitzen per adaptar el lliurament de la informació en funció del teu interès i per mesurar l’eficàcia d’aquests anuncis, tant al nostre lloc web com als llocs web dels nostres socis publicitaris." - }, - "cta": { - "save": { - "label": "Desar", - "ariaLabel": "" - } - } - } - } diff --git a/packages/components/pie-cookie-banner/locales/ca.js b/packages/components/pie-cookie-banner/locales/ca.js new file mode 100644 index 0000000000..e4b3078134 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/ca.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Galetes', + description: 'Utilitzem galetes pròpies i de tercers, així com altres tecnologies per millorar i personalitzar la teva experiència d’usuari, optimitzar l’anàlisi i mostrar anuncis amb tercers (llegeix la nostra Declaració). Les galetes necessàries sempre estan definides. Fes clic a Només necessàries per continuar sense acceptar-ne més. Fes clic a Gestionar preferències per compartir les teves preferències o Acceptar-les totes.', + cta: { + managePreferences: 'Gestionar preferències', + necessaryOnly: 'Només necessàries', + acceptAll: 'Acceptar-les totes', + }, + }, + preferencesManagement: { + title: 'Gestiona les teves preferències', + description: 'Pots trobar tota la informació a la Declaració de galetes i a la llista de tecnologies de galetes.', + all: { + title: 'Activar-les totes', + }, + necessary: { + title: 'Necessàries', + description: 'Aquestes galetes són necessàries per garantir que el lloc web i les seves característiques funcionin adequadament. Els serveis que has demanat no es poden oferir sense aquestes galetes.', + }, + functional: { + title: 'Funcionals', + description: 'Aquestes galetes permeten que el lloc web recordi les eleccions que fas per oferir-te una millor funcionalitat i característiques personals.', + }, + analytical: { + title: 'Analítiques', + description: 'Aquestes galetes analítiques, incloses les estadístiques, s’utilitzen per entendre com interaccionen els visitants amb el lloc web i per poder mesurar i millorar el rendiment del nostre lloc web.', + }, + personalized: { + title: 'Personalitzades (orientació i publicitat)', + description: 'Aquestes galetes de màrqueting s’utilitzen per adaptar el lliurament de la informació en funció del teu interès i per mesurar l’eficàcia d’aquests anuncis, tant al nostre lloc web com als llocs web dels nostres socis publicitaris.', + }, + cta: { + save: { + label: 'Desar', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/da-dk.json b/packages/components/pie-cookie-banner/locales/da-dk.json deleted file mode 100644 index 0933f70287..0000000000 --- a/packages/components/pie-cookie-banner/locales/da-dk.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "Vi bruger vores egne og tredjepartscookies og anden teknologi til at forbedre og tilpasse din brugeroplevelse, optimere analyser og vise annoncer med tredjeparter (læs vores erklæring). Vi bruger altid nødvendige cookier. Klik på Kun nødvendige for at fortsætte uden at acceptere flere. Klik på Administrer præferencer for at dele dine præferencer eller Accepter alle.", - "cta": { - "managePreferences": "Administrer præferencer", - "necessaryOnly": "Kun nødvendige", - "acceptAll": "Accepter alle" - } - }, - "preferencesManagement": { - "title": "Administrer præferencer", - "description": "Du kan finde alle oplysningerne i cookie-erklæringen og cookie-teknologilisten.", - "all": { - "title": "Aktiver alle" - }, - "necessary": { - "title": "Nødvendige", - "description": " Disse cookier er nødvendige for at sikre, at hjemmesiden og dens funktioner fungerer korrekt. Tjenester, som du har bedt om, kan ikke leveres uden disse cookier." - }, - "functional": { - "title": "Funktionelle", - "description": " Disse cookier gør det muligt for hjemmesiden at huske de valg, du træffer, for at give dig bedre funktionalitet og personlige funktioner." - }, - "analytical": { - "title": "Analytiske", - "description": " Disse analytiske cookier, herunder statistiske, bruges til at forstå, hvordan besøgende interagerer med hjemmesiden, og vi kan måle og forbedre vores hjemmesides ydeevne." - }, - "personalized": { - "title": "Personlige (målretning og annoncering)", - "description": "Disse markedsføringscookier bruges til at skræddersy leveringen af oplysninger til dig baseret på dine interesser og til at måle effektiviteten af sådanne annoncer, både på vores hjemmeside og vores annonceringspartneres hjemmesider." - }, - "cta": { - "save": { - "label": "Gem", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/da.js b/packages/components/pie-cookie-banner/locales/da.js new file mode 100644 index 0000000000..6dfa978f79 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/da.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'Vi bruger vores egne og tredjepartscookies og anden teknologi til at forbedre og tilpasse din brugeroplevelse, optimere analyser og vise annoncer med tredjeparter (læs vores erklæring). Vi bruger altid nødvendige cookier. Klik på Kun nødvendige for at fortsætte uden at acceptere flere. Klik på Administrer præferencer for at dele dine præferencer eller Accepter alle.', + cta: { + managePreferences: 'Administrer præferencer', + necessaryOnly: 'Kun nødvendige', + acceptAll: 'Accepter alle', + }, + }, + preferencesManagement: { + title: 'Administrer præferencer', + description: 'Du kan finde alle oplysningerne i cookie-erklæringen og cookie-teknologilisten.', + all: { + title: 'Aktiver alle', + }, + necessary: { + title: 'Nødvendige', + description: ' Disse cookier er nødvendige for at sikre, at hjemmesiden og dens funktioner fungerer korrekt. Tjenester, som du har bedt om, kan ikke leveres uden disse cookier.', + }, + functional: { + title: 'Funktionelle', + description: ' Disse cookier gør det muligt for hjemmesiden at huske de valg, du træffer, for at give dig bedre funktionalitet og personlige funktioner.', + }, + analytical: { + title: 'Analytiske', + description: ' Disse analytiske cookier, herunder statistiske, bruges til at forstå, hvordan besøgende interagerer med hjemmesiden, og vi kan måle og forbedre vores hjemmesides ydeevne.', + }, + personalized: { + title: 'Personlige (målretning og annoncering)', + description: 'Disse markedsføringscookier bruges til at skræddersy leveringen af oplysninger til dig baseret på dine interesser og til at måle effektiviteten af sådanne annoncer, både på vores hjemmeside og vores annonceringspartneres hjemmesider.', + }, + cta: { + save: { + label: 'Gem', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/de-de.json b/packages/components/pie-cookie-banner/locales/de-de.json deleted file mode 100644 index 0a68cce3ce..0000000000 --- a/packages/components/pie-cookie-banner/locales/de-de.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "Wir nutzen unsere eigenen Cookies und die von Drittanbietern sowie andere Technologien, um dein Nutzererlebnis zu verbessern und zu personalisieren, um Analysen zur Optimierung durchzuführen und um Werbung in Partnerschaft mit Dritten zu schalten (siehe unsere Hinweise). Die notwendigen Cookies werden immer gesetzt. Klicke auf Nur notwendige, um fortzufahren, ohne weitere anzunehmen. Klicke auf Einstellungen verwalten, um deine Einstellungen zu aktualisieren, oder auf Alle annehmen.", - "cta": { - "managePreferences": "Einstellungen verwalten", - "necessaryOnly": "Nur notwendige", - "acceptAll": "Alle annehmen" - } - }, - "preferencesManagement": { - "title": "Deine Einstellungen verwalten", - "description": "Alle Informationen findest du in der Cookie-Erklärung und der Cookie-Technologie-Liste.", - "all": { - "title": "Alle aktivieren" - }, - "necessary": { - "title": "Notwendig", - "description": "Diese Cookies sind notwendig, um sicherzustellen, dass die Webseite und ihre Funktionen ordnungsgemäß funktionieren. Die von dir angeforderten Dienste können ohne diese Cookies nicht bereitgestellt werden." - }, - "functional": { - "title": "Funktional", - "description": "Diese Cookies ermöglichen es der Webseite, sich an die von dir getroffenen Entscheidungen zu erinnern, um dir eine bessere Funktionalität und individuelle Funktionen zu bieten." - }, - "analytical": { - "title": "Analytisch", - "description": "Diese analytischen Cookies, einschließlich Statistiken, werden verwendet, um zu verstehen, wie Besucher mit der Webseite interagieren, und wir können die Leistung unserer Webseite messen und verbessern." - }, - "personalized": { - "title": "Personalisiert (Targeting und Werbung)", - "description": "Diese Marketing-Cookies werden verwendet, um die Übermittlung von Informationen an dich auf deine Interessen abzustimmen und um die Effektivität solcher Werbung zu messen, sowohl auf unserer Webseite als auch auf den Webseiten unserer Werbepartner." - }, - "cta": { - "save": { - "label": "Speichern", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/de.js b/packages/components/pie-cookie-banner/locales/de.js new file mode 100644 index 0000000000..69a380cde2 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/de.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'Wir nutzen unsere eigenen Cookies und die von Drittanbietern sowie andere Technologien, um dein Nutzererlebnis zu verbessern und zu personalisieren, um Analysen zur Optimierung durchzuführen und um Werbung in Partnerschaft mit Dritten zu schalten (siehe unsere Hinweise). Die notwendigen Cookies werden immer gesetzt. Klicke auf Nur notwendige, um fortzufahren, ohne weitere anzunehmen. Klicke auf Einstellungen verwalten, um deine Einstellungen zu aktualisieren, oder auf Alle annehmen.', + cta: { + managePreferences: 'Einstellungen verwalten', + necessaryOnly: 'Nur notwendige', + acceptAll: 'Alle annehmen', + }, + }, + preferencesManagement: { + title: 'Deine Einstellungen verwalten', + description: 'Alle Informationen findest du in der Cookie-Erklärung und der Cookie-Technologie-Liste.', + all: { + title: 'Alle aktivieren', + }, + necessary: { + title: 'Notwendig', + description: 'Diese Cookies sind notwendig, um sicherzustellen, dass die Webseite und ihre Funktionen ordnungsgemäß funktionieren. Die von dir angeforderten Dienste können ohne diese Cookies nicht bereitgestellt werden.', + }, + functional: { + title: 'Funktional', + description: 'Diese Cookies ermöglichen es der Webseite, sich an die von dir getroffenen Entscheidungen zu erinnern, um dir eine bessere Funktionalität und individuelle Funktionen zu bieten.', + }, + analytical: { + title: 'Analytisch', + description: 'Diese analytischen Cookies, einschließlich Statistiken, werden verwendet, um zu verstehen, wie Besucher mit der Webseite interagieren, und wir können die Leistung unserer Webseite messen und verbessern.', + }, + personalized: { + title: 'Personalisiert (Targeting und Werbung)', + description: 'Diese Marketing-Cookies werden verwendet, um die Übermittlung von Informationen an dich auf deine Interessen abzustimmen und um die Effektivität solcher Werbung zu messen, sowohl auf unserer Webseite als auch auf den Webseiten unserer Werbepartner.', + }, + cta: { + save: { + label: 'Speichern', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/en-fr.js b/packages/components/pie-cookie-banner/locales/en-fr.js new file mode 100644 index 0000000000..550309c4dd --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/en-fr.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'We use our own and third party cookies and other tech to enhance and personalise your user experience, optimize analytics, and show ads with third parties (read our Statement). Necessary cookies are always set. Select Continue without accepting to accept only essential trackers required for an optimal use of our platform. Click Manage preferences to share your preferences or Accept all.', + cta: { + managePreferences: 'Manage preferences', + necessaryOnly: 'Continue without accepting', + acceptAll: 'Accept all', + }, + }, + preferencesManagement: { + title: 'Manage your preferences', + description: 'You can find all the information in the Cookie Statement and Cookie technology list.', + all: { + title: 'Turn all on', + }, + necessary: { + title: 'Necessary Technologies', + description: 'These technologies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these technologies.', + }, + functional: { + title: 'Functional Technologies', + description: 'These technologies allow the website to remember the choices you make to give you better functionality and personal features.', + }, + analytical: { + title: 'Analytical Technologies', + description: 'These analytical technologies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website.', + }, + personalized: { + title: 'Personalised (targeting and advertising) Technologies', + description: "These marketing technologies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on our website and our advertising partners' websites.", + }, + cta: { + save: { + label: 'Save', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/en-fr.json b/packages/components/pie-cookie-banner/locales/en-fr.json deleted file mode 100644 index 486d71b97b..0000000000 --- a/packages/components/pie-cookie-banner/locales/en-fr.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "We use our own and third party cookies and other tech to enhance and personalise your user experience, optimize analytics, and show ads with third parties (read our Statement). Necessary cookies are always set. Select Continue without accepting to accept only essential trackers required for an optimal use of our platform. Click Manage preferences to share your preferences or Accept all.", - "cta": { - "managePreferences": "Manage preferences", - "necessaryOnly": "Continue without accepting", - "acceptAll": "Accept all" - } - }, - "preferencesManagement": { - "title": "Manage your preferences", - "description": "You can find all the information in the Cookie Statement and Cookie technology list.", - "all": { - "title": "Turn all on" - }, - "necessary": { - "title": "Necessary Technologies", - "description": "These technologies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these technologies." - }, - "functional": { - "title": "Functional Technologies", - "description": "These technologies allow the website to remember the choices you make to give you better functionality and personal features." - }, - "analytical": { - "title": "Analytical Technologies", - "description": "These analytical technologies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website." - }, - "personalized": { - "title": "Personalised (targeting and advertising) Technologies", - "description": "These marketing technologies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on our website and our advertising partners' websites." - }, - "cta": { - "save": { - "label": "Save", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/en-gb.json b/packages/components/pie-cookie-banner/locales/en-gb.json deleted file mode 100644 index 4aae9fdc48..0000000000 --- a/packages/components/pie-cookie-banner/locales/en-gb.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "We use our own and third party cookies and other tech to enhance and personalise your user experience, optimize analytics, and show ads with third parties (read our Statement). Necessary cookies are always set. Click Necessary only to continue without accepting more. Click Manage preferences to share your preferences or Accept all.", - "cta": { - "managePreferences": "Manage preferences", - "necessaryOnly": "Necessary only", - "acceptAll": "Accept all" - } - }, - "preferencesManagement": { - "title": "Manage your preferences", - "description": "You can find all the information in the Cookie Statement and Cookie technology list.", - "all": { - "title": "Turn all on" - }, - "necessary": { - "title": "Necessary", - "description": "These cookies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these cookies." - }, - "functional": { - "title": "Functional", - "description": "These cookies allow the website to remember the choices you make to give you better functionality and personal features." - }, - "analytical": { - "title": "Analytical", - "description": "These analytical cookies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website." - }, - "personalized": { - "title": "Personalised (targeting and advertising)", - "description": "These marketing cookies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on our website and our advertising partners' websites." - }, - "cta": { - "save": { - "label": "Save", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/en.js b/packages/components/pie-cookie-banner/locales/en.js new file mode 100644 index 0000000000..ddc0d6b1f0 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/en.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'We use our own and third party cookies and other tech to enhance and personalise your user experience, optimize analytics, and show ads with third parties (read our Statement). Necessary cookies are always set. Click Necessary only to continue without accepting more. Click Manage preferences to share your preferences or Accept all.', + cta: { + managePreferences: 'Manage preferences', + necessaryOnly: 'Necessary only', + acceptAll: 'Accept all', + }, + }, + preferencesManagement: { + title: 'Manage your preferences', + description: 'You can find all the information in the Cookie Statement and Cookie technology list.', + all: { + title: 'Turn all on', + }, + necessary: { + title: 'Necessary', + description: 'These cookies are necessary to ensure that the website and its features function properly. Services you have asked for cannot be provided without these cookies.', + }, + functional: { + title: 'Functional', + description: 'These cookies allow the website to remember the choices you make to give you better functionality and personal features.', + }, + analytical: { + title: 'Analytical', + description: 'These analytical cookies, including statistics, are used to understand how visitors interact with the website and we can measure and improve the performance of our website.', + }, + personalized: { + title: 'Personalised (targeting and advertising)', + description: "These marketing cookies are used to tailor the delivery of information to you based upon your interest and to measure the effectiveness of such advertisements, both on our website and our advertising partners' websites.", + }, + cta: { + save: { + label: 'Save', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/es-es.json b/packages/components/pie-cookie-banner/locales/es-es.json deleted file mode 100644 index c0334dc799..0000000000 --- a/packages/components/pie-cookie-banner/locales/es-es.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "Usamos nuestras propias cookies y de terceros, así como otra tecnología para mejorar y personalizar tu experiencia de usuario, optimizar el análisis y mostrar anuncios con terceros (lee nuestra Declaración). Siempre se establecen las cookies necesarias. Haz clic en Sólo necesarias para seguir sin aceptar más. Haz clic en Gestionar preferencias para compartir tus preferencias o Aceptarlas todas.", - "cta": { - "managePreferences": "Gestionar preferencias", - "necessaryOnly": "Sólo necesarias", - "acceptAll": "Aceptarlas todas" - } - }, - "preferencesManagement": { - "title": "Gestionar tus preferencias", - "description": "Puedes encontrar toda la información en la Declaración sobre cookies y la Lista de tecnología de cookies.", - "all": { - "title": "Activar todas" - }, - "necessary": { - "title": "Necesarias", - "description": "Estas cookies son necesarias para garantizar que el sitio web y sus funciones funcionen correctamente. Los servicios que has solicitado no se pueden proporcionar sin estas cookies." - }, - "functional": { - "title": "Funcionales", - "description": "Estas cookies permiten que el sitio web recuerde las opciones que eliges para ofrecerte una mejor funcionalidad y características personales." - }, - "analytical": { - "title": "Analíticas", - "description": "Estas cookies analíticas, incluidas las estadísticas, se utilizan para comprender cómo interactúan los visitantes con el sitio web y para que podamos medir y mejorar el rendimiento de nuestro sitio web." - }, - "personalized": { - "title": "Personalizadas (dirigidas y de publicidad)", - "description": "Estas cookies de marketing se utilizan para adaptar la entrega de información en función de tu interés y para medir la eficacia de dichos anuncios, tanto en nuestro sitio web como en los sitios web de nuestros socios publicitarios." - }, - "cta": { - "save": { - "label": "Guardar", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/es.js b/packages/components/pie-cookie-banner/locales/es.js new file mode 100644 index 0000000000..0293c0c85c --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/es.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'Usamos nuestras propias cookies y de terceros, así como otra tecnología para mejorar y personalizar tu experiencia de usuario, optimizar el análisis y mostrar anuncios con terceros (lee nuestra Declaración). Siempre se establecen las cookies necesarias. Haz clic en Sólo necesarias para seguir sin aceptar más. Haz clic en Gestionar preferencias para compartir tus preferencias o Aceptarlas todas.', + cta: { + managePreferences: 'Gestionar preferencias', + necessaryOnly: 'Sólo necesarias', + acceptAll: 'Aceptarlas todas', + }, + }, + preferencesManagement: { + title: 'Gestionar tus preferencias', + description: 'Puedes encontrar toda la información en la Declaración sobre cookies y la Lista de tecnología de cookies.', + all: { + title: 'Activar todas', + }, + necessary: { + title: 'Necesarias', + description: 'Estas cookies son necesarias para garantizar que el sitio web y sus funciones funcionen correctamente. Los servicios que has solicitado no se pueden proporcionar sin estas cookies.', + }, + functional: { + title: 'Funcionales', + description: 'Estas cookies permiten que el sitio web recuerde las opciones que eliges para ofrecerte una mejor funcionalidad y características personales.', + }, + analytical: { + title: 'Analíticas', + description: 'Estas cookies analíticas, incluidas las estadísticas, se utilizan para comprender cómo interactúan los visitantes con el sitio web y para que podamos medir y mejorar el rendimiento de nuestro sitio web.', + }, + personalized: { + title: 'Personalizadas (dirigidas y de publicidad)', + description: 'Estas cookies de marketing se utilizan para adaptar la entrega de información en función de tu interés y para medir la eficacia de dichos anuncios, tanto en nuestro sitio web como en los sitios web de nuestros socios publicitarios.', + }, + cta: { + save: { + label: 'Guardar', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/fr-fr.js b/packages/components/pie-cookie-banner/locales/fr-fr.js new file mode 100644 index 0000000000..7299dfecb9 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/fr-fr.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'Nous utilisons nos propres cookies et ceux de tiers, ainsi que d’autres technologies, afin d’améliorer et de personnaliser votre expérience d’utilisateur, d’optimiser nos analyses et d’afficher des publicités en partenariat avec des tiers (veuillez consulter notre déclaration). Nous installons toujours les cookies essentiels. Sélectionnez Continuer sans accepter pour accepter seulement les traqueurs nécessaires au fonctionnement optimal de notre plateforme. Cliquez sur Gérer les préférences pour choisir vous-même vos cookies ou sur Tout accepter.', + cta: { + managePreferences: 'Gérer les préférences', + necessaryOnly: 'Continuer sans accepter', + acceptAll: 'Tout accepter', + }, + }, + preferencesManagement: { + title: 'Gérer vos préférences', + description: 'Vous trouverez toutes les informations dans la déclaration relative aux technologies et dans la liste des technologies relatives aux technologies.', + all: { + title: 'Tout activer', + }, + necessary: { + title: 'Technologies nécessaires', + description: 'Ces technologies sont indispensables au bon fonctionnement du site Web et de ses fonctionnalités. Les services que vous avez demandés ne peuvent être fournis sans ces technologies.', + }, + functional: { + title: 'Technologies fonctionnelles', + description: 'Ces technologies permettent au site Web de se souvenir de vos choix pour vous offrir de meilleures fonctionnalités et une expérience personnalisée.', + }, + analytical: { + title: 'Technologies analytiques', + description: 'Les technologies analytiques, incluant des technologies statistiques, sont utilisés pour comprendre comment les visiteurs interagissent avec le site Web. Ils nous permettent d’en mesurer et d’en améliorer les performances.', + }, + personalized: { + title: 'Technologies personnalisées (ciblage et publicité)', + description: 'Ces technologies marketing sont utilisés pour adapter les informations affichées à vos centres d’intérêt et pour mesurer l’efficacité de ces publicités, à la fois sur notre site Web et sur les sites Web de nos partenaires publicitaires.', + }, + cta: { + save: { + label: 'Enregistrer', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/fr-fr.json b/packages/components/pie-cookie-banner/locales/fr-fr.json deleted file mode 100644 index bf932fb88c..0000000000 --- a/packages/components/pie-cookie-banner/locales/fr-fr.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "Nous utilisons nos propres cookies et ceux de tiers, ainsi que d’autres technologies, afin d’améliorer et de personnaliser votre expérience d’utilisateur, d’optimiser nos analyses et d’afficher des publicités en partenariat avec des tiers (veuillez consulter notre déclaration). Nous installons toujours les cookies essentiels. Sélectionnez Continuer sans accepter pour accepter seulement les traqueurs nécessaires au fonctionnement optimal de notre plateforme. Cliquez sur Gérer les préférences pour choisir vous-même vos cookies ou sur Tout accepter.", - "cta": { - "managePreferences": "Gérer les préférences", - "necessaryOnly": "Continuer sans accepter", - "acceptAll": "Tout accepter" - } - }, - "preferencesManagement": { - "title": "Gérer vos préférences", - "description": "Vous trouverez toutes les informations dans la déclaration relative aux technologies et dans la liste des technologies relatives aux technologies.", - "all": { - "title": "Tout activer" - }, - "necessary": { - "title": "Technologies nécessaires", - "description": "Ces technologies sont indispensables au bon fonctionnement du site Web et de ses fonctionnalités. Les services que vous avez demandés ne peuvent être fournis sans ces technologies." - }, - "functional": { - "title": "Technologies fonctionnelles", - "description": "Ces technologies permettent au site Web de se souvenir de vos choix pour vous offrir de meilleures fonctionnalités et une expérience personnalisée." - }, - "analytical": { - "title": "Technologies analytiques", - "description": "Les technologies analytiques, incluant des technologies statistiques, sont utilisés pour comprendre comment les visiteurs interagissent avec le site Web. Ils nous permettent d’en mesurer et d’en améliorer les performances." - }, - "personalized": { - "title": "Technologies personnalisées (ciblage et publicité)", - "description": "Ces technologies marketing sont utilisés pour adapter les informations affichées à vos centres d’intérêt et pour mesurer l’efficacité de ces publicités, à la fois sur notre site Web et sur les sites Web de nos partenaires publicitaires." - }, - "cta": { - "save": { - "label": "Enregistrer", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/fr.js b/packages/components/pie-cookie-banner/locales/fr.js new file mode 100644 index 0000000000..197db81034 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/fr.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'Nous utilisons nos propres cookies et ceux de tiers, ainsi que d’autres technologies, afin d’améliorer et de personnaliser votre expérience d’utilisateur, d’optimiser nos analyses et d’afficher des publicités en partenariat avec des tiers (veuillez consulter notre déclaration). Nous installons toujours les cookies essentiels. Cliquez sur Cookies essentiels uniquement pour continuer en acceptant uniquement les cookies indispensables. Cliquez sur Gérer les préférences pour choisir vous-même vos cookies ou sur Tout accepter.', + cta: { + managePreferences: 'Gérer les préférences', + necessaryOnly: 'Cookies essentiels uniquement', + acceptAll: 'Tout accepter', + }, + }, + preferencesManagement: { + title: 'Gérer vos préférences', + description: 'Vous trouverez toutes les informations dans la déclaration relative aux cookies et dans la liste des technologies relatives aux cookies.', + all: { + title: 'Tout activer', + }, + necessary: { + title: 'Cookies essentiels', + description: 'Ces cookies sont indispensables au bon fonctionnement du site Web et de ses fonctionnalités. Les services que vous avez demandés ne peuvent être fournis sans ces cookies.', + }, + functional: { + title: 'Cookies fonctionnels', + description: 'Ces cookies permettent au site Web de se souvenir de vos choix pour vous offrir de meilleures fonctionnalités et une expérience personnalisée.', + }, + analytical: { + title: 'Cookies analytiques', + description: 'Les cookies analytiques, incluant des cookies statistiques, sont utilisés pour comprendre comment les visiteurs interagissent avec le site Web. Ils nous permettent d’en mesurer et d’en améliorer les performances.', + }, + personalized: { + title: 'Cookies de ciblage (publicitaires)', + description: 'Ces cookies marketing sont utilisés pour adapter les informations affichées à vos centres d’intérêt et pour mesurer l’efficacité de ces publicités, à la fois sur notre site Web et sur les sites Web de nos partenaires publicitaires.', + }, + cta: { + save: { + label: 'Enregistrer', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/he-il.json b/packages/components/pie-cookie-banner/locales/he-il.json deleted file mode 100644 index a71231d1c9..0000000000 --- a/packages/components/pie-cookie-banner/locales/he-il.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "קובצי Cookie", - "description": "אנו משתמשים בקובצי Cookie ובטכנולוגיות נוספות שלנו ושל צדדים שלישיים כדי לשפר ולהתאים אישית את חוויית המשתמש שלכם, למטב ניתוח נתונים ולהציג פרסומות עם צדדים שלישיים (קראו את ההצהרה שלנו). קובצי Cookie הכרחיים תמיד נמצאים בשימוש. לחצו על הכרחי בלבד כדי להמשיך בלי להסכים לסוגים אחרים. לחצו על ניהול העדפות כדי לשתף את העדפותיכם או לחצו על הסכם להכול.", - "cta": { - "managePreferences": "ניהול העדפות", - "necessaryOnly": "הכרחי בלבד", - "acceptAll": "הסכם להכול" - } - }, - "preferencesManagement": { - "title": "ניהול ההעדפות של", - "description": "תוכל למצוא את כל המידע בהצהרת קובצי ה-Cookie וכן ברשימת הטכנולוגיה של קובצי ה-Cookie.", - "all": { - "title": "להפעלת הכול" - }, - "necessary": { - "title": "הכרחי", - "description": "קובצי Cookie אלה הכרחיים כדי להבטיח שאתר האינטרנט והתכונות שלו מתפקדים כראוי. לא ניתן לספק את השירותים שביקשתם ללא קובצי Cookie אלה." - }, - "functional": { - "title": "תפקודיים", - "description": "קובצי Cookie אלה מאפשרים לאתר האינטרנט לזכור את הבחירות שאתם עושים כדי לספק לכם חוויה מותאמת אישית ותפקודיות טובה יותר." - }, - "analytical": { - "title": "ניתוח נתונים", - "description": "קובצי Cookie אלה לניתוח נתונים, כולל נתונים סטטיסטיים, משמשים כדי להבין כיצד מבקרים מקיימים אינטראקציה עם אתר האינטרנט וכדי לאפשר לנו למדוד ולשפר את הביצועים של אתר האינטרנט שלנו." - }, - "personalized": { - "title": "התאמה אישית (מיקוד ופרסום)", - "description": "קובצי Cookie שיווקיים אלה משמשים כדי להתאים אישית את המידע הנמסר לכם על סמך תחומי העניין שלכם וכדי למדוד את היעילות של פרסומות כאלה, הן באתר האינטרנט שלנו והן באתרי האינטרנט של שותפי הפרסום שלנו." - }, - "cta": { - "save": { - "label": "שמירה", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/he.js b/packages/components/pie-cookie-banner/locales/he.js new file mode 100644 index 0000000000..cd22730393 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/he.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'קובצי Cookie', + description: 'אנו משתמשים בקובצי Cookie ובטכנולוגיות נוספות שלנו ושל צדדים שלישיים כדי לשפר ולהתאים אישית את חוויית המשתמש שלכם, למטב ניתוח נתונים ולהציג פרסומות עם צדדים שלישיים (קראו את ההצהרה שלנו). קובצי Cookie הכרחיים תמיד נמצאים בשימוש. לחצו על הכרחי בלבד כדי להמשיך בלי להסכים לסוגים אחרים. לחצו על ניהול העדפות כדי לשתף את העדפותיכם או לחצו על הסכם להכול.', + cta: { + managePreferences: 'ניהול העדפות', + necessaryOnly: 'הכרחי בלבד', + acceptAll: 'הסכם להכול', + }, + }, + preferencesManagement: { + title: 'ניהול ההעדפות של', + description: 'תוכל למצוא את כל המידע בהצהרת קובצי ה-Cookie וכן ברשימת הטכנולוגיה של קובצי ה-Cookie.', + all: { + title: 'להפעלת הכול', + }, + necessary: { + title: 'הכרחי', + description: 'קובצי Cookie אלה הכרחיים כדי להבטיח שאתר האינטרנט והתכונות שלו מתפקדים כראוי. לא ניתן לספק את השירותים שביקשתם ללא קובצי Cookie אלה.', + }, + functional: { + title: 'תפקודיים', + description: 'קובצי Cookie אלה מאפשרים לאתר האינטרנט לזכור את הבחירות שאתם עושים כדי לספק לכם חוויה מותאמת אישית ותפקודיות טובה יותר.', + }, + analytical: { + title: 'ניתוח נתונים', + description: 'קובצי Cookie אלה לניתוח נתונים, כולל נתונים סטטיסטיים, משמשים כדי להבין כיצד מבקרים מקיימים אינטראקציה עם אתר האינטרנט וכדי לאפשר לנו למדוד ולשפר את הביצועים של אתר האינטרנט שלנו.', + }, + personalized: { + title: 'התאמה אישית (מיקוד ופרסום)', + description: 'קובצי Cookie שיווקיים אלה משמשים כדי להתאים אישית את המידע הנמסר לכם על סמך תחומי העניין שלכם וכדי למדוד את היעילות של פרסומות כאלה, הן באתר האינטרנט שלנו והן באתרי האינטרנט של שותפי הפרסום שלנו.', + }, + cta: { + save: { + label: 'שמירה', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/index.js b/packages/components/pie-cookie-banner/locales/index.js deleted file mode 100644 index 812bbb1040..0000000000 --- a/packages/components/pie-cookie-banner/locales/index.js +++ /dev/null @@ -1,30 +0,0 @@ -import bgBG from './bg-bg.json'; -import caES from './ca-es.json'; -import daDK from './da-dk.json'; -import deDE from './de-de.json'; -import enFR from './en-fr.json'; -import enGB from './en-gb.json'; -import esES from './es-es.json'; -import frFR from './fr-fr.json'; -import heIL from './he-il.json'; -import itIT from './it-it.json'; -import nlNL from './nl-nl.json'; -import plPL from './pl-pl.json'; -import skSK from './sk-sk.json'; - -export default { - bgBG, - caES, - daDK, - deDE, - dkDK: daDK, - enGB, - enFR, - esES, - frFR, - heIL, - itIT, - nlNL, - plPL, - skSK, -}; diff --git a/packages/components/pie-cookie-banner/locales/it-it.json b/packages/components/pie-cookie-banner/locales/it-it.json deleted file mode 100644 index a1c263d33a..0000000000 --- a/packages/components/pie-cookie-banner/locales/it-it.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookie", - "description": "Usiamo cookie nostri e di terze parti e altre tecnologie per migliorare e personalizzare la tua esperienza utente, ottimizzare l’analisi dei dati e mostrare annunci pubblicitari in collaborazione con terze parti (leggi la nostra Informativa). I cookie necessari sono sempre attivi. Premi Solo necessari per proseguire senza accettare altri cookie. Apri Gestisci preferenze per scegliere quali cookie attivare, oppure premi Accetta tutti per attivare tutti i cookie.", - "cta": { - "managePreferences": "Gestisci preferenze", - "necessaryOnly": "Solo necessari", - "acceptAll": "Accetta tutti" - } - }, - "preferencesManagement": { - "title": "Gestisci le tue preferenze", - "description": "Tutti i dettagli sono disponibili nell’Informativa sui cookie e nell’Elenco delle tecnologie cookie.", - "all": { - "title": "Attiva tutti" - }, - "necessary": { - "title": "Necessari", - "description": "Questi cookie servono a garantire che il sito web e le sue componenti funzionino correttamente. Senza i cookie necessari, i servizi da te richiesti non possono essere forniti." - }, - "functional": { - "title": "Funzionali", - "description": "Questi cookie consentono al sito web di memorizzare le scelte effettuate dall’utente per offrire una migliore funzionalità e personalizzazione." - }, - "analytical": { - "title": "Analitici", - "description": "Questi cookie, che includono le statistiche, ci consentono di capire come i visitatori interagiscono con il nostro sito web per misurarne e migliorarne le prestazioni." - }, - "personalized": { - "title": "Personalizzati (targeting e pubblicità)", - "description": "Questi cookie, detti di profilazione, vengono usati per personalizzare le informazioni trasmesse all’utente in base ai suoi interessi e per misurare l’efficacia delle pubblicità, sia sul nostro sito web sia sui siti web dei nostri partner pubblicitari." - }, - "cta": { - "save": { - "label": "Salva", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/it.js b/packages/components/pie-cookie-banner/locales/it.js new file mode 100644 index 0000000000..74fc34928f --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/it.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookie', + description: 'Usiamo cookie nostri e di terze parti e altre tecnologie per migliorare e personalizzare la tua esperienza utente, ottimizzare l’analisi dei dati e mostrare annunci pubblicitari in collaborazione con terze parti (leggi la nostra Informativa). I cookie necessari sono sempre attivi. Premi Solo necessari per proseguire senza accettare altri cookie. Apri Gestisci preferenze per scegliere quali cookie attivare, oppure premi Accetta tutti per attivare tutti i cookie.', + cta: { + managePreferences: 'Gestisci preferenze', + necessaryOnly: 'Solo necessari', + acceptAll: 'Accetta tutti', + }, + }, + preferencesManagement: { + title: 'Gestisci le tue preferenze', + description: 'Tutti i dettagli sono disponibili nell’Informativa sui cookie e nell’Elenco delle tecnologie cookie.', + all: { + title: 'Attiva tutti', + }, + necessary: { + title: 'Necessari', + description: 'Questi cookie servono a garantire che il sito web e le sue componenti funzionino correttamente. Senza i cookie necessari, i servizi da te richiesti non possono essere forniti.', + }, + functional: { + title: 'Funzionali', + description: 'Questi cookie consentono al sito web di memorizzare le scelte effettuate dall’utente per offrire una migliore funzionalità e personalizzazione.', + }, + analytical: { + title: 'Analitici', + description: 'Questi cookie, che includono le statistiche, ci consentono di capire come i visitatori interagiscono con il nostro sito web per misurarne e migliorarne le prestazioni.', + }, + personalized: { + title: 'Personalizzati (targeting e pubblicità)', + description: 'Questi cookie, detti di profilazione, vengono usati per personalizzare le informazioni trasmesse all’utente in base ai suoi interessi e per misurare l’efficacia delle pubblicità, sia sul nostro sito web sia sui siti web dei nostri partner pubblicitari.', + }, + cta: { + save: { + label: 'Salva', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/nl-nl.json b/packages/components/pie-cookie-banner/locales/nl-nl.json deleted file mode 100644 index 45019cc926..0000000000 --- a/packages/components/pie-cookie-banner/locales/nl-nl.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Cookies", - "description": "Wij gebruiken onze eigen cookies, cookies van derde partijen en andere technieken om jouw gebruikerservaring te verbeteren en te personaliseren, analyses te optimaliseren en om advertenties met derde partijen te laten zien (lees onze privacyverklaring). Wij plaatsen altijd noodzakelijke cookies. Klik op Alleen noodzakelijk om door te gaan zonder meer te accepteren. Klik op Beheer voorkeuren om je voorkeuren te delen of Alles accepteren.", - "cta": { - "managePreferences": "Beheer voorkeuren", - "necessaryOnly": "Alleen noodzakelijk", - "acceptAll": "Alles accepteren" - } - }, - "preferencesManagement": { - "title": "Beheer je voorkeuren", - "description": "Je vindt alle informatie in de Cookieverklaring en de Cookietechnologielijst.", - "all": { - "title": "Zet alles aan" - }, - "necessary": { - "title": "Noodzakelijk", - "description": " Deze cookies zijn noodzakelijk voor een goede werking van de website en alle functies. Zonder deze cookies kunnen je gevraagde diensten niet worden geleverd." - }, - "functional": { - "title": "Functioneel", - "description": " Met deze cookies kan de website de keuzes die je maakt onthouden om je een betere functionaliteit en persoonlijke functies te bieden." - }, - "analytical": { - "title": "Analytisch", - "description": "Deze analytische cookies, waaronder statistieken, worden gebruikt om te begrijpen hoe bezoekers de website gebruiken, zodat wij de prestaties van onze website kunnen meten en verbeteren." - }, - "personalized": { - "title": "Gepersonaliseerd (targeting en reclame)", - "description": "Deze marketingcookies worden gebruikt om de informatievoorziening af te stemmen op jouw interesses en om de effectiviteit van dergelijke advertenties te meten. Zowel op onze website als op de websites van onze reclamepartners." - }, - "cta": { - "save": { - "label": "Opslaan", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/nl.js b/packages/components/pie-cookie-banner/locales/nl.js new file mode 100644 index 0000000000..50b121c660 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/nl.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Cookies', + description: 'Wij gebruiken onze eigen cookies, cookies van derde partijen en andere technieken om jouw gebruikerservaring te verbeteren en te personaliseren, analyses te optimaliseren en om advertenties met derde partijen te laten zien (lees onze privacyverklaring). Wij plaatsen altijd noodzakelijke cookies. Klik op Alleen noodzakelijk om door te gaan zonder meer te accepteren. Klik op Beheer voorkeuren om je voorkeuren te delen of Alles accepteren.', + cta: { + managePreferences: 'Beheer voorkeuren', + necessaryOnly: 'Alleen noodzakelijk', + acceptAll: 'Alles accepteren', + }, + }, + preferencesManagement: { + title: 'Beheer je voorkeuren', + description: 'Je vindt alle informatie in de Cookieverklaring en de Cookietechnologielijst.', + all: { + title: 'Zet alles aan', + }, + necessary: { + title: 'Noodzakelijk', + description: ' Deze cookies zijn noodzakelijk voor een goede werking van de website en alle functies. Zonder deze cookies kunnen je gevraagde diensten niet worden geleverd.', + }, + functional: { + title: 'Functioneel', + description: ' Met deze cookies kan de website de keuzes die je maakt onthouden om je een betere functionaliteit en persoonlijke functies te bieden.', + }, + analytical: { + title: 'Analytisch', + description: 'Deze analytische cookies, waaronder statistieken, worden gebruikt om te begrijpen hoe bezoekers de website gebruiken, zodat wij de prestaties van onze website kunnen meten en verbeteren.', + }, + personalized: { + title: 'Gepersonaliseerd (targeting en reclame)', + description: 'Deze marketingcookies worden gebruikt om de informatievoorziening af te stemmen op jouw interesses en om de effectiviteit van dergelijke advertenties te meten. Zowel op onze website als op de websites van onze reclamepartners.', + }, + cta: { + save: { + label: 'Opslaan', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/pl-pl.json b/packages/components/pie-cookie-banner/locales/pl-pl.json deleted file mode 100644 index 02760df7bf..0000000000 --- a/packages/components/pie-cookie-banner/locales/pl-pl.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Pliki cookie", - "description": "Używamy własnych plików cookie, plików stron trzecich oraz innych technologii mających na celu ulepszanie i personalizowanie doświadczeń użytkownika, optymalizację analiz i wyświetlanie reklam stronom trzecim (czytaj nasze Oświadczenie). Zawsze umieszczamy na urządzeniu użytkownika niezbędne pliki cookie. Kliknij Tylko niezbędne, aby kontynuować bez akceptowania kolejnych. Kliknij Zarządzaj ustawieniami, aby udostępnić ustawienia lub akceptować wszystkie.", - "cta": { - "managePreferences": "Zarządzaj ustawieniami", - "necessaryOnly": "Tylko niezbędne", - "acceptAll": "Zaakceptuj wszystkie" - } - }, - "preferencesManagement": { - "title": "Zarządzaj swoimi ustawieniami", - "description": "Wszystkie informacje można znaleźć w Oświadczeniu o plikach cookie i na liście technologii plików cookie.", - "all": { - "title": "Włącz wszystkie" - }, - "necessary": { - "title": "Niezbędne", - "description": "Te pliki cookie są niezbędne do zapewnienia prawidłowego działania witryny internetowej i jej funkcji. Usługi, o które użytkownik poprosił, nie mogą być świadczone bez tych plików cookie." - }, - "functional": { - "title": "Związane z funkcjonalnością", - "description": "Te pliki cookie umożliwiają witrynie zapamiętanie wyborów dokonanych przez użytkownika, aby zapewnić mu lepszą funkcjonalność i obsługę funkcji osobistych." - }, - "analytical": { - "title": "Analityczne", - "description": "Te analityczne pliki cookie, w tym związane ze statystykami, są wykorzystywane do zrozumienia, w jaki sposób odwiedzający wchodzą w interakcję z witryną internetową oraz jak możemy mierzyć i poprawiać wydajność naszej witryny internetowej." - }, - "personalized": { - "title": "Spersonalizowane (targetowanie i reklama)", - "description": "Te marketingowe pliki cookie są wykorzystywane w celu dostosowania dostarczania informacji użytkownikowi w oparciu o jego zainteresowania oraz w celu pomiaru skuteczności takich reklam, zarówno na naszej stronie internetowej, jak i na stronach internetowych naszych partnerów reklamowych." - }, - "cta": { - "save": { - "label": "Zapisz", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/pl.js b/packages/components/pie-cookie-banner/locales/pl.js new file mode 100644 index 0000000000..9a74f924e9 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/pl.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Pliki cookie', + description: 'Używamy własnych plików cookie, plików stron trzecich oraz innych technologii mających na celu ulepszanie i personalizowanie doświadczeń użytkownika, optymalizację analiz i wyświetlanie reklam stronom trzecim (czytaj nasze Oświadczenie). Zawsze umieszczamy na urządzeniu użytkownika niezbędne pliki cookie. Kliknij Tylko niezbędne, aby kontynuować bez akceptowania kolejnych. Kliknij Zarządzaj ustawieniami, aby udostępnić ustawienia lub akceptować wszystkie.', + cta: { + managePreferences: 'Zarządzaj ustawieniami', + necessaryOnly: 'Tylko niezbędne', + acceptAll: 'Zaakceptuj wszystkie', + }, + }, + preferencesManagement: { + title: 'Zarządzaj swoimi ustawieniami', + description: 'Wszystkie informacje można znaleźć w Oświadczeniu o plikach cookie i na liście technologii plików cookie.', + all: { + title: 'Włącz wszystkie', + }, + necessary: { + title: 'Niezbędne', + description: 'Te pliki cookie są niezbędne do zapewnienia prawidłowego działania witryny internetowej i jej funkcji. Usługi, o które użytkownik poprosił, nie mogą być świadczone bez tych plików cookie.', + }, + functional: { + title: 'Związane z funkcjonalnością', + description: 'Te pliki cookie umożliwiają witrynie zapamiętanie wyborów dokonanych przez użytkownika, aby zapewnić mu lepszą funkcjonalność i obsługę funkcji osobistych.', + }, + analytical: { + title: 'Analityczne', + description: 'Te analityczne pliki cookie, w tym związane ze statystykami, są wykorzystywane do zrozumienia, w jaki sposób odwiedzający wchodzą w interakcję z witryną internetową oraz jak możemy mierzyć i poprawiać wydajność naszej witryny internetowej.', + }, + personalized: { + title: 'Spersonalizowane (targetowanie i reklama)', + description: 'Te marketingowe pliki cookie są wykorzystywane w celu dostosowania dostarczania informacji użytkownikowi w oparciu o jego zainteresowania oraz w celu pomiaru skuteczności takich reklam, zarówno na naszej stronie internetowej, jak i na stronach internetowych naszych partnerów reklamowych.', + }, + cta: { + save: { + label: 'Zapisz', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/locales/sk-sk.json b/packages/components/pie-cookie-banner/locales/sk-sk.json deleted file mode 100644 index 17e7239f01..0000000000 --- a/packages/components/pie-cookie-banner/locales/sk-sk.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "banner": { - "title": "Súbory cookie", - "description": "Na zlepšenie a prispôsobenie používateľského prostredia, optimalizáciu analýz a zobrazovanie reklám tretích strán používame vlastné súbory cookie a súbory cookie tretích strán (prečítajte si naše Vyhlásenie). Nevyhnutné súbory cookie sú nastavené vždy. Kliknutím na tlačidlo Iba nevyhnutné môžeš pokračovať bez ďalších súborov cookie. Kliknutím na Spravovať preferencie môžeš zdieľať svoje preferencie, alebo kliknúť na Prijať všetko.", - "cta": { - "managePreferences": "Spravovať preferencie", - "necessaryOnly": "Iba nevyhnutné", - "acceptAll": "Prijať všetko" - } - }, - "preferencesManagement": { - "title": "Spravovať svoje preferencie", - "description": "Všetky informácie o našom používaní súborov cookie nájdeš vo Vyhlásení o súboroch cookie a zozname technológie súborov cookie.", - "all": { - "title": "Zapnúť všetky" - }, - "necessary": { - "title": "Nevyhnutné", - "description": "Tieto súbory cookie sú potrebné na zabezpečenie správneho fungovania webovej stránky a jej funkcií. Služby, o ktoré si požiadal/a, nie je možné poskytovať bez týchto súborov cookie." - }, - "functional": { - "title": "Funkčné", - "description": "Tieto súbory cookie umožňujú webovej stránke zapamätať si tvoje voľby, aby ti poskytla lepšiu funkčnosť a personalizované funkcie." - }, - "analytical": { - "title": "Analytické", - "description": "Tieto analytické súbory cookie, vrátane štatistík, sa používajú na pochopenie toho, ako návštevníci interagujú s webovou stránkou, a umožňujú nám merať a zlepšovať výkonnosť našej webovej stránky." - }, - "personalized": { - "title": "Personalizované (zameriavanie a reklama)", - "description": "Tieto marketingové súbory cookie sa používajú na prispôsobenie poskytovania informácií na základe tvojho záujmu a meranie účinnosti takýchto reklám na našich webových stránkach a webových stránkach našich reklamných partnerov." - }, - "cta": { - "save": { - "label": "Uložiť", - "ariaLabel": "" - } - } - } -} diff --git a/packages/components/pie-cookie-banner/locales/sk.js b/packages/components/pie-cookie-banner/locales/sk.js new file mode 100644 index 0000000000..bfcc48d587 --- /dev/null +++ b/packages/components/pie-cookie-banner/locales/sk.js @@ -0,0 +1,40 @@ +export default { + banner: { + title: 'Súbory cookie', + description: 'Na zlepšenie a prispôsobenie používateľského prostredia, optimalizáciu analýz a zobrazovanie reklám tretích strán používame vlastné súbory cookie a súbory cookie tretích strán (prečítajte si naše Vyhlásenie). Nevyhnutné súbory cookie sú nastavené vždy. Kliknutím na tlačidlo Iba nevyhnutné môžeš pokračovať bez ďalších súborov cookie. Kliknutím na Spravovať preferencie môžeš zdieľať svoje preferencie, alebo kliknúť na Prijať všetko.', + cta: { + managePreferences: 'Spravovať preferencie', + necessaryOnly: 'Iba nevyhnutné', + acceptAll: 'Prijať všetko', + }, + }, + preferencesManagement: { + title: 'Spravovať svoje preferencie', + description: 'Všetky informácie o našom používaní súborov cookie nájdeš vo Vyhlásení o súboroch cookie a zozname technológie súborov cookie.', + all: { + title: 'Zapnúť všetky', + }, + necessary: { + title: 'Nevyhnutné', + description: 'Tieto súbory cookie sú potrebné na zabezpečenie správneho fungovania webovej stránky a jej funkcií. Služby, o ktoré si požiadal/a, nie je možné poskytovať bez týchto súborov cookie.', + }, + functional: { + title: 'Funkčné', + description: 'Tieto súbory cookie umožňujú webovej stránke zapamätať si tvoje voľby, aby ti poskytla lepšiu funkčnosť a personalizované funkcie.', + }, + analytical: { + title: 'Analytické', + description: 'Tieto analytické súbory cookie, vrátane štatistík, sa používajú na pochopenie toho, ako návštevníci interagujú s webovou stránkou, a umožňujú nám merať a zlepšovať výkonnosť našej webovej stránky.', + }, + personalized: { + title: 'Personalizované (zameriavanie a reklama)', + description: 'Tieto marketingové súbory cookie sa používajú na prispôsobenie poskytovania informácií na základe tvojho záujmu a meranie účinnosti takýchto reklám na našich webových stránkach a webových stránkach našich reklamných partnerov.', + }, + cta: { + save: { + label: 'Uložiť', + ariaLabel: '', + }, + }, + }, +}; diff --git a/packages/components/pie-cookie-banner/src/defs.ts b/packages/components/pie-cookie-banner/src/defs.ts index 065607d7bf..a4be862c49 100644 --- a/packages/components/pie-cookie-banner/src/defs.ts +++ b/packages/components/pie-cookie-banner/src/defs.ts @@ -1,7 +1,9 @@ import { type TemplateResult } from 'lit'; import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core'; -export const Language = { +export const Language: { + readonly [key: string]: string; +} = { BULGARIAN: 'bg', CATALAN: 'ca', DANISH: 'da', @@ -14,21 +16,30 @@ export const Language = { POLISH: 'pl', SLOVAK: 'sk', SPANISH: 'es', -} as const; +}; -export const Country = { +export const Country: { + readonly [key: string]: string; +} = { + AUSTRALIA: 'au', + AUSTRIA: 'at', + BELGIUM: 'be', BULGARIA: 'bg', + CANADA: 'ca', DENMARK: 'dk', FRANCE: 'fr', GERMANY: 'de', GREAT_BRITAIN: 'gb', + IRELAND: 'ie', ISRAEL: 'il', ITALY: 'it', + LUXEMBOURG: 'lu', NETHERLANDS: 'nl', POLAND: 'pl', SLOVAKIA: 'sk', SPAIN: 'es', -} as const; + SWITZERLAND: 'ch', +}; export type LanguageCode = typeof Language[keyof typeof Language]; @@ -190,16 +201,42 @@ export const defaultProps: DefaultProps = { cookieTechnologiesLink: '', }; -export const defaultLanguage = new Map([ - [Country.GREAT_BRITAIN, Language.ENGLISH], - [Country.FRANCE, Language.FRENCH], - [Country.DENMARK, Language.DANISH], - [Country.SPAIN, Language.SPANISH], - [Country.ITALY, Language.ITALIAN], - [Country.NETHERLANDS, Language.DUTCH], - [Country.POLAND, Language.POLISH], - [Country.SLOVAKIA, Language.SLOVAK], - [Country.BULGARIA, Language.BULGARIAN], - [Country.GERMANY, Language.GERMAN], - [Country.ISRAEL, Language.HEBREW], +// Available locale files +export const availableLocales = new Set([ + `${Language.BULGARIAN}`, + `${Language.DANISH}`, + `${Language.ENGLISH}-${Country.FRANCE}`, + `${Language.FRENCH}-${Country.FRANCE}`, + `${Language.FRENCH}`, + `${Language.GERMAN}`, + `${Language.ENGLISH}`, + `${Language.HEBREW}`, + `${Language.ITALIAN}`, + `${Language.DUTCH}`, + `${Language.POLISH}`, + `${Language.SLOVAK}`, + `${Language.CATALAN}`, + `${Language.SPANISH}`, +]); + +// Map the default locale for each Country +export const defaultLocaleForCountry = new Map([ + [Country.AUSTRALIA, `${Language.ENGLISH}`], + [Country.AUSTRIA, `${Language.GERMAN}`], + [Country.BELGIUM, `${Language.FRENCH}`], + [Country.BULGARIA, `${Language.BULGARIAN}`], + [Country.CANADA, `${Language.ENGLISH}`], + [Country.DENMARK, `${Language.DANISH}`], + [Country.FRANCE, `${Language.FRENCH}-${Country.FRANCE}`], + [Country.GERMANY, `${Language.GERMAN}`], + [Country.GREAT_BRITAIN, `${Language.ENGLISH}`], + [Country.IRELAND, `${Language.ENGLISH}`], + [Country.ISRAEL, `${Language.HEBREW}`], + [Country.ITALY, `${Language.ITALIAN}`], + [Country.LUXEMBOURG, `${Language.FRENCH}`], + [Country.NETHERLANDS, `${Language.DUTCH}`], + [Country.POLAND, `${Language.POLISH}`], + [Country.SLOVAKIA, `${Language.SLOVAK}`], + [Country.SPAIN, `${Language.SPANISH}`], + [Country.SWITZERLAND, `${Language.GERMAN}`], ]); diff --git a/packages/components/pie-cookie-banner/src/index.ts b/packages/components/pie-cookie-banner/src/index.ts index f85da68006..5bfb705da3 100644 --- a/packages/components/pie-cookie-banner/src/index.ts +++ b/packages/components/pie-cookie-banner/src/index.ts @@ -16,6 +16,7 @@ import '@justeattakeaway/pie-modal'; import '@justeattakeaway/pie-switch'; import { type PieSwitch } from '@justeattakeaway/pie-switch'; import { defineCustomElement, dispatchCustomEvent } from '@justeattakeaway/pie-webc-core'; +import defaultLocale from '@justeattakeaway/pie-cookie-banner/locales/en.js'; import styles from './cookie-banner.scss?inline'; import { @@ -25,18 +26,18 @@ import { ON_COOKIE_BANNER_PREFS_SAVED, defaultProps, preferences, + availableLocales, + defaultLocaleForCountry, type CookieBannerProps, type Preference, type PreferenceIds, type CookieBannerLocale, type CustomTagEnhancers, - defaultLanguage, type CountryCode, type LanguageCode, } from './defs'; import { localiseText, localiseRichText } from './localisation-utils'; -import defaultLocale from '../locales/en-gb.json' assert { type: 'json' }; // Valid values available to consumers export * from './defs'; @@ -83,26 +84,51 @@ export class PieCookieBanner extends LitElement implements CookieBannerProps { async updated (changedProperties: PropertyValues) { // Re-fetch locale when country or language changes - if (changedProperties.has('country') || changedProperties.has('language')) { - await this._setLocaleBasedOnCountryAndLanguage(this.country, this.language); + if (changedProperties.has('language') || changedProperties.has('country')) { + await this._setLocaleBasedOnCountryAndLanguage(this.language, this.country); } } // Dynamically import locale JSON based on country and language - private async _setLocaleBasedOnCountryAndLanguage (country: CountryCode, language: LanguageCode, fallback = false): Promise { + private async _setLocaleBasedOnCountryAndLanguage (language: LanguageCode, country: CountryCode): Promise { try { - this._locale = (await import(`../locales/${language.toLowerCase()}-${country.toLowerCase()}.json`, { assert: { type: 'json' } })).default; + const localeString = this._getLocaleString(language, country); + this._locale = (await import(`../locales/${localeString}.js`)).default; } catch { - // If loading fails, try using the default language, if that fails fall back to the global default locale - if (!fallback) { - const fallbackLang = defaultLanguage.get(country) || defaultProps.language; - await this._setLocaleBasedOnCountryAndLanguage(country, fallbackLang, true); - } else { - this._locale = defaultLocale; - } + this._locale = defaultLocale; } } + /** + * Gets the locale string for the requested language and country. + * + * @param languageCode - The requested language code (e.g., 'es'). + * @param countryCode - The requested country code (e.g., 'ch'). + * @returns - The best matching/supported locale string". + */ + private _getLocaleString = (languageCode: LanguageCode, countryCode: CountryCode): string => { + // 1. Check for the exact locale + let requestedLocale = `${languageCode}-${countryCode}`.toLowerCase(); + if (availableLocales.has(requestedLocale)) { + return requestedLocale; + } + + // 2. Check for the requested language in the available locales + requestedLocale = `${languageCode}`.toLowerCase(); + if (availableLocales.has(requestedLocale)) { + return requestedLocale; + } + + // 3. Check for the requested country's default locale in the available locales + const preferredLocaleForCountryCode = defaultLocaleForCountry.get(countryCode.toLowerCase()); + if (preferredLocaleForCountryCode && availableLocales.has(preferredLocaleForCountryCode)) { + return preferredLocaleForCountryCode; + } + + // 4. Fallback (e.g. 'en') + return `${defaultProps.language}`; + }; + private _customTagEnhancers: CustomTagEnhancers = { linkStatement: (tagContent: string) => html`${tagContent}`, linkNecessaryOnly: (tagContent: string) => html`${tagContent}`, diff --git a/packages/components/pie-cookie-banner/test/component/pie-cookie-banner-locale.spec.ts b/packages/components/pie-cookie-banner/test/component/pie-cookie-banner-locale.spec.ts index cc6bf19f16..4269f5727b 100644 --- a/packages/components/pie-cookie-banner/test/component/pie-cookie-banner-locale.spec.ts +++ b/packages/components/pie-cookie-banner/test/component/pie-cookie-banner-locale.spec.ts @@ -1,5 +1,4 @@ import { test, expect } from '@justeattakeaway/pie-webc-testing/src/playwright/playwright-fixtures.ts'; -import { readFile } from 'fs/promises'; import { CookieBannerComponent } from 'test/helpers/page-object/pie-cookie-banner.page.ts'; import { ModalComponent } from '@justeattakeaway/pie-modal/test/helpers/page-object/pie-modal.page.ts'; import { Language, Country } from '@justeattakeaway/pie-cookie-banner/src/defs.ts'; @@ -8,7 +7,7 @@ function stripTags (str: string) { return str.replace(/<\/?[^>]+(>|$)/g, ''); } -const englishLocale = JSON.parse(await readFile(new URL('../../locales/en-gb.json', import.meta.url), { encoding: 'utf-8' })); +const defaultLocale = 'en'; let pieCookieBannerComponent: CookieBannerComponent; let pieModalComponent: ModalComponent; @@ -18,9 +17,9 @@ test.describe('PieCookieBanner - Country and Language Properties', () => { pieModalComponent = new ModalComponent(page); }); - test('should render text in the default (uk - english) language when unset', async () => { + test('should render text in the default language-country \'en-gb\' when unset', async () => { // Arrange - const englishLocale = JSON.parse(await readFile(new URL('../../locales/en-gb.json', import.meta.url), { encoding: 'utf-8' })); + const expectedLocale = (await import(`@justeattakeaway/pie-cookie-banner/locales/${defaultLocale}.js`)).default; await pieCookieBannerComponent.load(); // Act @@ -31,61 +30,16 @@ test.describe('PieCookieBanner - Country and Language Properties', () => { const modalDescriptionText = await pieModalComponent.getDescriptionTextContent(); // Assert - expect(acceptAllButtonText) - .toBe(englishLocale.banner.cta.acceptAll); - - expect(necessaryOnlyButtonText) - .toBe(englishLocale.banner.cta.necessaryOnly); - - expect(managePreferencesButtonText) - .toBe(englishLocale.banner.cta.managePreferences); - - expect(componentDescriptionText) - .toBe(stripTags(englishLocale.banner.description)); - - expect(modalDescriptionText) - .toBe(stripTags(englishLocale.preferencesManagement.description)); - }); - - [ - { country: Country.GREAT_BRITAIN, language: Language.ENGLISH }, - { country: Country.FRANCE, language: Language.ENGLISH }, - { country: Country.FRANCE, language: Language.FRENCH }, - { country: Country.DENMARK, language: Language.DANISH }, - { country: Country.SPAIN, language: Language.SPANISH }, - { country: Country.ITALY, language: Language.ITALIAN }, - { country: 'es', language: 'CA' }, // Test case-insensitivity, - { country: 'ES', language: 'ca' }, - { country: 'es', language: 'ca' }, - { country: 'ES', language: 'CA' }, - ].forEach(({ country, language }) => { - test(`should 'dynamically' update the locale when we reset the language-country from 'en-gb' to ${language}-${country}`, async () => { - // Arrange - await pieCookieBannerComponent.load(); // en-gb is the default locale - const locale = JSON.parse(await readFile(new URL(`../../locales/${language.toLowerCase()}-${country.toLowerCase()}.json`, import.meta.url), { encoding: 'utf-8' })); - - // Act - await pieCookieBannerComponent.setProperty('country', country); - await pieCookieBannerComponent.setProperty('language', language); - await pieCookieBannerComponent.waitForLocaleUpdate(); - - const acceptAllButtonText = await pieCookieBannerComponent.getAcceptAllTextContent(); - const necessaryOnlyButtonText = await pieCookieBannerComponent.getNecessaryOnlyTextContent(); - const managePreferencesButtonText = await pieCookieBannerComponent.getManagePreferencesTextContent(); - const componentDescriptionText = await pieCookieBannerComponent.getComponentDescriptionTextContent(); - const modalDescriptionText = await pieModalComponent.getDescriptionTextContent(); - - // Assert - expect(acceptAllButtonText).toBe(locale.banner.cta.acceptAll); - expect(necessaryOnlyButtonText).toBe(locale.banner.cta.necessaryOnly); - expect(managePreferencesButtonText).toBe(locale.banner.cta.managePreferences); - expect(componentDescriptionText).toBe(stripTags(locale.banner.description)); - expect(modalDescriptionText).toBe(stripTags(locale.preferencesManagement.description)); - }); + expect(acceptAllButtonText).toBe(expectedLocale.banner.cta.acceptAll); + expect(necessaryOnlyButtonText).toBe(expectedLocale.banner.cta.necessaryOnly); + expect(managePreferencesButtonText).toBe(expectedLocale.banner.cta.managePreferences); + expect(componentDescriptionText).toBe(stripTags(expectedLocale.banner.description)); + expect(modalDescriptionText).toBe(stripTags(expectedLocale.preferencesManagement.description)); }); test('should not update the locale if country and language properties are unchanged', async () => { // Arrange + const expectedLocale = (await import(`@justeattakeaway/pie-cookie-banner/locales/${defaultLocale}.js`)).default; await pieCookieBannerComponent.load(); // Act @@ -100,41 +54,40 @@ test.describe('PieCookieBanner - Country and Language Properties', () => { const modalDescriptionText = await pieModalComponent.getDescriptionTextContent(); // Assert - expect(acceptAllButtonText).toBe(englishLocale.banner.cta.acceptAll); - expect(necessaryOnlyButtonText).toBe(englishLocale.banner.cta.necessaryOnly); - expect(managePreferencesButtonText).toBe(englishLocale.banner.cta.managePreferences); - expect(componentDescriptionText).toBe(stripTags(englishLocale.banner.description)); - expect(modalDescriptionText).toBe(stripTags(englishLocale.preferencesManagement.description)); - }); - - test('should fallback to the global default language-country \'en-gb\' if the language and/or country is unsupported/invalid', async () => { - // Arrange - await pieCookieBannerComponent.load({ country: 'invalid', language: 'invalid' }); - - // Act - const acceptAllButtonText = await pieCookieBannerComponent.getAcceptAllTextContent(); - const necessaryOnlyButtonText = await pieCookieBannerComponent.getNecessaryOnlyTextContent(); - const managePreferencesButtonText = await pieCookieBannerComponent.getManagePreferencesTextContent(); - const componentDescriptionText = await pieCookieBannerComponent.getComponentDescriptionTextContent(); - const modalDescriptionText = await pieModalComponent.getDescriptionTextContent(); - - // Assert - expect(acceptAllButtonText).toBe(englishLocale.banner.cta.acceptAll); - expect(necessaryOnlyButtonText).toBe(englishLocale.banner.cta.necessaryOnly); - expect(managePreferencesButtonText).toBe(englishLocale.banner.cta.managePreferences); - expect(componentDescriptionText).toBe(stripTags(englishLocale.banner.description)); - expect(modalDescriptionText).toBe(stripTags(englishLocale.preferencesManagement.description)); + expect(acceptAllButtonText).toBe(expectedLocale.banner.cta.acceptAll); + expect(necessaryOnlyButtonText).toBe(expectedLocale.banner.cta.necessaryOnly); + expect(managePreferencesButtonText).toBe(expectedLocale.banner.cta.managePreferences); + expect(componentDescriptionText).toBe(stripTags(expectedLocale.banner.description)); + expect(modalDescriptionText).toBe(stripTags(expectedLocale.preferencesManagement.description)); }); [ - { country: Country.SPAIN, unsupportedLang: Language.ENGLISH, fallbackLang: Language.SPANISH }, - { country: Country.FRANCE, unsupportedLang: Language.SPANISH, fallbackLang: Language.FRENCH }, - { country: Country.GREAT_BRITAIN, unsupportedLang: Language.SPANISH, fallbackLang: Language.ENGLISH }, + { language: Language.FRENCH, country: Country.FRANCE, expectedLocale: 'fr-fr' }, // Test for exact/bespoke translations + { language: Language.ENGLISH, country: Country.FRANCE, expectedLocale: 'en-fr' }, // Test for exact/bespoke translations + { language: 'invalid', country: 'invalid', expectedLocale: 'en' }, // Test for invalid settings + { language: Language.SPANISH, country: 'invalid', expectedLocale: 'es' }, // Test for invalid settings + { language: 'invalid', country: Country.SPAIN, expectedLocale: 'es' }, // Test for invalid settings + { language: Language.SLOVAK, country: Country.SLOVAKIA, expectedLocale: 'sk' }, + { language: Language.ENGLISH, country: Country.GERMANY, expectedLocale: 'en' }, // Test for alternative language in country + { language: Language.GERMAN, country: Country.GERMANY, expectedLocale: 'de' }, + { language: Language.DANISH, country: Country.DENMARK, expectedLocale: 'da' }, + { language: Language.ENGLISH, country: Country.CANADA, expectedLocale: 'en' }, // Test for alternative language in country + { language: Language.FRENCH, country: Country.CANADA, expectedLocale: 'fr' }, // Test for alternative language in country + { language: Language.ITALIAN, country: Country.ITALY, expectedLocale: 'it' }, + { language: Language.SPANISH, country: Country.SPAIN, expectedLocale: 'es' }, + { language: 'CA', country: 'es', expectedLocale: 'ca' }, // Test case-insensitivity + { language: 'ca', country: 'ES', expectedLocale: 'ca' }, // Test case-insensitivity + { language: 'ca', country: 'es', expectedLocale: 'ca' }, // Test case-insensitivity + { language: 'CA', country: 'ES', expectedLocale: 'ca' }, // Test case-insensitivity + { language: 'pt', country: Country.SPAIN, expectedLocale: 'es' }, // Test for unsupported language + { language: 'ru', country: Country.FRANCE, expectedLocale: 'fr-fr' }, // Test for unsupported language + { language: 'es', country: 'pt', expectedLocale: 'es' }, // Test for unspported country + { language: 'fr', country: 'ru', expectedLocale: 'fr' }, // Test for unspported country ].forEach((obj) => { - test(`should fallback to the default language-country '${obj.fallbackLang}-${obj.country}' if the supplied language '${obj.unsupportedLang}' is unsupported`, async () => { + test(`should load the correct locale [${obj.expectedLocale}] given language [${obj.language}] & country [${obj.country}]`, async () => { // Arrange - const fallbackLocale = JSON.parse(await readFile(new URL(`../../locales/${obj.fallbackLang.toLowerCase()}-${obj.country.toLowerCase()}.json`, import.meta.url), { encoding: 'utf-8' })); - await pieCookieBannerComponent.load({ country: obj.country, language: obj.unsupportedLang }); // supply an unsupported language + const expectedLocale = (await import(`@justeattakeaway/pie-cookie-banner/locales/${obj.expectedLocale}.js`)).default; + await pieCookieBannerComponent.load({ country: obj.country, language: obj.language }); // Act const acceptAllButtonText = await pieCookieBannerComponent.getAcceptAllTextContent(); @@ -144,20 +97,11 @@ test.describe('PieCookieBanner - Country and Language Properties', () => { const modalDescriptionText = await pieModalComponent.getDescriptionTextContent(); // Assert - expect(acceptAllButtonText) - .toBe(fallbackLocale.banner.cta.acceptAll); - - expect(necessaryOnlyButtonText) - .toBe(fallbackLocale.banner.cta.necessaryOnly); - - expect(managePreferencesButtonText) - .toBe(fallbackLocale.banner.cta.managePreferences); - - expect(componentDescriptionText) - .toBe(stripTags(fallbackLocale.banner.description)); - - expect(modalDescriptionText) - .toBe(stripTags(fallbackLocale.preferencesManagement.description)); + expect(acceptAllButtonText).toBe(expectedLocale.banner.cta.acceptAll); + expect(necessaryOnlyButtonText).toBe(expectedLocale.banner.cta.necessaryOnly); + expect(managePreferencesButtonText).toBe(expectedLocale.banner.cta.managePreferences); + expect(componentDescriptionText).toBe(stripTags(expectedLocale.banner.description)); + expect(modalDescriptionText).toBe(stripTags(expectedLocale.preferencesManagement.description)); }); }); });