diff --git a/cspell.json b/cspell.json index 61a19132a..7709a7d28 100644 --- a/cspell.json +++ b/cspell.json @@ -5,7 +5,7 @@ // language - current active spelling language "language": "en", // words - list of words to be always considered correct - "words": ["cfworker", "felte", "ficsit", "pnpx", "prismjs", "urql", "webp", "wonka"], + "words": ["cfworker", "felte", "ficsit", "pnpx", "prismjs", "smui", "tolgee", "urql", "webp", "wonka"], // flagWords - list of words to be always considered incorrect // This is useful for offensive words and common spelling errors. // cSpell:disable (don't complain about the words we listed here) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9dc5fa196..00f75ff1a 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -69,22 +69,30 @@ await import('cookieconsent/src/cookieconsent'); - if ('cookieconsent' in window) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - window.cookieconsent.initialise({ - palette: { - popup: { - background: '#000' + tolgee.on('initialLoad', () => { + if ('cookieconsent' in window) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + // cspell:ignore initialise + window.cookieconsent.initialise({ + palette: { + popup: { + background: '#000' + }, + button: { + background: '#f1d600' + } }, - button: { - background: '#f1d600' - } - }, - theme: 'edgeless', - position: 'bottom-right' - }); - } + content: { + message: tolgee.t('cookieconsent.message'), + link: tolgee.t('cookieconsent.link'), + dismiss: tolgee.t('cookieconsent.dismiss') + }, + theme: 'edgeless', + position: 'bottom-right' + }); + } + }); customProtocolCheck.set(await import('$lib/thirdparty/custom_protocol'));