-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Introduce
companyNames
option as i18n parameter #CCM-25
* you can pass one or more company names which must be part of your consent text
- Loading branch information
Showing
10 changed files
with
565 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,80 @@ | ||
export const config = { | ||
consent_modal: { | ||
title: 'Tyto stránky využívají cookies', | ||
description: `Kliknutím na „Přijmout vše“ dáváte souhlas společnosti LMC k využívání souborů Cookies a dalších identifikátorů ve vašem zařízení. Použití těchto Cookies a dalších identifikátorů usnadní navigaci na stránkách, zobrazení personalizovaného obsahu, cílený marketing, analýzu využívání našich produktů a služeb. | ||
import { addSeparators, plural } from '../utils'; | ||
|
||
const extra = { | ||
and: 'a', | ||
company: 'společnosti', | ||
companies: 'společnostem', | ||
}; | ||
|
||
/** | ||
* @param {Object} [messages] - Object with extra messages | ||
* @param {array} [args.companyNames] - Array of strings with company names used to parametrized translations | ||
* @returns {Object} Object with translated messages | ||
*/ | ||
export const config = (messages) => { | ||
const lang = { ...extra, ...messages }; | ||
|
||
return { | ||
consent_modal: { | ||
title: 'Tyto stránky využívají cookies', | ||
description: `Kliknutím na „Přijmout vše“ dáváte souhlas ${plural( | ||
lang.companyNames.length, | ||
lang.company, | ||
lang.companies, | ||
)} ${addSeparators( | ||
lang.companyNames, | ||
extra.and, | ||
)} k využívání souborů Cookies a dalších identifikátorů ve vašem zařízení. Použití těchto Cookies a dalších identifikátorů usnadní navigaci na stránkách, zobrazení personalizovaného obsahu, cílený marketing, analýzu využívání našich produktů a služeb. | ||
Více informací naleznete na stránce <a href="https://www.lmc.eu/cs/cookies" target="_blank">Používání cookies</a>.`, | ||
primary_btn: { | ||
text: 'Přijmout vše', | ||
role: 'accept_all', | ||
}, | ||
secondary_btn: { | ||
text: 'Přijmout nezbytné', | ||
role: 'accept_necessary', | ||
primary_btn: { | ||
text: 'Přijmout vše', | ||
role: 'accept_all', | ||
}, | ||
secondary_btn: { | ||
text: 'Přijmout nezbytné', | ||
role: 'accept_necessary', | ||
}, | ||
}, | ||
}, | ||
settings_modal: { | ||
blocks: [ | ||
{ | ||
toggle: { | ||
value: 'necessary', | ||
enabled: true, | ||
readonly: true, | ||
settings_modal: { | ||
blocks: [ | ||
{ | ||
toggle: { | ||
value: 'necessary', | ||
enabled: true, | ||
readonly: true, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'ad', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'ad', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'analytics', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'analytics', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'functionality', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'functionality', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'personalization', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'personalization', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}; | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,74 @@ | ||
export const config = { | ||
consent_modal: { | ||
title: 'Diese Website verwendet Cookies', | ||
description: `Indem Sie auf „Alles akzeptieren“ klicken, stimmen Sie der Verwendung von Cookies und anderen Identifikatoren auf Ihrem Gerät durch LMC zu. Die Verwendung dieser Cookies und anderer Identifikatoren erleichtert die Navigation auf der Website, die Anzeige personalisierter Inhalte, gezieltes Marketing und die Analyse der Nutzung unserer Produkte und Dienstleistungen. | ||
import { addSeparators } from '../utils'; | ||
|
||
const extra = { | ||
and: 'und', | ||
}; | ||
|
||
/** | ||
* @param {Object} [messages] - Object with extra messages | ||
* @param {array} [args.companyNames] - Array of strings with company names used to parametrized translations | ||
* @returns {Object} Object with translated messages | ||
*/ | ||
export const config = (messages) => { | ||
const lang = { ...extra, ...messages }; | ||
|
||
return { | ||
consent_modal: { | ||
title: 'Diese Website verwendet Cookies', | ||
description: `Indem Sie auf „Alles akzeptieren“ klicken, stimmen Sie der Verwendung von Cookies und anderen Identifikatoren auf Ihrem Gerät durch ${addSeparators( | ||
lang.companyNames, | ||
extra.and, | ||
)} zu. Die Verwendung dieser Cookies und anderer Identifikatoren erleichtert die Navigation auf der Website, die Anzeige personalisierter Inhalte, gezieltes Marketing und die Analyse der Nutzung unserer Produkte und Dienstleistungen. | ||
Weitere Informationen finden Sie unter <a href="https://www.lmc.eu/en/cookies/" target="_blank">Verwendung von Cookies</a>.`, | ||
primary_btn: { | ||
text: 'Alles akzeptieren', | ||
role: 'accept_all', | ||
}, | ||
secondary_btn: { | ||
text: 'Das Notwendigste akzeptieren', | ||
role: 'accept_necessary', | ||
primary_btn: { | ||
text: 'Alles akzeptieren', | ||
role: 'accept_all', | ||
}, | ||
secondary_btn: { | ||
text: 'Das Notwendigste akzeptieren', | ||
role: 'accept_necessary', | ||
}, | ||
}, | ||
}, | ||
settings_modal: { | ||
blocks: [ | ||
{ | ||
toggle: { | ||
value: 'necessary', | ||
enabled: true, | ||
readonly: true, | ||
settings_modal: { | ||
blocks: [ | ||
{ | ||
toggle: { | ||
value: 'necessary', | ||
enabled: true, | ||
readonly: true, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'ad', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'ad', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'analytics', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'analytics', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'functionality', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'functionality', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
{ | ||
toggle: { | ||
value: 'personalization', | ||
enabled: false, | ||
readonly: false, | ||
{ | ||
toggle: { | ||
value: 'personalization', | ||
enabled: false, | ||
readonly: false, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}; | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.