Making WordPress.org


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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            }
Note: See TracChangeset for help on using the changeset viewer.