Privacy: fix inconsistencies in new strings.

Props audrasjb.
Fixes #43925.

git-svn-id: https://develop.svn.wordpress.org/trunk@43118 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2018-05-02 18:41:10 +00:00
parent 65df92173a
commit e678d4ea6d
5 changed files with 18 additions and 18 deletions

View File

@ -2013,13 +2013,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.
@ -2037,7 +2037,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 );
@ -2051,7 +2051,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(
@ -2094,19 +2094,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' ),
),
),
@ -2289,7 +2289,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

@ -1352,7 +1352,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>';
@ -1393,8 +1393,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>';
@ -1463,7 +1463,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>';
@ -1505,7 +1505,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

@ -201,7 +201,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

@ -2987,11 +2987,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

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