Privacy: fix inconsistencies in new strings.

Props audrasjb.
Merges [43118] to the 4.9 branch.
Fixes #43925.
Built from https://develop.svn.wordpress.org/branches/4.9@43119


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-05-02 18:51:26 +00:00
parent a2be0cd32b
commit 7cf7767298
6 changed files with 19 additions and 19 deletions

View File

@ -1876,13 +1876,13 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
$request = wp_get_user_request_data( $request_id );
if ( ! $request || 'export_personal_data' !== $request->action_name ) {
wp_send_json_error( __( 'Invalid request ID when generating export file' ) );
wp_send_json_error( __( 'Invalid request ID when generating export file.' ) );
}
$email_address = $request->email;
if ( ! is_email( $email_address ) ) {
wp_send_json_error( __( 'Invalid email address when generating export file' ) );
wp_send_json_error( __( 'Invalid email address when generating export file.' ) );
}
// Create the exports folder if needed.
@ -1900,7 +1900,7 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
if ( ! file_exists( $index_pathname ) ) {
$file = fopen( $index_pathname, 'w' );
if ( false === $file ) {
wp_send_json_error( __( 'Unable to protect export folder from browsing' ) );
wp_send_json_error( __( 'Unable to protect export folder from browsing.' ) );
}
fwrite( $file, 'Silence is golden.' );
fclose( $file );
@ -1914,7 +1914,7 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
$html_report_pathname = $exports_dir . $html_report_filename;
$file = fopen( $html_report_pathname, 'w' );
if ( false === $file ) {
wp_send_json_error( __( 'Unable to open export file (HTML report) for writing' ) );
wp_send_json_error( __( 'Unable to open export file (HTML report) for writing.' ) );
}
$title = sprintf(
@ -1957,19 +1957,19 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
'items' => array(
'about-1' => array(
array(
'name' => __( 'Report generated for' ),
'name' => _x( 'Report generated for', 'email address' ),
'value' => $email_address,
),
array(
'name' => __( 'For site' ),
'name' => _x( 'For site', 'website name' ),
'value' => get_bloginfo( 'name' ),
),
array(
'name' => __( 'At URL' ),
'name' => _x( 'At URL', 'website URL' ),
'value' => get_bloginfo( 'url' ),
),
array(
'name' => __( 'On' ),
'name' => _x( 'On', 'date/time' ),
'value' => current_time( 'mysql' ),
),
),
@ -2152,7 +2152,7 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde
$request = wp_get_user_request_data( $request_id );
if ( ! $request || 'export_personal_data' !== $request->action_name ) {
wp_send_json_error( __( 'Invalid request ID when merging exporter data' ) );
wp_send_json_error( __( 'Invalid request ID when merging exporter data.' ) );
}
$export_data = array();

View File

@ -1311,7 +1311,7 @@ class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table {
$download_data_markup .= '<span class="export_personal_data_idle"><a href="#" >' . __( 'Download Personal Data' ) . '</a></span>' .
'<span style="display:none" class="export_personal_data_processing" >' . __( 'Downloading Data...' ) . '</span>' .
'<span style="display:none" class="export_personal_data_success"><a href="#" >' . __( 'Download Personal Data Again' ) . '</a></span>' .
'<span style="display:none" class="export_personal_data_failed">' . __( 'Download Failed!' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';
'<span style="display:none" class="export_personal_data_failed">' . __( 'Download has failed.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';
$download_data_markup .= '</div>';
@ -1352,8 +1352,8 @@ class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table {
?>
<span class="export_personal_data_idle"><a class="button" href="#" ><?php _e( 'Email Data' ); ?></a></span>
<span style="display:none" class="export_personal_data_processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span>
<span style="display:none" class="export_personal_data_success success-message" ><?php _e( 'Email Sent!' ); ?></span>
<span style="display:none" class="export_personal_data_failed"><?php _e( 'Email Failed!' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>
<span style="display:none" class="export_personal_data_success success-message" ><?php _e( 'Email sent.' ); ?></span>
<span style="display:none" class="export_personal_data_failed"><?php _e( 'Email could not be sent.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>
<?php
echo '</div>';
@ -1422,7 +1422,7 @@ class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table {
$remove_data_markup .= '<span class="remove_personal_data_idle"><a href="#" >' . __( 'Force Remove Personal Data' ) . '</a></span>' .
'<span style="display:none" class="remove_personal_data_processing" >' . __( 'Removing Data...' ) . '</span>' .
'<span style="display:none" class="remove_personal_data_failed">' . __( 'Force Remove Failed!' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';
'<span style="display:none" class="remove_personal_data_failed">' . __( 'Force Remove has failed.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';
$remove_data_markup .= '</div>';
@ -1464,7 +1464,7 @@ class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table {
?>
<span class="remove_personal_data_idle"><a class="button" href="#" ><?php _e( 'Remove Personal Data' ); ?></a></span>
<span style="display:none" class="remove_personal_data_processing button updating-message" ><?php _e( 'Removing Data...' ); ?></span>
<span style="display:none" class="remove_personal_data_failed"><?php _e( 'Removing Data Failed!' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>
<span style="display:none" class="remove_personal_data_failed"><?php _e( 'Removing Data has failed.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>
<?php
echo '</div>';

View File

@ -195,7 +195,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<form method="post" action="">
<input type="hidden" name="action" value="create-privacy-page" />
<span>
<?php _e( 'Or create a new page: ' ); ?>
<?php _e( 'Or create a new page:' ); ?>
</span>
<?php
wp_nonce_field( 'create-privacy-page' );

View File

@ -2909,11 +2909,11 @@ function wp_create_user_request( $email_address = '', $action_name = '', $reques
$action_name = sanitize_key( $action_name );
if ( ! is_email( $email_address ) ) {
return new WP_Error( 'invalid_email', __( 'Invalid email address' ) );
return new WP_Error( 'invalid_email', __( 'Invalid email address.' ) );
}
if ( ! $action_name ) {
return new WP_Error( 'invalid_action', __( 'Invalid action name' ) );
return new WP_Error( 'invalid_action', __( 'Invalid action name.' ) );
}
$user = get_user_by( 'email', $email_address );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.6-alpha-43117';
$wp_version = '4.9.6-alpha-43119';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -840,7 +840,7 @@ break;
case 'confirmaction' :
if ( ! isset( $_GET['request_id'] ) ) {
wp_die( __( 'Invalid request' ) );
wp_die( __( 'Invalid request.' ) );
}
$request_id = (int) $_GET['request_id'];