Making WordPress.org

Changeset 7225


Ignore:
Timestamp:
05/24/2018 10:40:29 AM (6 years ago)
Author:
dd32
Message:

Main: Privacy: Add translated page titles and meta descriptions. Translate the form error strings and a few others that were missed.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/page-meta-descriptions.php

    r6974 r7225  
    109109            $desc  = esc_html__( 'WordPress is software designed for everyone with emphasis on accessibility, performance, security, and usability.', 'wporg' );
    110110            break;
     111
     112        case 'page-about-privacy-data-erasure-request.php':
     113            $title = esc_html_x( 'Data Erasure Request', 'Page title', 'wporg' );
     114            $desc  = esc_html__( 'WordPress.org respects your privacy and intends to remain transparent about any personal data we store about individuals. Under the General Data Protection Regulation (GDPR), EU citizens and residents may request deletion of personal data stored on our servers.', 'wporg' );
     115            break;
     116
     117        case 'page-about-privacy-data-export-request.php':
     118            $title = esc_html_x( 'Data Export Request', 'Page title', 'wporg' );
     119            $desc  = esc_html__( 'WordPress.org respects your privacy and intends to remain transparent about any personal data we store about individuals. Under the General Data Protection Regulation (GDPR), EU citizens and residents are entitled to receive a copy of any personal data we might hold about you.', 'wporg' );
     120            break;
    111121    }
    112122
     
    201211            $title = esc_html_x( 'About', 'Page title', 'wporg' );
    202212            break;
     213
     214        case 'page-about-privacy-data-erasure-request.php':
     215            $title = esc_html_x( 'Data Erasure Request', 'Page title', 'wporg' );
     216            break;
     217
     218        case 'page-about-privacy-data-export-request.php':
     219            $title = esc_html_x( 'Data Export Request', 'Page title', 'wporg' );
     220            break;
    203221    }
    204222
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php

    r7218 r7225  
    2323    // Currently only enabled for special accounts.
    2424    if ( ! is_user_logged_in() || ! wporg_user_has_restricted_password() ) {
    25         $api_request = new \WP_Error(
    26             'not_available',
    27             'This form is currently disabled.'
    28         );
     25        $error_message = 'This form is currently unavailable.';
    2926    } else
     27
    3028    if ( ! reCAPTCHA\check_status() ) {
    31         $error_message = 'Your form session has expired. Please try again.';
     29        $error_message = esc_html__( 'Your form session has expired. Please try again.', 'wporg' );
    3230    } elseif (
    3331        is_user_logged_in() &&
    3432        ! wp_verify_nonce( $_POST['_wpnonce'], $nonce_action )
    3533    ) {
    36         $error_message = 'Your form session has expired. Please try again.';
     34        $error_message = esc_html__( 'Your form session has expired. Please try again.', 'wporg' );
    3735
    3836    } elseif (
     
    4341        if ( is_user_logged_in() ) {
    4442            $error_message = sprintf(
    45                 'The provided email address belongs to a different WordPress.org account. Please <a href="%1$s">log out</a> and <a href="%2$s">login to the account first</a>.',
    46                 wp_logout_url( get_permalink() ),
    47                 wp_login_url( get_permalink() )
     43                /* translators: %s: link to the Login form */
     44                __( 'The provided email address belongs to a different WordPress.org account. Please <a href="%s">login to the account first</a>.', 'wporg' ),
     45                wp_logout_url( wp_login_url( get_permalink() ) )
    4846            );
    4947        } else {
    5048            $error_message = sprintf(
    51                 'The provided email address belongs to a WordPress.org account. Please <a href="%s">login to the account first</a>.',
     49                /* translators: %s: link to the Login form */
     50                __( 'The provided email address belongs to a WordPress.org account. Please <a href="%s">login to the account first</a>.', 'wporg' ),
    5251                wp_login_url( get_permalink() )
    5352            );
     
    7675            if ( 'duplicate_request' == $api_request->get_error_code() ) {
    7776                // TODO This should never have to be displayed to an end user. See API for details.
    78                 $error_message = 'A request for this email address already exists. Please check your spam folder for your confirmation email.';
     77                $error_message = esc_html__( 'A request for this email address already exists. Please check your spam folder for your confirmation email.', 'wporg' );
    7978
    8079            } elseif ( 'invalid_identifier' == $api_request->get_error_code() ) {
    81                 $error_message = 'The provided email was invalid. Please check the address and try again.';
     80                $error_message = esc_html__( 'The provided email was invalid. Please check the address and try again.', 'wporg' );
    8281
    8382            }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php

    r7224 r7225  
    4343}
    4444
    45 // TODO See inc/page-meta-descriptions.php for the meta description for this page.
     45// See inc/page-meta-descriptions.php for the meta description for this page.
    4646
    4747add_action( 'wp_head', function() {
     
    5858            padding: 6px;
    5959        }
     60        form.request-form label {
     61            display: block;
     62            color: #555;
     63            font-size: 0.8em;
     64        }
    6065        form.request-form input[type="email"] {
    61             width: 75%;
     66            width: 100%;
    6267        }
    6368    </style>';
     
    8489                    <p><?php esc_html_e( 'This will request permanent deletion of your WordPress.org account, and relevant personal or private data stored on WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org, and other related domains and sites.', 'wporg'); ?></p>
    8590
    86                     <?php /* translators: link to privacy policy. */ ?>
    87                     <p><?php printf( esc_html__( 'Not all data can be erased, please review the %s for details.', 'wporg' ), '<a href="/about/privacy/">Privacy Policy</a>' ); ?></p>
     91                    <p><?php
     92                        printf(
     93                            /* translators: link to privacy policy. */
     94                            esc_html__( 'Not all data can be erased, please review the %s for details.', 'wporg' ),
     95                            '<a href="/about/privacy/">' . esc_html_x( 'Privacy Policy', 'Page title', 'wporg' ) . '</a>'
     96                        );
     97                    ?></p>
    8898
    8999                    <?php if ( $error_message ) : ?>
    90                         <p class="error"><strong>An error occured with your request:</strong> <?php echo $error_message; ?></p>
     100
     101                        <p class="error">
     102                            <strong><?php esc_html_e( 'An error occured with your request:', 'wporg' ); ?></strong><br>
     103                            <?php echo $error_message; ?>
     104                        </p>
    91105                    <?php elseif ( $success ) : ?>
    92                         <p class="success"><strong>Please check your email for a confirmation link.</strong></p>
     106                        <p class="success"><strong><?php esc_html_e( 'Please check your email for a confirmation link, and follow the instructions to authenticate your request.', 'wporg' ); ?></strong></p>
    93107                    <?php endif; ?>
    94108
     
    105119                    <form id="erase-request-form" class="request-form" method="POST" action="#">
    106120                        <label for="email">
    107                             Email Address
     121                            <?php esc_html_e( 'Email Address', 'wporg' ); ?>
    108122                        </label>
    109123                        <input
    110124                            type="email"
    111125                            name="email" id="email"
    112                             placeholder="you@example.com"
     126                            placeholder="<?php
     127                                /* translators: Example placeholder email address */
     128                                esc_attr_e( 'you@example.com', 'wporg' )
     129                            ?>"
    113130                            required
    114131                            value="<?php echo esc_attr( $email ); ?>"
    115132                        >
    116                         <br>
    117133                        <p><?php esc_html_e( 'By submitting this form, you declare that you are the individual owner of the specified email address and its associated accounts; and that all submitted information including any supplemental details necessary to verify your identity are true. You also declare that it is your intention for accounts associated with that email address to be permanently deleted.', 'wporg' ); ?></p>
    118                         <br/>
    119                         <?php reCAPTCHA\display_submit_button( esc_attr__( 'Accept Declaration and Request Permanent Account Deletion', 'wporg' ) ); ?>
     134                        <?php reCAPTCHA\display_submit_button( __( 'Accept Declaration and Request Permanent Account Deletion', 'wporg' ) ); ?>
    120135                        <?php if ( is_user_logged_in() ) wp_nonce_field( $nonce_action ); ?>
    121136                    </form>
    122137
    123                         <p><strong>Please note:</strong> <?php esc_html_e( 'Before we can begin processing your request, we\'ll require that you verify ownership of the email address. If the email address is associated with an account, we\'ll also require you to login to that account first.', 'wporg' ); ?></p>
     138                        <p><?php esc_html_e( "Please Note: Before we can begin processing your request, we'll require that you verify ownership of the email address. If the email address is associated with an account, we'll also require you to login to that account first.", 'wporg' ); ?></p>
    124139
    125140                </section>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-export-request.php

    r7222 r7225  
    4343}
    4444
    45 // TODO See inc/page-meta-descriptions.php for the meta description for this page.
     45// See inc/page-meta-descriptions.php for the meta description for this page.
    4646
    4747add_action( 'wp_head', function() {
     
    5858            padding: 6px;
    5959        }
     60
     61        form.request-form label {
     62            display: block;
     63            color: #555;
     64            font-size: 0.8em;
     65        }
    6066        form.request-form input[type="email"] {
    61             width: 75%;
     67            width: 100%;
    6268        }
    6369    </style>';
     
    8591
    8692                    <?php if ( $error_message ) : ?>
    87                         <p class="error"><strong>An error occured with your request:</strong> <?php echo $error_message; ?></p>
     93                        <p class="error">
     94                            <strong><?php esc_html_e( 'An error occured with your request:', 'wporg' ); ?></strong><br>
     95                            <?php echo $error_message; ?>
     96                        </p>
    8897                    <?php elseif ( $success ) : ?>
    8998                    <p class="success"><strong><?php esc_html_e( 'Please check your email for a confirmation link, and follow the instructions to authenticate your request.', 'wporg' ); ?></strong></p>
     
    97106                    <form id="export-request-form" class="request-form" method="POST" action="#">
    98107                        <label for="email">
    99                             Email Address
     108                            <?php esc_html_e( 'Email Address', 'wporg' ); ?>
    100109                        </label>
    101110                        <input
    102111                            type="email"
    103112                            name="email" id="email"
    104                             placeholder="you@example.com"
     113                            placeholder="<?php
     114                                /* translators: Example placeholder email address */
     115                                esc_attr_e( 'you@example.com', 'wporg' )
     116                            ?>"
    105117                            required
    106118                            value="<?php echo esc_attr( $email ); ?>"
    107119                        >
    108                         <br>
    109120                        <p><?php esc_html_e( 'By submitting this form, you declare that you are the individual owner of the specified email address and its associated accounts; and that all submitted information including any supplemental details necessary to verify your identity are true.', 'wporg' ); ?></p>
    110                         <br />
    111                         <?php reCAPTCHA\display_submit_button( esc_attr__( 'Accept Declaration and Request Export', 'wporg' ) ); ?>
     121                        <?php reCAPTCHA\display_submit_button( __( 'Accept Declaration and Request Export', 'wporg' ) ); ?>
    112122                        <?php if ( is_user_logged_in() ) wp_nonce_field( $nonce_action ); ?>
    113123                    </form>
    114124
    115                     <p><strong>Please note:</strong> <?php esc_html_e( 'Before we can begin processing your request, we\'ll require that you verify ownership of the email address. If the email address is associated with an account, we\'ll also require you to log in to that account first.', 'wporg' ); ?></p>
     125                    <p><?php esc_html_e( "Please Note: Before we can begin processing your request, we'll require that you verify ownership of the email address. If the email address is associated with an account, we'll also require you to log in to that account first.", 'wporg' ); ?></p>
    116126
    117127                </section>
Note: See TracChangeset for help on using the changeset viewer.