Plugin Directory

Changeset 3471317


Ignore:
Timestamp:
02/27/2026 07:42:17 PM (4 weeks ago)
Author:
redshape
Message:

1.5.1

Location:
redshape-easy-labels
Files:
9 deleted
28 edited

Legend:

Unmodified
Added
Removed
  • redshape-easy-labels/trunk/assets/css/admin-settings.css

    r3465229 r3471317  
    1414.labels-container {
    1515    display: grid;
    16     grid-template-columns: repeat(2, 1fr);
     16    grid-template-columns: repeat(1, 1fr);
    1717    gap: 20px;
    1818    margin-bottom: 20px;
     
    4747    background: #f6f7f7;
    4848    border-bottom: 1px solid #e1e3e6;
     49    cursor: pointer;
     50    user-select: none;
    4951}
    5052
    5153.label-preview-large {
    5254    flex-grow: 1;
     55    display: flex;
     56    align-items: center;
     57    flex-wrap: wrap;
     58    gap: 8px;
    5359}
    5460
     
    9096}
    9197
     98.label-header-post-types {
     99    display: flex;
     100    flex-wrap: wrap;
     101    gap: 4px;
     102    align-items: center;
     103}
     104
     105.header-post-type-badge {
     106    display: inline-block;
     107    padding: 2px 8px;
     108    background: #e8f0fe;
     109    color: #2271b1;
     110    border-radius: 10px;
     111    font-size: 11px;
     112    font-weight: 500;
     113    border: 1px solid #c5d9f5;
     114    white-space: nowrap;
     115}
     116
     117.label-header-actions {
     118    display: flex;
     119    align-items: center;
     120    gap: 8px;
     121}
     122
     123.toggle-label-btn {
     124    background: #f0f0f1;
     125    color: #50575e;
     126    border: 1px solid #c3c4c7;
     127    border-radius: 50%;
     128    width: 32px;
     129    height: 32px;
     130    cursor: pointer;
     131    transition: all 0.3s ease;
     132    display: flex;
     133    align-items: center;
     134    justify-content: center;
     135    flex-shrink: 0;
     136}
     137
     138.toggle-label-btn:hover {
     139    background: #2271b1;
     140    color: white;
     141    border-color: #2271b1;
     142}
     143
     144.toggle-label-btn .dashicons {
     145    font-size: 16px;
     146    width: 16px;
     147    height: 16px;
     148    transition: transform 0.3s ease;
     149}
     150
     151.label-editor-card.collapsed .toggle-label-btn .dashicons {
     152    transform: rotate(-90deg);
     153}
     154
     155.label-editor-card.collapsed .label-editor-header {
     156    border-bottom-color: transparent;
     157}
     158
    92159.label-editor-body {
    93160    padding: 20px;
     161    max-height: 2000px;
     162    overflow: hidden;
     163    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
     164    opacity: 1;
     165}
     166
     167.label-editor-card.collapsed .label-editor-body {
     168    max-height: 0;
     169    padding-top: 0;
     170    padding-bottom: 0;
     171    opacity: 0;
    94172}
    95173
     
    229307    flex-direction: column;
    230308    gap: 24px;
    231     max-width: 800px;
     309    max-width: 100%;
    232310}
    233311
     
    359437
    360438.post-types-container {
    361     max-width: 1000px;
     439    max-width: 100%;
    362440}
    363441
     
    367445    gap: 20px;
    368446    padding: 24px;
     447    height: 80px;
    369448    background: #fff;
    370449    border: 1px solid #c3c4c7;
     
    402481.post-types-grid {
    403482    display: grid;
    404     grid-template-columns: repeat(2, 1fr);
     483    grid-template-columns: repeat(3, 1fr);
    405484    gap: 16px;
    406485}
     
    415494    display: block;
    416495    background: #fff;
    417     border: 2px solid #e1e3e6;
     496    border: 1px solid #c3c4c7;
    418497    border-radius: 8px;
    419498    cursor: pointer;
     
    426505    border-color: #2271b1;
    427506    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    428     transform: translateY(-2px);
    429507}
    430508
     
    548626
    549627.language-container {
    550     max-width: 1000px;
     628    max-width: 100%;
    551629}
    552630
     
    599677    display: block;
    600678    background: #fff;
    601     border: 2px solid #e1e3e6;
     679    border: 1px solid #c3c4c7;
    602680    border-radius: 8px;
    603681    cursor: pointer;
     
    610688    border-color: #2271b1;
    611689    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    612     transform: translateY(-2px);
    613690}
    614691
     
    10671144.general-settings-container {
    10681145    display: grid;
    1069     grid-template-columns: repeat(2, 1fr);
     1146    grid-template-columns: repeat(1, 1fr);
    10701147    gap: 20px;
    10711148    max-width: none;
     
    10801157.setting-section {
    10811158    background: #fff;
    1082     border: 1px solid #dcdcde;
     1159    border: 1px solid #c3c4c7;
    10831160    border-radius: 8px;
    10841161    padding: 24px;
    10851162    margin-bottom: 20px;
    10861163    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
     1164    transition: all 0.3s ease;
    10871165}
    10881166
    10891167.setting-section:hover {
    1090     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
     1168    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
     1169    border-color: #2271b1;
    10911170}
    10921171
     
    11081187.setting-section .border-style-options {
    11091188    display: flex;
    1110     flex-direction: column;
     1189    flex-direction: row;
    11111190    gap: 12px;
    11121191}
     
    11211200    transition: all 0.2s ease;
    11221201    background: #fff;
     1202    width: 100%;
    11231203}
    11241204
     
    11901270
    11911271.backup-restore-container {
    1192     max-width: 900px;
     1272    max-width: 100%;
    11931273}
    11941274
     
    14351515    gap: 24px;
    14361516    margin: 32px 0;
    1437     max-width: 1200px;
     1517    max-width: 100%;
    14381518}
    14391519
    14401520.support-card {
    14411521    background: #fff;
    1442     border: 2px solid #e0e0e0;
     1522    border: 1px solid #c3c4c7;
    14431523    border-radius: 12px;
    14441524    padding: 32px 24px;
     
    14501530
    14511531.support-card:hover {
    1452     transform: translateY(-4px);
    1453     box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
     1532    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    14541533    border-color: #2271b1;
    14551534}
     
    16081687.widgets-container {
    16091688    display: grid;
    1610     grid-template-columns: repeat(2, 1fr);
     1689    grid-template-columns: repeat(1, 1fr);
    16111690    gap: 20px;
    16121691    margin-bottom: 20px;
     
    16411720    background: #f6f7f7;
    16421721    border-bottom: 1px solid #e1e3e6;
     1722    cursor: pointer;
     1723    user-select: none;
    16431724}
    16441725
    16451726.widget-preview-large {
    16461727    flex-grow: 1;
     1728    display: flex;
     1729    align-items: center;
     1730    flex-wrap: wrap;
     1731    gap: 8px;
    16471732}
    16481733
     
    16721757}
    16731758
     1759.widget-header-info {
     1760    display: flex;
     1761    flex-wrap: wrap;
     1762    gap: 4px;
     1763    align-items: center;
     1764}
     1765
     1766.header-widget-viz-badge {
     1767    display: inline-block;
     1768    padding: 2px 8px;
     1769    background: #e8f5e8;
     1770    color: #2e7d32;
     1771    border-radius: 10px;
     1772    font-size: 11px;
     1773    font-weight: 500;
     1774    border: 1px solid #b8ddb8;
     1775    white-space: nowrap;
     1776}
     1777
     1778.widget-header-actions {
     1779    display: flex;
     1780    align-items: center;
     1781    gap: 8px;
     1782}
     1783
     1784.toggle-widget-btn {
     1785    background: #f0f0f1;
     1786    color: #50575e;
     1787    border: 1px solid #c3c4c7;
     1788    border-radius: 50%;
     1789    width: 32px;
     1790    height: 32px;
     1791    cursor: pointer;
     1792    transition: all 0.3s ease;
     1793    display: flex;
     1794    align-items: center;
     1795    justify-content: center;
     1796    flex-shrink: 0;
     1797}
     1798
     1799.toggle-widget-btn:hover {
     1800    background: #2271b1;
     1801    color: white;
     1802    border-color: #2271b1;
     1803}
     1804
     1805.toggle-widget-btn .dashicons {
     1806    font-size: 16px;
     1807    width: 16px;
     1808    height: 16px;
     1809    transition: transform 0.3s ease;
     1810}
     1811
     1812.widget-editor-card.collapsed .toggle-widget-btn .dashicons {
     1813    transform: rotate(-90deg);
     1814}
     1815
     1816.widget-editor-card.collapsed .widget-editor-header {
     1817    border-bottom-color: transparent;
     1818}
     1819
    16741820.widget-editor-body {
    16751821    padding: 20px;
     1822    max-height: 2000px;
     1823    overflow: hidden;
     1824    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
     1825    opacity: 1;
     1826}
     1827
     1828.widget-editor-card.collapsed .widget-editor-body {
     1829    max-height: 0;
     1830    padding-top: 0;
     1831    padding-bottom: 0;
     1832    opacity: 0;
    16761833}
    16771834
  • redshape-easy-labels/trunk/assets/js/admin.js

    r3468585 r3471317  
    16791679                        <div class="redshape-modal-info">
    16801680                            <span class="dashicons dashicons-info"></span>
    1681                             <p>${__('The label will be created and immediately available for all content types.')}</p>
     1681                            <p>${__('The label will be created and configured only for the current content type.')}</p>
    16821682                        </div>
    16831683                    </div>
     
    17181718        const $modal = $('#quick-create-label-modal');
    17191719       
     1720        // Detect current post type from body class or URL
     1721        const bodyMatch = $('body').attr('class').match(/post-type-(\w+)/);
     1722        const urlParams = new URLSearchParams(window.location.search);
     1723        const currentPostType = bodyMatch ? bodyMatch[1] : (urlParams.get('post_type') || 'post');
     1724        $modal.data('current-post-type', currentPostType);
     1725       
    17201726        // Reset form
    17211727        $('#quick-label-name').val('');
     
    17601766        const labelName = $('#quick-label-name').val().trim();
    17611767        const labelColor = $('#quick-label-color').val();
     1768        const postType = $('#quick-create-label-modal').data('current-post-type') || 'post';
    17621769       
    17631770        if (!labelName) {
     
    17781785                label_name: labelName,
    17791786                label_color: labelColor,
     1787                post_type: postType,
    17801788                auto_assign: false
    17811789            },
     
    18061814        const labelName = $('#quick-label-name').val().trim();
    18071815        const labelColor = $('#quick-label-color').val();
     1816        const postType = $('#quick-create-label-modal').data('current-post-type') || 'post';
    18081817       
    18091818        if (!labelName) {
     
    18301839                label_color: labelColor,
    18311840                post_id: postId,
     1841                post_type: postType,
    18321842                auto_assign: true
    18331843            },
     
    19581968                        '<span class="widget-preview-title">' + __('New Widget') + '</span>' +
    19591969                    '</span>' +
     1970                    '<div class="widget-header-info">' +
     1971                        '<span class="header-widget-viz-badge">' + __('Pie Chart') + '</span>' +
     1972                    '</div>' +
    19601973                '</div>' +
    1961                 '<button type="button" class="remove-widget-btn" title="' + __('Remove Widget') + '">' +
    1962                     '<span class="dashicons dashicons-trash"></span>' +
    1963                 '</button>' +
     1974                '<div class="widget-header-actions">' +
     1975                    '<button type="button" class="toggle-widget-btn" title="Toggle">' +
     1976                        '<span class="dashicons dashicons-arrow-down-alt2"></span>' +
     1977                    '</button>' +
     1978                    '<button type="button" class="remove-widget-btn" title="' + __('Remove Widget') + '">' +
     1979                        '<span class="dashicons dashicons-trash"></span>' +
     1980                    '</button>' +
     1981                '</div>' +
    19641982            '</div>' +
    19651983            '<div class="widget-editor-body">' +
     
    20392057   
    20402058    /**
     2059     * Handle toggle widget card collapse - click on entire header bar
     2060     */
     2061    $(document).on('click', '.widget-editor-header', function(e) {
     2062        if ($(e.target).closest('.widget-header-actions').length) return;
     2063        $(this).closest('.widget-editor-card').toggleClass('collapsed');
     2064    });
     2065
     2066    /**
     2067     * Handle toggle widget card collapse
     2068     */
     2069    $(document).on('click', '.toggle-widget-btn', function(e) {
     2070        e.preventDefault();
     2071        e.stopPropagation();
     2072        $(this).closest('.widget-editor-card').toggleClass('collapsed');
     2073    });
     2074
     2075    /**
    20412076     * Handle "Remove Widget" button click - IDENTICAL TO LABELS
    20422077     */
     
    22442279        $card.find('.widget-preview-title').text(newTitle);
    22452280    });
    2246    
     2281
     2282    /**
     2283     * Rebuild the post-type + viz-type badges in the collapsed widget card header
     2284     */
     2285    function updateWidgetHeaderInfo($card) {
     2286        var ptKey  = $card.find('.widget-post-type-select').val();
     2287        var vizKey = $card.find('.widget-visualization-select').val() || 'pie_chart';
     2288        var availablePostTypes = (typeof redshapeEasylabelsSettings !== 'undefined' && redshapeEasylabelsSettings.post_types)
     2289            ? redshapeEasylabelsSettings.post_types : {};
     2290        var vizLabels = {
     2291            'pie_chart':   __('Pie Chart'),
     2292            'donut_chart': __('Donut Chart'),
     2293            'bar_chart':   __('Bar Chart'),
     2294            'list_view':   __('List View'),
     2295            'stats_cards': __('Statistics Cards')
     2296        };
     2297        var html = '';
     2298        if (ptKey && availablePostTypes[ptKey]) {
     2299            html += '<span class="header-post-type-badge">' + availablePostTypes[ptKey].label + '</span>';
     2300        }
     2301        html += '<span class="header-widget-viz-badge">' + (vizLabels[vizKey] || vizKey) + '</span>';
     2302        $card.find('.widget-header-info').html(html);
     2303    }
     2304
     2305    /**
     2306     * Update header badges when visualization type changes
     2307     */
     2308    $(document).on('change', '.widget-visualization-select', function() {
     2309        updateWidgetHeaderInfo($(this).closest('.widget-editor-card'));
     2310    });
     2311
    22472312    /**
    22482313     * Filter labels when content type changes
     
    22502315    $(document).on('change', '.widget-post-type-select', function() {
    22512316        var $card = $(this).closest('.widget-editor-card');
     2317        updateWidgetHeaderInfo($card);
    22522318        var selectedPostType = $(this).val();
    22532319        var $labelsContainer = $card.find('.widget-labels-inclusion');
  • redshape-easy-labels/trunk/includes/admin-page.php

    r3468585 r3471317  
    240240                foreach ($redshape_easylabels_labels as $redshape_easylabels_key => $redshape_easylabels_label):
    241241                ?>
    242                 <div class="label-editor-card" data-index="<?php echo absint($redshape_easylabels_counter); ?>">
     242                <div class="label-editor-card collapsed" data-index="<?php echo absint($redshape_easylabels_counter); ?>">
    243243                    <div class="label-editor-header">
    244244                        <div class="label-preview-large">
     
    246246                                <?php echo esc_html($redshape_easylabels_label['name']); ?>
    247247                            </span>
    248                         </div>
    249                         <button type="button" class="remove-label-btn" title="<?php redshape_easylabels_cl_e('Remove label'); ?>">
    250                             <span class="dashicons dashicons-trash"></span>
    251                         </button>
     248                            <div class="label-header-post-types">
     249                                <?php
     250                                $redshape_easylabels_header_enabled_pts  = isset($redshape_easylabels_role_settings['enabled_post_types']) ? $redshape_easylabels_role_settings['enabled_post_types'] : array('post', 'page');
     251                                $redshape_easylabels_header_selected_pts = isset($redshape_easylabels_label['post_types']) ? $redshape_easylabels_label['post_types'] : array();
     252                                $redshape_easylabels_header_show_pts     = empty($redshape_easylabels_header_selected_pts) ? $redshape_easylabels_header_enabled_pts : $redshape_easylabels_header_selected_pts;
     253                                foreach ($redshape_easylabels_header_show_pts as $redshape_easylabels_header_pt_key):
     254                                    if (isset($redshape_easylabels_post_types[$redshape_easylabels_header_pt_key])): ?>
     255                                    <span class="header-post-type-badge"><?php echo esc_html(Redshape_Easylabels_I18n::get_post_type_name($redshape_easylabels_header_pt_key)); ?></span>
     256                                <?php   endif;
     257                                endforeach; ?>
     258                            </div>
     259                        </div>
     260                        <div class="label-header-actions">
     261                            <button type="button" class="toggle-label-btn" title="<?php redshape_easylabels_cl_e('Toggle'); ?>">
     262                                <span class="dashicons dashicons-arrow-down-alt2"></span>
     263                            </button>
     264                            <button type="button" class="remove-label-btn" title="<?php redshape_easylabels_cl_e('Remove label'); ?>">
     265                                <span class="dashicons dashicons-trash"></span>
     266                            </button>
     267                        </div>
    252268                    </div>
    253269                   
     
    795811                </div>
    796812                <div class="intro-content">
    797                     <h3><?php redshape_easylabels_cl_e('Select interface language'); ?></h3>
    798                     <p><?php redshape_easylabels_cl_e('Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language.'); ?></p>
     813                    <h3><?php redshape_easylabels_cl_e('Select content interface language'); ?></h3>
     814                    <p><?php redshape_easylabels_cl_e('Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language.'); ?></p>
    799815                </div>
    800816            </div>
     
    935951                foreach ($redshape_easylabels_dashboard_widgets as $redshape_easylabels_widget_key => $redshape_easylabels_widget):
    936952                ?>
    937                 <div class="widget-editor-card" data-index="<?php echo absint($redshape_easylabels_widget_counter); ?>">
     953                <div class="widget-editor-card collapsed" data-index="<?php echo absint($redshape_easylabels_widget_counter); ?>">
    938954                    <div class="widget-editor-header">
    939955                        <div class="widget-preview-large">
     
    942958                                <span class="widget-preview-title"><?php echo esc_html($redshape_easylabels_widget['title']); ?></span>
    943959                            </span>
    944                         </div>
    945                         <button type="button" class="remove-widget-btn" title="<?php redshape_easylabels_cl_e('Remove Widget'); ?>">
    946                             <span class="dashicons dashicons-trash"></span>
    947                         </button>
     960                            <div class="widget-header-info">
     961                                <?php
     962                                if ( ! empty( $redshape_easylabels_widget['post_type'] ) && isset( $redshape_easylabels_post_types_js[ $redshape_easylabels_widget['post_type'] ] ) ) :
     963                                ?><span class="header-post-type-badge"><?php echo esc_html( $redshape_easylabels_post_types_js[ $redshape_easylabels_widget['post_type'] ]['label'] ); ?></span><?php
     964                                endif;
     965                                $redshape_easylabels_header_viz_labels = array(
     966                                    'pie_chart'   => __( 'Pie Chart', 'redshape-easy-labels' ),
     967                                    'donut_chart' => __( 'Donut Chart', 'redshape-easy-labels' ),
     968                                    'bar_chart'   => __( 'Bar Chart', 'redshape-easy-labels' ),
     969                                    'list_view'   => __( 'List View', 'redshape-easy-labels' ),
     970                                    'stats_cards' => __( 'Statistics Cards', 'redshape-easy-labels' ),
     971                                );
     972                                $redshape_easylabels_header_viz_key  = isset( $redshape_easylabels_widget['visualization_type'] ) ? $redshape_easylabels_widget['visualization_type'] : 'pie_chart';
     973                                $redshape_easylabels_header_viz_name = isset( $redshape_easylabels_header_viz_labels[ $redshape_easylabels_header_viz_key ] ) ? $redshape_easylabels_header_viz_labels[ $redshape_easylabels_header_viz_key ] : $redshape_easylabels_header_viz_key;
     974                                ?><span class="header-widget-viz-badge"><?php echo esc_html( $redshape_easylabels_header_viz_name ); ?></span>
     975                            </div>
     976                        </div>
     977                        <div class="widget-header-actions">
     978                            <button type="button" class="toggle-widget-btn" title="<?php redshape_easylabels_cl_e('Toggle'); ?>">
     979                                <span class="dashicons dashicons-arrow-down-alt2"></span>
     980                            </button>
     981                            <button type="button" class="remove-widget-btn" title="<?php redshape_easylabels_cl_e('Remove Widget'); ?>">
     982                                <span class="dashicons dashicons-trash"></span>
     983                            </button>
     984                        </div>
    948985                    </div>
    949986                   
  • redshape-easy-labels/trunk/includes/class-redshape-easylabels-ajax.php

    r3468639 r3471317  
    174174        $label_color      = isset( $_POST['label_color'] ) ? sanitize_hex_color( wp_unslash( $_POST['label_color'] ) )           : '#007cba';
    175175        $post_id          = isset( $_POST['post_id'] )     ? intval( wp_unslash( $_POST['post_id'] ) )                           : 0;
     176        $post_type        = isset( $_POST['post_type'] )   ? sanitize_key( wp_unslash( $_POST['post_type'] ) )                   : '';
    176177        // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
    177178        $auto_assign_raw  = isset( $_POST['auto_assign'] ) ? wp_unslash( $_POST['auto_assign'] ) : false;
     
    194195            'name'       => $label_name,
    195196            'color'      => $label_color,
    196             'post_types' => array(),
     197            'post_types' => ! empty( $post_type ) ? array( $post_type ) : array(),
    197198        );
    198199        $options['default_labels'] = $labels;
  • redshape-easy-labels/trunk/includes/class-redshape-easylabels-i18n.php

    r3468610 r3471317  
    220220            // Lingua
    221221            'Language Settings' => 'Impostazioni Lingua',
    222             'Select interface language' => 'Seleziona la lingua dell\'interfaccia',
    223             'Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language.' => 'Scegli la lingua in cui visualizzare tutte le etichette, i pulsanti e i messaggi del plugin. Questa impostazione è indipendente dalla lingua di WordPress.',
     222            'Select content interface language' => 'Seleziona la lingua dell\'interfaccia contenuti',
     223            'Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language.' => 'Scegli la lingua per l\'interfaccia operativa: etichette contenuto, barra filtri, note, modali e widget della dashboard. La pagina delle impostazioni segue sempre la lingua del sito WordPress.',
    224224            'How does it work?' => 'Come funziona?',
    225             'Selected language will be applied to all plugin interfaces' => 'La lingua selezionata verrà applicata a tutte le interfacce del plugin',
    226             'This setting is independent of WordPress language' => 'Questa impostazione è indipendente dalla lingua di WordPress',
     225            'Selected language will be applied to the operational interface (labels, filters, modals, widgets)' => 'La lingua selezionata verrà applicata all\'interfaccia operativa (etichette, filtri, modali, widget)',
     226            'The settings page always follows the WordPress site language' => 'La pagina delle impostazioni segue sempre la lingua del sito WordPress',
    227227            'Labels and notes you created will remain unchanged' => 'Le etichette e le note che hai creato rimarranno invariate',
    228228            'Change language anytime without losing your data' => 'Cambia lingua in qualsiasi momento senza perdere i tuoi dati',
     229            // Chiavi legacy per compatibilità con i file .mo esistenti
     230            'Select interface language' => 'Seleziona la lingua dell\'interfaccia contenuti',
     231            'Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language.' => 'Scegli la lingua per l\'interfaccia operativa: etichette contenuto, barra filtri, note, modali e widget della dashboard. La pagina delle impostazioni segue sempre la lingua del sito WordPress.',
     232            'Selected language will be applied to all plugin interfaces' => 'La lingua selezionata verrà applicata all\'interfaccia operativa (etichette, filtri, modali, widget)',
     233            'This setting is independent of WordPress language' => 'La pagina delle impostazioni segue sempre la lingua del sito WordPress',
    229234           
    230235            // Messaggi generali
     
    345350            'Non hai i permessi per creare etichette' => 'Non hai i permessi per creare etichette',
    346351            'Etichetta creata con successo' => 'Etichetta creata con successo',
    347             'The label will be created and immediately available for all content types.' => 'L\'etichetta verrà creata e sarà immediatamente disponibile per tutti i tipi di contenuto.',
     352            'The label will be created and configured only for the current content type.' => 'L\'etichetta verrà creata e configurata solo per il tipo di contenuto corrente.',
    348353        ),
    349354       
     
    533538            'Non hai i permessi per creare etichette' => 'You don\'t have permission to create labels',
    534539            'Etichetta creata con successo' => 'Label created successfully',
    535             'The label will be created and immediately available for all content types.' => 'The label will be created and immediately available for all content types.',
     540            'The label will be created and configured only for the current content type.' => 'The label will be created and configured only for the current content type.',
    536541           
    537542            // Permissions
     
    555560            // Language
    556561            'Language Settings' => 'Language Settings',
    557             'Select interface language' => 'Select interface language',
    558             'Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language.' => 'Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language.',
     562            'Select content interface language' => 'Select content interface language',
     563            'Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language.' => 'Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language.',
    559564            'How does it work?' => 'How does it work?',
    560             'Selected language will be applied to all plugin interfaces' => 'Selected language will be applied to all plugin interfaces',
    561             'This setting is independent of WordPress language' => 'This setting is independent of WordPress language',
     565            'Selected language will be applied to the operational interface (labels, filters, modals, widgets)' => 'Selected language will be applied to the operational interface (labels, filters, modals, widgets)',
     566            'The settings page always follows the WordPress site language' => 'The settings page always follows the WordPress site language',
    562567            'Labels and notes you created will remain unchanged' => 'Labels and notes you created will remain unchanged',
    563568            'Change language anytime without losing your data' => 'Change language anytime without losing your data',
     569            // Legacy keys kept for backward compat with existing .mo files
     570            'Select interface language' => 'Select content interface language',
     571            'Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language.' => 'Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language.',
     572            'Selected language will be applied to all plugin interfaces' => 'Selected language will be applied to the operational interface (labels, filters, modals, widgets)',
     573            'This setting is independent of WordPress language' => 'The settings page always follows the WordPress site language',
    564574           
    565575            // General messages
     
    946956            'Non hai i permessi per creare etichette' => 'Vous n\'avez pas la permission de créer des étiquettes',
    947957            'Etichetta creata con successo' => 'Étiquette créée avec succès',
    948             'The label will be created and immediately available for all content types.' => 'L\'étiquette sera créée et immédiatement disponible pour tous les types de contenu.',
     958            'The label will be created and configured only for the current content type.' => 'L\'étiquette sera créée et configurée uniquement pour le type de contenu actuel.',
    949959           
    950960            // Dashboard Widgets (v1.2.0)
     
    12401250            'Non hai i permessi per creare etichette' => 'Sie haben keine Berechtigung zum Erstellen von Labels',
    12411251            'Etichetta creata con successo' => 'Label erfolgreich erstellt',
    1242             'The label will be created and immediately available for all content types.' => 'Das Label wird erstellt und ist sofort für alle Inhaltstypen verfügbar.',
     1252            'The label will be created and configured only for the current content type.' => 'Das Label wird erstellt und nur für den aktuellen Inhaltstyp konfiguriert.',
    12431253           
    12441254            // Dashboard Widgets (v1.2.0)
     
    15351545            'Non hai i permessi per creare etichette' => 'No tienes permiso para crear etiquetas',
    15361546            'Etichetta creata con successo' => 'Etiqueta creada con éxito',
    1537             'The label will be created and immediately available for all content types.' => 'La etiqueta se creará y estará disponible inmediatamente para todos los tipos de contenido.',
     1547            'The label will be created and configured only for the current content type.' => 'La etiqueta se creará y configurará solo para el tipo de contenido actual.',
    15381548           
    15391549            // Dashboard Widgets (v1.2.0)
     
    18181828            'Non hai i permessi per creare etichette' => 'У вас нет разрешения на создание меток',
    18191829            'Etichetta creata con successo' => 'Метка успешно создана',
    1820             'The label will be created and immediately available for all content types.' => 'Метка будет создана и немедленно станет доступна для всех типов контента.',
     1830            'The label will be created and configured only for the current content type.' => 'Метка будет создана и настроена только для текущего типа контента.',
    18211831           
    18221832            // Dashboard Widgets (v1.2.0)
     
    21122122            'Non hai i permessi per creare etichette' => '您没有创建标签的权限',
    21132123            'Etichetta creata con successo' => '标签创建成功',
    2114             'The label will be created and immediately available for all content types.' => '标签将被创建并立即可用于所有内容类型。',
     2124            'The label will be created and configured only for the current content type.' => '标签将被创建并仅针对当前内容类型进行配置。',
    21152125           
    21162126            // Dashboard Widgets (v1.2.0)
     
    24062416            'Non hai i permessi per creare etichette' => 'ラベルを作成する権限がありません',
    24072417            'Etichetta creata con successo' => 'ラベルが正常に作成されました',
    2408             'The label will be created and immediately available for all content types.' => 'ラベルが作成され、すべてのコンテンツタイプですぐに利用できるようになります。',
     2418            'The label will be created and configured only for the current content type.' => 'ラベルが作成され、現在のコンテンツタイプのみに設定されます。',
    24092419           
    24102420            // Dashboard Widgets (v1.2.0)
     
    27002710            'Non hai i permessi per creare etichette' => '라벨을 만들 권한이 없습니다',
    27012711            'Etichetta creata con successo' => '라벨이 성공적으로 생성되었습니다',
    2702             'The label will be created and immediately available for all content types.' => '라벨이 생성되어 모든 콘텐츠 유형에서 즉시 사용할 수 있습니다.',
     2712            'The label will be created and configured only for the current content type.' => '라벨이 생성되어 현재 콘텐츠 유형에만 구성됩니다.',
    27032713           
    27042714            // Dashboard Widgets (v1.2.0)
     
    29963006            'Non hai i permessi per creare etichette' => 'आपके पास लेबल बनाने की अनुमति नहीं है',
    29973007            'Etichetta creata con successo' => 'लेबल सफलतापूर्वक बनाया गया',
    2998             'The label will be created and immediately available for all content types.' => 'लेबल बनाया जाएगा और सभी सामग्री प्रकारों के लिए तुरंत उपलब्ध होगा।',
     3008            'The label will be created and configured only for the current content type.' => 'लेबल बनाया जाएगा और केवल वर्तमान सामग्री प्रकार के लिए कॉन्फ़िगर किया जाएगा।',
    29993009           
    30003010            // Dashboard Widgets (v1.2.0)
  • redshape-easy-labels/trunk/includes/class-redshape-easylabels-settings.php

    r3468639 r3471317  
    101101        $all_roles    = $wp_roles_obj->get_names();
    102102
    103         // Post types with correct locale
    104         $plugin_locale   = Redshape_Easylabels_I18n::get_current_locale();
    105         $original_locale = get_locale();
    106         if ( $plugin_locale !== $original_locale ) {
    107             switch_to_locale( $plugin_locale );
    108         }
     103        // Post types — on the settings page the text domain is already loaded with
     104        // the WP site locale (see redshape_easylabels_load_textdomain()), so post-type
     105        // labels come out in the correct admin language without any extra switching.
    109106        $post_types = get_post_types( array( 'public' => true ), 'objects' );
    110107        unset( $post_types['attachment'] );
    111         if ( $plugin_locale !== $original_locale ) {
    112             restore_previous_locale();
    113         }
    114108
    115109        // Active tab
     
    516510            });
    517511           
    518             const newCard = '<div class=\"label-editor-card\" data-index=\"' + labelCounter + '\"><div class=\"label-editor-header\"><div class=\"label-preview-large\"><span class=\"label-badge\" style=\"background-color: #007cba;\">Nuova Etichetta</span></div><button type=\"button\" class=\"remove-label-btn\" title=\"Rimuovi etichetta\"><span class=\"dashicons dashicons-trash\"></span></button></div><div class=\"label-editor-body\"><div class=\"label-field-row\"><div class=\"label-field-group flex-grow\"><label class=\"label-field-label\">Nome etichetta</label><input type=\"text\" name=\"labels[new_' + labelCounter + '][name]\" placeholder=\"es. In Lavorazione\" class=\"label-name-input\" /><small class=\"field-description\">La chiave identificativa verrà generata automaticamente dal nome</small></div><div class=\"label-field-group\"><label class=\"label-field-label\">Colore</label><div class=\"color-picker-wrapper\"><input type=\"color\" name=\"labels[new_' + labelCounter + '][color]\" value=\"#007cba\" class=\"label-color-input\" /><span class=\"color-hex-display\">#007cba</span></div></div></div><div class=\"label-post-types\"><div class=\"label-post-types-title\"><span class=\"dashicons dashicons-admin-post\"></span>Visibile su:</div><div class=\"post-types-grid\">' + postTypesCheckboxes + '</div><small class=\"field-description\" style=\"margin-top: 8px; color: #666;\">Se nessun tipo è selezionato, l\\'etichetta sarà visibile su tutti i tipi di contenuto abilitati.</small></div><div class=\"label-display-options\" style=\"margin-top: 16px; padding-top: 16px; border-top: 1px solid #e5e5e5;\"><label class=\"label-checkbox-option\" style=\"margin-bottom: 12px;\"><input type=\"checkbox\" name=\"labels[new_' + labelCounter + '][show_percentage]\" value=\"1\" /><span class=\"checkbox-label\"><span class=\"dashicons dashicons-chart-pie\" style=\"color: #2271b1;\"></span><strong>' + showPercentageText + '</strong></span></label><small class=\"field-description\" style=\"margin-left: 24px; display: block; margin-bottom: 12px; color: #666;\">' + showPercentageDesc + '</small><label class=\"label-checkbox-option\"><input type=\"checkbox\" name=\"labels[new_' + labelCounter + '][show_fraction]\" value=\"1\" /><span class=\"checkbox-label\"><span class=\"dashicons dashicons-editor-justify\" style=\"color: #2271b1;\"></span><strong>' + showFractionText + '</strong></span></label><small class=\"field-description\" style=\"margin-left: 24px; display: block; margin-top: 4px; color: #666;\">' + showFractionDesc + '</small></div></div></div>';
     512            let postTypesHeaderHtml = '';\n            postTypesData.forEach(function(pt) {\n                postTypesHeaderHtml += '<span class=\"header-post-type-badge\">' + pt.name + '</span>';\n            });\n\n            const newCard = '<div class=\"label-editor-card\" data-index=\"' + labelCounter + '\"><div class=\"label-editor-header\"><div class=\"label-preview-large\"><span class=\"label-badge\" style=\"background-color: #007cba;\">Nuova Etichetta</span><div class=\"label-header-post-types\">' + postTypesHeaderHtml + '</div></div><div class=\"label-header-actions\"><button type=\"button\" class=\"toggle-label-btn\" title=\"Comprimi\"><span class=\"dashicons dashicons-arrow-down-alt2\"></span></button><button type=\"button\" class=\"remove-label-btn\" title=\"Rimuovi etichetta\"><span class=\"dashicons dashicons-trash\"></span></button></div></div><div class=\"label-editor-body\"><div class=\"label-field-row\"><div class=\"label-field-group flex-grow\"><label class=\"label-field-label\">Nome etichetta</label><input type=\"text\" name=\"labels[new_' + labelCounter + '][name]\" placeholder=\"es. In Lavorazione\" class=\"label-name-input\" /><small class=\"field-description\">La chiave identificativa verrà generata automaticamente dal nome</small></div><div class=\"label-field-group\"><label class=\"label-field-label\">Colore</label><div class=\"color-picker-wrapper\"><input type=\"color\" name=\"labels[new_' + labelCounter + '][color]\" value=\"#007cba\" class=\"label-color-input\" /><span class=\"color-hex-display\">#007cba</span></div></div></div><div class=\"label-post-types\"><div class=\"label-post-types-title\"><span class=\"dashicons dashicons-admin-post\"></span>Visibile su:</div><div class=\"post-types-grid\">' + postTypesCheckboxes + '</div><small class=\"field-description\" style=\"margin-top: 8px; color: #666;\">Se nessun tipo è selezionato, l\\'etichetta sarà visibile su tutti i tipi di contenuto abilitati.</small></div><div class=\"label-display-options\" style=\"margin-top: 16px; padding-top: 16px; border-top: 1px solid #e5e5e5;\"><label class=\"label-checkbox-option\" style=\"margin-bottom: 12px;\"><input type=\"checkbox\" name=\"labels[new_' + labelCounter + '][show_percentage]\" value=\"1\" /><span class=\"checkbox-label\"><span class=\"dashicons dashicons-chart-pie\" style=\"color: #2271b1;\"></span><strong>' + showPercentageText + '</strong></span></label><small class=\"field-description\" style=\"margin-left: 24px; display: block; margin-bottom: 12px; color: #666;\">' + showPercentageDesc + '</small><label class=\"label-checkbox-option\"><input type=\"checkbox\" name=\"labels[new_' + labelCounter + '][show_fraction]\" value=\"1\" /><span class=\"checkbox-label\"><span class=\"dashicons dashicons-editor-justify\" style=\"color: #2271b1;\"></span><strong>' + showFractionText + '</strong></span></label><small class=\"field-description\" style=\"margin-left: 24px; display: block; margin-top: 4px; color: #666;\">' + showFractionDesc + '</small></div></div></div>';
    519513            const newCardEl = \$(newCard).addClass('new-label').insertBefore('.add-label-placeholder');
    520514            setTimeout(function() { newCardEl.removeClass('new-label'); }, 300);
     
    595589    });
    596590   
     591    \$(document).on('click', '.label-editor-header', function(e) {
     592        if (\$(e.target).closest('.label-header-actions').length) return;
     593        \$(this).closest('.label-editor-card').toggleClass('collapsed');
     594    });
     595
     596    \$(document).on('click', '.toggle-label-btn', function(e) {
     597        e.preventDefault();
     598        e.stopPropagation();
     599        \$(this).closest('.label-editor-card').toggleClass('collapsed');
     600    });
     601
     602    function updateLabelHeaderPostTypes(card) {
     603        const \$container = card.find('.label-header-post-types');
     604        const \$checked = card.find('.post-type-checkbox input:checked');
     605        let html = '';
     606        if (\$checked.length === 0) {
     607            postTypesData.forEach(function(pt) {
     608                html += '<span class=\"header-post-type-badge\">' + pt.name + '</span>';
     609            });
     610        } else {
     611            \$checked.each(function() {
     612                const name = \$(this).closest('.post-type-checkbox').find('.post-type-name').text();
     613                html += '<span class=\"header-post-type-badge\">' + name + '</span>';
     614            });
     615        }
     616        \$container.html(html);
     617    }
     618
     619    \$(document).on('change', '.post-type-checkbox input', function() {
     620        updateLabelHeaderPostTypes(\$(this).closest('.label-editor-card'));
     621    });
     622
    597623    \$(document).on('input', '.label-name-input', function() {
    598624        const card = \$(this).closest('.label-editor-card');
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-de_DE.po

    r3468639 r3471317  
    447447msgstr "Label hinzufügen"
    448448
     449msgid "Click to remove"
     450msgstr "Zum Entfernen klicken"
     451
     452msgid "Critical error. Reload the page."
     453msgstr "Kritischer Fehler. Seite neu laden."
     454
     455msgid "Error processing response"
     456msgstr "Fehler bei der Verarbeitung der Antwort"
     457
    449458msgid "Save"
    450459msgstr "Speichern"
     
    639648msgstr "Fehler beim Erstellen des Labels"
    640649
     650msgid "Label name is required"
     651msgstr "Der Label-Name ist erforderlich"
     652
     653msgid "Check for updates"
     654msgstr "Nach Updates suchen"
     655
    641656msgid "Il nome dell'etichetta è obbligatorio"
    642657msgstr "Der Label-Name ist erforderlich"
     
    651666msgstr "Label erfolgreich erstellt"
    652667
    653 msgid "The label will be created and immediately available for all content types."
    654 msgstr "Das Label wird erstellt und ist sofort für alle Inhaltstypen verfügbar."
     668msgid "The label will be created and configured only for the current content type."
     669msgstr "Das Label wird erstellt und nur für den aktuellen Inhaltstyp konfiguriert."
    655670
    656671msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-en_US.po

    r3468639 r3471317  
    2424msgstr "Label created successfully"
    2525
     26msgid "Select interface language"
     27msgstr "Select content interface language"
     28
     29msgid "Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language."
     30msgstr "Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language."
     31
     32msgid "Selected language will be applied to all plugin interfaces"
     33msgstr "Selected language will be applied to the operational interface (labels, filters, modals, widgets)"
     34
     35msgid "This setting is independent of WordPress language"
     36msgstr "The settings page always follows the WordPress site language"
     37
    2638msgid "Settings saved successfully"
    2739msgstr "Settings saved successfully!"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-es_ES.po

    r3468639 r3471317  
    450450msgstr "Añadir etiqueta"
    451451
     452msgid "Click to remove"
     453msgstr "Clic para eliminar"
     454
     455msgid "Critical error. Reload the page."
     456msgstr "Error crítico. Recarga la página."
     457
     458msgid "Error processing response"
     459msgstr "Error al procesar la respuesta"
     460
    452461msgid "Save"
    453462msgstr "Guardar"
     
    645654msgstr "Error al crear la etiqueta"
    646655
     656msgid "Label name is required"
     657msgstr "El nombre de la etiqueta es obligatorio"
     658
     659msgid "Check for updates"
     660msgstr "Buscar actualizaciones"
     661
    647662msgid "Il nome dell'etichetta è obbligatorio"
    648663msgstr "El nombre de la etiqueta es obligatorio"
     
    657672msgstr "Etiqueta creada con éxito"
    658673
    659 msgid "The label will be created and immediately available for all content types."
    660 msgstr "La etiqueta se creará y estará disponible inmediatamente para todos los tipos de contenido."
     674msgid "The label will be created and configured only for the current content type."
     675msgstr "La etiqueta se creará y configurará solo para el tipo de contenido actual."
    661676
    662677msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-fr_FR.po

    r3468639 r3471317  
    453453msgstr "Ajouter une étiquette"
    454454
     455msgid "Click to remove"
     456msgstr "Cliquer pour supprimer"
     457
     458msgid "Critical error. Reload the page."
     459msgstr "Erreur critique. Rechargez la page."
     460
     461msgid "Error processing response"
     462msgstr "Erreur de traitement de la réponse"
     463
    455464msgid "Save"
    456465msgstr "Enregistrer"
     
    645654msgstr "Échec de la création de l'étiquette"
    646655
     656msgid "Label name is required"
     657msgstr "Le nom de l'étiquette est obligatoire"
     658
     659msgid "Check for updates"
     660msgstr "Vérifier les mises à jour"
     661
    647662msgid "Il nome dell'etichetta è obbligatorio"
    648663msgstr "Le nom de l'étiquette est obligatoire"
     
    657672msgstr "Étiquette créée avec succès"
    658673
    659 msgid "The label will be created and immediately available for all content types."
    660 msgstr "L'étiquette sera créée et immédiatement disponible pour tous les types de contenu."
     674msgid "The label will be created and configured only for the current content type."
     675msgstr "L'étiquette sera créée et configurée uniquement pour le type de contenu actuel."
    661676
    662677msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-hi_IN.po

    r3468639 r3471317  
    414414msgstr "लेबल जोड़ें"
    415415
     416msgid "Click to remove"
     417msgstr "हटाने के लिए क्लिक करें"
     418
     419msgid "Critical error. Reload the page."
     420msgstr "गंभीर त्रुटि। पृष्ठ पुनः लोड करें।"
     421
     422msgid "Error processing response"
     423msgstr "प्रतिक्रिया प्रसंस्करण में त्रुटि"
     424
    416425msgid "Save"
    417426msgstr "सहेजें"
     
    615624msgstr "लेबल बनाने में विफल"
    616625
     626msgid "Label name is required"
     627msgstr "लेबल नाम आवश्यक है"
     628
     629msgid "Check for updates"
     630msgstr "अपडेट जाँचें"
     631
    617632msgid "Il nome dell'etichetta è obbligatorio"
    618633msgstr "लेबल नाम आवश्यक है"
     
    627642msgstr "लेबल सफलतापूर्वक बनाया गया"
    628643
    629 msgid "The label will be created and immediately available for all content types."
    630 msgstr "लेबल बनाया जाएगा और सभी सामग्री प्रकारों के लिए तुरंत उपलब्ध होगा।"
     644msgid "The label will be created and configured only for the current content type."
     645msgstr "लेबल बनाया जाएगा और केवल वर्तमान सामग्री प्रकार के लिए कॉन्फ़िगर किया जाएगा।"
    631646
    632647msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-it_IT.po

    r3468639 r3471317  
    498498msgstr "Impostazioni Lingua"
    499499
    500 msgid "Select interface language"
    501 msgstr "Seleziona la lingua dell'interfaccia"
    502 
    503 msgid "Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language."
    504 msgstr "Scegli la lingua in cui visualizzare tutte le etichette, i pulsanti e i messaggi del plugin. Questa impostazione è indipendente dalla lingua di WordPress."
     500msgid "Select content interface language"
     501msgstr "Seleziona la lingua dell'interfaccia contenuti"
     502
     503msgid "Choose the language for the operational interface: content labels, filter bar, notes, modals and dashboard widgets. The settings page always follows the WordPress site language."
     504msgstr "Scegli la lingua per l'interfaccia operativa: etichette contenuto, barra filtri, note, modali e widget della dashboard. La pagina delle impostazioni segue sempre la lingua del sito WordPress."
    505505
    506506msgid "How does it work?"
    507507msgstr "Come funziona?"
    508508
    509 msgid "Selected language will be applied to all plugin interfaces"
    510 msgstr "La lingua selezionata verrà applicata a tutte le interfacce del plugin"
    511 
    512 msgid "This setting is independent of WordPress language"
    513 msgstr "Questa impostazione è indipendente dalla lingua di WordPress"
     509msgid "Selected language will be applied to the operational interface (labels, filters, modals, widgets)"
     510msgstr "La lingua selezionata verrà applicata all'interfaccia operativa (etichette, filtri, modali, widget)"
     511
     512msgid "The settings page always follows the WordPress site language"
     513msgstr "La pagina delle impostazioni segue sempre la lingua del sito WordPress"
    514514
    515515msgid "Labels and notes you created will remain unchanged"
     
    519519msgstr "Cambia lingua in qualsiasi momento senza perdere i tuoi dati"
    520520
     521msgid "Select interface language"
     522msgstr "Seleziona la lingua dell'interfaccia contenuti"
     523
     524msgid "Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language."
     525msgstr "Scegli la lingua per l'interfaccia operativa: etichette contenuto, barra filtri, note, modali e widget della dashboard. La pagina delle impostazioni segue sempre la lingua del sito WordPress."
     526
     527msgid "Selected language will be applied to all plugin interfaces"
     528msgstr "La lingua selezionata verrà applicata all'interfaccia operativa (etichette, filtri, modali, widget)"
     529
     530msgid "This setting is independent of WordPress language"
     531msgstr "La pagina delle impostazioni segue sempre la lingua del sito WordPress"
     532
    521533msgid "Settings saved successfully"
    522534msgstr "Impostazioni salvate con successo!"
     
    525537msgstr "Aggiungi etichetta"
    526538
     539msgid "Click to remove"
     540msgstr "Clicca per rimuovere"
     541
     542msgid "Critical error. Reload the page."
     543msgstr "Errore critico. Ricarica la pagina."
     544
     545msgid "Error processing response"
     546msgstr "Errore di elaborazione risposta"
     547
    527548msgid "Save"
    528549msgstr "Salva"
     
    687708msgstr "Il colore dell'etichetta è obbligatorio"
    688709
     710msgid "Check for updates"
     711msgstr "Controlla aggiornamenti"
     712
    689713msgid "Widget configuration error"
    690714msgstr "Errore configurazione widget"
     
    765789msgstr "Impossibile creare l'etichetta"
    766790
    767 msgid "The label will be created and immediately available for all content types."
    768 msgstr "L'etichetta verrà creata e sarà immediatamente disponibile per tutti i tipi di contenuto."
    769 
     791msgid "The label will be created and configured only for the current content type."
     792msgstr "L'etichetta verrà creata e configurata solo per il tipo di contenuto corrente."
     793
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-ja_JP.po

    r3468639 r3471317  
    414414msgstr "ラベルを追加"
    415415
     416msgid "Click to remove"
     417msgstr "クリックして削除"
     418
     419msgid "Critical error. Reload the page."
     420msgstr "重大なエラー。ページを再読み込みしてください。"
     421
     422msgid "Error processing response"
     423msgstr "レスポンスの処理中にエラーが発生しました"
     424
    416425msgid "Save"
    417426msgstr "保存"
     
    615624msgstr "ラベルの作成に失敗しました"
    616625
     626msgid "Label name is required"
     627msgstr "ラベル名は必須です"
     628
     629msgid "Check for updates"
     630msgstr "アップデートを確認"
     631
    617632msgid "Il nome dell'etichetta è obbligatorio"
    618633msgstr "ラベル名は必須です"
     
    627642msgstr "ラベルが正常に作成されました"
    628643
    629 msgid "The label will be created and immediately available for all content types."
    630 msgstr "ラベルが作成され、すべてのコンテンツタイプですぐに利用できるようになります。"
     644msgid "The label will be created and configured only for the current content type."
     645msgstr "ラベルが作成され、現在のコンテンツタイプのみに設定されます。"
    631646
    632647msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-ko_KR.po

    r3468639 r3471317  
    414414msgstr "라벨 추가"
    415415
     416msgid "Click to remove"
     417msgstr "클릭하여 제거"
     418
     419msgid "Critical error. Reload the page."
     420msgstr "심각한 오류. 페이지를 새로 고침하세요."
     421
     422msgid "Error processing response"
     423msgstr "응답 처리 중 오류 발생"
     424
    416425msgid "Save"
    417426msgstr "저장"
     
    615624msgstr "라벨 생성 실패"
    616625
     626msgid "Label name is required"
     627msgstr "라벨 이름은 필수입니다"
     628
     629msgid "Check for updates"
     630msgstr "업데이트 확인"
     631
    617632msgid "Il nome dell'etichetta è obbligatorio"
    618633msgstr "라벨 이름은 필수입니다"
     
    627642msgstr "라벨이 성공적으로 생성되었습니다"
    628643
    629 msgid "The label will be created and immediately available for all content types."
    630 msgstr "라벨이 생성되어 모든 콘텐츠 유형에서 즉시 사용할 수 있습니다."
     644msgid "The label will be created and configured only for the current content type."
     645msgstr "라벨이 생성되어 현재 콘텐츠 유형에만 구성됩니다."
    631646
    632647msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-ru_RU.po

    r3468639 r3471317  
    414414msgstr "Добавить метку"
    415415
     416msgid "Click to remove"
     417msgstr "Нажмите, чтобы удалить"
     418
     419msgid "Critical error. Reload the page."
     420msgstr "Критическая ошибка. Перезагрузите страницу."
     421
     422msgid "Error processing response"
     423msgstr "Ошибка обработки ответа"
     424
    416425msgid "Save"
    417426msgstr "Сохранить"
     
    615624msgstr "Ошибка создания метки"
    616625
     626msgid "Label name is required"
     627msgstr "Название метки обязательно"
     628
     629msgid "Check for updates"
     630msgstr "Проверить обновления"
     631
    617632msgid "Il nome dell'etichetta è obbligatorio"
    618633msgstr "Название метки обязательно"
     
    627642msgstr "Метка успешно создана"
    628643
    629 msgid "The label will be created and immediately available for all content types."
    630 msgstr "Метка будет создана и немедленно станет доступна для всех типов контента."
     644msgid "The label will be created and configured only for the current content type."
     645msgstr "Метка будет создана и настроена только для текущего типа контента."
    631646
    632647msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/languages/redshape-easy-labels-zh_CN.po

    r3468639 r3471317  
    414414msgstr "添加标签"
    415415
     416msgid "Click to remove"
     417msgstr "点击移除"
     418
     419msgid "Critical error. Reload the page."
     420msgstr "严重错误。请重新加载页面。"
     421
     422msgid "Error processing response"
     423msgstr "处理响应时出错"
     424
    416425msgid "Save"
    417426msgstr "保存"
     
    615624msgstr "创建标签失败"
    616625
     626msgid "Label name is required"
     627msgstr "标签名称为必填项"
     628
     629msgid "Check for updates"
     630msgstr "检查更新"
     631
    617632msgid "Il nome dell'etichetta è obbligatorio"
    618633msgstr "标签名称为必填项"
     
    627642msgstr "标签创建成功"
    628643
    629 msgid "The label will be created and immediately available for all content types."
    630 msgstr "标签将被创建并立即可用于所有内容类型。"
     644msgid "The label will be created and configured only for the current content type."
     645msgstr "标签将被创建并仅针对当前内容类型进行配置。"
    631646
    632647msgid "Dashboard Widgets"
  • redshape-easy-labels/trunk/readme.txt

    r3468639 r3471317  
    55Tested up to: 6.9
    66Requires PHP: 7.0
    7 Stable tag: 1.5.0
     7Stable tag: 1.5.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9393
    9494== Changelog ==
     95
     96= 1.5.1 =
     97* Improvement: Settings page (Tools > Easy Labels) now always renders in the WordPress site language — the `plugin_language` option now controls only the operational interface (content labels, filter bar, notes, modals, dashboard widgets)
     98* Fix: Removed redundant `switch_to_locale()` call in `prepare_view_data()` — post-type names on the settings page now correctly follow the WordPress site locale
     99* Improvement: Updated Language tab description and i18n strings to accurately reflect the new two-locale behaviour (settings = WP locale, operational UI = plugin language)
     100* UI: Several layout and visual improvements to the settings page — all main tab containers (support, backup, language, permissions, post-types) set to full-width layout; post-types grid updated to a 3-column layout; intro card headers and descriptions standardised for consistent two-line appearance across all tabs
     101* UI: Label and widget editor cards are now collapsible — each card has a toggle arrow button next to the delete button; existing cards load collapsed by default, newly created cards start open
     102* UI: Post-type badges now appear to the right of the coloured label badge in the collapsed label card header, showing which content types the label is assigned to; badges update dynamically when checkboxes are changed
     103* UI: Widget editor card collapsed header now shows the configured content type and visualization type as info badges; badges update dynamically when the respective selects are changed
     104* UX: Clicking anywhere on the label or widget card header bar now toggles the collapsed state (the arrow button still works as before); `cursor: pointer` added to header bars for clarity
     105* UI: All card/section hover effects across the settings page now use a consistent style — base border standardised to `1px solid #c3c4c7` and hover border to `1px solid #2271b1` with `box-shadow: 0 4px 12px rgba(0,0,0,0.08)`; removed `transform: translateY` animations and non-standard border thicknesses/colours from post-type cards, language cards, support cards and setting sections
     106* Fix: Extended `phpcs:disable/enable` block in `redshape-easy-labels.php` to correctly suppress `NonceVerification.Recommended` across the multi-line `$is_settings_page` expression (reading-only `$_GET['page']` to determine admin context)
     107* Fix: Renamed template variables in `admin-page.php` to use the `$redshape_easylabels_` plugin prefix, resolving `PrefixAllGlobals` PHPCS warnings
     108* Improvement: Labels created via the quick-create modal (from post list or meta box) are now automatically configured to be visible only on the current content type (post type), instead of all types; the modal info text updated accordingly
     109* Version bump: 1.5.0 → 1.5.1
    95110
    96111= 1.5.0 =
     
    247262== Upgrade Notice ==
    248263
     264= 1.5.1 =
     265Maintenance release. Version bump to 1.5.1.
     266
    249267= 1.5.0 =
    250268Maintenance release. Full SVN repository sync — all plugin files are now correctly distributed. Recommended update for all users.
  • redshape-easy-labels/trunk/redshape-easy-labels.php

    r3468639 r3471317  
    33 * Plugin Name: REDSHAPE Easy Labels
    44 * Description: Colored labels and internal notes system for posts and pages, visible only in backend for content organization. Supports 10 languages (IT, EN, FR, DE, ES, RU, ZH, JA, KO, HI).
    5  * Version: 1.5.0
     5 * Version: 1.5.1
    66 * Author: REDSHAPE
    77 * Author URI: https://redshape.it
     
    1818
    1919// Define plugin constants
    20 define('REDSHAPE_EASYLABELS_VERSION', '1.5.0');
     20define('REDSHAPE_EASYLABELS_VERSION', '1.5.1');
    2121define('REDSHAPE_EASYLABELS_PLUGIN_URL', plugin_dir_url(__FILE__));
    2222define('REDSHAPE_EASYLABELS_PLUGIN_PATH', plugin_dir_path(__FILE__));
     
    7474function redshape_easylabels_load_textdomain() {
    7575    $options = get_option( 'redshape_easylabels_options', array() );
    76     $locale  = isset( $options['plugin_language'] ) ? sanitize_text_field( $options['plugin_language'] ) : 'en_US';
     76
     77    // The settings/configuration page (Tools > Easy Labels) always follows the
     78    // WordPress site locale so administrators see it in their own language.
     79    // All other admin pages (list tables, post editor, widgets, AJAX responses)
     80    // use the plugin's own language setting so the operational UI is consistent
     81    // regardless of what locale individual users have set in WordPress.
     82    // phpcs:disable WordPress.Security.NonceVerification.Recommended
     83    $is_settings_page = is_admin()
     84        && isset( $_GET['page'] )
     85        && sanitize_text_field( wp_unslash( $_GET['page'] ) ) === 'redshape-easylabels-settings';
     86    // phpcs:enable WordPress.Security.NonceVerification.Recommended
     87
     88    if ( $is_settings_page ) {
     89        $locale = get_locale();
     90    } else {
     91        $locale = isset( $options['plugin_language'] ) ? sanitize_text_field( $options['plugin_language'] ) : 'en_US';
     92    }
    7793
    7894    $mo_file = REDSHAPE_EASYLABELS_PLUGIN_PATH . 'languages/redshape-easy-labels-' . $locale . '.mo';
Note: See TracChangeset for help on using the changeset viewer.