Plugin Directory

Changeset 3754407


Ignore:
Timestamp:
10/19/2026 09:34:13 AM (4 weeks ago)
Author:
tapiokansleri
Message:

Release 1.8.9: every visitor-facing text is editable

Location:
kansleri-cookie-consent
Files:
15 edited
15 copied

Legend:

Unmodified
Added
Removed
  • kansleri-cookie-consent/tags/1.8.9/assets/admin.css

    r3728487 r3754407  
    743743}
    744744
     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  
    11611161    ];
    11621162    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    });
    11631167
    11641168    function darken(hex, amount) {
  • kansleri-cookie-consent/tags/1.8.9/includes/class-admin.php

    r3746047 r3754407  
    237237    $lang = kncc_get_current_language();
    238238    $placeholder_source = kncc_get_default_settings_for_language($lang);
     239    $builtin_texts = kncc_get_builtin_texts_for_language($lang);
    239240    ?>
    240241    <?php $kncc_is_plugin_style = (($settings['text_style_mode'] ?? 'plugin') === 'plugin'); ?>
    … …  
    342343        </tr>
    343344        <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>
    344385          <th scope="row"><label for="kncc-iframe-placeholder-text"><?php esc_html_e('Blocked iframe message', 'kansleri-cookie-consent'); ?></label></th>
    345386          <td>
    … …  
    351392          <th scope="row"><label for="kncc-iframe-accept-text"><?php esc_html_e('Blocked iframe accept button', 'kansleri-cookie-consent'); ?></label></th>
    352393          <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>
    353416        </tr>
    354417        <tr>
    … …  
    417480    $preview_in_use = kncc_get_categories_in_use();
    418481    $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    };
    424486    ?>
    425487
    … …  
    469531                  />
    470532                  <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>
    472534                </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>
    476538                <?php endif; ?>
    477539              </div>
    … …  
    644706              <?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'); ?>
    645707            </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; ?>
    646761          </td>
    647762        </tr>
    … …  
    14841599    // All text fields are saved as-is, including empty strings. An empty value means
    14851600    // "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(
    14871602      'banner_position',
    14881603      'heading_text', 'description_text', 'accept_text',
    14891604      'reject_text', 'customize_text', 'save_text', 'close_text',
    14901605      'iframe_placeholder_text', 'iframe_accept_text',
    1491     );
     1606    ), kncc_get_builtin_text_keys());
    14921607    foreach ($text_fields as $field) {
    14931608      if (isset($_POST[$field])) {
  • kansleri-cookie-consent/tags/1.8.9/includes/class-consent.php

    r3724446 r3754407  
    1818
    1919    $settings = kncc_get_settings();
     20    $texts = kncc_get_localized_texts();
    2021
    2122    wp_enqueue_style(
    … …  
    4849      ) : null,
    4950      '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),
    5455      ),
    5556    )) . ';', 'before');
    … …  
    9394    $text_style_mode = (isset($settings['text_style_mode']) && $settings['text_style_mode'] === 'theme') ? 'theme' : 'plugin';
    9495
    95     $all_cats = kncc_get_categories();
    9696    $categories = array();
    9797    $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);
    101101    }
    102102
    … …  
    104104    $empty_mode = (isset($settings['empty_category_mode']) && $settings['empty_category_mode'] === 'hide') ? 'hide' : 'disable';
    105105    $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),
    109109    );
    110110
    … …  
    160160         <?php if ($is_modal) : ?>aria-modal="true"<?php endif; ?>
    161161         data-kncc-modal="<?php echo $is_modal ? '1' : '0'; ?>"
    162          aria-label="<?php esc_attr_e('Cookie consent', 'kansleri-cookie-consent'); ?>"
     162         aria-label="<?php echo esc_attr(kncc_text('banner_label', $settings)); ?>"
    163163         style="display:none;">
    164164
    … …  
    173173          <p class="kncc-desc"><?php echo esc_html($settings['description_text']); ?>
    174174            <?php if ($policy_link) : ?>
    175               <a href="<?php echo esc_url($policy_link); ?>" class="kncc-policy-link" target="_blank"><?php esc_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>
    176176            <?php endif; ?>
    177177          </p>
    … …  
    232232              id="kncc-floating-btn"
    233233              class="kncc-floating-btn kncc-typography--<?php echo esc_attr($text_style_mode); ?>"
    234               aria-label="<?php esc_attr_e('Cookie settings', 'kansleri-cookie-consent'); ?>"
    235               title="<?php esc_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)); ?>"
    236236              style="display:none;">
    237237        <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  
    5959
    6060    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>';
    6262    }
    6363
    64     $all_cats = kncc_get_categories();
    6564    $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);
    6869    }
    6970
    70     $cat_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),
    7576    );
    7677
    … …  
    9697      <?php if (!empty($status_categories)) : ?>
    9798        <div class="kncc-policy__consent-status">
    98           <p class="kncc-policy__consent-status-heading"><strong><?php esc_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>
    99100          <div id="kncc-policy-consent-status"
    100101               class="kncc-policy__consent-status-body"
    … …  
    104105          <?php if (class_exists('KNCC_WP_Consent_API') && KNCC_WP_Consent_API::is_active()) : ?>
    105106            <p class="kncc-policy__consent-status-note">
    106               <?php esc_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)); ?>
    107108            </p>
    108109          <?php endif; ?>
    … …  
    111112      <div class="kncc-policy__edit-consent">
    112113        <button type="button" class="kncc-btn kncc-btn--primary kncc-edit-consent-btn">
    113           <?php esc_html_e('Edit cookie preferences', 'kansleri-cookie-consent'); ?>
     114          <?php echo esc_html(kncc_text('policy_edit_button', $settings)); ?>
    114115        </button>
    115116      </div>
    … …  
    122123            <thead>
    123124              <tr>
    124                 <th><?php esc_html_e('Cookie', 'kansleri-cookie-consent'); ?></th>
    125                 <th><?php esc_html_e('Provider', 'kansleri-cookie-consent'); ?></th>
    126                 <th><?php esc_html_e('Purpose', 'kansleri-cookie-consent'); ?></th>
    127                 <th><?php esc_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>
    128129              </tr>
    129130            </thead>
    … …  
    131132              <?php foreach ($grouped[$key] as $cookie) : ?>
    132133                <tr>
    133                   <td data-label="<?php esc_attr_e('Cookie', 'kansleri-cookie-consent'); ?>"><code><?php echo esc_html($cookie['name']); ?></code></td>
    134                   <td data-label="<?php esc_attr_e('Provider', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['provider'] ?? ''); ?></td>
    135                   <td data-label="<?php esc_attr_e('Purpose', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['description'] ?? ''); ?></td>
    136                   <td data-label="<?php esc_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>
    137138                </tr>
    138139              <?php endforeach; ?>
  • kansleri-cookie-consent/tags/1.8.9/includes/class-script-blocker.php

    r3746047 r3754407  
    10031003
    10041004  /**
    1005    * Placeholder message and accept button text for a category. Marketing uses the texts
    1006    * 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.
    10071007   */
    10081008  private static function get_placeholder_texts($category) {
    … …  
    10121012    }
    10131013
    1014     if ($category === 'analytics') {
     1014    $settings = kncc_get_localized_texts();
     1015    if ($category === 'analytics' || $category === 'preferences') {
    10151016      $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),
    10231019      );
    10241020    } else {
    1025       $settings = kncc_get_localized_texts();
    10261021      $texts[$category] = array(
    10271022        'placeholder' => !empty($settings['iframe_placeholder_text'])
  • kansleri-cookie-consent/tags/1.8.9/kansleri-cookie-consent.php

    r3746047 r3754407  
    33 * Plugin Name: Kansleri Cookie Consent
    44 * 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.8
     5 * Version: 1.8.9
    66 * Author: Kansleri.fi
    77 * Author URI: https://kansleri.fi
    … …  
    2020}
    2121
    22 define('KNCC_VERSION', '1.8.8');
     22define('KNCC_VERSION', '1.8.9');
    2323// Bump whenever the consent log schema changes so dbDelta runs on upgrade.
    2424define('KNCC_DB_VERSION', '1.3.0');
    … …  
    9292    'block_html_scripts' => true,
    9393    'block_iframes'      => true,
    94   );
     94  ) + array_fill_keys(kncc_get_builtin_text_keys(), '');
    9595}
    9696endif;
    … …  
    276276  restore_previous_locale();
    277277  return $defaults;
     278}
     279endif;
     280
     281if (!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 */
     289function 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}
     326endif;
     327
     328if (!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 */
     333function 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}
     340endif;
     341
     342if (!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 */
     346function 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}
     358endif;
     359
     360if (!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 */
     365function 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] : '';
    278376}
    279377endif;
    … …  
    838936 */
    839937function kncc_get_text_field_keys() {
    840   return array(
     938  return array_merge(array(
    841939    'heading_text',
    842940    'description_text',
    … …  
    848946    'iframe_placeholder_text',
    849947    'iframe_accept_text',
    850   );
     948  ), kncc_get_builtin_text_keys());
    851949}
    852950endif;
    … …  
    9621060function kncc_cookie_settings_shortcode($atts) {
    9631061  $atts = shortcode_atts(array(
    964     'text' => __('Cookie settings', 'kansleri-cookie-consent'),
     1062    'text' => kncc_text('settings_link_text', kncc_get_localized_texts()),
    9651063  ), $atts, 'kncc_cookie_settings');
    9661064
  • kansleri-cookie-consent/tags/1.8.9/languages/kansleri-cookie-consent-fi.l10n.php

    r3746047 r3754407  
    44  'plural-forms' => 'nplurals=2; plural=(n != 1);',
    55  'language' => 'fi',
    6   'project-id-version' => 'Kansleri Cookie Consent 1.8.8',
     6  'project-id-version' => 'Kansleri Cookie Consent 1.8.9',
    77  'x-generator' => 'kncc gen-l10n.php',
    88  'messages' =>
    … …  
    5353    '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.',
    5454    'Banner background' => 'Bannerin tausta',
     55    'Banner label for screen readers' => 'Bannerin nimi ruudunlukijoille',
    5556    'Banner preview' => 'Bannerin esikatselu',
    5657    'Banner style' => 'Bannerin tyyli',
    … …  
    5859    '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.',
    5960    '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',
    6062    'Block YouTube and Vimeo videos until the visitor accepts marketing cookies' => 'Estä YouTube- ja Vimeo-videot, kunnes kävijä hyväksyy markkinointievästeet',
    6163    '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',
    6266    'Blocked iframe accept button' => 'Estetyn iframen hyväksy-painike',
    6367    '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',
    6470    '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öä.',
    6571    'Body text' => 'Leipäteksti',
    6672    'Bottom bar' => 'Alapalkki',
     73    'Buttons and messages' => 'Painikkeet ja viestit',
    6774    'CSS template copied to clipboard.' => 'CSS-malli kopioitu leikepöydälle.',
    6875    'Categories' => 'Kategoriat',
    6976    'Category' => 'Kategoria',
     77    'Category descriptions' => 'Kategorioiden kuvaukset',
    7078    'Centered modal' => 'Keskitetty ikkuna',
    7179    'Choice' => 'Valinta',
    … …  
    8795    '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.',
    8896    'Consent statistics' => 'Suostumustilastot',
     97    'Consent status' => 'Suostumuksen tila',
    8998    'Controls the main accent color used by buttons and links.' => 'Määrittää painikkeiden ja linkkien pääkorostusvärin.',
    9099    'Controls the styling of the [kncc_cookie_policy] cookie declaration table.' => 'Määrittää [kncc_cookie_policy]-evästeluettelotaulukon ulkoasun.',
    … …  
    94103    '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.',
    95104    'Cookie Policy' => 'Evästekäytäntö',
     105    'Cookie categories' => 'Evästekategoriat',
    96106    'Cookie consent' => 'Evästesuostumus',
    97107    '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',
    98109    'Cookie policy page' => 'Evästekäytäntösivu',
    99110    'Cookie settings' => 'Evästeasetukset',
     111    'Cookie settings label' => 'Evästeasetusten teksti',
    100112    'Cookies' => 'Evästeet',
    101113    'Cookies imported into the table. Save cookies to persist changes.' => 'Evästeet tuotu taulukkoon. Tallenna evästeet säilyttääksesi muutokset.',
    … …  
    133145    'Duration' => 'Kesto',
    134146    'Edit cookie preferences' => 'Muokkaa evästeasetuksia',
     147    'Edit preferences button' => 'Muokkaa asetuksia -painike',
    135148    'Empty cookie categories' => 'Tyhjät evästekategoriat',
    136149    'Enable Consent Mode v2 (outputs consent defaults in &lt;head&gt; before GTM)' => 'Ota Consent Mode v2 käyttöön (tulostaa suostumusoletukset &lt;head&gt;-osioon ennen GTM:ää)',
    … …  
    154167    'Google Consent Mode v2' => 'Google Consent Mode v2',
    155168    'Google Tag Manager: throttles request rate.' => 'Google Tag Manager: rajoittaa pyyntöjen tiheyttä.',
     169    'Heading' => 'Otsikko',
    156170    'Heading text' => 'Otsikkoteksti',
    157171    'Heading/Description/Button texts' => 'Otsikon/kuvauksen/painikkeen tekstit',
    … …  
    198212    'Manage cookies' => 'Hallitse evästeitä',
    199213    'Marketing' => 'Markkinointi',
     214    'Message when no cookies are registered' => 'Viesti, kun evästeitä ei ole rekisteröity',
    200215    'Meta Pixel: stores click identifiers.' => 'Meta Pixel: tallentaa mainosklikkausten tunnisteet.',
    201216    'Meta Pixel: tracks visits across websites for ad targeting.' => 'Meta Pixel: seuraa käyntejä eri verkkosivustoilla mainonnan kohdentamista varten.',
    … …  
    209224    'Multilingual support (WPML & Polylang)' => 'Monikielisyystuki (WPML ja Polylang)',
    210225    '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.',
    211227    'Necessary' => 'Välttämättömät',
    212228    'Necessary (never blocked)' => 'Välttämättömät (ei estetä koskaan)',
    … …  
    260276    '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):',
    261277    'Policy page style' => 'Tietosuojasivun tyyli',
     278    'Policy page texts' => 'Tietosuojasivun tekstit',
    262279    'Polylang: stores visitor language preference.' => 'Polylang: tallentaa kävijän kielivalinnan.',
    263280    'Possibly removed' => 'Mahdollisesti poistettu',
    … …  
    314331    'Show but lock (disable) the switch' => 'Näytä, mutta lukitse (poista käytöstä) valitsin',
    315332    '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ä.',
    316335    '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.',
    317336    '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ä.',
    … …  
    320339    '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.',
    321340    'Stores your cookie consent preferences.' => 'Tallentaa evästevalintasi, jotta evästebanneria ei näytetä joka käynnillä uudelleen.',
     341    'Table column headings' => 'Taulukon sarakeotsikot',
    322342    '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ä)',
    323344    '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.',
    324345    '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ä.',
    325348    'The AI will return improved JSON with clear cookie descriptions.' => 'AI palauttaa parannetun JSONin selkeillä evästekuvauksilla.',
    326349    '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)”.',
    … …  
    346369    'Tips:' => 'Vinkkejä:',
    347370    '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.',
    348372    'Total records:' => 'Merkintöjä yhteensä:',
    349373    'Total responses' => 'Vastauksia yhteensä',
  • kansleri-cookie-consent/tags/1.8.9/languages/kansleri-cookie-consent-fi.po

    r3746047 r3754407  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: Kansleri Cookie Consent 1.8.8\n"
     6"Project-Id-Version: Kansleri Cookie Consent 1.8.9\n"
    77"Report-Msgid-Bugs-To: https://kansleri.fi\n"
    8 "POT-Creation-Date: 2026-10-13 12:00+0300\n"
    9 "PO-Revision-Date: 2026-10-13 12: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"
    1010"Last-Translator: Kansleri.fi\n"
    1111"Language-Team: Finnish\n"
    … …  
    22812281msgid "Crisp: keeps the chat session and visitor identity."
    22822282msgstr "Crisp: ylläpitää chat-istuntoa ja kävijän tunnistetta."
     2283
     2284#: includes/class-admin.php
     2285msgid "Cookie policy link text"
     2286msgstr "Evästekäytäntö-linkin teksti"
     2287
     2288#: includes/class-admin.php
     2289msgid "Cookie settings label"
     2290msgstr "Evästeasetusten teksti"
     2291
     2292#: includes/class-admin.php
     2293msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link."
     2294msgstr "Kelluvan painikkeen työkaluvihje ja ruudunlukijan nimi sekä [kncc_cookie_settings]-linkin oletusteksti."
     2295
     2296#: includes/class-admin.php
     2297msgid "Banner label for screen readers"
     2298msgstr "Bannerin nimi ruudunlukijoille"
     2299
     2300#: includes/class-admin.php
     2301msgid "Cookie categories"
     2302msgstr "Evästekategoriat"
     2303
     2304#: includes/class-admin.php
     2305msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language."
     2306msgstr "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
     2309msgid "Text when no cookies are used"
     2310msgstr "Teksti, kun evästeitä ei käytetä"
     2311
     2312#: includes/class-admin.php
     2313msgid "Blocked analytics content message"
     2314msgstr "Estetyn analytiikkasisällön viesti"
     2315
     2316#: includes/class-admin.php
     2317msgid "Blocked analytics content accept button"
     2318msgstr "Estetyn analytiikkasisällön hyväksy-painike"
     2319
     2320#: includes/class-admin.php
     2321msgid "Shown over blocked content that needs analytics cookies, such as a review widget."
     2322msgstr "Näytetään analytiikkaevästeitä vaativan estetyn sisällön päällä, esimerkiksi arvosteluwidgetissä."
     2323
     2324#: includes/class-admin.php
     2325msgid "Blocked preferences content message"
     2326msgstr "Estetyn mieltymyssisällön viesti"
     2327
     2328#: includes/class-admin.php
     2329msgid "Blocked preferences content accept button"
     2330msgstr "Estetyn mieltymyssisällön hyväksy-painike"
     2331
     2332#: includes/class-admin.php
     2333msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget."
     2334msgstr "Näytetään mieltymysevästeitä vaativan estetyn sisällön päällä, esimerkiksi chat- tai ajanvarauswidgetissä."
     2335
     2336#: includes/class-admin.php
     2337msgid "Policy page texts"
     2338msgstr "Tietosuojasivun tekstit"
     2339
     2340#: includes/class-admin.php
     2341msgid "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."
     2342msgstr "[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
     2345msgid "Category descriptions"
     2346msgstr "Kategorioiden kuvaukset"
     2347
     2348#: includes/class-admin.php
     2349msgid "Consent status"
     2350msgstr "Suostumuksen tila"
     2351
     2352#: includes/class-admin.php
     2353msgid "Heading"
     2354msgstr "Otsikko"
     2355
     2356#: includes/class-admin.php
     2357msgid "Before the visitor chooses"
     2358msgstr "Ennen kävijän valintaa"
     2359
     2360#: includes/class-admin.php
     2361msgid "Technical note (shown when WP Consent API is active)"
     2362msgstr "Tekninen huomautus (näytetään, kun WP Consent API on käytössä)"
     2363
     2364#: includes/class-admin.php
     2365msgid "Buttons and messages"
     2366msgstr "Painikkeet ja viestit"
     2367
     2368#: includes/class-admin.php
     2369msgid "Edit preferences button"
     2370msgstr "Muokkaa asetuksia -painike"
     2371
     2372#: includes/class-admin.php
     2373msgid "Message when no cookies are registered"
     2374msgstr "Viesti, kun evästeitä ei ole rekisteröity"
     2375
     2376#: includes/class-admin.php
     2377msgid "Table column headings"
     2378msgstr "Taulukon sarakeotsikot"
  • kansleri-cookie-consent/tags/1.8.9/languages/kansleri-cookie-consent.pot

    r3746047 r3754407  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: Kansleri Cookie Consent 1.8.8\n"
     9"Project-Id-Version: Kansleri Cookie Consent 1.8.9\n"
    1010"Report-Msgid-Bugs-To: https://kansleri.fi\n"
    11 "POT-Creation-Date: 2026-10-13 12:00+0300\n"
     11"POT-Creation-Date: 2026-10-19 12:00+0300\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    19541954msgid "Crisp: keeps the chat session and visitor identity."
    19551955msgstr ""
     1956
     1957#: includes/class-admin.php
     1958msgid "Cookie policy link text"
     1959msgstr ""
     1960
     1961#: includes/class-admin.php
     1962msgid "Cookie settings label"
     1963msgstr ""
     1964
     1965#: includes/class-admin.php
     1966msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link."
     1967msgstr ""
     1968
     1969#: includes/class-admin.php
     1970msgid "Banner label for screen readers"
     1971msgstr ""
     1972
     1973#: includes/class-admin.php
     1974msgid "Cookie categories"
     1975msgstr ""
     1976
     1977#: includes/class-admin.php
     1978msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language."
     1979msgstr ""
     1980
     1981#: includes/class-admin.php
     1982msgid "Text when no cookies are used"
     1983msgstr ""
     1984
     1985#: includes/class-admin.php
     1986msgid "Blocked analytics content message"
     1987msgstr ""
     1988
     1989#: includes/class-admin.php
     1990msgid "Blocked analytics content accept button"
     1991msgstr ""
     1992
     1993#: includes/class-admin.php
     1994msgid "Shown over blocked content that needs analytics cookies, such as a review widget."
     1995msgstr ""
     1996
     1997#: includes/class-admin.php
     1998msgid "Blocked preferences content message"
     1999msgstr ""
     2000
     2001#: includes/class-admin.php
     2002msgid "Blocked preferences content accept button"
     2003msgstr ""
     2004
     2005#: includes/class-admin.php
     2006msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget."
     2007msgstr ""
     2008
     2009#: includes/class-admin.php
     2010msgid "Policy page texts"
     2011msgstr ""
     2012
     2013#: includes/class-admin.php
     2014msgid "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."
     2015msgstr ""
     2016
     2017#: includes/class-admin.php
     2018msgid "Category descriptions"
     2019msgstr ""
     2020
     2021#: includes/class-admin.php
     2022msgid "Consent status"
     2023msgstr ""
     2024
     2025#: includes/class-admin.php
     2026msgid "Heading"
     2027msgstr ""
     2028
     2029#: includes/class-admin.php
     2030msgid "Before the visitor chooses"
     2031msgstr ""
     2032
     2033#: includes/class-admin.php
     2034msgid "Technical note (shown when WP Consent API is active)"
     2035msgstr ""
     2036
     2037#: includes/class-admin.php
     2038msgid "Buttons and messages"
     2039msgstr ""
     2040
     2041#: includes/class-admin.php
     2042msgid "Edit preferences button"
     2043msgstr ""
     2044
     2045#: includes/class-admin.php
     2046msgid "Message when no cookies are registered"
     2047msgstr ""
     2048
     2049#: includes/class-admin.php
     2050msgid "Table column headings"
     2051msgstr ""
  • kansleri-cookie-consent/tags/1.8.9/readme.txt

    r3746047 r3754407  
    44Requires at least: 6.0
    55Tested up to: 7.1
    6 Stable tag: 1.8.8
     6Stable tag: 1.8.9
    77Requires PHP: 7.4
    88License: GPLv2 or later
    … …  
    113113== Changelog ==
    114114
     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
    115119= 1.8.8 =
    116120* 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  
    743743}
    744744
     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  
    11611161    ];
    11621162    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    });
    11631167
    11641168    function darken(hex, amount) {
  • kansleri-cookie-consent/trunk/includes/class-admin.php

    r3746047 r3754407  
    237237    $lang = kncc_get_current_language();
    238238    $placeholder_source = kncc_get_default_settings_for_language($lang);
     239    $builtin_texts = kncc_get_builtin_texts_for_language($lang);
    239240    ?>
    240241    <?php $kncc_is_plugin_style = (($settings['text_style_mode'] ?? 'plugin') === 'plugin'); ?>
    … …  
    342343        </tr>
    343344        <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>
    344385          <th scope="row"><label for="kncc-iframe-placeholder-text"><?php esc_html_e('Blocked iframe message', 'kansleri-cookie-consent'); ?></label></th>
    345386          <td>
    … …  
    351392          <th scope="row"><label for="kncc-iframe-accept-text"><?php esc_html_e('Blocked iframe accept button', 'kansleri-cookie-consent'); ?></label></th>
    352393          <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>
    353416        </tr>
    354417        <tr>
    … …  
    417480    $preview_in_use = kncc_get_categories_in_use();
    418481    $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    };
    424486    ?>
    425487
    … …  
    469531                  />
    470532                  <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>
    472534                </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>
    476538                <?php endif; ?>
    477539              </div>
    … …  
    644706              <?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'); ?>
    645707            </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; ?>
    646761          </td>
    647762        </tr>
    … …  
    14841599    // All text fields are saved as-is, including empty strings. An empty value means
    14851600    // "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(
    14871602      'banner_position',
    14881603      'heading_text', 'description_text', 'accept_text',
    14891604      'reject_text', 'customize_text', 'save_text', 'close_text',
    14901605      'iframe_placeholder_text', 'iframe_accept_text',
    1491     );
     1606    ), kncc_get_builtin_text_keys());
    14921607    foreach ($text_fields as $field) {
    14931608      if (isset($_POST[$field])) {
  • kansleri-cookie-consent/trunk/includes/class-consent.php

    r3724446 r3754407  
    1818
    1919    $settings = kncc_get_settings();
     20    $texts = kncc_get_localized_texts();
    2021
    2122    wp_enqueue_style(
    … …  
    4849      ) : null,
    4950      '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),
    5455      ),
    5556    )) . ';', 'before');
    … …  
    9394    $text_style_mode = (isset($settings['text_style_mode']) && $settings['text_style_mode'] === 'theme') ? 'theme' : 'plugin';
    9495
    95     $all_cats = kncc_get_categories();
    9696    $categories = array();
    9797    $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);
    101101    }
    102102
    … …  
    104104    $empty_mode = (isset($settings['empty_category_mode']) && $settings['empty_category_mode'] === 'hide') ? 'hide' : 'disable';
    105105    $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),
    109109    );
    110110
    … …  
    160160         <?php if ($is_modal) : ?>aria-modal="true"<?php endif; ?>
    161161         data-kncc-modal="<?php echo $is_modal ? '1' : '0'; ?>"
    162          aria-label="<?php esc_attr_e('Cookie consent', 'kansleri-cookie-consent'); ?>"
     162         aria-label="<?php echo esc_attr(kncc_text('banner_label', $settings)); ?>"
    163163         style="display:none;">
    164164
    … …  
    173173          <p class="kncc-desc"><?php echo esc_html($settings['description_text']); ?>
    174174            <?php if ($policy_link) : ?>
    175               <a href="<?php echo esc_url($policy_link); ?>" class="kncc-policy-link" target="_blank"><?php esc_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>
    176176            <?php endif; ?>
    177177          </p>
    … …  
    232232              id="kncc-floating-btn"
    233233              class="kncc-floating-btn kncc-typography--<?php echo esc_attr($text_style_mode); ?>"
    234               aria-label="<?php esc_attr_e('Cookie settings', 'kansleri-cookie-consent'); ?>"
    235               title="<?php esc_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)); ?>"
    236236              style="display:none;">
    237237        <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  
    5959
    6060    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>';
    6262    }
    6363
    64     $all_cats = kncc_get_categories();
    6564    $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);
    6869    }
    6970
    70     $cat_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),
    7576    );
    7677
    … …  
    9697      <?php if (!empty($status_categories)) : ?>
    9798        <div class="kncc-policy__consent-status">
    98           <p class="kncc-policy__consent-status-heading"><strong><?php esc_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>
    99100          <div id="kncc-policy-consent-status"
    100101               class="kncc-policy__consent-status-body"
    … …  
    104105          <?php if (class_exists('KNCC_WP_Consent_API') && KNCC_WP_Consent_API::is_active()) : ?>
    105106            <p class="kncc-policy__consent-status-note">
    106               <?php esc_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)); ?>
    107108            </p>
    108109          <?php endif; ?>
    … …  
    111112      <div class="kncc-policy__edit-consent">
    112113        <button type="button" class="kncc-btn kncc-btn--primary kncc-edit-consent-btn">
    113           <?php esc_html_e('Edit cookie preferences', 'kansleri-cookie-consent'); ?>
     114          <?php echo esc_html(kncc_text('policy_edit_button', $settings)); ?>
    114115        </button>
    115116      </div>
    … …  
    122123            <thead>
    123124              <tr>
    124                 <th><?php esc_html_e('Cookie', 'kansleri-cookie-consent'); ?></th>
    125                 <th><?php esc_html_e('Provider', 'kansleri-cookie-consent'); ?></th>
    126                 <th><?php esc_html_e('Purpose', 'kansleri-cookie-consent'); ?></th>
    127                 <th><?php esc_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>
    128129              </tr>
    129130            </thead>
    … …  
    131132              <?php foreach ($grouped[$key] as $cookie) : ?>
    132133                <tr>
    133                   <td data-label="<?php esc_attr_e('Cookie', 'kansleri-cookie-consent'); ?>"><code><?php echo esc_html($cookie['name']); ?></code></td>
    134                   <td data-label="<?php esc_attr_e('Provider', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['provider'] ?? ''); ?></td>
    135                   <td data-label="<?php esc_attr_e('Purpose', 'kansleri-cookie-consent'); ?>"><?php echo esc_html($cookie['description'] ?? ''); ?></td>
    136                   <td data-label="<?php esc_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>
    137138                </tr>
    138139              <?php endforeach; ?>
  • kansleri-cookie-consent/trunk/includes/class-script-blocker.php

    r3746047 r3754407  
    10031003
    10041004  /**
    1005    * Placeholder message and accept button text for a category. Marketing uses the texts
    1006    * 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.
    10071007   */
    10081008  private static function get_placeholder_texts($category) {
    … …  
    10121012    }
    10131013
    1014     if ($category === 'analytics') {
     1014    $settings = kncc_get_localized_texts();
     1015    if ($category === 'analytics' || $category === 'preferences') {
    10151016      $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),
    10231019      );
    10241020    } else {
    1025       $settings = kncc_get_localized_texts();
    10261021      $texts[$category] = array(
    10271022        'placeholder' => !empty($settings['iframe_placeholder_text'])
  • kansleri-cookie-consent/trunk/kansleri-cookie-consent.php

    r3746047 r3754407  
    33 * Plugin Name: Kansleri Cookie Consent
    44 * 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.8
     5 * Version: 1.8.9
    66 * Author: Kansleri.fi
    77 * Author URI: https://kansleri.fi
    … …  
    2020}
    2121
    22 define('KNCC_VERSION', '1.8.8');
     22define('KNCC_VERSION', '1.8.9');
    2323// Bump whenever the consent log schema changes so dbDelta runs on upgrade.
    2424define('KNCC_DB_VERSION', '1.3.0');
    … …  
    9292    'block_html_scripts' => true,
    9393    'block_iframes'      => true,
    94   );
     94  ) + array_fill_keys(kncc_get_builtin_text_keys(), '');
    9595}
    9696endif;
    … …  
    276276  restore_previous_locale();
    277277  return $defaults;
     278}
     279endif;
     280
     281if (!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 */
     289function 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}
     326endif;
     327
     328if (!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 */
     333function 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}
     340endif;
     341
     342if (!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 */
     346function 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}
     358endif;
     359
     360if (!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 */
     365function 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] : '';
    278376}
    279377endif;
    … …  
    838936 */
    839937function kncc_get_text_field_keys() {
    840   return array(
     938  return array_merge(array(
    841939    'heading_text',
    842940    'description_text',
    … …  
    848946    'iframe_placeholder_text',
    849947    'iframe_accept_text',
    850   );
     948  ), kncc_get_builtin_text_keys());
    851949}
    852950endif;
    … …  
    9621060function kncc_cookie_settings_shortcode($atts) {
    9631061  $atts = shortcode_atts(array(
    964     'text' => __('Cookie settings', 'kansleri-cookie-consent'),
     1062    'text' => kncc_text('settings_link_text', kncc_get_localized_texts()),
    9651063  ), $atts, 'kncc_cookie_settings');
    9661064
  • kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.l10n.php

    r3746047 r3754407  
    44  'plural-forms' => 'nplurals=2; plural=(n != 1);',
    55  'language' => 'fi',
    6   'project-id-version' => 'Kansleri Cookie Consent 1.8.8',
     6  'project-id-version' => 'Kansleri Cookie Consent 1.8.9',
    77  'x-generator' => 'kncc gen-l10n.php',
    88  'messages' =>
    … …  
    5353    '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.',
    5454    'Banner background' => 'Bannerin tausta',
     55    'Banner label for screen readers' => 'Bannerin nimi ruudunlukijoille',
    5556    'Banner preview' => 'Bannerin esikatselu',
    5657    'Banner style' => 'Bannerin tyyli',
    … …  
    5859    '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.',
    5960    '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',
    6062    'Block YouTube and Vimeo videos until the visitor accepts marketing cookies' => 'Estä YouTube- ja Vimeo-videot, kunnes kävijä hyväksyy markkinointievästeet',
    6163    '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',
    6266    'Blocked iframe accept button' => 'Estetyn iframen hyväksy-painike',
    6367    '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',
    6470    '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öä.',
    6571    'Body text' => 'Leipäteksti',
    6672    'Bottom bar' => 'Alapalkki',
     73    'Buttons and messages' => 'Painikkeet ja viestit',
    6774    'CSS template copied to clipboard.' => 'CSS-malli kopioitu leikepöydälle.',
    6875    'Categories' => 'Kategoriat',
    6976    'Category' => 'Kategoria',
     77    'Category descriptions' => 'Kategorioiden kuvaukset',
    7078    'Centered modal' => 'Keskitetty ikkuna',
    7179    'Choice' => 'Valinta',
    … …  
    8795    '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.',
    8896    'Consent statistics' => 'Suostumustilastot',
     97    'Consent status' => 'Suostumuksen tila',
    8998    'Controls the main accent color used by buttons and links.' => 'Määrittää painikkeiden ja linkkien pääkorostusvärin.',
    9099    'Controls the styling of the [kncc_cookie_policy] cookie declaration table.' => 'Määrittää [kncc_cookie_policy]-evästeluettelotaulukon ulkoasun.',
    … …  
    94103    '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.',
    95104    'Cookie Policy' => 'Evästekäytäntö',
     105    'Cookie categories' => 'Evästekategoriat',
    96106    'Cookie consent' => 'Evästesuostumus',
    97107    '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',
    98109    'Cookie policy page' => 'Evästekäytäntösivu',
    99110    'Cookie settings' => 'Evästeasetukset',
     111    'Cookie settings label' => 'Evästeasetusten teksti',
    100112    'Cookies' => 'Evästeet',
    101113    'Cookies imported into the table. Save cookies to persist changes.' => 'Evästeet tuotu taulukkoon. Tallenna evästeet säilyttääksesi muutokset.',
    … …  
    133145    'Duration' => 'Kesto',
    134146    'Edit cookie preferences' => 'Muokkaa evästeasetuksia',
     147    'Edit preferences button' => 'Muokkaa asetuksia -painike',
    135148    'Empty cookie categories' => 'Tyhjät evästekategoriat',
    136149    'Enable Consent Mode v2 (outputs consent defaults in &lt;head&gt; before GTM)' => 'Ota Consent Mode v2 käyttöön (tulostaa suostumusoletukset &lt;head&gt;-osioon ennen GTM:ää)',
    … …  
    154167    'Google Consent Mode v2' => 'Google Consent Mode v2',
    155168    'Google Tag Manager: throttles request rate.' => 'Google Tag Manager: rajoittaa pyyntöjen tiheyttä.',
     169    'Heading' => 'Otsikko',
    156170    'Heading text' => 'Otsikkoteksti',
    157171    'Heading/Description/Button texts' => 'Otsikon/kuvauksen/painikkeen tekstit',
    … …  
    198212    'Manage cookies' => 'Hallitse evästeitä',
    199213    'Marketing' => 'Markkinointi',
     214    'Message when no cookies are registered' => 'Viesti, kun evästeitä ei ole rekisteröity',
    200215    'Meta Pixel: stores click identifiers.' => 'Meta Pixel: tallentaa mainosklikkausten tunnisteet.',
    201216    'Meta Pixel: tracks visits across websites for ad targeting.' => 'Meta Pixel: seuraa käyntejä eri verkkosivustoilla mainonnan kohdentamista varten.',
    … …  
    209224    'Multilingual support (WPML & Polylang)' => 'Monikielisyystuki (WPML ja Polylang)',
    210225    '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.',
    211227    'Necessary' => 'Välttämättömät',
    212228    'Necessary (never blocked)' => 'Välttämättömät (ei estetä koskaan)',
    … …  
    260276    '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):',
    261277    'Policy page style' => 'Tietosuojasivun tyyli',
     278    'Policy page texts' => 'Tietosuojasivun tekstit',
    262279    'Polylang: stores visitor language preference.' => 'Polylang: tallentaa kävijän kielivalinnan.',
    263280    'Possibly removed' => 'Mahdollisesti poistettu',
    … …  
    314331    'Show but lock (disable) the switch' => 'Näytä, mutta lukitse (poista käytöstä) valitsin',
    315332    '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ä.',
    316335    '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.',
    317336    '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ä.',
    … …  
    320339    '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.',
    321340    'Stores your cookie consent preferences.' => 'Tallentaa evästevalintasi, jotta evästebanneria ei näytetä joka käynnillä uudelleen.',
     341    'Table column headings' => 'Taulukon sarakeotsikot',
    322342    '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ä)',
    323344    '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.',
    324345    '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ä.',
    325348    'The AI will return improved JSON with clear cookie descriptions.' => 'AI palauttaa parannetun JSONin selkeillä evästekuvauksilla.',
    326349    '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)”.',
    … …  
    346369    'Tips:' => 'Vinkkejä:',
    347370    '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.',
    348372    'Total records:' => 'Merkintöjä yhteensä:',
    349373    'Total responses' => 'Vastauksia yhteensä',
  • kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent-fi.po

    r3746047 r3754407  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: Kansleri Cookie Consent 1.8.8\n"
     6"Project-Id-Version: Kansleri Cookie Consent 1.8.9\n"
    77"Report-Msgid-Bugs-To: https://kansleri.fi\n"
    8 "POT-Creation-Date: 2026-10-13 12:00+0300\n"
    9 "PO-Revision-Date: 2026-10-13 12: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"
    1010"Last-Translator: Kansleri.fi\n"
    1111"Language-Team: Finnish\n"
    … …  
    22812281msgid "Crisp: keeps the chat session and visitor identity."
    22822282msgstr "Crisp: ylläpitää chat-istuntoa ja kävijän tunnistetta."
     2283
     2284#: includes/class-admin.php
     2285msgid "Cookie policy link text"
     2286msgstr "Evästekäytäntö-linkin teksti"
     2287
     2288#: includes/class-admin.php
     2289msgid "Cookie settings label"
     2290msgstr "Evästeasetusten teksti"
     2291
     2292#: includes/class-admin.php
     2293msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link."
     2294msgstr "Kelluvan painikkeen työkaluvihje ja ruudunlukijan nimi sekä [kncc_cookie_settings]-linkin oletusteksti."
     2295
     2296#: includes/class-admin.php
     2297msgid "Banner label for screen readers"
     2298msgstr "Bannerin nimi ruudunlukijoille"
     2299
     2300#: includes/class-admin.php
     2301msgid "Cookie categories"
     2302msgstr "Evästekategoriat"
     2303
     2304#: includes/class-admin.php
     2305msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language."
     2306msgstr "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
     2309msgid "Text when no cookies are used"
     2310msgstr "Teksti, kun evästeitä ei käytetä"
     2311
     2312#: includes/class-admin.php
     2313msgid "Blocked analytics content message"
     2314msgstr "Estetyn analytiikkasisällön viesti"
     2315
     2316#: includes/class-admin.php
     2317msgid "Blocked analytics content accept button"
     2318msgstr "Estetyn analytiikkasisällön hyväksy-painike"
     2319
     2320#: includes/class-admin.php
     2321msgid "Shown over blocked content that needs analytics cookies, such as a review widget."
     2322msgstr "Näytetään analytiikkaevästeitä vaativan estetyn sisällön päällä, esimerkiksi arvosteluwidgetissä."
     2323
     2324#: includes/class-admin.php
     2325msgid "Blocked preferences content message"
     2326msgstr "Estetyn mieltymyssisällön viesti"
     2327
     2328#: includes/class-admin.php
     2329msgid "Blocked preferences content accept button"
     2330msgstr "Estetyn mieltymyssisällön hyväksy-painike"
     2331
     2332#: includes/class-admin.php
     2333msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget."
     2334msgstr "Näytetään mieltymysevästeitä vaativan estetyn sisällön päällä, esimerkiksi chat- tai ajanvarauswidgetissä."
     2335
     2336#: includes/class-admin.php
     2337msgid "Policy page texts"
     2338msgstr "Tietosuojasivun tekstit"
     2339
     2340#: includes/class-admin.php
     2341msgid "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."
     2342msgstr "[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
     2345msgid "Category descriptions"
     2346msgstr "Kategorioiden kuvaukset"
     2347
     2348#: includes/class-admin.php
     2349msgid "Consent status"
     2350msgstr "Suostumuksen tila"
     2351
     2352#: includes/class-admin.php
     2353msgid "Heading"
     2354msgstr "Otsikko"
     2355
     2356#: includes/class-admin.php
     2357msgid "Before the visitor chooses"
     2358msgstr "Ennen kävijän valintaa"
     2359
     2360#: includes/class-admin.php
     2361msgid "Technical note (shown when WP Consent API is active)"
     2362msgstr "Tekninen huomautus (näytetään, kun WP Consent API on käytössä)"
     2363
     2364#: includes/class-admin.php
     2365msgid "Buttons and messages"
     2366msgstr "Painikkeet ja viestit"
     2367
     2368#: includes/class-admin.php
     2369msgid "Edit preferences button"
     2370msgstr "Muokkaa asetuksia -painike"
     2371
     2372#: includes/class-admin.php
     2373msgid "Message when no cookies are registered"
     2374msgstr "Viesti, kun evästeitä ei ole rekisteröity"
     2375
     2376#: includes/class-admin.php
     2377msgid "Table column headings"
     2378msgstr "Taulukon sarakeotsikot"
  • kansleri-cookie-consent/trunk/languages/kansleri-cookie-consent.pot

    r3746047 r3754407  
    77msgid ""
    88msgstr ""
    9 "Project-Id-Version: Kansleri Cookie Consent 1.8.8\n"
     9"Project-Id-Version: Kansleri Cookie Consent 1.8.9\n"
    1010"Report-Msgid-Bugs-To: https://kansleri.fi\n"
    11 "POT-Creation-Date: 2026-10-13 12:00+0300\n"
     11"POT-Creation-Date: 2026-10-19 12:00+0300\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    19541954msgid "Crisp: keeps the chat session and visitor identity."
    19551955msgstr ""
     1956
     1957#: includes/class-admin.php
     1958msgid "Cookie policy link text"
     1959msgstr ""
     1960
     1961#: includes/class-admin.php
     1962msgid "Cookie settings label"
     1963msgstr ""
     1964
     1965#: includes/class-admin.php
     1966msgid "Tooltip and screen reader label of the floating button, and the default text of the [kncc_cookie_settings] link."
     1967msgstr ""
     1968
     1969#: includes/class-admin.php
     1970msgid "Banner label for screen readers"
     1971msgstr ""
     1972
     1973#: includes/class-admin.php
     1974msgid "Cookie categories"
     1975msgstr ""
     1976
     1977#: includes/class-admin.php
     1978msgid "Names and descriptions shown when visitors open Customize. Leave a field empty to use the built-in text, which is translated into each language."
     1979msgstr ""
     1980
     1981#: includes/class-admin.php
     1982msgid "Text when no cookies are used"
     1983msgstr ""
     1984
     1985#: includes/class-admin.php
     1986msgid "Blocked analytics content message"
     1987msgstr ""
     1988
     1989#: includes/class-admin.php
     1990msgid "Blocked analytics content accept button"
     1991msgstr ""
     1992
     1993#: includes/class-admin.php
     1994msgid "Shown over blocked content that needs analytics cookies, such as a review widget."
     1995msgstr ""
     1996
     1997#: includes/class-admin.php
     1998msgid "Blocked preferences content message"
     1999msgstr ""
     2000
     2001#: includes/class-admin.php
     2002msgid "Blocked preferences content accept button"
     2003msgstr ""
     2004
     2005#: includes/class-admin.php
     2006msgid "Shown over blocked content that needs preference cookies, such as a chat or booking widget."
     2007msgstr ""
     2008
     2009#: includes/class-admin.php
     2010msgid "Policy page texts"
     2011msgstr ""
     2012
     2013#: includes/class-admin.php
     2014msgid "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."
     2015msgstr ""
     2016
     2017#: includes/class-admin.php
     2018msgid "Category descriptions"
     2019msgstr ""
     2020
     2021#: includes/class-admin.php
     2022msgid "Consent status"
     2023msgstr ""
     2024
     2025#: includes/class-admin.php
     2026msgid "Heading"
     2027msgstr ""
     2028
     2029#: includes/class-admin.php
     2030msgid "Before the visitor chooses"
     2031msgstr ""
     2032
     2033#: includes/class-admin.php
     2034msgid "Technical note (shown when WP Consent API is active)"
     2035msgstr ""
     2036
     2037#: includes/class-admin.php
     2038msgid "Buttons and messages"
     2039msgstr ""
     2040
     2041#: includes/class-admin.php
     2042msgid "Edit preferences button"
     2043msgstr ""
     2044
     2045#: includes/class-admin.php
     2046msgid "Message when no cookies are registered"
     2047msgstr ""
     2048
     2049#: includes/class-admin.php
     2050msgid "Table column headings"
     2051msgstr ""
  • kansleri-cookie-consent/trunk/readme.txt

    r3746047 r3754407  
    44Requires at least: 6.0
    55Tested up to: 7.1
    6 Stable tag: 1.8.8
     6Stable tag: 1.8.9
    77Requires PHP: 7.4
    88License: GPLv2 or later
    … …  
    113113== Changelog ==
    114114
     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
    115119= 1.8.8 =
    116120* 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.