Changeset 48383
- Timestamp:
- 07/07/2020 04:07:25 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/color-picker.js
r47122 r48383 3 3 */ 4 4 5 /* global wpColorPickerL10n */6 5 ( function( $, undef ) { 7 6 … … 12 11 _button = '<input type="button" class="button button-small" />', 13 12 _wrappingLabel = '<label></label>', 14 _wrappingLabelText = '<span class="screen-reader-text"></span>'; 13 _wrappingLabelText = '<span class="screen-reader-text"></span>', 14 __ = wp.i18n.__; 15 15 16 16 /** … … 119 119 self.wrappingLabelText = $( _wrappingLabelText ) 120 120 .insertBefore( el ) 121 .text( wpColorPickerL10n.defaultLabel);121 .text( __( 'Color value' ) ); 122 122 } 123 123 … … 137 137 .css( { backgroundColor: self.initialValue } ); 138 138 // Set the toggle button span element text. 139 self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick);139 self.toggler.find( '.wp-color-result-text' ).text( __( 'Select Color' ) ); 140 140 // Set up the Iris container and insert it after the wrapping label. 141 141 self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel ); … … 147 147 self.button 148 148 .addClass( 'wp-picker-default' ) 149 .val( wpColorPickerL10n.defaultString)150 .attr( 'aria-label', wpColorPickerL10n.defaultAriaLabel);149 .val( __( 'Default' ) ) 150 .attr( 'aria-label', __( 'Select default color' ) ); 151 151 } else { 152 152 self.button 153 153 .addClass( 'wp-picker-clear' ) 154 .val( wpColorPickerL10n.clear)155 .attr( 'aria-label', wpColorPickerL10n.clearAriaLabel);154 .val( __( 'Clear' ) ) 155 .attr( 'aria-label', __( 'Clear color' ) ); 156 156 } 157 157 -
trunk/src/wp-includes/script-loader.php
r48375 r48383 1350 1350 $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); 1351 1351 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); 1352 did_action( 'init' ) && $scripts->localize( 1353 'wp-color-picker', 1354 'wpColorPickerL10n', 1355 array( 1356 'clear' => __( 'Clear' ), 1357 'clearAriaLabel' => __( 'Clear color' ), 1358 'defaultString' => __( 'Default' ), 1359 'defaultAriaLabel' => __( 'Select default color' ), 1360 'pick' => __( 'Select Color' ), 1361 'defaultLabel' => __( 'Color value' ), 1362 ) 1363 ); 1352 $scripts->set_translations( 'wp-color-picker' ); 1364 1353 1365 1354 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox', 'wp-util', 'wp-a11y' ), false, 1 );
Note: See TracChangeset
for help on using the changeset viewer.