WordPress.org

Make WordPress Core

Changeset 49970


Ignore:
Timestamp:
01/17/2021 05:45:01 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Privacy: Use more consistent wording for strings related to personal data requests.

This replaces "user privacy" in various error messages with "personal data", for consistency with other existing strings.

Follow-up to [49090].

Props xkon, transl8or.
Fixes #51849.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/privacy-tools.php

    r49927 r49970  
    2121
    2222    if ( ! $request || 'user_request' !== $request->post_type ) {
    23         return new WP_Error( 'privacy_request_error', __( 'Invalid user privacy request.' ) );
     23        return new WP_Error( 'privacy_request_error', __( 'Invalid personal data request.' ) );
    2424    }
    2525
     
    2929        return $result;
    3030    } elseif ( ! $result ) {
    31         return new WP_Error( 'privacy_request_error', __( 'Unable to initiate user privacy confirmation request.' ) );
     31        return new WP_Error( 'privacy_request_error', __( 'Unable to initiate confirmation for personal data request.' ) );
    3232    }
    3333
     
    5050
    5151    if ( ! $request ) {
    52         return new WP_Error( 'privacy_request_error', __( 'Invalid user privacy request.' ) );
     52        return new WP_Error( 'privacy_request_error', __( 'Invalid personal data request.' ) );
    5353    }
    5454
     
    105105                        'action_type',
    106106                        'action_type',
    107                         __( 'Invalid user privacy action.' ),
     107                        __( 'Invalid personal data action.' ),
    108108                        'error'
    109109                    );
     
    117117                        'action_type',
    118118                        'action_type',
    119                         __( 'Invalid user privacy action.' ),
     119                        __( 'Invalid personal data action.' ),
    120120                        'error'
    121121                    );
     
    298298function wp_privacy_generate_personal_data_export_file( $request_id ) {
    299299    if ( ! class_exists( 'ZipArchive' ) ) {
    300         wp_send_json_error( __( 'Unable to generate user privacy export file. ZipArchive not available.' ) );
     300        wp_send_json_error( __( 'Unable to generate personal data export file. ZipArchive not available.' ) );
    301301    }
    302302
     
    305305
    306306    if ( ! $request || 'export_personal_data' !== $request->action_name ) {
    307         wp_send_json_error( __( 'Invalid request ID when generating user privacy export file.' ) );
     307        wp_send_json_error( __( 'Invalid request ID when generating personal data export file.' ) );
    308308    }
    309309
     
    311311
    312312    if ( ! is_email( $email_address ) ) {
    313         wp_send_json_error( __( 'Invalid email address when generating user privacy export file.' ) );
     313        wp_send_json_error( __( 'Invalid email address when generating personal data export file.' ) );
    314314    }
    315315
     
    319319
    320320    if ( ! wp_mkdir_p( $exports_dir ) ) {
    321         wp_send_json_error( __( 'Unable to create user privacy export folder.' ) );
     321        wp_send_json_error( __( 'Unable to create personal data export folder.' ) );
    322322    }
    323323
     
    327327        $file = fopen( $index_pathname, 'w' );
    328328        if ( false === $file ) {
    329             wp_send_json_error( __( 'Unable to protect user privacy export folder from browsing.' ) );
     329            wp_send_json_error( __( 'Unable to protect personal data export folder from browsing.' ) );
    330330        }
    331331        fwrite( $file, '<!-- Silence is golden. -->' );
     
    396396
    397397    if ( false === $file ) {
    398         wp_send_json_error( __( 'Unable to open user privacy export file (JSON report) for writing.' ) );
     398        wp_send_json_error( __( 'Unable to open personal data export file (JSON report) for writing.' ) );
    399399    }
    400400
     
    411411
    412412    if ( false === $file ) {
    413         wp_send_json_error( __( 'Unable to open user privacy export file (HTML report) for writing.' ) );
     413        wp_send_json_error( __( 'Unable to open personal data export (HTML report) for writing.' ) );
    414414    }
    415415
     
    505505    if ( true === $zip->open( $archive_pathname, ZipArchive::CREATE ) ) {
    506506        if ( ! $zip->addFile( $json_report_pathname, 'export.json' ) ) {
    507             $error = __( 'Unable to add data to user privacy export file (JSON format).' );
     507            $error = __( 'Unable to archive the personal data export file (JSON format).' );
    508508        }
    509509
    510510        if ( ! $zip->addFile( $html_report_pathname, 'index.html' ) ) {
    511             $error = __( 'Unable to add data to user privacy export file (HTML format).' );
     511            $error = __( 'Unable to archive the personal data export file (HTML format).' );
    512512        }
    513513
     
    530530        }
    531531    } else {
    532         $error = __( 'Unable to open user privacy export file (archive) for writing.' );
     532        $error = __( 'Unable to open personal data export file (archive) for writing.' );
    533533    }
    534534
     
    759759
    760760    if ( ! $request || 'export_personal_data' !== $request->action_name ) {
    761         wp_send_json_error( __( 'Invalid request ID when merging user privacy exporter data.' ) );
     761        wp_send_json_error( __( 'Invalid request ID when merging personal data to export.' ) );
    762762    }
    763763
     
    910910
    911911    if ( ! $request || 'remove_personal_data' !== $request->action_name ) {
    912         wp_send_json_error( __( 'Invalid request ID when processing user privacy eraser data.' ) );
     912        wp_send_json_error( __( 'Invalid request ID when processing personal data to erase.' ) );
    913913    }
    914914
  • trunk/src/wp-includes/user.php

    r49935 r49970  
    31243124
    31253125/**
    3126  * Get all user privacy request types.
     3126 * Get all personal data request types.
    31273127 *
    31283128 * @since 4.9.6
     
    38063806
    38073807    if ( $requests_query->found_posts ) {
    3808         return new WP_Error( 'duplicate_request', __( 'An incomplete user privacy request for this email address already exists.' ) );
     3808        return new WP_Error( 'duplicate_request', __( 'An incomplete personal data request for this email address already exists.' ) );
    38093809    }
    38103810
     
    38743874
    38753875    if ( ! $request ) {
    3876         return new WP_Error( 'invalid_request', __( 'Invalid user privacy request.' ) );
     3876        return new WP_Error( 'invalid_request', __( 'Invalid personal data request.' ) );
    38773877    }
    38783878
     
    40624062
    40634063    if ( ! $request || ! $saved_key || ! $key_request_time ) {
    4064         return new WP_Error( 'invalid_request', __( 'Invalid user privacy request.' ) );
     4064        return new WP_Error( 'invalid_request', __( 'Invalid personal data request.' ) );
    40654065    }
    40664066
    40674067    if ( ! in_array( $request->status, array( 'request-pending', 'request-failed' ), true ) ) {
    4068         return new WP_Error( 'expired_request', __( 'This user privacy request has expired.' ) );
     4068        return new WP_Error( 'expired_request', __( 'This personal data request has expired.' ) );
    40694069    }
    40704070
    40714071    if ( empty( $key ) ) {
    4072         return new WP_Error( 'missing_key', __( 'This user privacy request is missing the confirmation key.' ) );
     4072        return new WP_Error( 'missing_key', __( 'The confirmation key is missing from this personal data request.' ) );
    40734073    }
    40744074
     
    40894089
    40904090    if ( ! $wp_hasher->CheckPassword( $key, $saved_key ) ) {
    4091         return new WP_Error( 'invalid_key', __( 'This user privacy request confirmation key is invalid.' ) );
     4091        return new WP_Error( 'invalid_key', __( 'The confirmation key is invalid for this personal data request.' ) );
    40924092    }
    40934093
    40944094    if ( ! $expiration_time || time() > $expiration_time ) {
    4095         return new WP_Error( 'expired_key', __( 'This user privacy request confirmation key has expired.' ) );
     4095        return new WP_Error( 'expired_key', __( 'The confirmation key has expired for this personal data request.' ) );
    40964096    }
    40974097
Note: See TracChangeset for help on using the changeset viewer.