Changeset 3754407
- Timestamp:
- 10/19/2026 09:34:13 AM (4 weeks ago)
- Location:
- kansleri-cookie-consent
- Files:
-
- 15 edited
- 15 copied
-
tags/1.8.9 (copied) (copied from kansleri-cookie-consent/trunk )
-
tags/1.8.9/assets/admin.css (modified) (1 diff)
-
tags/1.8.9/assets/admin.js (copied) (copied from kansleri-cookie-consent/trunk/assets/admin.js ) (1 diff)
-
tags/1.8.9/assets/consent.css (copied) (copied from kansleri-cookie-consent/trunk/assets/consent.css )
-
tags/1.8.9/assets/consent.js (copied) (copied from kansleri-cookie-consent/trunk/assets/consent.js )
-
tags/1.8.9/includes/class-admin.php (copied) (copied from kansleri-cookie-consent/trunk/includes/class-admin.php ) (7 diffs)
-
tags/1.8.9/includes/class-consent.php (modified) (7 diffs)
-
tags/1.8.9/includes/class-policy-page.php (modified) (6 diffs)
-
tags/1.8.9/includes/class-scanner.php (copied) (copied from kansleri-cookie-consent/trunk/includes/class-scanner.php )
-
tags/1.8.9/includes/class-script-blocker.php (copied) (copied from kansleri-cookie-consent/trunk/includes/class-script-blocker.php ) (2 diffs)
-
tags/1.8.9/includes/class-service-cookies.php (copied) (copied from kansleri-cookie-consent/trunk/includes/class-service-cookies.php )
-
tags/1.8.9/kansleri-cookie-consent.php (copied) (copied from kansleri-cookie-consent/trunk/kansleri-cookie-consent.php ) (7 diffs)
-
tags/1.8.9/languages/kansleri-cookie-consent-fi.l10n.php (copied) (copied from kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.l10n.php ) (13 diffs)
-
tags/1.8.9/languages/kansleri-cookie-consent-fi.mo (copied) (copied from kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.mo )
-
tags/1.8.9/languages/kansleri-cookie-consent-fi.po (copied) (copied from kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.po ) (2 diffs)
-
tags/1.8.9/languages/kansleri-cookie-consent.pot (copied) (copied from kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent.pot ) (2 diffs)
-
tags/1.8.9/readme.txt (copied) (copied from kansleri-cookie-consent/trunk/readme.txt ) (2 diffs)
-
tags/1.8.9/uninstall.php (copied) (copied from kansleri-cookie-consent/trunk/uninstall.php )
-
trunk/assets/admin.css (modified) (1 diff)
-
trunk/assets/admin.js (modified) (1 diff)
-
trunk/includes/class-admin.php (modified) (7 diffs)
-
trunk/includes/class-consent.php (modified) (7 diffs)
-
trunk/includes/class-policy-page.php (modified) (6 diffs)
-
trunk/includes/class-script-blocker.php (modified) (2 diffs)
-
trunk/kansleri-cookie-consent.php (modified) (7 diffs)
-
trunk/languages/kansleri-cookie-consent-fi.l10n.php (modified) (13 diffs)
-
trunk/languages/kansleri-cookie-consent-fi.mo (modified) ( previous)
-
trunk/languages/kansleri-cookie-consent-fi.po (modified) (2 diffs)
-
trunk/languages/kansleri-cookie-consent.pot (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kansleri-cookie-consent/tags/1.8.9/assets/admin.css
r3728487 r3754407 743 743 } 744 744 745 /* Grouped visitor-facing text fields (cookie categories, policy page texts). */ 746 .kncc-texts-help { 747 margin: 0 0 12px; 748 } 749 750 .kncc-text-group { 751 max-width: 640px; 752 margin: 0 0 14px; 753 padding: 8px 14px 2px; 754 border: 1px solid #dcdcde; 755 border-radius: 4px; 756 background: #fff; 757 } 758 759 .kncc-text-group legend { 760 padding: 0 4px; 761 font-weight: 600; 762 } 763 764 .kncc-text-group p { 765 margin: 0 0 10px; 766 } 767 -
kansleri-cookie-consent/tags/1.8.9/assets/admin.js
r3746047 r3754407 1161 1161 ]; 1162 1162 var TEXT_FIELDS = ['heading_text', 'description_text', 'accept_text', 'reject_text', 'customize_text', 'save_text', 'close_text']; 1163 ['necessary', 'analytics', 'marketing', 'preferences'].forEach(function (cat) { 1164 TEXT_FIELDS.push('category_name_' + cat, 'category_desc_' + cat); 1165 if (cat !== 'necessary') TEXT_FIELDS.push('empty_note_' + cat); 1166 }); 1163 1167 1164 1168 function darken(hex, amount) { -
kansleri-cookie-consent/tags/1.8.9/includes/class-admin.php
r3746047 r3754407 237 237 $lang = kncc_get_current_language(); 238 238 $placeholder_source = kncc_get_default_settings_for_language($lang); 239 $builtin_texts = kncc_get_builtin_texts_for_language($lang); 239 240 ?> 240 241 <?php $kncc_is_plugin_style = (($settings['text_style_mode'] ?? 'plugin') === 'plugin'); ?> … … 342 343 </tr> 343 344 <tr> 345 <th scope="row"><label for="kncc-policy-link-text"><?php esc_html_e('Cookie policy link text', 'kansleri-cookie-consent'); ?></label></th> 346 <td><input type="text" id="kncc-policy-link-text" name="policy_link_text" value="<?php echo esc_attr($settings['policy_link_text'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['policy_link_text']); ?>" class="regular-text" /></td> 347 </tr> 348 <tr> 349 <th scope="row"><label for="kncc-settings-link-text"><?php esc_html_e('Cookie settings label', 'kansleri-cookie-consent'); ?></label></th> 350 <td> 351 <input type="text" id="kncc-settings-link-text" name="settings_link_text" value="<?php echo esc_attr($settings['settings_link_text'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['settings_link_text']); ?>" class="regular-text" /> 352 <p class="description"><?php esc_html_e('Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link.', 'kansleri-cookie-consent'); ?></p> 353 </td> 354 </tr> 355 <tr> 356 <th scope="row"><label for="kncc-banner-label"><?php esc_html_e('Banner label for screen readers', 'kansleri-cookie-consent'); ?></label></th> 357 <td><input type="text" id="kncc-banner-label" name="banner_label" value="<?php echo esc_attr($settings['banner_label'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['banner_label']); ?>" class="regular-text" /></td> 358 </tr> 359 <tr> 360 <th scope="row"><?php esc_html_e('Cookie categories', 'kansleri-cookie-consent'); ?></th> 361 <td> 362 <p class="description kncc-texts-help"><?php esc_html_e('Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language.', 'kansleri-cookie-consent'); ?></p> 363 <?php foreach (array_keys(kncc_get_categories()) as $key) : ?> 364 <fieldset class="kncc-text-group"> 365 <legend><?php echo esc_html($builtin_texts['category_name_' . $key]); ?></legend> 366 <p> 367 <label for="kncc-category-name-<?php echo esc_attr($key); ?>"><?php esc_html_e('Name', 'kansleri-cookie-consent'); ?></label><br /> 368 <input type="text" id="kncc-category-name-<?php echo esc_attr($key); ?>" name="category_name_<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($settings['category_name_' . $key] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['category_name_' . $key]); ?>" class="regular-text" /> 369 </p> 370 <p> 371 <label for="kncc-category-desc-<?php echo esc_attr($key); ?>"><?php esc_html_e('Description', 'kansleri-cookie-consent'); ?></label><br /> 372 <textarea id="kncc-category-desc-<?php echo esc_attr($key); ?>" name="category_desc_<?php echo esc_attr($key); ?>" rows="2" class="large-text" placeholder="<?php echo esc_attr($builtin_texts['category_desc_' . $key]); ?>"><?php echo esc_textarea($settings['category_desc_' . $key] ?? ''); ?></textarea> 373 </p> 374 <?php if (isset($builtin_texts['empty_note_' . $key])) : ?> 375 <p> 376 <label for="kncc-empty-note-<?php echo esc_attr($key); ?>"><?php esc_html_e('Text when no cookies are used', 'kansleri-cookie-consent'); ?></label><br /> 377 <input type="text" id="kncc-empty-note-<?php echo esc_attr($key); ?>" name="empty_note_<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($settings['empty_note_' . $key] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['empty_note_' . $key]); ?>" class="large-text" /> 378 </p> 379 <?php endif; ?> 380 </fieldset> 381 <?php endforeach; ?> 382 </td> 383 </tr> 384 <tr> 344 385 <th scope="row"><label for="kncc-iframe-placeholder-text"><?php esc_html_e('Blocked iframe message', 'kansleri-cookie-consent'); ?></label></th> 345 386 <td> … … 351 392 <th scope="row"><label for="kncc-iframe-accept-text"><?php esc_html_e('Blocked iframe accept button', 'kansleri-cookie-consent'); ?></label></th> 352 393 <td><input type="text" id="kncc-iframe-accept-text" name="iframe_accept_text" value="<?php echo esc_attr($settings['iframe_accept_text'] ?? ''); ?>" placeholder="<?php echo esc_attr($placeholder_source['iframe_accept_text']); ?>" class="regular-text" /></td> 394 </tr> 395 <tr> 396 <th scope="row"><label for="kncc-placeholder-text-analytics"><?php esc_html_e('Blocked analytics content message', 'kansleri-cookie-consent'); ?></label></th> 397 <td> 398 <input type="text" id="kncc-placeholder-text-analytics" name="placeholder_text_analytics" value="<?php echo esc_attr($settings['placeholder_text_analytics'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_text_analytics']); ?>" class="regular-text" /> 399 <p class="description"><?php esc_html_e('Shown over blocked content that needs analytics cookies, such as a review widget.', 'kansleri-cookie-consent'); ?></p> 400 </td> 401 </tr> 402 <tr> 403 <th scope="row"><label for="kncc-placeholder-accept-analytics"><?php esc_html_e('Blocked analytics content accept button', 'kansleri-cookie-consent'); ?></label></th> 404 <td><input type="text" id="kncc-placeholder-accept-analytics" name="placeholder_accept_analytics" value="<?php echo esc_attr($settings['placeholder_accept_analytics'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_accept_analytics']); ?>" class="regular-text" /></td> 405 </tr> 406 <tr> 407 <th scope="row"><label for="kncc-placeholder-text-preferences"><?php esc_html_e('Blocked preferences content message', 'kansleri-cookie-consent'); ?></label></th> 408 <td> 409 <input type="text" id="kncc-placeholder-text-preferences" name="placeholder_text_preferences" value="<?php echo esc_attr($settings['placeholder_text_preferences'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_text_preferences']); ?>" class="regular-text" /> 410 <p class="description"><?php esc_html_e('Shown over blocked content that needs preference cookies, such as a chat or booking widget.', 'kansleri-cookie-consent'); ?></p> 411 </td> 412 </tr> 413 <tr> 414 <th scope="row"><label for="kncc-placeholder-accept-preferences"><?php esc_html_e('Blocked preferences content accept button', 'kansleri-cookie-consent'); ?></label></th> 415 <td><input type="text" id="kncc-placeholder-accept-preferences" name="placeholder_accept_preferences" value="<?php echo esc_attr($settings['placeholder_accept_preferences'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_accept_preferences']); ?>" class="regular-text" /></td> 353 416 </tr> 354 417 <tr> … … 417 480 $preview_in_use = kncc_get_categories_in_use(); 418 481 $preview_empty_mode = (isset($preview_settings['empty_category_mode']) && $preview_settings['empty_category_mode'] === 'hide') ? 'hide' : 'disable'; 419 $preview_empty_notes = array( 420 'analytics' => __('No analytics cookies are used on this site.', 'kansleri-cookie-consent'), 421 'marketing' => __('No marketing cookies are used on this site.', 'kansleri-cookie-consent'), 422 'preferences' => __('No preference cookies are used on this site.', 'kansleri-cookie-consent'), 423 ); 482 // Saved wording, or the built-in text of the language being edited. 483 $preview_text = function ($key) use ($settings, $builtin_texts) { 484 return (isset($settings[$key]) && is_string($settings[$key]) && trim($settings[$key]) !== '') ? $settings[$key] : $builtin_texts[$key]; 485 }; 424 486 ?> 425 487 … … 469 531 /> 470 532 <span class="kncc-category__toggle"></span> 471 <span class="kncc-category__name "><?php echo esc_html($data['label']); ?></span>533 <span class="kncc-category__name kncc-preview-category_name_<?php echo esc_attr($key); ?>"><?php echo esc_html($preview_text('category_name_' . $key)); ?></span> 472 534 </label> 473 <p class="kncc-category__desc "><?php echo esc_html($data['description']); ?></p>474 <?php if ($is_empty && isset($ preview_empty_notes[$key])) : ?>475 <p class="kncc-category__empty-note "><?php echo esc_html($preview_empty_notes[$key]); ?></p>535 <p class="kncc-category__desc kncc-preview-category_desc_<?php echo esc_attr($key); ?>"><?php echo esc_html($preview_text('category_desc_' . $key)); ?></p> 536 <?php if ($is_empty && isset($builtin_texts['empty_note_' . $key])) : ?> 537 <p class="kncc-category__empty-note kncc-preview-empty_note_<?php echo esc_attr($key); ?>"><?php echo esc_html($preview_text('empty_note_' . $key)); ?></p> 476 538 <?php endif; ?> 477 539 </div> … … 644 706 <?php esc_html_e('Theme style is the default so the policy page matches your site typography. Switch to Plugin style for strict plugin sizes and colors.', 'kansleri-cookie-consent'); ?> 645 707 </p> 708 </td> 709 </tr> 710 <tr> 711 <th scope="row"><?php esc_html_e('Policy page texts', 'kansleri-cookie-consent'); ?></th> 712 <td> 713 <p class="description kncc-texts-help"><?php esc_html_e('Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab.', 'kansleri-cookie-consent'); ?></p> 714 <?php 715 $builtin_texts = kncc_get_builtin_texts_for_language(kncc_get_current_language()); 716 $policy_text_groups = array( 717 __('Category descriptions', 'kansleri-cookie-consent') => array( 718 'policy_desc_necessary' => array($builtin_texts['category_name_necessary'], true), 719 'policy_desc_analytics' => array($builtin_texts['category_name_analytics'], true), 720 'policy_desc_marketing' => array($builtin_texts['category_name_marketing'], true), 721 'policy_desc_preferences' => array($builtin_texts['category_name_preferences'], true), 722 ), 723 __('Consent status', 'kansleri-cookie-consent') => array( 724 'policy_status_heading' => array(__('Heading', 'kansleri-cookie-consent'), false), 725 'status_no_choice' => array(__('Before the visitor chooses', 'kansleri-cookie-consent'), false), 726 'status_allowed' => array(__('Allowed', 'kansleri-cookie-consent'), false), 727 'status_denied' => array(__('Denied', 'kansleri-cookie-consent'), false), 728 'status_always_active' => array(__('Always active', 'kansleri-cookie-consent'), false), 729 'policy_status_note' => array(__('Technical note (shown when WP Consent API is active)', 'kansleri-cookie-consent'), true), 730 ), 731 __('Buttons and messages', 'kansleri-cookie-consent') => array( 732 'policy_edit_button' => array(__('Edit preferences button', 'kansleri-cookie-consent'), false), 733 'policy_no_cookies' => array(__('Message when no cookies are registered', 'kansleri-cookie-consent'), false), 734 ), 735 __('Table column headings', 'kansleri-cookie-consent') => array( 736 'policy_col_cookie' => array(__('Cookie', 'kansleri-cookie-consent'), false), 737 'policy_col_provider' => array(__('Provider', 'kansleri-cookie-consent'), false), 738 'policy_col_purpose' => array(__('Purpose', 'kansleri-cookie-consent'), false), 739 'policy_col_duration' => array(__('Duration', 'kansleri-cookie-consent'), false), 740 ), 741 ); 742 foreach ($policy_text_groups as $group_label => $fields) : 743 ?> 744 <fieldset class="kncc-text-group"> 745 <legend><?php echo esc_html($group_label); ?></legend> 746 <?php foreach ($fields as $key => $field) : 747 list($label, $multiline) = $field; 748 $id = 'kncc-' . str_replace('_', '-', $key); 749 ?> 750 <p> 751 <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label); ?></label><br /> 752 <?php if ($multiline) : ?> 753 <textarea id="<?php echo esc_attr($id); ?>" name="<?php echo esc_attr($key); ?>" rows="2" class="large-text" placeholder="<?php echo esc_attr($builtin_texts[$key]); ?>"><?php echo esc_textarea($settings[$key] ?? ''); ?></textarea> 754 <?php else : ?> 755 <input type="text" id="<?php echo esc_attr($id); ?>" name="<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($settings[$key] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts[$key]); ?>" class="regular-text" /> 756 <?php endif; ?> 757 </p> 758 <?php endforeach; ?> 759 </fieldset> 760 <?php endforeach; ?> 646 761 </td> 647 762 </tr> … … 1484 1599 // All text fields are saved as-is, including empty strings. An empty value means 1485 1600 // "use the locale default" — the frontend substitutes the visitor's locale default at render time. 1486 $text_fields = array (1601 $text_fields = array_merge(array( 1487 1602 'banner_position', 1488 1603 'heading_text', 'description_text', 'accept_text', 1489 1604 'reject_text', 'customize_text', 'save_text', 'close_text', 1490 1605 'iframe_placeholder_text', 'iframe_accept_text', 1491 ) ;1606 ), kncc_get_builtin_text_keys()); 1492 1607 foreach ($text_fields as $field) { 1493 1608 if (isset($_POST[$field])) { -
kansleri-cookie-consent/tags/1.8.9/includes/class-consent.php
r3724446 r3754407 18 18 19 19 $settings = kncc_get_settings(); 20 $texts = kncc_get_localized_texts(); 20 21 21 22 wp_enqueue_style( … … 48 49 ) : null, 49 50 'policyStatus' => array( 50 'noChoice' => __('You have not made a choice yet.', 'kansleri-cookie-consent'),51 'allowed' => __('Allowed', 'kansleri-cookie-consent'),52 'denied' => __('Denied', 'kansleri-cookie-consent'),53 'alwaysActive' => __('Always active', 'kansleri-cookie-consent'),51 'noChoice' => kncc_text('status_no_choice', $texts), 52 'allowed' => kncc_text('status_allowed', $texts), 53 'denied' => kncc_text('status_denied', $texts), 54 'alwaysActive' => kncc_text('status_always_active', $texts), 54 55 ), 55 56 )) . ';', 'before'); … … 93 94 $text_style_mode = (isset($settings['text_style_mode']) && $settings['text_style_mode'] === 'theme') ? 'theme' : 'plugin'; 94 95 95 $all_cats = kncc_get_categories();96 96 $categories = array(); 97 97 $cat_descriptions = array(); 98 foreach ( $all_cats as $key => $data) {99 $categories[$key] = $data['label'];100 $cat_descriptions[$key] = $data['description'];98 foreach (array_keys(kncc_get_categories()) as $key) { 99 $categories[$key] = kncc_text('category_name_' . $key, $settings); 100 $cat_descriptions[$key] = kncc_text('category_desc_' . $key, $settings); 101 101 } 102 102 … … 104 104 $empty_mode = (isset($settings['empty_category_mode']) && $settings['empty_category_mode'] === 'hide') ? 'hide' : 'disable'; 105 105 $empty_notes = array( 106 'analytics' => __('No analytics cookies are used on this site.', 'kansleri-cookie-consent'),107 'marketing' => __('No marketing cookies are used on this site.', 'kansleri-cookie-consent'),108 'preferences' => __('No preference cookies are used on this site.', 'kansleri-cookie-consent'),106 'analytics' => kncc_text('empty_note_analytics', $settings), 107 'marketing' => kncc_text('empty_note_marketing', $settings), 108 'preferences' => kncc_text('empty_note_preferences', $settings), 109 109 ); 110 110 … … 160 160 <?php if ($is_modal) : ?>aria-modal="true"<?php endif; ?> 161 161 data-kncc-modal="<?php echo $is_modal ? '1' : '0'; ?>" 162 aria-label="<?php e sc_attr_e('Cookie consent', 'kansleri-cookie-consent'); ?>"162 aria-label="<?php echo esc_attr(kncc_text('banner_label', $settings)); ?>" 163 163 style="display:none;"> 164 164 … … 173 173 <p class="kncc-desc"><?php echo esc_html($settings['description_text']); ?> 174 174 <?php if ($policy_link) : ?> 175 <a href="<?php echo esc_url($policy_link); ?>" class="kncc-policy-link" target="_blank"><?php e sc_html_e('Cookie Policy', 'kansleri-cookie-consent'); ?></a>175 <a href="<?php echo esc_url($policy_link); ?>" class="kncc-policy-link" target="_blank"><?php echo esc_html(kncc_text('policy_link_text', $settings)); ?></a> 176 176 <?php endif; ?> 177 177 </p> … … 232 232 id="kncc-floating-btn" 233 233 class="kncc-floating-btn kncc-typography--<?php echo esc_attr($text_style_mode); ?>" 234 aria-label="<?php e sc_attr_e('Cookie settings', 'kansleri-cookie-consent'); ?>"235 title="<?php e sc_attr_e('Cookie settings', 'kansleri-cookie-consent'); ?>"234 aria-label="<?php echo esc_attr(kncc_text('settings_link_text', $settings)); ?>" 235 title="<?php echo esc_attr(kncc_text('settings_link_text', $settings)); ?>" 236 236 style="display:none;"> 237 237 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> -
kansleri-cookie-consent/tags/1.8.9/includes/class-policy-page.php
r3702251 r3754407 59 59 60 60 if (empty($cookies)) { 61 return '<p>' . esc_html __('No cookies have been registered yet.', 'kansleri-cookie-consent') . '</p>';61 return '<p>' . esc_html(kncc_text('policy_no_cookies', $settings)) . '</p>'; 62 62 } 63 63 64 $all_cats = kncc_get_categories();65 64 $categories = array(); 66 foreach ($all_cats as $key => $data) { 67 $categories[$key] = $data['label']; 65 $cat_descriptions = array(); 66 foreach (array_keys(kncc_get_categories()) as $key) { 67 $categories[$key] = kncc_text('category_name_' . $key, $settings); 68 $cat_descriptions[$key] = kncc_text('policy_desc_' . $key, $settings); 68 69 } 69 70 70 $c at_descriptions= array(71 ' necessary' => __('These cookies are essential for the website to function and cannot be switched off.', 'kansleri-cookie-consent'),72 ' analytics' => __('These cookies help us understand how visitors interact with the website by collecting and reporting information anonymously.', 'kansleri-cookie-consent'),73 ' marketing' => __('These cookies are used to deliver relevant advertisements and track ad campaign performance.', 'kansleri-cookie-consent'),74 ' preferences' => __('These cookies allow the website to remember choices you make and provide enhanced functionality and personalisation.', 'kansleri-cookie-consent'),71 $col = array( 72 'cookie' => kncc_text('policy_col_cookie', $settings), 73 'provider' => kncc_text('policy_col_provider', $settings), 74 'purpose' => kncc_text('policy_col_purpose', $settings), 75 'duration' => kncc_text('policy_col_duration', $settings), 75 76 ); 76 77 … … 96 97 <?php if (!empty($status_categories)) : ?> 97 98 <div class="kncc-policy__consent-status"> 98 <p class="kncc-policy__consent-status-heading"><strong><?php e sc_html_e('Your current cookie preferences', 'kansleri-cookie-consent'); ?></strong></p>99 <p class="kncc-policy__consent-status-heading"><strong><?php echo esc_html(kncc_text('policy_status_heading', $settings)); ?></strong></p> 99 100 <div id="kncc-policy-consent-status" 100 101 class="kncc-policy__consent-status-body" … … 104 105 <?php if (class_exists('KNCC_WP_Consent_API') && KNCC_WP_Consent_API::is_active()) : ?> 105 106 <p class="kncc-policy__consent-status-note"> 106 <?php e sc_html_e('These choices are stored technically as wp_consent_functional, wp_consent_statistics, wp_consent_marketing, and wp_consent_preferences for compatibility with WordPress plugins.', 'kansleri-cookie-consent'); ?>107 <?php echo esc_html(kncc_text('policy_status_note', $settings)); ?> 107 108 </p> 108 109 <?php endif; ?> … … 111 112 <div class="kncc-policy__edit-consent"> 112 113 <button type="button" class="kncc-btn kncc-btn--primary kncc-edit-consent-btn"> 113 <?php e sc_html_e('Edit cookie preferences', 'kansleri-cookie-consent'); ?>114 <?php echo esc_html(kncc_text('policy_edit_button', $settings)); ?> 114 115 </button> 115 116 </div> … … 122 123 <thead> 123 124 <tr> 124 <th><?php e sc_html_e('Cookie', 'kansleri-cookie-consent'); ?></th>125 <th><?php e sc_html_e('Provider', 'kansleri-cookie-consent'); ?></th>126 <th><?php e sc_html_e('Purpose', 'kansleri-cookie-consent'); ?></th>127 <th><?php e sc_html_e('Duration', 'kansleri-cookie-consent'); ?></th>125 <th><?php echo esc_html($col['cookie']); ?></th> 126 <th><?php echo esc_html($col['provider']); ?></th> 127 <th><?php echo esc_html($col['purpose']); ?></th> 128 <th><?php echo esc_html($col['duration']); ?></th> 128 129 </tr> 129 130 </thead> … … 131 132 <?php foreach ($grouped[$key] as $cookie) : ?> 132 133 <tr> 133 <td data-label="<?php e sc_attr_e('Cookie', 'kansleri-cookie-consent'); ?>"><code><?php echo esc_html($cookie['name']); ?></code></td>134 <td data-label="<?php e sc_attr_e('Provider', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['provider'] ?? ''); ?></td>135 <td data-label="<?php e sc_attr_e('Purpose', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['description'] ?? ''); ?></td>136 <td data-label="<?php e sc_attr_e('Duration', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['duration'] ?? ''); ?></td>134 <td data-label="<?php echo esc_attr($col['cookie']); ?>"><code><?php echo esc_html($cookie['name']); ?></code></td> 135 <td data-label="<?php echo esc_attr($col['provider']); ?>"><?php echo esc_html($cookie['provider'] ?? ''); ?></td> 136 <td data-label="<?php echo esc_attr($col['purpose']); ?>"><?php echo esc_html($cookie['description'] ?? ''); ?></td> 137 <td data-label="<?php echo esc_attr($col['duration']); ?>"><?php echo esc_html($cookie['duration'] ?? ''); ?></td> 137 138 </tr> 138 139 <?php endforeach; ?> -
kansleri-cookie-consent/tags/1.8.9/includes/class-script-blocker.php
r3746047 r3754407 1003 1003 1004 1004 /** 1005 * Placeholder message and accept button text for a category . Marketing uses the texts1006 * from the General tab, which videos have always used; the others have built-in texts.1005 * Placeholder message and accept button text for a category, all editable on the General 1006 * tab. Marketing keeps the iframe_* settings that videos have always used. 1007 1007 */ 1008 1008 private static function get_placeholder_texts($category) { … … 1012 1012 } 1013 1013 1014 if ($category === 'analytics') { 1014 $settings = kncc_get_localized_texts(); 1015 if ($category === 'analytics' || $category === 'preferences') { 1015 1016 $texts[$category] = array( 1016 'placeholder' => __('This content is blocked because it requires analytics cookies.', 'kansleri-cookie-consent'), 1017 'accept' => __('Accept analytics cookies', 'kansleri-cookie-consent'), 1018 ); 1019 } elseif ($category === 'preferences') { 1020 $texts[$category] = array( 1021 'placeholder' => __('This content is blocked because it requires preference cookies.', 'kansleri-cookie-consent'), 1022 'accept' => __('Accept preference cookies', 'kansleri-cookie-consent'), 1017 'placeholder' => kncc_text('placeholder_text_' . $category, $settings), 1018 'accept' => kncc_text('placeholder_accept_' . $category, $settings), 1023 1019 ); 1024 1020 } else { 1025 $settings = kncc_get_localized_texts();1026 1021 $texts[$category] = array( 1027 1022 'placeholder' => !empty($settings['iframe_placeholder_text']) -
kansleri-cookie-consent/tags/1.8.9/kansleri-cookie-consent.php
r3746047 r3754407 3 3 * Plugin Name: Kansleri Cookie Consent 4 4 * Description: Free, no-ads GDPR cookie consent with script blocking, consent logging, Google Consent Mode v2, and AI-assisted setup. Perfect for personal sites and small businesses. 5 * Version: 1.8. 85 * Version: 1.8.9 6 6 * Author: Kansleri.fi 7 7 * Author URI: https://kansleri.fi … … 20 20 } 21 21 22 define('KNCC_VERSION', '1.8. 8');22 define('KNCC_VERSION', '1.8.9'); 23 23 // Bump whenever the consent log schema changes so dbDelta runs on upgrade. 24 24 define('KNCC_DB_VERSION', '1.3.0'); … … 92 92 'block_html_scripts' => true, 93 93 'block_iframes' => true, 94 ) ;94 ) + array_fill_keys(kncc_get_builtin_text_keys(), ''); 95 95 } 96 96 endif; … … 276 276 restore_previous_locale(); 277 277 return $defaults; 278 } 279 endif; 280 281 if (!function_exists('kncc_get_builtin_texts')) : 282 /** 283 * Visitor-facing texts the site owner can replace, with their built-in wording. 284 * 285 * These settings are stored empty until the owner types their own text, and an empty value 286 * shows the built-in text in the visitor's language. Keeping the built-in wording out of the 287 * saved settings means a site never gets stuck with the admin's language. 288 */ 289 function kncc_get_builtin_texts() { 290 $categories = kncc_get_categories(); 291 $texts = array( 292 'policy_link_text' => __('Cookie Policy', 'kansleri-cookie-consent'), 293 'settings_link_text' => __('Cookie settings', 'kansleri-cookie-consent'), 294 'banner_label' => __('Cookie consent', 'kansleri-cookie-consent'), 295 ); 296 foreach ($categories as $key => $data) { 297 $texts['category_name_' . $key] = $data['label']; 298 $texts['category_desc_' . $key] = $data['description']; 299 } 300 return $texts + array( 301 'empty_note_analytics' => __('No analytics cookies are used on this site.', 'kansleri-cookie-consent'), 302 'empty_note_marketing' => __('No marketing cookies are used on this site.', 'kansleri-cookie-consent'), 303 'empty_note_preferences' => __('No preference cookies are used on this site.', 'kansleri-cookie-consent'), 304 'placeholder_text_analytics' => __('This content is blocked because it requires analytics cookies.', 'kansleri-cookie-consent'), 305 'placeholder_accept_analytics' => __('Accept analytics cookies', 'kansleri-cookie-consent'), 306 'placeholder_text_preferences' => __('This content is blocked because it requires preference cookies.', 'kansleri-cookie-consent'), 307 'placeholder_accept_preferences' => __('Accept preference cookies', 'kansleri-cookie-consent'), 308 'policy_desc_necessary' => __('These cookies are essential for the website to function and cannot be switched off.', 'kansleri-cookie-consent'), 309 'policy_desc_analytics' => __('These cookies help us understand how visitors interact with the website by collecting and reporting information anonymously.', 'kansleri-cookie-consent'), 310 'policy_desc_marketing' => __('These cookies are used to deliver relevant advertisements and track ad campaign performance.', 'kansleri-cookie-consent'), 311 'policy_desc_preferences' => __('These cookies allow the website to remember choices you make and provide enhanced functionality and personalisation.', 'kansleri-cookie-consent'), 312 'policy_no_cookies' => __('No cookies have been registered yet.', 'kansleri-cookie-consent'), 313 'policy_status_heading' => __('Your current cookie preferences', 'kansleri-cookie-consent'), 314 'policy_status_note' => __('These choices are stored technically as wp_consent_functional, wp_consent_statistics, wp_consent_marketing, and wp_consent_preferences for compatibility with WordPress plugins.', 'kansleri-cookie-consent'), 315 'policy_edit_button' => __('Edit cookie preferences', 'kansleri-cookie-consent'), 316 'policy_col_cookie' => __('Cookie', 'kansleri-cookie-consent'), 317 'policy_col_provider' => __('Provider', 'kansleri-cookie-consent'), 318 'policy_col_purpose' => __('Purpose', 'kansleri-cookie-consent'), 319 'policy_col_duration' => __('Duration', 'kansleri-cookie-consent'), 320 'status_no_choice' => __('You have not made a choice yet.', 'kansleri-cookie-consent'), 321 'status_allowed' => __('Allowed', 'kansleri-cookie-consent'), 322 'status_denied' => __('Denied', 'kansleri-cookie-consent'), 323 'status_always_active' => __('Always active', 'kansleri-cookie-consent'), 324 ); 325 } 326 endif; 327 328 if (!function_exists('kncc_get_builtin_text_keys')) : 329 /** 330 * Keys of kncc_get_builtin_texts(). Cached because they never depend on the language and 331 * every settings read needs them (through kncc_get_default_settings()). 332 */ 333 function kncc_get_builtin_text_keys() { 334 static $keys = null; 335 if ($keys === null) { 336 $keys = array_keys(kncc_get_builtin_texts()); 337 } 338 return $keys; 339 } 340 endif; 341 342 if (!function_exists('kncc_get_builtin_texts_for_language')) : 343 /** 344 * kncc_get_builtin_texts() in the given language (the admin shows them as placeholders). 345 */ 346 function kncc_get_builtin_texts_for_language($lang = null) { 347 $target_locale = kncc_get_content_locale($lang); 348 349 if ($target_locale === determine_locale()) { 350 return kncc_get_builtin_texts(); 351 } 352 353 switch_to_locale($target_locale); 354 $texts = kncc_get_builtin_texts(); 355 restore_previous_locale(); 356 return $texts; 357 } 358 endif; 359 360 if (!function_exists('kncc_text')) : 361 /** 362 * A visitor-facing text: the site owner's own wording when set, otherwise the built-in text 363 * in the current language. $settings comes from kncc_get_localized_texts() or similar. 364 */ 365 function kncc_text($key, $settings) { 366 if (isset($settings[$key]) && is_string($settings[$key]) && trim($settings[$key]) !== '') { 367 return $settings[$key]; 368 } 369 370 static $builtin = array(); 371 $locale = determine_locale(); 372 if (!isset($builtin[$locale])) { 373 $builtin[$locale] = kncc_get_builtin_texts(); 374 } 375 return isset($builtin[$locale][$key]) ? $builtin[$locale][$key] : ''; 278 376 } 279 377 endif; … … 838 936 */ 839 937 function kncc_get_text_field_keys() { 840 return array (938 return array_merge(array( 841 939 'heading_text', 842 940 'description_text', … … 848 946 'iframe_placeholder_text', 849 947 'iframe_accept_text', 850 ) ;948 ), kncc_get_builtin_text_keys()); 851 949 } 852 950 endif; … … 962 1060 function kncc_cookie_settings_shortcode($atts) { 963 1061 $atts = shortcode_atts(array( 964 'text' => __('Cookie settings', 'kansleri-cookie-consent'),1062 'text' => kncc_text('settings_link_text', kncc_get_localized_texts()), 965 1063 ), $atts, 'kncc_cookie_settings'); 966 1064 -
kansleri-cookie-consent/tags/1.8.9/languages/kansleri-cookie-consent-fi.l10n.php
r3746047 r3754407 4 4 'plural-forms' => 'nplurals=2; plural=(n != 1);', 5 5 'language' => 'fi', 6 'project-id-version' => 'Kansleri Cookie Consent 1.8. 8',6 'project-id-version' => 'Kansleri Cookie Consent 1.8.9', 7 7 'x-generator' => 'kncc gen-l10n.php', 8 8 'messages' => … … 53 53 'Appears after scanning when unknown cookies are found. Copies a ready prompt to paste into an AI tool. After the AI responds, paste the JSON back into the text box and click Import.' => 'Ilmestyy skannauksen jälkeen, kun tuntemattomia evästeitä löytyy. Kopioi valmiin kehotteen AI-työkaluun liitettäväksi. AI:n vastauksen jälkeen liitä JSON tekstikenttään ja napsauta Tuo.', 54 54 'Banner background' => 'Bannerin tausta', 55 'Banner label for screen readers' => 'Bannerin nimi ruudunlukijoille', 55 56 'Banner preview' => 'Bannerin esikatselu', 56 57 'Banner style' => 'Bannerin tyyli', … … 58 59 'Banner z-index is 999999 and the floating button is 999998 — raise them if your theme renders overlays on top of the banner.' => 'Bannerin z-index on 999999 ja kelluvan painikkeen 999998 — nosta näitä jos teemasi renderöi overlayt bannerin päälle.', 59 60 'Basic Consent Mode: the Google tag and Google Tag Manager wait until the visitor accepts analytics cookies.' => 'Basic Consent Mode: Google-tagi ja Google Tag Manager odottavat, kunnes kävijä hyväksyy analytiikkaevästeet.', 61 'Before the visitor chooses' => 'Ennen kävijän valintaa', 60 62 'Block YouTube and Vimeo videos until the visitor accepts marketing cookies' => 'Estä YouTube- ja Vimeo-videot, kunnes kävijä hyväksyy markkinointievästeet', 61 63 'Block by address' => 'Estä osoitteen perusteella', 64 'Blocked analytics content accept button' => 'Estetyn analytiikkasisällön hyväksy-painike', 65 'Blocked analytics content message' => 'Estetyn analytiikkasisällön viesti', 62 66 'Blocked iframe accept button' => 'Estetyn iframen hyväksy-painike', 63 67 'Blocked iframe message' => 'Estetyn iframen viesti', 68 'Blocked preferences content accept button' => 'Estetyn mieltymyssisällön hyväksy-painike', 69 'Blocked preferences content message' => 'Estetyn mieltymyssisällön viesti', 64 70 'Blocks any other script by part of its address until the visitor accepts the category you choose, for example a widget the plugin does not recognize. Turn on Placeholder for scripts that show content on the page.' => 'Estää minkä tahansa muun skriptin osoitteen osan perusteella, kunnes kävijä hyväksyy valitsemasi kategorian, esimerkiksi widgetin, jota lisäosa ei tunnista. Ota paikkamerkki käyttöön skripteille, jotka näyttävät sivulla sisältöä.', 65 71 'Body text' => 'Leipäteksti', 66 72 'Bottom bar' => 'Alapalkki', 73 'Buttons and messages' => 'Painikkeet ja viestit', 67 74 'CSS template copied to clipboard.' => 'CSS-malli kopioitu leikepöydälle.', 68 75 'Categories' => 'Kategoriat', 69 76 'Category' => 'Kategoria', 77 'Category descriptions' => 'Kategorioiden kuvaukset', 70 78 'Centered modal' => 'Keskitetty ikkuna', 71 79 'Choice' => 'Valinta', … … 87 95 'Consent Mode tells Google tags what the visitor has allowed (for example analytics or ads). This plugin sends a denied-by-default signal before tags run, and sends an updated signal after the visitor chooses. It controls consent signals only: you still need to install GTM/GA scripts separately.' => 'Consent Mode kertoo Google-tageille, mitä kävijä on sallinut (esim. analytiikan tai mainonnan). Tämä lisäosa lähettää oletuksena estetyn signaalin ennen tagien suorittamista ja päivitetyn signaalin kävijän valinnan jälkeen. Se ohjaa vain suostumussignaaleja: GTM/GA-skriptit on asennettava erikseen.', 88 96 'Consent statistics' => 'Suostumustilastot', 97 'Consent status' => 'Suostumuksen tila', 89 98 'Controls the main accent color used by buttons and links.' => 'Määrittää painikkeiden ja linkkien pääkorostusvärin.', 90 99 'Controls the styling of the [kncc_cookie_policy] cookie declaration table.' => 'Määrittää [kncc_cookie_policy]-evästeluettelotaulukon ulkoasun.', … … 94 103 'Cookie Consent: %1$d cookie(s) are missing descriptions: %2$s. %3$s to add them.' => 'Evästesuostumus: %1$d evästeeltä puuttuu kuvaus: %2$s. %3$s lisätäksesi ne.', 95 104 'Cookie Policy' => 'Evästekäytäntö', 105 'Cookie categories' => 'Evästekategoriat', 96 106 'Cookie consent' => 'Evästesuostumus', 97 107 'Cookie names, categories, providers, and durations are shared across all languages. Only the description field can be translated per language. Switch language and edit descriptions in the Cookies tab.' => 'Evästeiden nimet, kategoriat, tarjoajat ja kestot ovat samat kaikilla kielillä. Vain kuvauskenttä voidaan kääntää kielikohtaisesti. Vaihda kieltä ja muokkaa kuvauksia Evästeet-välilehdellä.', 108 'Cookie policy link text' => 'Evästekäytäntö-linkin teksti', 98 109 'Cookie policy page' => 'Evästekäytäntösivu', 99 110 'Cookie settings' => 'Evästeasetukset', 111 'Cookie settings label' => 'Evästeasetusten teksti', 100 112 'Cookies' => 'Evästeet', 101 113 'Cookies imported into the table. Save cookies to persist changes.' => 'Evästeet tuotu taulukkoon. Tallenna evästeet säilyttääksesi muutokset.', … … 133 145 'Duration' => 'Kesto', 134 146 'Edit cookie preferences' => 'Muokkaa evästeasetuksia', 147 'Edit preferences button' => 'Muokkaa asetuksia -painike', 135 148 'Empty cookie categories' => 'Tyhjät evästekategoriat', 136 149 'Enable Consent Mode v2 (outputs consent defaults in <head> before GTM)' => 'Ota Consent Mode v2 käyttöön (tulostaa suostumusoletukset <head>-osioon ennen GTM:ää)', … … 154 167 'Google Consent Mode v2' => 'Google Consent Mode v2', 155 168 'Google Tag Manager: throttles request rate.' => 'Google Tag Manager: rajoittaa pyyntöjen tiheyttä.', 169 'Heading' => 'Otsikko', 156 170 'Heading text' => 'Otsikkoteksti', 157 171 'Heading/Description/Button texts' => 'Otsikon/kuvauksen/painikkeen tekstit', … … 198 212 'Manage cookies' => 'Hallitse evästeitä', 199 213 'Marketing' => 'Markkinointi', 214 'Message when no cookies are registered' => 'Viesti, kun evästeitä ei ole rekisteröity', 200 215 'Meta Pixel: stores click identifiers.' => 'Meta Pixel: tallentaa mainosklikkausten tunnisteet.', 201 216 'Meta Pixel: tracks visits across websites for ad targeting.' => 'Meta Pixel: seuraa käyntejä eri verkkosivustoilla mainonnan kohdentamista varten.', … … 209 224 'Multilingual support (WPML & Polylang)' => 'Monikielisyystuki (WPML ja Polylang)', 210 225 'Name' => 'Nimi', 226 'Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language.' => 'Nimet ja kuvaukset, jotka näytetään, kun kävijä avaa Muokkaa-näkymän. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle.', 211 227 'Necessary' => 'Välttämättömät', 212 228 'Necessary (never blocked)' => 'Välttämättömät (ei estetä koskaan)', … … 260 276 'Policy page AI prompt (copied to clipboard — or select all and copy manually):' => 'Evästekäytännön AI-kehote (kopioitu leikepöydälle — tai valitse kaikki ja kopioi manuaalisesti):', 261 277 'Policy page style' => 'Tietosuojasivun tyyli', 278 'Policy page texts' => 'Tietosuojasivun tekstit', 262 279 'Polylang: stores visitor language preference.' => 'Polylang: tallentaa kävijän kielivalinnan.', 263 280 'Possibly removed' => 'Mahdollisesti poistettu', … … 314 331 'Show but lock (disable) the switch' => 'Näytä, mutta lukitse (poista käytöstä) valitsin', 315 332 'Shown over blocked YouTube and Vimeo embeds before the visitor accepts marketing cookies.' => 'Näytetään estettyjen YouTube- ja Vimeo-upotusten päällä ennen kuin kävijä hyväksyy markkinointievästeet.', 333 'Shown over blocked content that needs analytics cookies, such as a review widget.' => 'Näytetään analytiikkaevästeitä vaativan estetyn sisällön päällä, esimerkiksi arvosteluwidgetissä.', 334 'Shown over blocked content that needs preference cookies, such as a chat or booking widget.' => 'Näytetään mieltymysevästeitä vaativan estetyn sisällön päällä, esimerkiksi chat- tai ajanvarauswidgetissä.', 316 335 'Shows how many visitors accepted, rejected, or customized cookies over 7, 30, or 90 day periods. Data is aggregated and anonymous — no personal data is stored.' => 'Näyttää kuinka moni kävijä hyväksyi, hylkäsi tai mukautti evästeitä 7, 30 tai 90 päivän aikana. Tiedot ovat koottuja ja nimettömiä — henkilötietoja ei tallenneta.', 317 336 'Site Kit sets consent defaults for its own regions. This plugin adds a denied default for all other visitors and sends each visitor\'s choice as a consent update.' => 'Site Kit asettaa suostumusoletukset omille alueilleen. Tämä lisäosa lisää estetyn oletuksen kaikille muille kävijöille ja lähettää kunkin kävijän valinnan suostumuspäivityksenä.', … … 320 339 'Stops tracking pasted into Bricks, Elementor, or similar Custom Code fields until the visitor gives consent.' => 'Estää Bricks-, Elementor- tai vastaaviin Custom Code -kenttiin liitetyn seurannan, kunnes kävijä antaa suostumuksen.', 321 340 'Stores your cookie consent preferences.' => 'Tallentaa evästevalintasi, jotta evästebanneria ei näytetä joka käynnillä uudelleen.', 341 'Table column headings' => 'Taulukon sarakeotsikot', 322 342 'Taboola: identifies the browser for ad targeting.' => 'Taboola: tunnistaa selaimen mainonnan kohdentamista varten.', 343 'Technical note (shown when WP Consent API is active)' => 'Tekninen huomautus (näytetään, kun WP Consent API on käytössä)', 323 344 'Test how the banner looks with your current (unsaved) settings — the preview stays visible while you edit.' => 'Testaa miltä banneri näyttää nykyisillä (tallentamattomilla) asetuksilla — esikatselu pysyy näkyvissä muokkauksen aikana.', 324 345 'Text and font style' => 'Teksti- ja kirjasintyyli', 346 'Text when no cookies are used' => 'Teksti, kun evästeitä ei käytetä', 347 'Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab.' => '[kncc_cookie_policy]-evästeselosteen tekstit. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle. Kategorioiden nimiä muokataan Yleiset-välilehdellä.', 325 348 'The AI will return improved JSON with clear cookie descriptions.' => 'AI palauttaa parannetun JSONin selkeillä evästekuvauksilla.', 326 349 'The Trustmary reviews widget waits for analytics consent, because it stores a visitor ID in the browser. A placeholder with an accept button is shown in its place. To load it right away, add widget.trustmary.com under Block by address with the category “Necessary (never blocked)”.' => 'Trustmaryn arvosteluwidget odottaa analytiikkasuostumusta, koska se tallentaa selaimeen kävijätunnisteen. Sen paikalla näytetään paikkamerkki ja hyväksymispainike. Jos haluat sen latautuvan heti, lisää widget.trustmary.com kohtaan Estä osoitteen perusteella kategorialla ”Välttämättömät (ei estetä koskaan)”.', … … 346 369 'Tips:' => 'Vinkkejä:', 347 370 'Tools like Google Analytics are blocked automatically when added through WordPress plugins (e.g. Google Site Kit).' => 'Työkalut kuten Google Analytics estetään automaattisesti, kun ne lisätään WordPress-lisäosien kautta (esim. Google Site Kit).', 371 'Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link.' => 'Kelluvan painikkeen työkaluvihje ja ruudunlukijan nimi sekä [kncc_cookie_settings]-linkin oletusteksti.', 348 372 'Total records:' => 'Merkintöjä yhteensä:', 349 373 'Total responses' => 'Vastauksia yhteensä', -
kansleri-cookie-consent/tags/1.8.9/languages/kansleri-cookie-consent-fi.po
r3746047 r3754407 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: Kansleri Cookie Consent 1.8. 8\n"6 "Project-Id-Version: Kansleri Cookie Consent 1.8.9\n" 7 7 "Report-Msgid-Bugs-To: https://kansleri.fi\n" 8 "POT-Creation-Date: 2026-10-1 312:00+0300\n"9 "PO-Revision-Date: 2026-10-1 312:00+0300\n"8 "POT-Creation-Date: 2026-10-19 12:00+0300\n" 9 "PO-Revision-Date: 2026-10-19 12:00+0300\n" 10 10 "Last-Translator: Kansleri.fi\n" 11 11 "Language-Team: Finnish\n" … … 2281 2281 msgid "Crisp: keeps the chat session and visitor identity." 2282 2282 msgstr "Crisp: ylläpitää chat-istuntoa ja kävijän tunnistetta." 2283 2284 #: includes/class-admin.php 2285 msgid "Cookie policy link text" 2286 msgstr "Evästekäytäntö-linkin teksti" 2287 2288 #: includes/class-admin.php 2289 msgid "Cookie settings label" 2290 msgstr "Evästeasetusten teksti" 2291 2292 #: includes/class-admin.php 2293 msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link." 2294 msgstr "Kelluvan painikkeen työkaluvihje ja ruudunlukijan nimi sekä [kncc_cookie_settings]-linkin oletusteksti." 2295 2296 #: includes/class-admin.php 2297 msgid "Banner label for screen readers" 2298 msgstr "Bannerin nimi ruudunlukijoille" 2299 2300 #: includes/class-admin.php 2301 msgid "Cookie categories" 2302 msgstr "Evästekategoriat" 2303 2304 #: includes/class-admin.php 2305 msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language." 2306 msgstr "Nimet ja kuvaukset, jotka näytetään, kun kävijä avaa Muokkaa-näkymän. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle." 2307 2308 #: includes/class-admin.php 2309 msgid "Text when no cookies are used" 2310 msgstr "Teksti, kun evästeitä ei käytetä" 2311 2312 #: includes/class-admin.php 2313 msgid "Blocked analytics content message" 2314 msgstr "Estetyn analytiikkasisällön viesti" 2315 2316 #: includes/class-admin.php 2317 msgid "Blocked analytics content accept button" 2318 msgstr "Estetyn analytiikkasisällön hyväksy-painike" 2319 2320 #: includes/class-admin.php 2321 msgid "Shown over blocked content that needs analytics cookies, such as a review widget." 2322 msgstr "Näytetään analytiikkaevästeitä vaativan estetyn sisällön päällä, esimerkiksi arvosteluwidgetissä." 2323 2324 #: includes/class-admin.php 2325 msgid "Blocked preferences content message" 2326 msgstr "Estetyn mieltymyssisällön viesti" 2327 2328 #: includes/class-admin.php 2329 msgid "Blocked preferences content accept button" 2330 msgstr "Estetyn mieltymyssisällön hyväksy-painike" 2331 2332 #: includes/class-admin.php 2333 msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget." 2334 msgstr "Näytetään mieltymysevästeitä vaativan estetyn sisällön päällä, esimerkiksi chat- tai ajanvarauswidgetissä." 2335 2336 #: includes/class-admin.php 2337 msgid "Policy page texts" 2338 msgstr "Tietosuojasivun tekstit" 2339 2340 #: includes/class-admin.php 2341 msgid "Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab." 2342 msgstr "[kncc_cookie_policy]-evästeselosteen tekstit. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle. Kategorioiden nimiä muokataan Yleiset-välilehdellä." 2343 2344 #: includes/class-admin.php 2345 msgid "Category descriptions" 2346 msgstr "Kategorioiden kuvaukset" 2347 2348 #: includes/class-admin.php 2349 msgid "Consent status" 2350 msgstr "Suostumuksen tila" 2351 2352 #: includes/class-admin.php 2353 msgid "Heading" 2354 msgstr "Otsikko" 2355 2356 #: includes/class-admin.php 2357 msgid "Before the visitor chooses" 2358 msgstr "Ennen kävijän valintaa" 2359 2360 #: includes/class-admin.php 2361 msgid "Technical note (shown when WP Consent API is active)" 2362 msgstr "Tekninen huomautus (näytetään, kun WP Consent API on käytössä)" 2363 2364 #: includes/class-admin.php 2365 msgid "Buttons and messages" 2366 msgstr "Painikkeet ja viestit" 2367 2368 #: includes/class-admin.php 2369 msgid "Edit preferences button" 2370 msgstr "Muokkaa asetuksia -painike" 2371 2372 #: includes/class-admin.php 2373 msgid "Message when no cookies are registered" 2374 msgstr "Viesti, kun evästeitä ei ole rekisteröity" 2375 2376 #: includes/class-admin.php 2377 msgid "Table column headings" 2378 msgstr "Taulukon sarakeotsikot" -
kansleri-cookie-consent/tags/1.8.9/languages/kansleri-cookie-consent.pot
r3746047 r3754407 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: Kansleri Cookie Consent 1.8. 8\n"9 "Project-Id-Version: Kansleri Cookie Consent 1.8.9\n" 10 10 "Report-Msgid-Bugs-To: https://kansleri.fi\n" 11 "POT-Creation-Date: 2026-10-1 312:00+0300\n"11 "POT-Creation-Date: 2026-10-19 12:00+0300\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 1954 1954 msgid "Crisp: keeps the chat session and visitor identity." 1955 1955 msgstr "" 1956 1957 #: includes/class-admin.php 1958 msgid "Cookie policy link text" 1959 msgstr "" 1960 1961 #: includes/class-admin.php 1962 msgid "Cookie settings label" 1963 msgstr "" 1964 1965 #: includes/class-admin.php 1966 msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link." 1967 msgstr "" 1968 1969 #: includes/class-admin.php 1970 msgid "Banner label for screen readers" 1971 msgstr "" 1972 1973 #: includes/class-admin.php 1974 msgid "Cookie categories" 1975 msgstr "" 1976 1977 #: includes/class-admin.php 1978 msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language." 1979 msgstr "" 1980 1981 #: includes/class-admin.php 1982 msgid "Text when no cookies are used" 1983 msgstr "" 1984 1985 #: includes/class-admin.php 1986 msgid "Blocked analytics content message" 1987 msgstr "" 1988 1989 #: includes/class-admin.php 1990 msgid "Blocked analytics content accept button" 1991 msgstr "" 1992 1993 #: includes/class-admin.php 1994 msgid "Shown over blocked content that needs analytics cookies, such as a review widget." 1995 msgstr "" 1996 1997 #: includes/class-admin.php 1998 msgid "Blocked preferences content message" 1999 msgstr "" 2000 2001 #: includes/class-admin.php 2002 msgid "Blocked preferences content accept button" 2003 msgstr "" 2004 2005 #: includes/class-admin.php 2006 msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget." 2007 msgstr "" 2008 2009 #: includes/class-admin.php 2010 msgid "Policy page texts" 2011 msgstr "" 2012 2013 #: includes/class-admin.php 2014 msgid "Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab." 2015 msgstr "" 2016 2017 #: includes/class-admin.php 2018 msgid "Category descriptions" 2019 msgstr "" 2020 2021 #: includes/class-admin.php 2022 msgid "Consent status" 2023 msgstr "" 2024 2025 #: includes/class-admin.php 2026 msgid "Heading" 2027 msgstr "" 2028 2029 #: includes/class-admin.php 2030 msgid "Before the visitor chooses" 2031 msgstr "" 2032 2033 #: includes/class-admin.php 2034 msgid "Technical note (shown when WP Consent API is active)" 2035 msgstr "" 2036 2037 #: includes/class-admin.php 2038 msgid "Buttons and messages" 2039 msgstr "" 2040 2041 #: includes/class-admin.php 2042 msgid "Edit preferences button" 2043 msgstr "" 2044 2045 #: includes/class-admin.php 2046 msgid "Message when no cookies are registered" 2047 msgstr "" 2048 2049 #: includes/class-admin.php 2050 msgid "Table column headings" 2051 msgstr "" -
kansleri-cookie-consent/tags/1.8.9/readme.txt
r3746047 r3754407 4 4 Requires at least: 6.0 5 5 Tested up to: 7.1 6 Stable tag: 1.8. 86 Stable tag: 1.8.9 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 113 113 == Changelog == 114 114 115 = 1.8.9 = 116 * New: Every text visitors see can now be edited. The General tab adds the cookie category names and descriptions, the "no cookies are used" notes, the Cookie Policy link text, the floating button label (also the default text of the `[kncc_cookie_settings]` link), the banner's screen reader label, and the messages and buttons on blocked analytics and preferences content. The Policy Page tab adds every text of the `[kncc_cookie_policy]` cookie declaration: category descriptions, table headings, the consent status texts and the edit button 117 * Empty fields keep the built-in text, translated into each language, so nothing changes on your site until you type your own wording. On multilingual sites (Polylang, WPML) each language can have its own wording 118 115 119 = 1.8.8 = 116 120 * Fixed: Descriptions and durations of the cookies the plugin adds itself (from Scan Cookies and detected scripts, e.g. `_ga`, `kncc_consent` and `wp_consent_*`) were always in English, even on Finnish sites. The cookie policy page now shows them in the visitor's language, and the Cookies tab in the language you are editing. This also covers cookies already in your list, so there is nothing to re-scan or re-save. Descriptions you have written or edited yourself are shown as written -
kansleri-cookie-consent/trunk/assets/admin.css
r3728487 r3754407 743 743 } 744 744 745 /* Grouped visitor-facing text fields (cookie categories, policy page texts). */ 746 .kncc-texts-help { 747 margin: 0 0 12px; 748 } 749 750 .kncc-text-group { 751 max-width: 640px; 752 margin: 0 0 14px; 753 padding: 8px 14px 2px; 754 border: 1px solid #dcdcde; 755 border-radius: 4px; 756 background: #fff; 757 } 758 759 .kncc-text-group legend { 760 padding: 0 4px; 761 font-weight: 600; 762 } 763 764 .kncc-text-group p { 765 margin: 0 0 10px; 766 } 767 -
kansleri-cookie-consent/trunk/assets/admin.js
r3746047 r3754407 1161 1161 ]; 1162 1162 var TEXT_FIELDS = ['heading_text', 'description_text', 'accept_text', 'reject_text', 'customize_text', 'save_text', 'close_text']; 1163 ['necessary', 'analytics', 'marketing', 'preferences'].forEach(function (cat) { 1164 TEXT_FIELDS.push('category_name_' + cat, 'category_desc_' + cat); 1165 if (cat !== 'necessary') TEXT_FIELDS.push('empty_note_' + cat); 1166 }); 1163 1167 1164 1168 function darken(hex, amount) { -
kansleri-cookie-consent/trunk/includes/class-admin.php
r3746047 r3754407 237 237 $lang = kncc_get_current_language(); 238 238 $placeholder_source = kncc_get_default_settings_for_language($lang); 239 $builtin_texts = kncc_get_builtin_texts_for_language($lang); 239 240 ?> 240 241 <?php $kncc_is_plugin_style = (($settings['text_style_mode'] ?? 'plugin') === 'plugin'); ?> … … 342 343 </tr> 343 344 <tr> 345 <th scope="row"><label for="kncc-policy-link-text"><?php esc_html_e('Cookie policy link text', 'kansleri-cookie-consent'); ?></label></th> 346 <td><input type="text" id="kncc-policy-link-text" name="policy_link_text" value="<?php echo esc_attr($settings['policy_link_text'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['policy_link_text']); ?>" class="regular-text" /></td> 347 </tr> 348 <tr> 349 <th scope="row"><label for="kncc-settings-link-text"><?php esc_html_e('Cookie settings label', 'kansleri-cookie-consent'); ?></label></th> 350 <td> 351 <input type="text" id="kncc-settings-link-text" name="settings_link_text" value="<?php echo esc_attr($settings['settings_link_text'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['settings_link_text']); ?>" class="regular-text" /> 352 <p class="description"><?php esc_html_e('Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link.', 'kansleri-cookie-consent'); ?></p> 353 </td> 354 </tr> 355 <tr> 356 <th scope="row"><label for="kncc-banner-label"><?php esc_html_e('Banner label for screen readers', 'kansleri-cookie-consent'); ?></label></th> 357 <td><input type="text" id="kncc-banner-label" name="banner_label" value="<?php echo esc_attr($settings['banner_label'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['banner_label']); ?>" class="regular-text" /></td> 358 </tr> 359 <tr> 360 <th scope="row"><?php esc_html_e('Cookie categories', 'kansleri-cookie-consent'); ?></th> 361 <td> 362 <p class="description kncc-texts-help"><?php esc_html_e('Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language.', 'kansleri-cookie-consent'); ?></p> 363 <?php foreach (array_keys(kncc_get_categories()) as $key) : ?> 364 <fieldset class="kncc-text-group"> 365 <legend><?php echo esc_html($builtin_texts['category_name_' . $key]); ?></legend> 366 <p> 367 <label for="kncc-category-name-<?php echo esc_attr($key); ?>"><?php esc_html_e('Name', 'kansleri-cookie-consent'); ?></label><br /> 368 <input type="text" id="kncc-category-name-<?php echo esc_attr($key); ?>" name="category_name_<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($settings['category_name_' . $key] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['category_name_' . $key]); ?>" class="regular-text" /> 369 </p> 370 <p> 371 <label for="kncc-category-desc-<?php echo esc_attr($key); ?>"><?php esc_html_e('Description', 'kansleri-cookie-consent'); ?></label><br /> 372 <textarea id="kncc-category-desc-<?php echo esc_attr($key); ?>" name="category_desc_<?php echo esc_attr($key); ?>" rows="2" class="large-text" placeholder="<?php echo esc_attr($builtin_texts['category_desc_' . $key]); ?>"><?php echo esc_textarea($settings['category_desc_' . $key] ?? ''); ?></textarea> 373 </p> 374 <?php if (isset($builtin_texts['empty_note_' . $key])) : ?> 375 <p> 376 <label for="kncc-empty-note-<?php echo esc_attr($key); ?>"><?php esc_html_e('Text when no cookies are used', 'kansleri-cookie-consent'); ?></label><br /> 377 <input type="text" id="kncc-empty-note-<?php echo esc_attr($key); ?>" name="empty_note_<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($settings['empty_note_' . $key] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['empty_note_' . $key]); ?>" class="large-text" /> 378 </p> 379 <?php endif; ?> 380 </fieldset> 381 <?php endforeach; ?> 382 </td> 383 </tr> 384 <tr> 344 385 <th scope="row"><label for="kncc-iframe-placeholder-text"><?php esc_html_e('Blocked iframe message', 'kansleri-cookie-consent'); ?></label></th> 345 386 <td> … … 351 392 <th scope="row"><label for="kncc-iframe-accept-text"><?php esc_html_e('Blocked iframe accept button', 'kansleri-cookie-consent'); ?></label></th> 352 393 <td><input type="text" id="kncc-iframe-accept-text" name="iframe_accept_text" value="<?php echo esc_attr($settings['iframe_accept_text'] ?? ''); ?>" placeholder="<?php echo esc_attr($placeholder_source['iframe_accept_text']); ?>" class="regular-text" /></td> 394 </tr> 395 <tr> 396 <th scope="row"><label for="kncc-placeholder-text-analytics"><?php esc_html_e('Blocked analytics content message', 'kansleri-cookie-consent'); ?></label></th> 397 <td> 398 <input type="text" id="kncc-placeholder-text-analytics" name="placeholder_text_analytics" value="<?php echo esc_attr($settings['placeholder_text_analytics'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_text_analytics']); ?>" class="regular-text" /> 399 <p class="description"><?php esc_html_e('Shown over blocked content that needs analytics cookies, such as a review widget.', 'kansleri-cookie-consent'); ?></p> 400 </td> 401 </tr> 402 <tr> 403 <th scope="row"><label for="kncc-placeholder-accept-analytics"><?php esc_html_e('Blocked analytics content accept button', 'kansleri-cookie-consent'); ?></label></th> 404 <td><input type="text" id="kncc-placeholder-accept-analytics" name="placeholder_accept_analytics" value="<?php echo esc_attr($settings['placeholder_accept_analytics'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_accept_analytics']); ?>" class="regular-text" /></td> 405 </tr> 406 <tr> 407 <th scope="row"><label for="kncc-placeholder-text-preferences"><?php esc_html_e('Blocked preferences content message', 'kansleri-cookie-consent'); ?></label></th> 408 <td> 409 <input type="text" id="kncc-placeholder-text-preferences" name="placeholder_text_preferences" value="<?php echo esc_attr($settings['placeholder_text_preferences'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_text_preferences']); ?>" class="regular-text" /> 410 <p class="description"><?php esc_html_e('Shown over blocked content that needs preference cookies, such as a chat or booking widget.', 'kansleri-cookie-consent'); ?></p> 411 </td> 412 </tr> 413 <tr> 414 <th scope="row"><label for="kncc-placeholder-accept-preferences"><?php esc_html_e('Blocked preferences content accept button', 'kansleri-cookie-consent'); ?></label></th> 415 <td><input type="text" id="kncc-placeholder-accept-preferences" name="placeholder_accept_preferences" value="<?php echo esc_attr($settings['placeholder_accept_preferences'] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts['placeholder_accept_preferences']); ?>" class="regular-text" /></td> 353 416 </tr> 354 417 <tr> … … 417 480 $preview_in_use = kncc_get_categories_in_use(); 418 481 $preview_empty_mode = (isset($preview_settings['empty_category_mode']) && $preview_settings['empty_category_mode'] === 'hide') ? 'hide' : 'disable'; 419 $preview_empty_notes = array( 420 'analytics' => __('No analytics cookies are used on this site.', 'kansleri-cookie-consent'), 421 'marketing' => __('No marketing cookies are used on this site.', 'kansleri-cookie-consent'), 422 'preferences' => __('No preference cookies are used on this site.', 'kansleri-cookie-consent'), 423 ); 482 // Saved wording, or the built-in text of the language being edited. 483 $preview_text = function ($key) use ($settings, $builtin_texts) { 484 return (isset($settings[$key]) && is_string($settings[$key]) && trim($settings[$key]) !== '') ? $settings[$key] : $builtin_texts[$key]; 485 }; 424 486 ?> 425 487 … … 469 531 /> 470 532 <span class="kncc-category__toggle"></span> 471 <span class="kncc-category__name "><?php echo esc_html($data['label']); ?></span>533 <span class="kncc-category__name kncc-preview-category_name_<?php echo esc_attr($key); ?>"><?php echo esc_html($preview_text('category_name_' . $key)); ?></span> 472 534 </label> 473 <p class="kncc-category__desc "><?php echo esc_html($data['description']); ?></p>474 <?php if ($is_empty && isset($ preview_empty_notes[$key])) : ?>475 <p class="kncc-category__empty-note "><?php echo esc_html($preview_empty_notes[$key]); ?></p>535 <p class="kncc-category__desc kncc-preview-category_desc_<?php echo esc_attr($key); ?>"><?php echo esc_html($preview_text('category_desc_' . $key)); ?></p> 536 <?php if ($is_empty && isset($builtin_texts['empty_note_' . $key])) : ?> 537 <p class="kncc-category__empty-note kncc-preview-empty_note_<?php echo esc_attr($key); ?>"><?php echo esc_html($preview_text('empty_note_' . $key)); ?></p> 476 538 <?php endif; ?> 477 539 </div> … … 644 706 <?php esc_html_e('Theme style is the default so the policy page matches your site typography. Switch to Plugin style for strict plugin sizes and colors.', 'kansleri-cookie-consent'); ?> 645 707 </p> 708 </td> 709 </tr> 710 <tr> 711 <th scope="row"><?php esc_html_e('Policy page texts', 'kansleri-cookie-consent'); ?></th> 712 <td> 713 <p class="description kncc-texts-help"><?php esc_html_e('Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab.', 'kansleri-cookie-consent'); ?></p> 714 <?php 715 $builtin_texts = kncc_get_builtin_texts_for_language(kncc_get_current_language()); 716 $policy_text_groups = array( 717 __('Category descriptions', 'kansleri-cookie-consent') => array( 718 'policy_desc_necessary' => array($builtin_texts['category_name_necessary'], true), 719 'policy_desc_analytics' => array($builtin_texts['category_name_analytics'], true), 720 'policy_desc_marketing' => array($builtin_texts['category_name_marketing'], true), 721 'policy_desc_preferences' => array($builtin_texts['category_name_preferences'], true), 722 ), 723 __('Consent status', 'kansleri-cookie-consent') => array( 724 'policy_status_heading' => array(__('Heading', 'kansleri-cookie-consent'), false), 725 'status_no_choice' => array(__('Before the visitor chooses', 'kansleri-cookie-consent'), false), 726 'status_allowed' => array(__('Allowed', 'kansleri-cookie-consent'), false), 727 'status_denied' => array(__('Denied', 'kansleri-cookie-consent'), false), 728 'status_always_active' => array(__('Always active', 'kansleri-cookie-consent'), false), 729 'policy_status_note' => array(__('Technical note (shown when WP Consent API is active)', 'kansleri-cookie-consent'), true), 730 ), 731 __('Buttons and messages', 'kansleri-cookie-consent') => array( 732 'policy_edit_button' => array(__('Edit preferences button', 'kansleri-cookie-consent'), false), 733 'policy_no_cookies' => array(__('Message when no cookies are registered', 'kansleri-cookie-consent'), false), 734 ), 735 __('Table column headings', 'kansleri-cookie-consent') => array( 736 'policy_col_cookie' => array(__('Cookie', 'kansleri-cookie-consent'), false), 737 'policy_col_provider' => array(__('Provider', 'kansleri-cookie-consent'), false), 738 'policy_col_purpose' => array(__('Purpose', 'kansleri-cookie-consent'), false), 739 'policy_col_duration' => array(__('Duration', 'kansleri-cookie-consent'), false), 740 ), 741 ); 742 foreach ($policy_text_groups as $group_label => $fields) : 743 ?> 744 <fieldset class="kncc-text-group"> 745 <legend><?php echo esc_html($group_label); ?></legend> 746 <?php foreach ($fields as $key => $field) : 747 list($label, $multiline) = $field; 748 $id = 'kncc-' . str_replace('_', '-', $key); 749 ?> 750 <p> 751 <label for="<?php echo esc_attr($id); ?>"><?php echo esc_html($label); ?></label><br /> 752 <?php if ($multiline) : ?> 753 <textarea id="<?php echo esc_attr($id); ?>" name="<?php echo esc_attr($key); ?>" rows="2" class="large-text" placeholder="<?php echo esc_attr($builtin_texts[$key]); ?>"><?php echo esc_textarea($settings[$key] ?? ''); ?></textarea> 754 <?php else : ?> 755 <input type="text" id="<?php echo esc_attr($id); ?>" name="<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($settings[$key] ?? ''); ?>" placeholder="<?php echo esc_attr($builtin_texts[$key]); ?>" class="regular-text" /> 756 <?php endif; ?> 757 </p> 758 <?php endforeach; ?> 759 </fieldset> 760 <?php endforeach; ?> 646 761 </td> 647 762 </tr> … … 1484 1599 // All text fields are saved as-is, including empty strings. An empty value means 1485 1600 // "use the locale default" — the frontend substitutes the visitor's locale default at render time. 1486 $text_fields = array (1601 $text_fields = array_merge(array( 1487 1602 'banner_position', 1488 1603 'heading_text', 'description_text', 'accept_text', 1489 1604 'reject_text', 'customize_text', 'save_text', 'close_text', 1490 1605 'iframe_placeholder_text', 'iframe_accept_text', 1491 ) ;1606 ), kncc_get_builtin_text_keys()); 1492 1607 foreach ($text_fields as $field) { 1493 1608 if (isset($_POST[$field])) { -
kansleri-cookie-consent/trunk/includes/class-consent.php
r3724446 r3754407 18 18 19 19 $settings = kncc_get_settings(); 20 $texts = kncc_get_localized_texts(); 20 21 21 22 wp_enqueue_style( … … 48 49 ) : null, 49 50 'policyStatus' => array( 50 'noChoice' => __('You have not made a choice yet.', 'kansleri-cookie-consent'),51 'allowed' => __('Allowed', 'kansleri-cookie-consent'),52 'denied' => __('Denied', 'kansleri-cookie-consent'),53 'alwaysActive' => __('Always active', 'kansleri-cookie-consent'),51 'noChoice' => kncc_text('status_no_choice', $texts), 52 'allowed' => kncc_text('status_allowed', $texts), 53 'denied' => kncc_text('status_denied', $texts), 54 'alwaysActive' => kncc_text('status_always_active', $texts), 54 55 ), 55 56 )) . ';', 'before'); … … 93 94 $text_style_mode = (isset($settings['text_style_mode']) && $settings['text_style_mode'] === 'theme') ? 'theme' : 'plugin'; 94 95 95 $all_cats = kncc_get_categories();96 96 $categories = array(); 97 97 $cat_descriptions = array(); 98 foreach ( $all_cats as $key => $data) {99 $categories[$key] = $data['label'];100 $cat_descriptions[$key] = $data['description'];98 foreach (array_keys(kncc_get_categories()) as $key) { 99 $categories[$key] = kncc_text('category_name_' . $key, $settings); 100 $cat_descriptions[$key] = kncc_text('category_desc_' . $key, $settings); 101 101 } 102 102 … … 104 104 $empty_mode = (isset($settings['empty_category_mode']) && $settings['empty_category_mode'] === 'hide') ? 'hide' : 'disable'; 105 105 $empty_notes = array( 106 'analytics' => __('No analytics cookies are used on this site.', 'kansleri-cookie-consent'),107 'marketing' => __('No marketing cookies are used on this site.', 'kansleri-cookie-consent'),108 'preferences' => __('No preference cookies are used on this site.', 'kansleri-cookie-consent'),106 'analytics' => kncc_text('empty_note_analytics', $settings), 107 'marketing' => kncc_text('empty_note_marketing', $settings), 108 'preferences' => kncc_text('empty_note_preferences', $settings), 109 109 ); 110 110 … … 160 160 <?php if ($is_modal) : ?>aria-modal="true"<?php endif; ?> 161 161 data-kncc-modal="<?php echo $is_modal ? '1' : '0'; ?>" 162 aria-label="<?php e sc_attr_e('Cookie consent', 'kansleri-cookie-consent'); ?>"162 aria-label="<?php echo esc_attr(kncc_text('banner_label', $settings)); ?>" 163 163 style="display:none;"> 164 164 … … 173 173 <p class="kncc-desc"><?php echo esc_html($settings['description_text']); ?> 174 174 <?php if ($policy_link) : ?> 175 <a href="<?php echo esc_url($policy_link); ?>" class="kncc-policy-link" target="_blank"><?php e sc_html_e('Cookie Policy', 'kansleri-cookie-consent'); ?></a>175 <a href="<?php echo esc_url($policy_link); ?>" class="kncc-policy-link" target="_blank"><?php echo esc_html(kncc_text('policy_link_text', $settings)); ?></a> 176 176 <?php endif; ?> 177 177 </p> … … 232 232 id="kncc-floating-btn" 233 233 class="kncc-floating-btn kncc-typography--<?php echo esc_attr($text_style_mode); ?>" 234 aria-label="<?php e sc_attr_e('Cookie settings', 'kansleri-cookie-consent'); ?>"235 title="<?php e sc_attr_e('Cookie settings', 'kansleri-cookie-consent'); ?>"234 aria-label="<?php echo esc_attr(kncc_text('settings_link_text', $settings)); ?>" 235 title="<?php echo esc_attr(kncc_text('settings_link_text', $settings)); ?>" 236 236 style="display:none;"> 237 237 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> -
kansleri-cookie-consent/trunk/includes/class-policy-page.php
r3702251 r3754407 59 59 60 60 if (empty($cookies)) { 61 return '<p>' . esc_html __('No cookies have been registered yet.', 'kansleri-cookie-consent') . '</p>';61 return '<p>' . esc_html(kncc_text('policy_no_cookies', $settings)) . '</p>'; 62 62 } 63 63 64 $all_cats = kncc_get_categories();65 64 $categories = array(); 66 foreach ($all_cats as $key => $data) { 67 $categories[$key] = $data['label']; 65 $cat_descriptions = array(); 66 foreach (array_keys(kncc_get_categories()) as $key) { 67 $categories[$key] = kncc_text('category_name_' . $key, $settings); 68 $cat_descriptions[$key] = kncc_text('policy_desc_' . $key, $settings); 68 69 } 69 70 70 $c at_descriptions= array(71 ' necessary' => __('These cookies are essential for the website to function and cannot be switched off.', 'kansleri-cookie-consent'),72 ' analytics' => __('These cookies help us understand how visitors interact with the website by collecting and reporting information anonymously.', 'kansleri-cookie-consent'),73 ' marketing' => __('These cookies are used to deliver relevant advertisements and track ad campaign performance.', 'kansleri-cookie-consent'),74 ' preferences' => __('These cookies allow the website to remember choices you make and provide enhanced functionality and personalisation.', 'kansleri-cookie-consent'),71 $col = array( 72 'cookie' => kncc_text('policy_col_cookie', $settings), 73 'provider' => kncc_text('policy_col_provider', $settings), 74 'purpose' => kncc_text('policy_col_purpose', $settings), 75 'duration' => kncc_text('policy_col_duration', $settings), 75 76 ); 76 77 … … 96 97 <?php if (!empty($status_categories)) : ?> 97 98 <div class="kncc-policy__consent-status"> 98 <p class="kncc-policy__consent-status-heading"><strong><?php e sc_html_e('Your current cookie preferences', 'kansleri-cookie-consent'); ?></strong></p>99 <p class="kncc-policy__consent-status-heading"><strong><?php echo esc_html(kncc_text('policy_status_heading', $settings)); ?></strong></p> 99 100 <div id="kncc-policy-consent-status" 100 101 class="kncc-policy__consent-status-body" … … 104 105 <?php if (class_exists('KNCC_WP_Consent_API') && KNCC_WP_Consent_API::is_active()) : ?> 105 106 <p class="kncc-policy__consent-status-note"> 106 <?php e sc_html_e('These choices are stored technically as wp_consent_functional, wp_consent_statistics, wp_consent_marketing, and wp_consent_preferences for compatibility with WordPress plugins.', 'kansleri-cookie-consent'); ?>107 <?php echo esc_html(kncc_text('policy_status_note', $settings)); ?> 107 108 </p> 108 109 <?php endif; ?> … … 111 112 <div class="kncc-policy__edit-consent"> 112 113 <button type="button" class="kncc-btn kncc-btn--primary kncc-edit-consent-btn"> 113 <?php e sc_html_e('Edit cookie preferences', 'kansleri-cookie-consent'); ?>114 <?php echo esc_html(kncc_text('policy_edit_button', $settings)); ?> 114 115 </button> 115 116 </div> … … 122 123 <thead> 123 124 <tr> 124 <th><?php e sc_html_e('Cookie', 'kansleri-cookie-consent'); ?></th>125 <th><?php e sc_html_e('Provider', 'kansleri-cookie-consent'); ?></th>126 <th><?php e sc_html_e('Purpose', 'kansleri-cookie-consent'); ?></th>127 <th><?php e sc_html_e('Duration', 'kansleri-cookie-consent'); ?></th>125 <th><?php echo esc_html($col['cookie']); ?></th> 126 <th><?php echo esc_html($col['provider']); ?></th> 127 <th><?php echo esc_html($col['purpose']); ?></th> 128 <th><?php echo esc_html($col['duration']); ?></th> 128 129 </tr> 129 130 </thead> … … 131 132 <?php foreach ($grouped[$key] as $cookie) : ?> 132 133 <tr> 133 <td data-label="<?php e sc_attr_e('Cookie', 'kansleri-cookie-consent'); ?>"><code><?php echo esc_html($cookie['name']); ?></code></td>134 <td data-label="<?php e sc_attr_e('Provider', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['provider'] ?? ''); ?></td>135 <td data-label="<?php e sc_attr_e('Purpose', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['description'] ?? ''); ?></td>136 <td data-label="<?php e sc_attr_e('Duration', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['duration'] ?? ''); ?></td>134 <td data-label="<?php echo esc_attr($col['cookie']); ?>"><code><?php echo esc_html($cookie['name']); ?></code></td> 135 <td data-label="<?php echo esc_attr($col['provider']); ?>"><?php echo esc_html($cookie['provider'] ?? ''); ?></td> 136 <td data-label="<?php echo esc_attr($col['purpose']); ?>"><?php echo esc_html($cookie['description'] ?? ''); ?></td> 137 <td data-label="<?php echo esc_attr($col['duration']); ?>"><?php echo esc_html($cookie['duration'] ?? ''); ?></td> 137 138 </tr> 138 139 <?php endforeach; ?> -
kansleri-cookie-consent/trunk/includes/class-script-blocker.php
r3746047 r3754407 1003 1003 1004 1004 /** 1005 * Placeholder message and accept button text for a category . Marketing uses the texts1006 * from the General tab, which videos have always used; the others have built-in texts.1005 * Placeholder message and accept button text for a category, all editable on the General 1006 * tab. Marketing keeps the iframe_* settings that videos have always used. 1007 1007 */ 1008 1008 private static function get_placeholder_texts($category) { … … 1012 1012 } 1013 1013 1014 if ($category === 'analytics') { 1014 $settings = kncc_get_localized_texts(); 1015 if ($category === 'analytics' || $category === 'preferences') { 1015 1016 $texts[$category] = array( 1016 'placeholder' => __('This content is blocked because it requires analytics cookies.', 'kansleri-cookie-consent'), 1017 'accept' => __('Accept analytics cookies', 'kansleri-cookie-consent'), 1018 ); 1019 } elseif ($category === 'preferences') { 1020 $texts[$category] = array( 1021 'placeholder' => __('This content is blocked because it requires preference cookies.', 'kansleri-cookie-consent'), 1022 'accept' => __('Accept preference cookies', 'kansleri-cookie-consent'), 1017 'placeholder' => kncc_text('placeholder_text_' . $category, $settings), 1018 'accept' => kncc_text('placeholder_accept_' . $category, $settings), 1023 1019 ); 1024 1020 } else { 1025 $settings = kncc_get_localized_texts();1026 1021 $texts[$category] = array( 1027 1022 'placeholder' => !empty($settings['iframe_placeholder_text']) -
kansleri-cookie-consent/trunk/kansleri-cookie-consent.php
r3746047 r3754407 3 3 * Plugin Name: Kansleri Cookie Consent 4 4 * Description: Free, no-ads GDPR cookie consent with script blocking, consent logging, Google Consent Mode v2, and AI-assisted setup. Perfect for personal sites and small businesses. 5 * Version: 1.8. 85 * Version: 1.8.9 6 6 * Author: Kansleri.fi 7 7 * Author URI: https://kansleri.fi … … 20 20 } 21 21 22 define('KNCC_VERSION', '1.8. 8');22 define('KNCC_VERSION', '1.8.9'); 23 23 // Bump whenever the consent log schema changes so dbDelta runs on upgrade. 24 24 define('KNCC_DB_VERSION', '1.3.0'); … … 92 92 'block_html_scripts' => true, 93 93 'block_iframes' => true, 94 ) ;94 ) + array_fill_keys(kncc_get_builtin_text_keys(), ''); 95 95 } 96 96 endif; … … 276 276 restore_previous_locale(); 277 277 return $defaults; 278 } 279 endif; 280 281 if (!function_exists('kncc_get_builtin_texts')) : 282 /** 283 * Visitor-facing texts the site owner can replace, with their built-in wording. 284 * 285 * These settings are stored empty until the owner types their own text, and an empty value 286 * shows the built-in text in the visitor's language. Keeping the built-in wording out of the 287 * saved settings means a site never gets stuck with the admin's language. 288 */ 289 function kncc_get_builtin_texts() { 290 $categories = kncc_get_categories(); 291 $texts = array( 292 'policy_link_text' => __('Cookie Policy', 'kansleri-cookie-consent'), 293 'settings_link_text' => __('Cookie settings', 'kansleri-cookie-consent'), 294 'banner_label' => __('Cookie consent', 'kansleri-cookie-consent'), 295 ); 296 foreach ($categories as $key => $data) { 297 $texts['category_name_' . $key] = $data['label']; 298 $texts['category_desc_' . $key] = $data['description']; 299 } 300 return $texts + array( 301 'empty_note_analytics' => __('No analytics cookies are used on this site.', 'kansleri-cookie-consent'), 302 'empty_note_marketing' => __('No marketing cookies are used on this site.', 'kansleri-cookie-consent'), 303 'empty_note_preferences' => __('No preference cookies are used on this site.', 'kansleri-cookie-consent'), 304 'placeholder_text_analytics' => __('This content is blocked because it requires analytics cookies.', 'kansleri-cookie-consent'), 305 'placeholder_accept_analytics' => __('Accept analytics cookies', 'kansleri-cookie-consent'), 306 'placeholder_text_preferences' => __('This content is blocked because it requires preference cookies.', 'kansleri-cookie-consent'), 307 'placeholder_accept_preferences' => __('Accept preference cookies', 'kansleri-cookie-consent'), 308 'policy_desc_necessary' => __('These cookies are essential for the website to function and cannot be switched off.', 'kansleri-cookie-consent'), 309 'policy_desc_analytics' => __('These cookies help us understand how visitors interact with the website by collecting and reporting information anonymously.', 'kansleri-cookie-consent'), 310 'policy_desc_marketing' => __('These cookies are used to deliver relevant advertisements and track ad campaign performance.', 'kansleri-cookie-consent'), 311 'policy_desc_preferences' => __('These cookies allow the website to remember choices you make and provide enhanced functionality and personalisation.', 'kansleri-cookie-consent'), 312 'policy_no_cookies' => __('No cookies have been registered yet.', 'kansleri-cookie-consent'), 313 'policy_status_heading' => __('Your current cookie preferences', 'kansleri-cookie-consent'), 314 'policy_status_note' => __('These choices are stored technically as wp_consent_functional, wp_consent_statistics, wp_consent_marketing, and wp_consent_preferences for compatibility with WordPress plugins.', 'kansleri-cookie-consent'), 315 'policy_edit_button' => __('Edit cookie preferences', 'kansleri-cookie-consent'), 316 'policy_col_cookie' => __('Cookie', 'kansleri-cookie-consent'), 317 'policy_col_provider' => __('Provider', 'kansleri-cookie-consent'), 318 'policy_col_purpose' => __('Purpose', 'kansleri-cookie-consent'), 319 'policy_col_duration' => __('Duration', 'kansleri-cookie-consent'), 320 'status_no_choice' => __('You have not made a choice yet.', 'kansleri-cookie-consent'), 321 'status_allowed' => __('Allowed', 'kansleri-cookie-consent'), 322 'status_denied' => __('Denied', 'kansleri-cookie-consent'), 323 'status_always_active' => __('Always active', 'kansleri-cookie-consent'), 324 ); 325 } 326 endif; 327 328 if (!function_exists('kncc_get_builtin_text_keys')) : 329 /** 330 * Keys of kncc_get_builtin_texts(). Cached because they never depend on the language and 331 * every settings read needs them (through kncc_get_default_settings()). 332 */ 333 function kncc_get_builtin_text_keys() { 334 static $keys = null; 335 if ($keys === null) { 336 $keys = array_keys(kncc_get_builtin_texts()); 337 } 338 return $keys; 339 } 340 endif; 341 342 if (!function_exists('kncc_get_builtin_texts_for_language')) : 343 /** 344 * kncc_get_builtin_texts() in the given language (the admin shows them as placeholders). 345 */ 346 function kncc_get_builtin_texts_for_language($lang = null) { 347 $target_locale = kncc_get_content_locale($lang); 348 349 if ($target_locale === determine_locale()) { 350 return kncc_get_builtin_texts(); 351 } 352 353 switch_to_locale($target_locale); 354 $texts = kncc_get_builtin_texts(); 355 restore_previous_locale(); 356 return $texts; 357 } 358 endif; 359 360 if (!function_exists('kncc_text')) : 361 /** 362 * A visitor-facing text: the site owner's own wording when set, otherwise the built-in text 363 * in the current language. $settings comes from kncc_get_localized_texts() or similar. 364 */ 365 function kncc_text($key, $settings) { 366 if (isset($settings[$key]) && is_string($settings[$key]) && trim($settings[$key]) !== '') { 367 return $settings[$key]; 368 } 369 370 static $builtin = array(); 371 $locale = determine_locale(); 372 if (!isset($builtin[$locale])) { 373 $builtin[$locale] = kncc_get_builtin_texts(); 374 } 375 return isset($builtin[$locale][$key]) ? $builtin[$locale][$key] : ''; 278 376 } 279 377 endif; … … 838 936 */ 839 937 function kncc_get_text_field_keys() { 840 return array (938 return array_merge(array( 841 939 'heading_text', 842 940 'description_text', … … 848 946 'iframe_placeholder_text', 849 947 'iframe_accept_text', 850 ) ;948 ), kncc_get_builtin_text_keys()); 851 949 } 852 950 endif; … … 962 1060 function kncc_cookie_settings_shortcode($atts) { 963 1061 $atts = shortcode_atts(array( 964 'text' => __('Cookie settings', 'kansleri-cookie-consent'),1062 'text' => kncc_text('settings_link_text', kncc_get_localized_texts()), 965 1063 ), $atts, 'kncc_cookie_settings'); 966 1064 -
kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.l10n.php
r3746047 r3754407 4 4 'plural-forms' => 'nplurals=2; plural=(n != 1);', 5 5 'language' => 'fi', 6 'project-id-version' => 'Kansleri Cookie Consent 1.8. 8',6 'project-id-version' => 'Kansleri Cookie Consent 1.8.9', 7 7 'x-generator' => 'kncc gen-l10n.php', 8 8 'messages' => … … 53 53 'Appears after scanning when unknown cookies are found. Copies a ready prompt to paste into an AI tool. After the AI responds, paste the JSON back into the text box and click Import.' => 'Ilmestyy skannauksen jälkeen, kun tuntemattomia evästeitä löytyy. Kopioi valmiin kehotteen AI-työkaluun liitettäväksi. AI:n vastauksen jälkeen liitä JSON tekstikenttään ja napsauta Tuo.', 54 54 'Banner background' => 'Bannerin tausta', 55 'Banner label for screen readers' => 'Bannerin nimi ruudunlukijoille', 55 56 'Banner preview' => 'Bannerin esikatselu', 56 57 'Banner style' => 'Bannerin tyyli', … … 58 59 'Banner z-index is 999999 and the floating button is 999998 — raise them if your theme renders overlays on top of the banner.' => 'Bannerin z-index on 999999 ja kelluvan painikkeen 999998 — nosta näitä jos teemasi renderöi overlayt bannerin päälle.', 59 60 'Basic Consent Mode: the Google tag and Google Tag Manager wait until the visitor accepts analytics cookies.' => 'Basic Consent Mode: Google-tagi ja Google Tag Manager odottavat, kunnes kävijä hyväksyy analytiikkaevästeet.', 61 'Before the visitor chooses' => 'Ennen kävijän valintaa', 60 62 'Block YouTube and Vimeo videos until the visitor accepts marketing cookies' => 'Estä YouTube- ja Vimeo-videot, kunnes kävijä hyväksyy markkinointievästeet', 61 63 'Block by address' => 'Estä osoitteen perusteella', 64 'Blocked analytics content accept button' => 'Estetyn analytiikkasisällön hyväksy-painike', 65 'Blocked analytics content message' => 'Estetyn analytiikkasisällön viesti', 62 66 'Blocked iframe accept button' => 'Estetyn iframen hyväksy-painike', 63 67 'Blocked iframe message' => 'Estetyn iframen viesti', 68 'Blocked preferences content accept button' => 'Estetyn mieltymyssisällön hyväksy-painike', 69 'Blocked preferences content message' => 'Estetyn mieltymyssisällön viesti', 64 70 'Blocks any other script by part of its address until the visitor accepts the category you choose, for example a widget the plugin does not recognize. Turn on Placeholder for scripts that show content on the page.' => 'Estää minkä tahansa muun skriptin osoitteen osan perusteella, kunnes kävijä hyväksyy valitsemasi kategorian, esimerkiksi widgetin, jota lisäosa ei tunnista. Ota paikkamerkki käyttöön skripteille, jotka näyttävät sivulla sisältöä.', 65 71 'Body text' => 'Leipäteksti', 66 72 'Bottom bar' => 'Alapalkki', 73 'Buttons and messages' => 'Painikkeet ja viestit', 67 74 'CSS template copied to clipboard.' => 'CSS-malli kopioitu leikepöydälle.', 68 75 'Categories' => 'Kategoriat', 69 76 'Category' => 'Kategoria', 77 'Category descriptions' => 'Kategorioiden kuvaukset', 70 78 'Centered modal' => 'Keskitetty ikkuna', 71 79 'Choice' => 'Valinta', … … 87 95 'Consent Mode tells Google tags what the visitor has allowed (for example analytics or ads). This plugin sends a denied-by-default signal before tags run, and sends an updated signal after the visitor chooses. It controls consent signals only: you still need to install GTM/GA scripts separately.' => 'Consent Mode kertoo Google-tageille, mitä kävijä on sallinut (esim. analytiikan tai mainonnan). Tämä lisäosa lähettää oletuksena estetyn signaalin ennen tagien suorittamista ja päivitetyn signaalin kävijän valinnan jälkeen. Se ohjaa vain suostumussignaaleja: GTM/GA-skriptit on asennettava erikseen.', 88 96 'Consent statistics' => 'Suostumustilastot', 97 'Consent status' => 'Suostumuksen tila', 89 98 'Controls the main accent color used by buttons and links.' => 'Määrittää painikkeiden ja linkkien pääkorostusvärin.', 90 99 'Controls the styling of the [kncc_cookie_policy] cookie declaration table.' => 'Määrittää [kncc_cookie_policy]-evästeluettelotaulukon ulkoasun.', … … 94 103 'Cookie Consent: %1$d cookie(s) are missing descriptions: %2$s. %3$s to add them.' => 'Evästesuostumus: %1$d evästeeltä puuttuu kuvaus: %2$s. %3$s lisätäksesi ne.', 95 104 'Cookie Policy' => 'Evästekäytäntö', 105 'Cookie categories' => 'Evästekategoriat', 96 106 'Cookie consent' => 'Evästesuostumus', 97 107 'Cookie names, categories, providers, and durations are shared across all languages. Only the description field can be translated per language. Switch language and edit descriptions in the Cookies tab.' => 'Evästeiden nimet, kategoriat, tarjoajat ja kestot ovat samat kaikilla kielillä. Vain kuvauskenttä voidaan kääntää kielikohtaisesti. Vaihda kieltä ja muokkaa kuvauksia Evästeet-välilehdellä.', 108 'Cookie policy link text' => 'Evästekäytäntö-linkin teksti', 98 109 'Cookie policy page' => 'Evästekäytäntösivu', 99 110 'Cookie settings' => 'Evästeasetukset', 111 'Cookie settings label' => 'Evästeasetusten teksti', 100 112 'Cookies' => 'Evästeet', 101 113 'Cookies imported into the table. Save cookies to persist changes.' => 'Evästeet tuotu taulukkoon. Tallenna evästeet säilyttääksesi muutokset.', … … 133 145 'Duration' => 'Kesto', 134 146 'Edit cookie preferences' => 'Muokkaa evästeasetuksia', 147 'Edit preferences button' => 'Muokkaa asetuksia -painike', 135 148 'Empty cookie categories' => 'Tyhjät evästekategoriat', 136 149 'Enable Consent Mode v2 (outputs consent defaults in <head> before GTM)' => 'Ota Consent Mode v2 käyttöön (tulostaa suostumusoletukset <head>-osioon ennen GTM:ää)', … … 154 167 'Google Consent Mode v2' => 'Google Consent Mode v2', 155 168 'Google Tag Manager: throttles request rate.' => 'Google Tag Manager: rajoittaa pyyntöjen tiheyttä.', 169 'Heading' => 'Otsikko', 156 170 'Heading text' => 'Otsikkoteksti', 157 171 'Heading/Description/Button texts' => 'Otsikon/kuvauksen/painikkeen tekstit', … … 198 212 'Manage cookies' => 'Hallitse evästeitä', 199 213 'Marketing' => 'Markkinointi', 214 'Message when no cookies are registered' => 'Viesti, kun evästeitä ei ole rekisteröity', 200 215 'Meta Pixel: stores click identifiers.' => 'Meta Pixel: tallentaa mainosklikkausten tunnisteet.', 201 216 'Meta Pixel: tracks visits across websites for ad targeting.' => 'Meta Pixel: seuraa käyntejä eri verkkosivustoilla mainonnan kohdentamista varten.', … … 209 224 'Multilingual support (WPML & Polylang)' => 'Monikielisyystuki (WPML ja Polylang)', 210 225 'Name' => 'Nimi', 226 'Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language.' => 'Nimet ja kuvaukset, jotka näytetään, kun kävijä avaa Muokkaa-näkymän. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle.', 211 227 'Necessary' => 'Välttämättömät', 212 228 'Necessary (never blocked)' => 'Välttämättömät (ei estetä koskaan)', … … 260 276 'Policy page AI prompt (copied to clipboard — or select all and copy manually):' => 'Evästekäytännön AI-kehote (kopioitu leikepöydälle — tai valitse kaikki ja kopioi manuaalisesti):', 261 277 'Policy page style' => 'Tietosuojasivun tyyli', 278 'Policy page texts' => 'Tietosuojasivun tekstit', 262 279 'Polylang: stores visitor language preference.' => 'Polylang: tallentaa kävijän kielivalinnan.', 263 280 'Possibly removed' => 'Mahdollisesti poistettu', … … 314 331 'Show but lock (disable) the switch' => 'Näytä, mutta lukitse (poista käytöstä) valitsin', 315 332 'Shown over blocked YouTube and Vimeo embeds before the visitor accepts marketing cookies.' => 'Näytetään estettyjen YouTube- ja Vimeo-upotusten päällä ennen kuin kävijä hyväksyy markkinointievästeet.', 333 'Shown over blocked content that needs analytics cookies, such as a review widget.' => 'Näytetään analytiikkaevästeitä vaativan estetyn sisällön päällä, esimerkiksi arvosteluwidgetissä.', 334 'Shown over blocked content that needs preference cookies, such as a chat or booking widget.' => 'Näytetään mieltymysevästeitä vaativan estetyn sisällön päällä, esimerkiksi chat- tai ajanvarauswidgetissä.', 316 335 'Shows how many visitors accepted, rejected, or customized cookies over 7, 30, or 90 day periods. Data is aggregated and anonymous — no personal data is stored.' => 'Näyttää kuinka moni kävijä hyväksyi, hylkäsi tai mukautti evästeitä 7, 30 tai 90 päivän aikana. Tiedot ovat koottuja ja nimettömiä — henkilötietoja ei tallenneta.', 317 336 'Site Kit sets consent defaults for its own regions. This plugin adds a denied default for all other visitors and sends each visitor\'s choice as a consent update.' => 'Site Kit asettaa suostumusoletukset omille alueilleen. Tämä lisäosa lisää estetyn oletuksen kaikille muille kävijöille ja lähettää kunkin kävijän valinnan suostumuspäivityksenä.', … … 320 339 'Stops tracking pasted into Bricks, Elementor, or similar Custom Code fields until the visitor gives consent.' => 'Estää Bricks-, Elementor- tai vastaaviin Custom Code -kenttiin liitetyn seurannan, kunnes kävijä antaa suostumuksen.', 321 340 'Stores your cookie consent preferences.' => 'Tallentaa evästevalintasi, jotta evästebanneria ei näytetä joka käynnillä uudelleen.', 341 'Table column headings' => 'Taulukon sarakeotsikot', 322 342 'Taboola: identifies the browser for ad targeting.' => 'Taboola: tunnistaa selaimen mainonnan kohdentamista varten.', 343 'Technical note (shown when WP Consent API is active)' => 'Tekninen huomautus (näytetään, kun WP Consent API on käytössä)', 323 344 'Test how the banner looks with your current (unsaved) settings — the preview stays visible while you edit.' => 'Testaa miltä banneri näyttää nykyisillä (tallentamattomilla) asetuksilla — esikatselu pysyy näkyvissä muokkauksen aikana.', 324 345 'Text and font style' => 'Teksti- ja kirjasintyyli', 346 'Text when no cookies are used' => 'Teksti, kun evästeitä ei käytetä', 347 'Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab.' => '[kncc_cookie_policy]-evästeselosteen tekstit. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle. Kategorioiden nimiä muokataan Yleiset-välilehdellä.', 325 348 'The AI will return improved JSON with clear cookie descriptions.' => 'AI palauttaa parannetun JSONin selkeillä evästekuvauksilla.', 326 349 'The Trustmary reviews widget waits for analytics consent, because it stores a visitor ID in the browser. A placeholder with an accept button is shown in its place. To load it right away, add widget.trustmary.com under Block by address with the category “Necessary (never blocked)”.' => 'Trustmaryn arvosteluwidget odottaa analytiikkasuostumusta, koska se tallentaa selaimeen kävijätunnisteen. Sen paikalla näytetään paikkamerkki ja hyväksymispainike. Jos haluat sen latautuvan heti, lisää widget.trustmary.com kohtaan Estä osoitteen perusteella kategorialla ”Välttämättömät (ei estetä koskaan)”.', … … 346 369 'Tips:' => 'Vinkkejä:', 347 370 'Tools like Google Analytics are blocked automatically when added through WordPress plugins (e.g. Google Site Kit).' => 'Työkalut kuten Google Analytics estetään automaattisesti, kun ne lisätään WordPress-lisäosien kautta (esim. Google Site Kit).', 371 'Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link.' => 'Kelluvan painikkeen työkaluvihje ja ruudunlukijan nimi sekä [kncc_cookie_settings]-linkin oletusteksti.', 348 372 'Total records:' => 'Merkintöjä yhteensä:', 349 373 'Total responses' => 'Vastauksia yhteensä', -
kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.po
r3746047 r3754407 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: Kansleri Cookie Consent 1.8. 8\n"6 "Project-Id-Version: Kansleri Cookie Consent 1.8.9\n" 7 7 "Report-Msgid-Bugs-To: https://kansleri.fi\n" 8 "POT-Creation-Date: 2026-10-1 312:00+0300\n"9 "PO-Revision-Date: 2026-10-1 312:00+0300\n"8 "POT-Creation-Date: 2026-10-19 12:00+0300\n" 9 "PO-Revision-Date: 2026-10-19 12:00+0300\n" 10 10 "Last-Translator: Kansleri.fi\n" 11 11 "Language-Team: Finnish\n" … … 2281 2281 msgid "Crisp: keeps the chat session and visitor identity." 2282 2282 msgstr "Crisp: ylläpitää chat-istuntoa ja kävijän tunnistetta." 2283 2284 #: includes/class-admin.php 2285 msgid "Cookie policy link text" 2286 msgstr "Evästekäytäntö-linkin teksti" 2287 2288 #: includes/class-admin.php 2289 msgid "Cookie settings label" 2290 msgstr "Evästeasetusten teksti" 2291 2292 #: includes/class-admin.php 2293 msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link." 2294 msgstr "Kelluvan painikkeen työkaluvihje ja ruudunlukijan nimi sekä [kncc_cookie_settings]-linkin oletusteksti." 2295 2296 #: includes/class-admin.php 2297 msgid "Banner label for screen readers" 2298 msgstr "Bannerin nimi ruudunlukijoille" 2299 2300 #: includes/class-admin.php 2301 msgid "Cookie categories" 2302 msgstr "Evästekategoriat" 2303 2304 #: includes/class-admin.php 2305 msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language." 2306 msgstr "Nimet ja kuvaukset, jotka näytetään, kun kävijä avaa Muokkaa-näkymän. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle." 2307 2308 #: includes/class-admin.php 2309 msgid "Text when no cookies are used" 2310 msgstr "Teksti, kun evästeitä ei käytetä" 2311 2312 #: includes/class-admin.php 2313 msgid "Blocked analytics content message" 2314 msgstr "Estetyn analytiikkasisällön viesti" 2315 2316 #: includes/class-admin.php 2317 msgid "Blocked analytics content accept button" 2318 msgstr "Estetyn analytiikkasisällön hyväksy-painike" 2319 2320 #: includes/class-admin.php 2321 msgid "Shown over blocked content that needs analytics cookies, such as a review widget." 2322 msgstr "Näytetään analytiikkaevästeitä vaativan estetyn sisällön päällä, esimerkiksi arvosteluwidgetissä." 2323 2324 #: includes/class-admin.php 2325 msgid "Blocked preferences content message" 2326 msgstr "Estetyn mieltymyssisällön viesti" 2327 2328 #: includes/class-admin.php 2329 msgid "Blocked preferences content accept button" 2330 msgstr "Estetyn mieltymyssisällön hyväksy-painike" 2331 2332 #: includes/class-admin.php 2333 msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget." 2334 msgstr "Näytetään mieltymysevästeitä vaativan estetyn sisällön päällä, esimerkiksi chat- tai ajanvarauswidgetissä." 2335 2336 #: includes/class-admin.php 2337 msgid "Policy page texts" 2338 msgstr "Tietosuojasivun tekstit" 2339 2340 #: includes/class-admin.php 2341 msgid "Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab." 2342 msgstr "[kncc_cookie_policy]-evästeselosteen tekstit. Jätä kenttä tyhjäksi, niin käytetään valmista tekstiä, joka on käännetty kullekin kielelle. Kategorioiden nimiä muokataan Yleiset-välilehdellä." 2343 2344 #: includes/class-admin.php 2345 msgid "Category descriptions" 2346 msgstr "Kategorioiden kuvaukset" 2347 2348 #: includes/class-admin.php 2349 msgid "Consent status" 2350 msgstr "Suostumuksen tila" 2351 2352 #: includes/class-admin.php 2353 msgid "Heading" 2354 msgstr "Otsikko" 2355 2356 #: includes/class-admin.php 2357 msgid "Before the visitor chooses" 2358 msgstr "Ennen kävijän valintaa" 2359 2360 #: includes/class-admin.php 2361 msgid "Technical note (shown when WP Consent API is active)" 2362 msgstr "Tekninen huomautus (näytetään, kun WP Consent API on käytössä)" 2363 2364 #: includes/class-admin.php 2365 msgid "Buttons and messages" 2366 msgstr "Painikkeet ja viestit" 2367 2368 #: includes/class-admin.php 2369 msgid "Edit preferences button" 2370 msgstr "Muokkaa asetuksia -painike" 2371 2372 #: includes/class-admin.php 2373 msgid "Message when no cookies are registered" 2374 msgstr "Viesti, kun evästeitä ei ole rekisteröity" 2375 2376 #: includes/class-admin.php 2377 msgid "Table column headings" 2378 msgstr "Taulukon sarakeotsikot" -
kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent.pot
r3746047 r3754407 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: Kansleri Cookie Consent 1.8. 8\n"9 "Project-Id-Version: Kansleri Cookie Consent 1.8.9\n" 10 10 "Report-Msgid-Bugs-To: https://kansleri.fi\n" 11 "POT-Creation-Date: 2026-10-1 312:00+0300\n"11 "POT-Creation-Date: 2026-10-19 12:00+0300\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 1954 1954 msgid "Crisp: keeps the chat session and visitor identity." 1955 1955 msgstr "" 1956 1957 #: includes/class-admin.php 1958 msgid "Cookie policy link text" 1959 msgstr "" 1960 1961 #: includes/class-admin.php 1962 msgid "Cookie settings label" 1963 msgstr "" 1964 1965 #: includes/class-admin.php 1966 msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link." 1967 msgstr "" 1968 1969 #: includes/class-admin.php 1970 msgid "Banner label for screen readers" 1971 msgstr "" 1972 1973 #: includes/class-admin.php 1974 msgid "Cookie categories" 1975 msgstr "" 1976 1977 #: includes/class-admin.php 1978 msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language." 1979 msgstr "" 1980 1981 #: includes/class-admin.php 1982 msgid "Text when no cookies are used" 1983 msgstr "" 1984 1985 #: includes/class-admin.php 1986 msgid "Blocked analytics content message" 1987 msgstr "" 1988 1989 #: includes/class-admin.php 1990 msgid "Blocked analytics content accept button" 1991 msgstr "" 1992 1993 #: includes/class-admin.php 1994 msgid "Shown over blocked content that needs analytics cookies, such as a review widget." 1995 msgstr "" 1996 1997 #: includes/class-admin.php 1998 msgid "Blocked preferences content message" 1999 msgstr "" 2000 2001 #: includes/class-admin.php 2002 msgid "Blocked preferences content accept button" 2003 msgstr "" 2004 2005 #: includes/class-admin.php 2006 msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget." 2007 msgstr "" 2008 2009 #: includes/class-admin.php 2010 msgid "Policy page texts" 2011 msgstr "" 2012 2013 #: includes/class-admin.php 2014 msgid "Texts of the [kncc_cookie_policy] cookie declaration. Leave a field empty to use the built-in text, which is translated into each language. Category names are edited on the General tab." 2015 msgstr "" 2016 2017 #: includes/class-admin.php 2018 msgid "Category descriptions" 2019 msgstr "" 2020 2021 #: includes/class-admin.php 2022 msgid "Consent status" 2023 msgstr "" 2024 2025 #: includes/class-admin.php 2026 msgid "Heading" 2027 msgstr "" 2028 2029 #: includes/class-admin.php 2030 msgid "Before the visitor chooses" 2031 msgstr "" 2032 2033 #: includes/class-admin.php 2034 msgid "Technical note (shown when WP Consent API is active)" 2035 msgstr "" 2036 2037 #: includes/class-admin.php 2038 msgid "Buttons and messages" 2039 msgstr "" 2040 2041 #: includes/class-admin.php 2042 msgid "Edit preferences button" 2043 msgstr "" 2044 2045 #: includes/class-admin.php 2046 msgid "Message when no cookies are registered" 2047 msgstr "" 2048 2049 #: includes/class-admin.php 2050 msgid "Table column headings" 2051 msgstr "" -
kansleri-cookie-consent/trunk/readme.txt
r3746047 r3754407 4 4 Requires at least: 6.0 5 5 Tested up to: 7.1 6 Stable tag: 1.8. 86 Stable tag: 1.8.9 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 113 113 == Changelog == 114 114 115 = 1.8.9 = 116 * New: Every text visitors see can now be edited. The General tab adds the cookie category names and descriptions, the "no cookies are used" notes, the Cookie Policy link text, the floating button label (also the default text of the `[kncc_cookie_settings]` link), the banner's screen reader label, and the messages and buttons on blocked analytics and preferences content. The Policy Page tab adds every text of the `[kncc_cookie_policy]` cookie declaration: category descriptions, table headings, the consent status texts and the edit button 117 * Empty fields keep the built-in text, translated into each language, so nothing changes on your site until you type your own wording. On multilingual sites (Polylang, WPML) each language can have its own wording 118 115 119 = 1.8.8 = 116 120 * Fixed: Descriptions and durations of the cookies the plugin adds itself (from Scan Cookies and detected scripts, e.g. `_ga`, `kncc_consent` and `wp_consent_*`) were always in English, even on Finnish sites. The cookie policy page now shows them in the visitor's language, and the Cookies tab in the language you are editing. This also covers cookies already in your list, so there is nothing to re-scan or re-save. Descriptions you have written or edited yourself are shown as written
Note:
See TracChangeset
for help on using the changeset viewer.