WordPress.org

Make WordPress Core

Ticket #44360: 44360-src.2.diff

File 44360-src.2.diff, 3.3 KB (added by GaryJ, 15 months ago)

Fixes WordPress.WP.I18n violations in src/*.php files - replacement that excludes wp-admin/update.php

  • src/wp-login.php

    diff --git src/wp-login.php src/wp-login.php
    index e02208ae56..7e6bed7d00 100644
    switch ( $action ) { 
    937937
    938938                if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
    939939                        if ( headers_sent() ) {
    940                                 /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
    941940                                $user = new WP_Error(
    942941                                        'test_cookie', sprintf(
     942                                                /* translators: 1: Browser cookie documentation URL, 2: Support forums URL */
    943943                                                __( '<strong>ERROR</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
    944944                                                __( 'https://codex.wordpress.org/Cookies' ), __( 'https://wordpress.org/support/' )
    945945                                        )
    946946                                );
    947947                        } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
    948948                                // If cookies are disabled we can't log in even with a valid user+pass
    949                                 /* translators: %s: Browser cookie documentation URL */
    950949                                $user = new WP_Error(
    951950                                        'test_cookie', sprintf(
     951                                                /* translators: %s: Browser cookie documentation URL */
    952952                                                __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
    953953                                                __( 'https://codex.wordpress.org/Cookies' )
    954954                                        )
  • src/wp-signup.php

    diff --git src/wp-signup.php src/wp-signup.php
    index 3a424743bf..2b23754e3f 100644
    function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) { 
    323323        $blog_title = $filtered_results['blog_title'];
    324324        $errors     = $filtered_results['errors'];
    325325
     326        /* translators: %s: Network's site name. */
    326327        echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>';
    327328
    328329        if ( $errors->has_errors() ) {
    329330                echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>';
    330331        }
    331332        ?>
    332         <p><?php printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ); ?></p>
     333        <p><?php
     334                /* translators: %s: Current user's display name. */
     335                printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ); ?></p>
    333336
    334337        <?php
    335338        $blogs = get_blogs_of_user( $current_user->ID );
    if ( $active_signup == 'none' ) { 
    955958                                $newblog = get_blogaddress_by_name( $newblogname );
    956959
    957960                                if ( $active_signup == 'blog' || $active_signup == 'all' ) {
    958                                         /* translators: %s: site address */
    959961                                        printf(
     962                                                /* translators: %s: site address */
    960963                                                '<p><em>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</em></p>',
    961964                                                '<strong>' . $newblog . '</strong>'
    962965                                        );
    963                                 } else {                  /* translators: %s: site address */
     966                                } else {
    964967                                        printf(
     968                                                /* translators: %s: site address */
    965969                                                '<p><em>' . __( 'The site you were looking for, %s, does not exist.' ) . '</em></p>',
    966970                                                '<strong>' . $newblog . '</strong>'
    967971                                        );