Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions assets/consent/messages.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Consent bar and settings strings, 14 locales — the same set devslab.kr and
* the open-source hub (devslab-kr.github.io) render.
* Consent bar and settings strings, including Kannada. Shared by devslab.kr and
* the open-source hub (devslab-kr.github.io).
*
* Korean and English are @devslab/site-kit's CONSENT_MESSAGES_KO / _EN word
* for word (a test pins that); the other twelve say the same short things in
* for word (a test pins that); the other locales say the same short things in
* the same neutral tone (owner decision 2026-10-06, DDS D-034): what is
* collected and why, that it is optional, and a "learn more" link. The full
* disclosure — Google Analytics 4, Google LLC, the transfer to the United
Expand Down Expand Up @@ -140,6 +140,30 @@ export const CONSENT_MESSAGES = Object.freeze({
saved: '已儲存 Cookie 設定。',
trigger: 'Cookie 設定',
}),
kn: Object.freeze({
regionLabel: 'ಕುಕೀ ಸಮ್ಮತಿ',
title: 'ಬಳಕೆಯ ಅಂಕಿಅಂಶಗಳು (ಐಚ್ಛಿಕ)',
body: 'ಸೇವೆಯನ್ನು ಸುಧಾರಿಸಲು ಬಳಕೆಯ ಅಂಕಿಅಂಶಗಳನ್ನು ಸಂಗ್ರಹಿಸುತ್ತೇವೆ. ಇದು ಐಚ್ಛಿಕ. ಒಪ್ಪದಿದ್ದರೂ ಎಲ್ಲ ಸೌಲಭ್ಯಗಳನ್ನು ಬಳಸಬಹುದು.',
learnMore: 'ಇನ್ನಷ್ಟು ತಿಳಿಯಿರಿ',
privacyLink: 'ಗೌಪ್ಯತಾ ನೀತಿ',
acceptAll: 'ಎಲ್ಲವನ್ನೂ ಒಪ್ಪಿ',
rejectAll: 'ನಿರಾಕರಿಸಿ',
settings: 'ಸೆಟ್ಟಿಂಗ್‌ಗಳು',
dismiss: 'ಆಯ್ಕೆ ಮಾಡದೆ ಮುಚ್ಚಿ',
settingsTitle: 'ಕುಕೀ ಸೆಟ್ಟಿಂಗ್‌ಗಳು',
settingsIntro: 'ಪುಟದ ಕೆಳಗಿನ “ಕುಕೀ ಸೆಟ್ಟಿಂಗ್‌ಗಳು” ಮೂಲಕ ಯಾವಾಗ ಬೇಕಾದರೂ ಬದಲಾಯಿಸಬಹುದು.',
necessaryTitle: 'ಅಗತ್ಯ',
necessaryBody: 'ಸೈಟ್ ಕಾರ್ಯನಿರ್ವಹಿಸಲು ಅಗತ್ಯವಾದ್ದರಿಂದ ಯಾವಾಗಲೂ ಸಕ್ರಿಯವಾಗಿರುತ್ತವೆ.',
necessaryStatus: 'ಯಾವಾಗಲೂ ಸಕ್ರಿಯ',
analyticsTitle: 'ಬಳಕೆಯ ಅಂಕಿಅಂಶಗಳು (ಐಚ್ಛಿಕ)',
analyticsBody: 'ಸೇವೆಯನ್ನು ಸುಧಾರಿಸಲು ನೆರವಾಗುವ ಬಳಕೆಯ ಅಂಕಿಅಂಶಗಳು.',
analyticsSwitch: 'ಬಳಕೆಯ ಅಂಕಿಅಂಶ ಸಂಗ್ರಹಕ್ಕೆ ಅನುಮತಿಸಿ',
save: 'ಆಯ್ಕೆಗಳನ್ನು ಉಳಿಸಿ',
cancel: 'ರದ್ದುಮಾಡಿ',
close: 'ಮುಚ್ಚಿ',
saved: 'ಕುಕೀ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಉಳಿಸಲಾಗಿದೆ.',
trigger: 'ಕುಕೀ ಸೆಟ್ಟಿಂಗ್‌ಗಳು',
}),
hi: Object.freeze({
regionLabel: 'कुकी सहमति',
title: 'उपयोग के आँकड़े (वैकल्पिक)',
Expand Down
8 changes: 5 additions & 3 deletions tests/consent.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,16 @@ for (const [label, cookie] of [
});
}

test('the bar strings: ko/en are the kit’s, all fourteen hub locales filled', () => {
test('the shared bar strings cover every hub locale and Kannada', () => {
assert.deepEqual(CONSENT_MESSAGES.ko, CONSENT_MESSAGES_KO);
assert.deepEqual(CONSENT_MESSAGES.en, CONSENT_MESSAGES_EN);
const html = readFileSync(join(root, 'index.html'), 'utf8');
const supported = JSON.parse(html.match(/var SUPPORTED = (\[[^\]]+\]);/)[1].replaceAll("'", '"'));
assert.deepEqual(Object.keys(CONSENT_MESSAGES).sort(), [...supported].sort());
assert.deepEqual(Object.keys(CONSENT_MESSAGES).sort(), [...supported, 'kn'].sort());
assert.equal(consentMessagesFor('kn-IN').lang, 'kn');
assert.equal(consentMessagesFor('KN').lang, 'kn');
const keys = Object.keys(CONSENT_MESSAGES_KO).sort();
for (const lang of supported) {
for (const lang of Object.keys(CONSENT_MESSAGES)) {
const m = consentMessagesFor(lang).messages;
assert.deepEqual(Object.keys(m).sort(), keys, `${lang}: the kit's keys, learnMore and cancel included`);
assert.ok(m.settingsIntro.includes(m.trigger), `${lang}: the settings intro names the footer control`);
Expand Down
Loading