Changeset 3471317
- Timestamp:
- 02/27/2026 07:42:17 PM (4 weeks ago)
- Location:
- redshape-easy-labels
- Files:
-
- 9 deleted
- 28 edited
-
tags/1.0.0 (deleted)
-
tags/1.0.1 (deleted)
-
tags/1.1.0 (deleted)
-
tags/1.2.0 (deleted)
-
tags/1.3.0 (deleted)
-
tags/1.4.1 (deleted)
-
tags/1.4.2 (deleted)
-
tags/1.4.3 (deleted)
-
tags/1.4.4 (deleted)
-
trunk/assets/css/admin-settings.css (modified) (22 diffs)
-
trunk/assets/js/admin.js (modified) (10 diffs)
-
trunk/includes/admin-page.php (modified) (5 diffs)
-
trunk/includes/class-redshape-easylabels-ajax.php (modified) (2 diffs)
-
trunk/includes/class-redshape-easylabels-i18n.php (modified) (12 diffs)
-
trunk/includes/class-redshape-easylabels-settings.php (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-de_DE.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-de_DE.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-en_US.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-en_US.po (modified) (1 diff)
-
trunk/languages/redshape-easy-labels-es_ES.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-es_ES.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-fr_FR.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-fr_FR.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-hi_IN.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-hi_IN.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-it_IT.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-it_IT.po (modified) (5 diffs)
-
trunk/languages/redshape-easy-labels-ja_JP.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-ja_JP.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-ko_KR.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-ko_KR.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-ru_RU.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-ru_RU.po (modified) (3 diffs)
-
trunk/languages/redshape-easy-labels-zh_CN.mo (modified) (previous)
-
trunk/languages/redshape-easy-labels-zh_CN.po (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/redshape-easy-labels.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
redshape-easy-labels/trunk/assets/css/admin-settings.css
r3465229 r3471317 14 14 .labels-container { 15 15 display: grid; 16 grid-template-columns: repeat( 2, 1fr);16 grid-template-columns: repeat(1, 1fr); 17 17 gap: 20px; 18 18 margin-bottom: 20px; … … 47 47 background: #f6f7f7; 48 48 border-bottom: 1px solid #e1e3e6; 49 cursor: pointer; 50 user-select: none; 49 51 } 50 52 51 53 .label-preview-large { 52 54 flex-grow: 1; 55 display: flex; 56 align-items: center; 57 flex-wrap: wrap; 58 gap: 8px; 53 59 } 54 60 … … 90 96 } 91 97 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 92 159 .label-editor-body { 93 160 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; 94 172 } 95 173 … … 229 307 flex-direction: column; 230 308 gap: 24px; 231 max-width: 800px;309 max-width: 100%; 232 310 } 233 311 … … 359 437 360 438 .post-types-container { 361 max-width: 100 0px;439 max-width: 100%; 362 440 } 363 441 … … 367 445 gap: 20px; 368 446 padding: 24px; 447 height: 80px; 369 448 background: #fff; 370 449 border: 1px solid #c3c4c7; … … 402 481 .post-types-grid { 403 482 display: grid; 404 grid-template-columns: repeat( 2, 1fr);483 grid-template-columns: repeat(3, 1fr); 405 484 gap: 16px; 406 485 } … … 415 494 display: block; 416 495 background: #fff; 417 border: 2px solid #e1e3e6;496 border: 1px solid #c3c4c7; 418 497 border-radius: 8px; 419 498 cursor: pointer; … … 426 505 border-color: #2271b1; 427 506 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 428 transform: translateY(-2px);429 507 } 430 508 … … 548 626 549 627 .language-container { 550 max-width: 100 0px;628 max-width: 100%; 551 629 } 552 630 … … 599 677 display: block; 600 678 background: #fff; 601 border: 2px solid #e1e3e6;679 border: 1px solid #c3c4c7; 602 680 border-radius: 8px; 603 681 cursor: pointer; … … 610 688 border-color: #2271b1; 611 689 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 612 transform: translateY(-2px);613 690 } 614 691 … … 1067 1144 .general-settings-container { 1068 1145 display: grid; 1069 grid-template-columns: repeat( 2, 1fr);1146 grid-template-columns: repeat(1, 1fr); 1070 1147 gap: 20px; 1071 1148 max-width: none; … … 1080 1157 .setting-section { 1081 1158 background: #fff; 1082 border: 1px solid # dcdcde;1159 border: 1px solid #c3c4c7; 1083 1160 border-radius: 8px; 1084 1161 padding: 24px; 1085 1162 margin-bottom: 20px; 1086 1163 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); 1164 transition: all 0.3s ease; 1087 1165 } 1088 1166 1089 1167 .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; 1091 1170 } 1092 1171 … … 1108 1187 .setting-section .border-style-options { 1109 1188 display: flex; 1110 flex-direction: column;1189 flex-direction: row; 1111 1190 gap: 12px; 1112 1191 } … … 1121 1200 transition: all 0.2s ease; 1122 1201 background: #fff; 1202 width: 100%; 1123 1203 } 1124 1204 … … 1190 1270 1191 1271 .backup-restore-container { 1192 max-width: 900px;1272 max-width: 100%; 1193 1273 } 1194 1274 … … 1435 1515 gap: 24px; 1436 1516 margin: 32px 0; 1437 max-width: 1 200px;1517 max-width: 100%; 1438 1518 } 1439 1519 1440 1520 .support-card { 1441 1521 background: #fff; 1442 border: 2px solid #e0e0e0;1522 border: 1px solid #c3c4c7; 1443 1523 border-radius: 12px; 1444 1524 padding: 32px 24px; … … 1450 1530 1451 1531 .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); 1454 1533 border-color: #2271b1; 1455 1534 } … … 1608 1687 .widgets-container { 1609 1688 display: grid; 1610 grid-template-columns: repeat( 2, 1fr);1689 grid-template-columns: repeat(1, 1fr); 1611 1690 gap: 20px; 1612 1691 margin-bottom: 20px; … … 1641 1720 background: #f6f7f7; 1642 1721 border-bottom: 1px solid #e1e3e6; 1722 cursor: pointer; 1723 user-select: none; 1643 1724 } 1644 1725 1645 1726 .widget-preview-large { 1646 1727 flex-grow: 1; 1728 display: flex; 1729 align-items: center; 1730 flex-wrap: wrap; 1731 gap: 8px; 1647 1732 } 1648 1733 … … 1672 1757 } 1673 1758 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 1674 1820 .widget-editor-body { 1675 1821 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; 1676 1833 } 1677 1834 -
redshape-easy-labels/trunk/assets/js/admin.js
r3468585 r3471317 1679 1679 <div class="redshape-modal-info"> 1680 1680 <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> 1682 1682 </div> 1683 1683 </div> … … 1718 1718 const $modal = $('#quick-create-label-modal'); 1719 1719 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 1720 1726 // Reset form 1721 1727 $('#quick-label-name').val(''); … … 1760 1766 const labelName = $('#quick-label-name').val().trim(); 1761 1767 const labelColor = $('#quick-label-color').val(); 1768 const postType = $('#quick-create-label-modal').data('current-post-type') || 'post'; 1762 1769 1763 1770 if (!labelName) { … … 1778 1785 label_name: labelName, 1779 1786 label_color: labelColor, 1787 post_type: postType, 1780 1788 auto_assign: false 1781 1789 }, … … 1806 1814 const labelName = $('#quick-label-name').val().trim(); 1807 1815 const labelColor = $('#quick-label-color').val(); 1816 const postType = $('#quick-create-label-modal').data('current-post-type') || 'post'; 1808 1817 1809 1818 if (!labelName) { … … 1830 1839 label_color: labelColor, 1831 1840 post_id: postId, 1841 post_type: postType, 1832 1842 auto_assign: true 1833 1843 }, … … 1958 1968 '<span class="widget-preview-title">' + __('New Widget') + '</span>' + 1959 1969 '</span>' + 1970 '<div class="widget-header-info">' + 1971 '<span class="header-widget-viz-badge">' + __('Pie Chart') + '</span>' + 1972 '</div>' + 1960 1973 '</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>' + 1964 1982 '</div>' + 1965 1983 '<div class="widget-editor-body">' + … … 2039 2057 2040 2058 /** 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 /** 2041 2076 * Handle "Remove Widget" button click - IDENTICAL TO LABELS 2042 2077 */ … … 2244 2279 $card.find('.widget-preview-title').text(newTitle); 2245 2280 }); 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 2247 2312 /** 2248 2313 * Filter labels when content type changes … … 2250 2315 $(document).on('change', '.widget-post-type-select', function() { 2251 2316 var $card = $(this).closest('.widget-editor-card'); 2317 updateWidgetHeaderInfo($card); 2252 2318 var selectedPostType = $(this).val(); 2253 2319 var $labelsContainer = $card.find('.widget-labels-inclusion'); -
redshape-easy-labels/trunk/includes/admin-page.php
r3468585 r3471317 240 240 foreach ($redshape_easylabels_labels as $redshape_easylabels_key => $redshape_easylabels_label): 241 241 ?> 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); ?>"> 243 243 <div class="label-editor-header"> 244 244 <div class="label-preview-large"> … … 246 246 <?php echo esc_html($redshape_easylabels_label['name']); ?> 247 247 </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> 252 268 </div> 253 269 … … 795 811 </div> 796 812 <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 WordPresslanguage.'); ?></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> 799 815 </div> 800 816 </div> … … 935 951 foreach ($redshape_easylabels_dashboard_widgets as $redshape_easylabels_widget_key => $redshape_easylabels_widget): 936 952 ?> 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); ?>"> 938 954 <div class="widget-editor-header"> 939 955 <div class="widget-preview-large"> … … 942 958 <span class="widget-preview-title"><?php echo esc_html($redshape_easylabels_widget['title']); ?></span> 943 959 </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> 948 985 </div> 949 986 -
redshape-easy-labels/trunk/includes/class-redshape-easylabels-ajax.php
r3468639 r3471317 174 174 $label_color = isset( $_POST['label_color'] ) ? sanitize_hex_color( wp_unslash( $_POST['label_color'] ) ) : '#007cba'; 175 175 $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'] ) ) : ''; 176 177 // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 177 178 $auto_assign_raw = isset( $_POST['auto_assign'] ) ? wp_unslash( $_POST['auto_assign'] ) : false; … … 194 195 'name' => $label_name, 195 196 'color' => $label_color, 196 'post_types' => array(),197 'post_types' => ! empty( $post_type ) ? array( $post_type ) : array(), 197 198 ); 198 199 $options['default_labels'] = $labels; -
redshape-easy-labels/trunk/includes/class-redshape-easylabels-i18n.php
r3468610 r3471317 220 220 // Lingua 221 221 '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 diWordPress.',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.', 224 224 '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 'Th is setting is independent of WordPress language' => 'Questa impostazione è indipendente dalla lingua diWordPress',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', 227 227 'Labels and notes you created will remain unchanged' => 'Le etichette e le note che hai creato rimarranno invariate', 228 228 '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', 229 234 230 235 // Messaggi generali … … 345 350 'Non hai i permessi per creare etichette' => 'Non hai i permessi per creare etichette', 346 351 '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.', 348 353 ), 349 354 … … 533 538 'Non hai i permessi per creare etichette' => 'You don\'t have permission to create labels', 534 539 '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.', 536 541 537 542 // Permissions … … 555 560 // Language 556 561 '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 WordPresslanguage.',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.', 559 564 '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 'Th is setting is independent of WordPress language' => 'This setting is independent of WordPresslanguage',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', 562 567 'Labels and notes you created will remain unchanged' => 'Labels and notes you created will remain unchanged', 563 568 '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', 564 574 565 575 // General messages … … 946 956 'Non hai i permessi per creare etichette' => 'Vous n\'avez pas la permission de créer des étiquettes', 947 957 '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.', 949 959 950 960 // Dashboard Widgets (v1.2.0) … … 1240 1250 'Non hai i permessi per creare etichette' => 'Sie haben keine Berechtigung zum Erstellen von Labels', 1241 1251 '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.', 1243 1253 1244 1254 // Dashboard Widgets (v1.2.0) … … 1535 1545 'Non hai i permessi per creare etichette' => 'No tienes permiso para crear etiquetas', 1536 1546 '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.', 1538 1548 1539 1549 // Dashboard Widgets (v1.2.0) … … 1818 1828 'Non hai i permessi per creare etichette' => 'У вас нет разрешения на создание меток', 1819 1829 '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.' => 'Метка будет создана и настроена только для текущего типа контента.', 1821 1831 1822 1832 // Dashboard Widgets (v1.2.0) … … 2112 2122 'Non hai i permessi per creare etichette' => '您没有创建标签的权限', 2113 2123 '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.' => '标签将被创建并仅针对当前内容类型进行配置。', 2115 2125 2116 2126 // Dashboard Widgets (v1.2.0) … … 2406 2416 'Non hai i permessi per creare etichette' => 'ラベルを作成する権限がありません', 2407 2417 '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.' => 'ラベルが作成され、現在のコンテンツタイプのみに設定されます。', 2409 2419 2410 2420 // Dashboard Widgets (v1.2.0) … … 2700 2710 'Non hai i permessi per creare etichette' => '라벨을 만들 권한이 없습니다', 2701 2711 '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.' => '라벨이 생성되어 현재 콘텐츠 유형에만 구성됩니다.', 2703 2713 2704 2714 // Dashboard Widgets (v1.2.0) … … 2996 3006 'Non hai i permessi per creare etichette' => 'आपके पास लेबल बनाने की अनुमति नहीं है', 2997 3007 '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.' => 'लेबल बनाया जाएगा और केवल वर्तमान सामग्री प्रकार के लिए कॉन्फ़िगर किया जाएगा।', 2999 3009 3000 3010 // Dashboard Widgets (v1.2.0) -
redshape-easy-labels/trunk/includes/class-redshape-easylabels-settings.php
r3468639 r3471317 101 101 $all_roles = $wp_roles_obj->get_names(); 102 102 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. 109 106 $post_types = get_post_types( array( 'public' => true ), 'objects' ); 110 107 unset( $post_types['attachment'] ); 111 if ( $plugin_locale !== $original_locale ) {112 restore_previous_locale();113 }114 108 115 109 // Active tab … … 516 510 }); 517 511 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>'; 519 513 const newCardEl = \$(newCard).addClass('new-label').insertBefore('.add-label-placeholder'); 520 514 setTimeout(function() { newCardEl.removeClass('new-label'); }, 300); … … 595 589 }); 596 590 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 597 623 \$(document).on('input', '.label-name-input', function() { 598 624 const card = \$(this).closest('.label-editor-card'); -
redshape-easy-labels/trunk/languages/redshape-easy-labels-de_DE.po
r3468639 r3471317 447 447 msgstr "Label hinzufügen" 448 448 449 msgid "Click to remove" 450 msgstr "Zum Entfernen klicken" 451 452 msgid "Critical error. Reload the page." 453 msgstr "Kritischer Fehler. Seite neu laden." 454 455 msgid "Error processing response" 456 msgstr "Fehler bei der Verarbeitung der Antwort" 457 449 458 msgid "Save" 450 459 msgstr "Speichern" … … 639 648 msgstr "Fehler beim Erstellen des Labels" 640 649 650 msgid "Label name is required" 651 msgstr "Der Label-Name ist erforderlich" 652 653 msgid "Check for updates" 654 msgstr "Nach Updates suchen" 655 641 656 msgid "Il nome dell'etichetta è obbligatorio" 642 657 msgstr "Der Label-Name ist erforderlich" … … 651 666 msgstr "Label erfolgreich erstellt" 652 667 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."668 msgid "The label will be created and configured only for the current content type." 669 msgstr "Das Label wird erstellt und nur für den aktuellen Inhaltstyp konfiguriert." 655 670 656 671 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-en_US.po
r3468639 r3471317 24 24 msgstr "Label created successfully" 25 25 26 msgid "Select interface language" 27 msgstr "Select content interface language" 28 29 msgid "Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language." 30 msgstr "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 32 msgid "Selected language will be applied to all plugin interfaces" 33 msgstr "Selected language will be applied to the operational interface (labels, filters, modals, widgets)" 34 35 msgid "This setting is independent of WordPress language" 36 msgstr "The settings page always follows the WordPress site language" 37 26 38 msgid "Settings saved successfully" 27 39 msgstr "Settings saved successfully!" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-es_ES.po
r3468639 r3471317 450 450 msgstr "Añadir etiqueta" 451 451 452 msgid "Click to remove" 453 msgstr "Clic para eliminar" 454 455 msgid "Critical error. Reload the page." 456 msgstr "Error crítico. Recarga la página." 457 458 msgid "Error processing response" 459 msgstr "Error al procesar la respuesta" 460 452 461 msgid "Save" 453 462 msgstr "Guardar" … … 645 654 msgstr "Error al crear la etiqueta" 646 655 656 msgid "Label name is required" 657 msgstr "El nombre de la etiqueta es obligatorio" 658 659 msgid "Check for updates" 660 msgstr "Buscar actualizaciones" 661 647 662 msgid "Il nome dell'etichetta è obbligatorio" 648 663 msgstr "El nombre de la etiqueta es obligatorio" … … 657 672 msgstr "Etiqueta creada con éxito" 658 673 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."674 msgid "The label will be created and configured only for the current content type." 675 msgstr "La etiqueta se creará y configurará solo para el tipo de contenido actual." 661 676 662 677 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-fr_FR.po
r3468639 r3471317 453 453 msgstr "Ajouter une étiquette" 454 454 455 msgid "Click to remove" 456 msgstr "Cliquer pour supprimer" 457 458 msgid "Critical error. Reload the page." 459 msgstr "Erreur critique. Rechargez la page." 460 461 msgid "Error processing response" 462 msgstr "Erreur de traitement de la réponse" 463 455 464 msgid "Save" 456 465 msgstr "Enregistrer" … … 645 654 msgstr "Échec de la création de l'étiquette" 646 655 656 msgid "Label name is required" 657 msgstr "Le nom de l'étiquette est obligatoire" 658 659 msgid "Check for updates" 660 msgstr "Vérifier les mises à jour" 661 647 662 msgid "Il nome dell'etichetta è obbligatorio" 648 663 msgstr "Le nom de l'étiquette est obligatoire" … … 657 672 msgstr "Étiquette créée avec succès" 658 673 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."674 msgid "The label will be created and configured only for the current content type." 675 msgstr "L'étiquette sera créée et configurée uniquement pour le type de contenu actuel." 661 676 662 677 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-hi_IN.po
r3468639 r3471317 414 414 msgstr "लेबल जोड़ें" 415 415 416 msgid "Click to remove" 417 msgstr "हटाने के लिए क्लिक करें" 418 419 msgid "Critical error. Reload the page." 420 msgstr "गंभीर त्रुटि। पृष्ठ पुनः लोड करें।" 421 422 msgid "Error processing response" 423 msgstr "प्रतिक्रिया प्रसंस्करण में त्रुटि" 424 416 425 msgid "Save" 417 426 msgstr "सहेजें" … … 615 624 msgstr "लेबल बनाने में विफल" 616 625 626 msgid "Label name is required" 627 msgstr "लेबल नाम आवश्यक है" 628 629 msgid "Check for updates" 630 msgstr "अपडेट जाँचें" 631 617 632 msgid "Il nome dell'etichetta è obbligatorio" 618 633 msgstr "लेबल नाम आवश्यक है" … … 627 642 msgstr "लेबल सफलतापूर्वक बनाया गया" 628 643 629 msgid "The label will be created and immediately available for all content types."630 msgstr "लेबल बनाया जाएगा और सभी सामग्री प्रकारों के लिए तुरंत उपलब्ध होगा।"644 msgid "The label will be created and configured only for the current content type." 645 msgstr "लेबल बनाया जाएगा और केवल वर्तमान सामग्री प्रकार के लिए कॉन्फ़िगर किया जाएगा।" 631 646 632 647 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-it_IT.po
r3468639 r3471317 498 498 msgstr "Impostazioni Lingua" 499 499 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 WordPresslanguage."504 msgstr "Scegli la lingua in cui visualizzare tutte le etichette, i pulsanti e i messaggi del plugin. Questa impostazione è indipendente dalla lingua diWordPress."500 msgid "Select content interface language" 501 msgstr "Seleziona la lingua dell'interfaccia contenuti" 502 503 msgid "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." 504 msgstr "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." 505 505 506 506 msgid "How does it work?" 507 507 msgstr "Come funziona?" 508 508 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 "Th is setting is independent of WordPresslanguage"513 msgstr " Questa impostazione è indipendente dalla lingua diWordPress"509 msgid "Selected language will be applied to the operational interface (labels, filters, modals, widgets)" 510 msgstr "La lingua selezionata verrà applicata all'interfaccia operativa (etichette, filtri, modali, widget)" 511 512 msgid "The settings page always follows the WordPress site language" 513 msgstr "La pagina delle impostazioni segue sempre la lingua del sito WordPress" 514 514 515 515 msgid "Labels and notes you created will remain unchanged" … … 519 519 msgstr "Cambia lingua in qualsiasi momento senza perdere i tuoi dati" 520 520 521 msgid "Select interface language" 522 msgstr "Seleziona la lingua dell'interfaccia contenuti" 523 524 msgid "Choose the language to display all labels, buttons and plugin messages. This setting is independent of WordPress language." 525 msgstr "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 527 msgid "Selected language will be applied to all plugin interfaces" 528 msgstr "La lingua selezionata verrà applicata all'interfaccia operativa (etichette, filtri, modali, widget)" 529 530 msgid "This setting is independent of WordPress language" 531 msgstr "La pagina delle impostazioni segue sempre la lingua del sito WordPress" 532 521 533 msgid "Settings saved successfully" 522 534 msgstr "Impostazioni salvate con successo!" … … 525 537 msgstr "Aggiungi etichetta" 526 538 539 msgid "Click to remove" 540 msgstr "Clicca per rimuovere" 541 542 msgid "Critical error. Reload the page." 543 msgstr "Errore critico. Ricarica la pagina." 544 545 msgid "Error processing response" 546 msgstr "Errore di elaborazione risposta" 547 527 548 msgid "Save" 528 549 msgstr "Salva" … … 687 708 msgstr "Il colore dell'etichetta è obbligatorio" 688 709 710 msgid "Check for updates" 711 msgstr "Controlla aggiornamenti" 712 689 713 msgid "Widget configuration error" 690 714 msgstr "Errore configurazione widget" … … 765 789 msgstr "Impossibile creare l'etichetta" 766 790 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 791 msgid "The label will be created and configured only for the current content type." 792 msgstr "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 414 414 msgstr "ラベルを追加" 415 415 416 msgid "Click to remove" 417 msgstr "クリックして削除" 418 419 msgid "Critical error. Reload the page." 420 msgstr "重大なエラー。ページを再読み込みしてください。" 421 422 msgid "Error processing response" 423 msgstr "レスポンスの処理中にエラーが発生しました" 424 416 425 msgid "Save" 417 426 msgstr "保存" … … 615 624 msgstr "ラベルの作成に失敗しました" 616 625 626 msgid "Label name is required" 627 msgstr "ラベル名は必須です" 628 629 msgid "Check for updates" 630 msgstr "アップデートを確認" 631 617 632 msgid "Il nome dell'etichetta è obbligatorio" 618 633 msgstr "ラベル名は必須です" … … 627 642 msgstr "ラベルが正常に作成されました" 628 643 629 msgid "The label will be created and immediately available for all content types."630 msgstr "ラベルが作成され、 すべてのコンテンツタイプですぐに利用できるようになります。"644 msgid "The label will be created and configured only for the current content type." 645 msgstr "ラベルが作成され、現在のコンテンツタイプのみに設定されます。" 631 646 632 647 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-ko_KR.po
r3468639 r3471317 414 414 msgstr "라벨 추가" 415 415 416 msgid "Click to remove" 417 msgstr "클릭하여 제거" 418 419 msgid "Critical error. Reload the page." 420 msgstr "심각한 오류. 페이지를 새로 고침하세요." 421 422 msgid "Error processing response" 423 msgstr "응답 처리 중 오류 발생" 424 416 425 msgid "Save" 417 426 msgstr "저장" … … 615 624 msgstr "라벨 생성 실패" 616 625 626 msgid "Label name is required" 627 msgstr "라벨 이름은 필수입니다" 628 629 msgid "Check for updates" 630 msgstr "업데이트 확인" 631 617 632 msgid "Il nome dell'etichetta è obbligatorio" 618 633 msgstr "라벨 이름은 필수입니다" … … 627 642 msgstr "라벨이 성공적으로 생성되었습니다" 628 643 629 msgid "The label will be created and immediately available for all content types."630 msgstr "라벨이 생성되어 모든 콘텐츠 유형에서 즉시 사용할 수 있습니다."644 msgid "The label will be created and configured only for the current content type." 645 msgstr "라벨이 생성되어 현재 콘텐츠 유형에만 구성됩니다." 631 646 632 647 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-ru_RU.po
r3468639 r3471317 414 414 msgstr "Добавить метку" 415 415 416 msgid "Click to remove" 417 msgstr "Нажмите, чтобы удалить" 418 419 msgid "Critical error. Reload the page." 420 msgstr "Критическая ошибка. Перезагрузите страницу." 421 422 msgid "Error processing response" 423 msgstr "Ошибка обработки ответа" 424 416 425 msgid "Save" 417 426 msgstr "Сохранить" … … 615 624 msgstr "Ошибка создания метки" 616 625 626 msgid "Label name is required" 627 msgstr "Название метки обязательно" 628 629 msgid "Check for updates" 630 msgstr "Проверить обновления" 631 617 632 msgid "Il nome dell'etichetta è obbligatorio" 618 633 msgstr "Название метки обязательно" … … 627 642 msgstr "Метка успешно создана" 628 643 629 msgid "The label will be created and immediately available for all content types."630 msgstr "Метка будет создана и н емедленно станет доступна для всех типовконтента."644 msgid "The label will be created and configured only for the current content type." 645 msgstr "Метка будет создана и настроена только для текущего типа контента." 631 646 632 647 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/languages/redshape-easy-labels-zh_CN.po
r3468639 r3471317 414 414 msgstr "添加标签" 415 415 416 msgid "Click to remove" 417 msgstr "点击移除" 418 419 msgid "Critical error. Reload the page." 420 msgstr "严重错误。请重新加载页面。" 421 422 msgid "Error processing response" 423 msgstr "处理响应时出错" 424 416 425 msgid "Save" 417 426 msgstr "保存" … … 615 624 msgstr "创建标签失败" 616 625 626 msgid "Label name is required" 627 msgstr "标签名称为必填项" 628 629 msgid "Check for updates" 630 msgstr "检查更新" 631 617 632 msgid "Il nome dell'etichetta è obbligatorio" 618 633 msgstr "标签名称为必填项" … … 627 642 msgstr "标签创建成功" 628 643 629 msgid "The label will be created and immediately available for all content types."630 msgstr "标签将被创建并 立即可用于所有内容类型。"644 msgid "The label will be created and configured only for the current content type." 645 msgstr "标签将被创建并仅针对当前内容类型进行配置。" 631 646 632 647 msgid "Dashboard Widgets" -
redshape-easy-labels/trunk/readme.txt
r3468639 r3471317 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.0 7 Stable tag: 1.5. 07 Stable tag: 1.5.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 93 93 94 94 == 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 95 110 96 111 = 1.5.0 = … … 247 262 == Upgrade Notice == 248 263 264 = 1.5.1 = 265 Maintenance release. Version bump to 1.5.1. 266 249 267 = 1.5.0 = 250 268 Maintenance 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 3 3 * Plugin Name: REDSHAPE Easy Labels 4 4 * 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. 05 * Version: 1.5.1 6 6 * Author: REDSHAPE 7 7 * Author URI: https://redshape.it … … 18 18 19 19 // Define plugin constants 20 define('REDSHAPE_EASYLABELS_VERSION', '1.5. 0');20 define('REDSHAPE_EASYLABELS_VERSION', '1.5.1'); 21 21 define('REDSHAPE_EASYLABELS_PLUGIN_URL', plugin_dir_url(__FILE__)); 22 22 define('REDSHAPE_EASYLABELS_PLUGIN_PATH', plugin_dir_path(__FILE__)); … … 74 74 function redshape_easylabels_load_textdomain() { 75 75 $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 } 77 93 78 94 $mo_file = REDSHAPE_EASYLABELS_PLUGIN_PATH . 'languages/redshape-easy-labels-' . $locale . '.mo';
Note: See TracChangeset
for help on using the changeset viewer.