Skip to content

Commit 944dc13

Browse files
committed
Fix translations, DEV-1111
1 parent 0c1911e commit 944dc13

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

i18n/de_DE.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"Cookiebot ID","Cookiebot ID"
44
"Data Culture","Data Culture"
55
"Please <a href=""javascript:Cookiebot.renew()"" class=""cookiebot-iframe-consent-link"">accept %1 cookies</a> to view this %2 content.","Bitte <a href=""javascript:Cookiebot.renew()"" class=""cookiebot-iframe-consent-link"">akzeptieren Sie %1 Cookies</a>, um diesen %2 Inhalt anzuzeigen."
6-
"Please <a href="javascript:Cookiebot.renew()">accept marketing cookies</a> to view this content.","Bitte <a href="javascript:Cookiebot.renew()">akzeptieren Sie Marketing-Cookies</a>, um diesen Inhalt anzuzeigen."
6+
"Please <a href=""javascript:Cookiebot.renew()"">accept marketing cookies</a> to view this content.","Bitte <a href=""javascript:Cookiebot.renew()"">akzeptieren Sie Marketing-Cookies</a>, um diesen Inhalt anzuzeigen."

i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"Cookiebot ID","Cookiebot ID"
44
"Data Culture","Data Culture"
55
"Please <a href=""javascript:Cookiebot.renew()"" class=""cookiebot-iframe-consent-link"">accept %1 cookies</a> to view this %2 content.","Please <a href=""javascript:Cookiebot.renew()"" class=""cookiebot-iframe-consent-link"">accept %1 cookies</a> to view this %2 content."
6-
"Please <a href="javascript:Cookiebot.renew()">accept marketing cookies</a> to view this content.","Please <a href="javascript:Cookiebot.renew()">accept marketing cookies</a> to view this content."
6+
"Please <a href=""javascript:Cookiebot.renew()"">accept marketing cookies</a> to view this content.","Please <a href=""javascript:Cookiebot.renew()"">accept marketing cookies</a> to view this content."

view/frontend/templates/iframe-handler.phtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
declare(strict_types=1);
44

55
use CustomGento\Cookiebot\ViewModel\Script;
6+
use Magento\Framework\Escaper;
67
use Magento\Framework\View\Element\Template;
78
use Magento\Framework\View\Helper\SecureHtmlRenderer;
89

910
/** @var Template $block */
11+
/** @var Escaper $escaper */
1012
/** @var SecureHtmlRenderer $secureRenderer */
1113
/** @var Script $viewModel */
1214
$viewModel = $block->getData('view_model');
13-
$consentMessage
14-
= 'Please <a href="javascript:Cookiebot.renew()" class="cookiebot-iframe-consent-link">accept %1 cookies</a> to view this %2 content.';
15+
$consentMessage = __('Please <a href="javascript:Cookiebot.renew()" class="cookiebot-iframe-consent-link">accept %1 cookies</a> to view this %2 content.');
1516

1617
$scriptString = '
1718
document.addEventListener("DOMContentLoaded", function () {
@@ -49,7 +50,7 @@ $scriptString = '
4950
5051
// Setup consent message and button
5152
divElement.classList.add(`cookieconsent-optout-${consentType}`);
52-
const consentMessage = `' . $consentMessage . '`;
53+
const consentMessage = `' . $escaper->escapeJs($consentMessage) . '`;
5354
const message = consentMessage
5455
.replace("%1", consentType)
5556
.replace("%2", serviceProvider);

0 commit comments

Comments
 (0)