diff --git a/wp-admin/js/privacy-tools.js b/wp-admin/js/privacy-tools.js
index 12b0722ddb..a8f4f4ccde 100644
--- a/wp-admin/js/privacy-tools.js
+++ b/wp-admin/js/privacy-tools.js
@@ -6,7 +6,7 @@
// Privacy request action handling.
jQuery( document ).ready( function( $ ) {
- var strings = window.privacyToolsL10n || {},
+ var __ = wp.i18n.__,
copiedNoticeTimeout;
function setActionState( $action, state ) {
@@ -77,7 +77,7 @@ jQuery( document ).ready( function( $ ) {
setExportProgress( 0 );
function onExportDoneSuccess( zipUrl ) {
- var summaryMessage = strings.emailSent;
+ var summaryMessage = __( 'The personal data export link for this user was sent.' );
setActionState( $action, 'export-personal-data-success' );
@@ -86,16 +86,19 @@ jQuery( document ).ready( function( $ ) {
if ( 'undefined' !== typeof zipUrl ) {
window.location = zipUrl;
} else if ( ! sendAsEmail ) {
- onExportFailure( strings.noExportFile );
+ onExportFailure( __( 'No personal data export file was generated.' ) );
}
setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 );
}
function onExportFailure( errorMessage ) {
+ var summaryMessage = __( 'An error occurred while attempting to export personal data.' );
+
setActionState( $action, 'export-personal-data-failed' );
+
if ( errorMessage ) {
- appendResultsAfterRow( $requestRow, 'notice-error', strings.exportError, [ errorMessage ] );
+ appendResultsAfterRow( $requestRow, 'notice-error', summaryMessage, [ errorMessage ] );
}
setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 );
@@ -175,23 +178,23 @@ jQuery( document ).ready( function( $ ) {
setErasureProgress( 0 );
function onErasureDoneSuccess() {
- var summaryMessage = strings.noDataFound,
+ var summaryMessage = __( 'No personal data was found for this user.' ),
classes = 'notice-success';
setActionState( $action, 'remove-personal-data-success' );
if ( false === hasRemoved ) {
if ( false === hasRetained ) {
- summaryMessage = strings.noDataFound;
+ summaryMessage = __( 'No personal data was found for this user.' );
} else {
- summaryMessage = strings.noneRemoved;
+ summaryMessage = __( 'Personal data was found for this user but was not erased.' );
classes = 'notice-warning';
}
} else {
if ( false === hasRetained ) {
- summaryMessage = strings.foundAndRemoved;
+ summaryMessage = __( 'All of the personal data found for this user was erased.' );
} else {
- summaryMessage = strings.someNotRemoved;
+ summaryMessage = __( 'Personal data was found for this user but some of the personal data found was not erased.' );
classes = 'notice-warning';
}
}
@@ -201,8 +204,11 @@ jQuery( document ).ready( function( $ ) {
}
function onErasureFailure() {
+ var summaryMessage = __( 'An error occurred while attempting to find and erase personal data.' );
+
setActionState( $action, 'remove-personal-data-failed' );
- appendResultsAfterRow( $requestRow, 'notice-error', strings.removalError, [] );
+
+ appendResultsAfterRow( $requestRow, 'notice-error', summaryMessage, [] );
setTimeout( function() { $rowActions.removeClass( 'processing' ); }, 500 );
}
@@ -267,7 +273,6 @@ jQuery( document ).ready( function( $ ) {
var $parent,
$container,
range,
- __ = wp.i18n.__,
$target = $( event.target ),
copiedNotice = $target.siblings( '.success' );
diff --git a/wp-admin/js/privacy-tools.min.js b/wp-admin/js/privacy-tools.min.js
index a90012e02e..319a85bd07 100644
--- a/wp-admin/js/privacy-tools.min.js
+++ b/wp-admin/js/privacy-tools.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-jQuery(document).ready(function(g){var d,h=window.privacyToolsL10n||{};function T(e,t){e.children().addClass("hidden"),e.children("."+t).removeClass("hidden")}function w(e){e.removeClass("has-request-results"),e.next().hasClass("request-results")&&e.next().remove()}function x(e,t,o,n){var s="",a="request-results";w(e),n.length&&(g.each(n,function(e,t){s=s+"
"+t+""}),s=""),e.addClass("has-request-results"),e.hasClass("status-request-confirmed")&&(a+=" status-request-confirmed"),e.hasClass("status-request-failed")&&(a+=" status-request-failed"),e.after(function(){return' |
"})}g(".export-personal-data-handle").click(function(e){var t=g(this),a=t.parents(".export-personal-data"),r=t.parents("tr"),n=r.find(".export-progress"),i=t.parents(".row-actions"),c=a.data("request-id"),d=a.data("nonce"),u=a.data("exporters-count"),l=!!a.data("send-as-email");function p(e){T(a,"export-personal-data-failed"),e&&x(r,"notice-error",h.exportError,[e]),setTimeout(function(){i.removeClass("processing")},500)}function m(e){var t=0"+t+""}),s=""),e.addClass("has-request-results"),e.hasClass("status-request-confirmed")&&(n+=" status-request-confirmed"),e.hasClass("status-request-failed")&&(n+=" status-request-failed"),e.after(function(){return' |
"})}h(".export-personal-data-handle").click(function(e){var t=h(this),n=t.parents(".export-personal-data"),r=t.parents("tr"),a=r.find(".export-progress"),i=t.parents(".row-actions"),c=n.data("request-id"),d=n.data("nonce"),u=n.data("exporters-count"),l=!!n.data("send-as-email");function p(e){var t=g("An error occurred while attempting to export personal data.");w(n,"export-personal-data-failed"),e&&x(r,"notice-error",t,[e]),setTimeout(function(){i.removeClass("processing")},500)}function m(e){var t=0add( '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 );
+ $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 );
$scripts->set_translations( 'media-views' );
+
$scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
$scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 );
@@ -1379,24 +1380,11 @@ function wp_default_scripts( $scripts ) {
)
);
- $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y', 'wp-i18n' ), false, 1 );
+ $scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y' ), false, 1 );
$scripts->set_translations( 'site-health' );
- $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery', 'wp-a11y', 'wp-i18n' ), false, 1 );
- did_action( 'init' ) && $scripts->localize(
- 'privacy-tools',
- 'privacyToolsL10n',
- array(
- 'noDataFound' => __( 'No personal data was found for this user.' ),
- 'foundAndRemoved' => __( 'All of the personal data found for this user was erased.' ),
- 'noneRemoved' => __( 'Personal data was found for this user but was not erased.' ),
- 'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ),
- 'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ),
- 'emailSent' => __( 'The personal data export link for this user was sent.' ),
- 'noExportFile' => __( 'No personal data export file was generated.' ),
- 'exportError' => __( 'An error occurred while attempting to export personal data.' ),
- )
- );
+ $scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
+ $scripts->set_translations( 'privacy-tools' );
$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y', 'wp-sanitize' ), false, 1 );
$scripts->set_translations( 'updates' );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index ff6ef26d20..5da1b6182e 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
-$wp_version = '5.5-alpha-48273';
+$wp_version = '5.5-alpha-48274';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.