Changeset 48274
- Timestamp:
- 07/02/2020 11:09:23 AM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/privacy-tools.js
r48234 r48274 7 7 // Privacy request action handling. 8 8 jQuery( document ).ready( function( $ ) { 9 var strings = window.privacyToolsL10n || {},9 var __ = wp.i18n.__, 10 10 copiedNoticeTimeout; 11 11 … … 78 78 79 79 function onExportDoneSuccess( zipUrl ) { 80 var summaryMessage = strings.emailSent;80 var summaryMessage = __( 'The personal data export link for this user was sent.' ); 81 81 82 82 setActionState( $action, 'export-personal-data-success' ); … … 87 87 window.location = zipUrl; 88 88 } else if ( ! sendAsEmail ) { 89 onExportFailure( strings.noExportFile);89 onExportFailure( __( 'No personal data export file was generated.' ) ); 90 90 } 91 91 … … 94 94 95 95 function onExportFailure( errorMessage ) { 96 var summaryMessage = __( 'An error occurred while attempting to export personal data.' ); 97 96 98 setActionState( $action, 'export-personal-data-failed' ); 99 97 100 if ( errorMessage ) { 98 appendResultsAfterRow( $requestRow, 'notice-error', s trings.exportError, [ errorMessage ] );101 appendResultsAfterRow( $requestRow, 'notice-error', summaryMessage, [ errorMessage ] ); 99 102 } 100 103 … … 176 179 177 180 function onErasureDoneSuccess() { 178 var summaryMessage = strings.noDataFound,181 var summaryMessage = __( 'No personal data was found for this user.' ), 179 182 classes = 'notice-success'; 180 183 … … 183 186 if ( false === hasRemoved ) { 184 187 if ( false === hasRetained ) { 185 summaryMessage = strings.noDataFound;188 summaryMessage = __( 'No personal data was found for this user.' ); 186 189 } else { 187 summaryMessage = strings.noneRemoved;190 summaryMessage = __( 'Personal data was found for this user but was not erased.' ); 188 191 classes = 'notice-warning'; 189 192 } 190 193 } else { 191 194 if ( false === hasRetained ) { 192 summaryMessage = strings.foundAndRemoved;195 summaryMessage = __( 'All of the personal data found for this user was erased.' ); 193 196 } else { 194 summaryMessage = strings.someNotRemoved;197 summaryMessage = __( 'Personal data was found for this user but some of the personal data found was not erased.' ); 195 198 classes = 'notice-warning'; 196 199 } … … 202 205 203 206 function onErasureFailure() { 207 var summaryMessage = __( 'An error occurred while attempting to find and erase personal data.' ); 208 204 209 setActionState( $action, 'remove-personal-data-failed' ); 205 appendResultsAfterRow( $requestRow, 'notice-error', strings.removalError, [] ); 210 211 appendResultsAfterRow( $requestRow, 'notice-error', summaryMessage, [] ); 206 212 207 213 setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 ); … … 268 274 $container, 269 275 range, 270 __ = wp.i18n.__,271 276 $target = $( event.target ), 272 277 copiedNotice = $target.siblings( '.success' ); -
trunk/src/wp-includes/script-loader.php
r48270 r48274 1206 1206 // To enqueue media-views or media-editor, call wp_enqueue_media(). 1207 1207 // Both rely on numerous settings, styles, and templates to operate correctly. 1208 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', ' wp-i18n', 'clipboard' ), false, 1 );1208 $scripts->add( 'media-views', "/wp-includes/js/media-views$suffix.js", array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement', 'wp-api-request', 'wp-a11y', 'clipboard' ), false, 1 ); 1209 1209 $scripts->set_translations( 'media-views' ); 1210 1210 1211 $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 ); 1211 1212 $scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 ); … … 1380 1381 ); 1381 1382 1382 $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y' , 'wp-i18n'), false, 1 );1383 $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y' ), false, 1 ); 1383 1384 $scripts->set_translations( 'site-health' ); 1384 1385 1385 $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery', 'wp-a11y', 'wp-i18n' ), false, 1 ); 1386 did_action( 'init' ) && $scripts->localize( 1387 'privacy-tools', 1388 'privacyToolsL10n', 1389 array( 1390 'noDataFound' => __( 'No personal data was found for this user.' ), 1391 'foundAndRemoved' => __( 'All of the personal data found for this user was erased.' ), 1392 'noneRemoved' => __( 'Personal data was found for this user but was not erased.' ), 1393 'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ), 1394 'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ), 1395 'emailSent' => __( 'The personal data export link for this user was sent.' ), 1396 'noExportFile' => __( 'No personal data export file was generated.' ), 1397 'exportError' => __( 'An error occurred while attempting to export personal data.' ), 1398 ) 1399 ); 1386 $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); 1387 $scripts->set_translations( 'privacy-tools' ); 1400 1388 1401 1389 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y', 'wp-sanitize' ), false, 1 );
Note: See TracChangeset
for help on using the changeset viewer.