Make WordPress Core

Ticket #44360: 44360-src.diff

File 44360-src.diff, 3.9 KB (added by GaryJ, 6 years ago)

Fixes WordPress.WP.I18n violations in src/*.php files.

  • src/wp-admin/update.php

    diff --git src/wp-admin/update.php src/wp-admin/update.php
    index 5b07beb710..64ce97af65 100644
    if ( isset( $_GET['action'] ) ) { 
    269269
    270270                require_once( ABSPATH . 'wp-admin/admin-header.php' );
    271271
     272                /* translators: %s: file name */
    272273                $title = sprintf( __( 'Installing Theme from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) );
    273274                $nonce = 'theme-upload';
    274275                $url   = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-theme' );
  • 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                                        );