Make WordPress Core

Ticket #35730: 35730.patch

File 35730.patch, 8.1 KB (added by ramiy, 10 years ago)
  • wp-signup.php

     
    117117                        $site = $current_site->domain . $current_site->path . __( 'sitename' );
    118118                else
    119119                        $site = __( 'domain' ) . '.' . $site_domain . $current_site->path;
    120                 echo '<p>(<strong>' . sprintf( __('Your address will be %s.'), $site ) . '</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
     120
     121                echo '<p>(<strong>' .
     122                        sprintf(
     123                                /* translators: %s: site address */
     124                                __( 'Your address will be %s.' ),
     125                                $site
     126                        ) . '</strong>) ' .
     127                        __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) .
     128                        '</p>';
    121129        }
    122130
    123131        // Blog Title
     
    445453                $login_url = 'http://' . $domain . $path . 'wp-login.php';
    446454        }
    447455
    448         $site = sprintf( '<a href="%1$s">%2$s</a>',
     456        $site = sprintf(
     457                '<a href="%1$s">%2$s</a>',
    449458                esc_url( $home_url ),
    450459                $blog_title
    451460        );
    452461
    453462        ?>
    454         <h2><?php printf( __( 'The site %s is yours.' ), $site ); ?></h2>
     463        <h2><?php printf(
     464                        /* translators: %s: site name */
     465                        __( 'The site %s is yours.' ),
     466                        $site
     467                );
     468        ?></h2>
    455469        <p>
    456470                <?php printf(
    457                         __( '<a href="%1$s">%2$s</a> is your new site. <a href="%3$s">Log in</a> as &#8220;%4$s&#8221; using your existing password.' ),
    458                         esc_url( $home_url ),
    459                         untrailingslashit( $domain . $path ),
     471                        /* translators: %s: link to the site */
     472                        __( '%s is your new site.' ),
     473                        '<a href="' . esc_url( $home_url ) . '">' . untrailingslashit( $domain . $path ) . '</a>'
     474                ); ?>
     475                <?php printf(
     476                        /* translators: 1: login url 2: user name */
     477                        __( '<a href="%1$s">Log in</a> as &#8220;%2$s&#8221; using your existing password.' ),
    460478                        esc_url( $login_url ),
    461479                        $user_name
    462480                ); ?>
     
    513531
    514532        ?>
    515533
    516         <h2><?php printf( __( 'Get your own %s account in seconds' ), get_current_site()->site_name ) ?></h2>
     534        <h2><?php printf(
     535                /* translators: %s: site name */
     536                __( 'Get your own %s account in seconds' ),
     537                get_current_site()->site_name
     538        ); ?></h2>
    517539        <form id="setupform" method="post" action="wp-signup.php" novalidate="novalidate">
    518540                <input type="hidden" name="stage" value="validate-user-signup" />
    519541                <?php
     
    581603 */
    582604function confirm_user_signup($user_name, $user_email) {
    583605        ?>
    584         <h2><?php /* translators: %s: username */
    585         printf( __( '%s is your new username' ), $user_name) ?></h2>
     606        <h2><?php printf(
     607                /* translators: %s: username */
     608                __( '%s is your new username' ),
     609                $user_name
     610        ); ?></h2>
    586611        <p><?php _e( 'But, before you can start using your new username, <strong>you must activate it</strong>.' ) ?></p>
    587         <p><?php /* translators: %s: email address */
    588         printf( __( 'Check your inbox at %s and click the link given.' ), '<strong>' . $user_email . '</strong>' ); ?></p>
     612        <p><?php printf(
     613                /* translators: %s: email address */
     614                __( 'Check your inbox at %s and click the link given.' ),
     615                '<strong>' . $user_email . '</strong>'
     616        ); ?></p>
    589617        <p><?php _e( 'If you do not activate your username within two days, you will have to sign up again.' ); ?></p>
    590618        <?php
    591619        /** This action is documented in wp-signup.php */
     
    726754 */
    727755function confirm_blog_signup( $domain, $path, $blog_title, $user_name = '', $user_email = '', $meta = array() ) {
    728756        ?>
    729         <h2><?php /* translators: %s: site address */
    730         printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
    731 
    732         <p><?php _e( 'But, before you can start using your site, <strong>you must activate it</strong>.' ) ?></p>
    733         <p><?php /* translators: %s: email address */
    734         printf( __( 'Check your inbox at %s and click the link given.' ), '<strong>' . $user_email . '</strong>' ); ?></p>
     757        <h2><?php printf(
     758                /* translators: %s: site address */
     759                __( 'Congratulations! Your new site, %s, is almost ready.' ),
     760                "<a href='http://{$domain}{$path}'>{$blog_title}</a>"
     761        ); ?></h2>
     762        <p><?php _e( 'But, before you can start using your site, <strong>you must activate it</strong>.' ); ?></p>
     763        <p><?php printf(
     764                /* translators: %s: email address */
     765                __( 'Check your inbox at %s and click the link given.' ),
     766                '<strong>' . $user_email . '</strong>'
     767        ); ?></p>
    735768        <p><?php _e( 'If you do not activate your site within two days, you will have to sign up again.' ); ?></p>
    736769        <h2><?php _e( 'Still waiting for your email?' ); ?></h2>
    737770        <p>
    738                 <?php _e( 'If you haven&#8217;t received your email yet, there are a number of things you can do:' ) ?>
     771                <?php _e( 'If you haven&#8217;t received your email yet, there are a number of things you can do:' ); ?>
    739772                <ul id="noemail-tips">
    740                         <li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ) ?></strong></p></li>
    741                         <li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ) ?></p></li>
    742                         <li><?php printf( __( 'Have you entered your email correctly? You have entered %s, if it&#8217;s incorrect, you will not receive your email.' ), $user_email ) ?></li>
     773                        <li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ); ?></strong></p></li>
     774                        <li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ); ?></p></li>
     775                        <li><?php printf(
     776                                /* translators: %s: email address */
     777                                __( 'Have you entered your email correctly? You have entered %s, if it&#8217;s incorrect, you will not receive your email.' ),
     778                                $user_email
     779                        ); ?></li>
    743780                </ul>
    744781        </p>
    745782        <?php
     
    799836$i18n_signup['user'] = _x('user', 'Multisite active signup type');
    800837
    801838if ( is_super_admin() )
    802         echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '</div>';
     839        echo '<div class="mu_alert">' .
     840                sprintf(
     841                        /* translators: 1: type of site sign-up; 2: network settings url */
     842                        __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ),
     843                        $i18n_signup[$active_signup],
     844                        esc_url( network_admin_url( 'settings.php' ) )
     845                ) .
     846                '</div>';
    803847
    804848$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
    805849
     
    808852        _e( 'Registration has been disabled.' );
    809853} elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
    810854        $login_url = wp_login_url( network_site_url( 'wp-signup.php' ) );
    811         echo sprintf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
     855        echo sprintf(
     856                /* translators: %s: login url */
     857                __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ),
     858                $login_url
     859        );
    812860} else {
    813861        $stage = isset( $_POST['stage'] ) ?  $_POST['stage'] : 'default';
    814862        switch ( $stage ) {
     
    849897                                $newblog = get_blogaddress_by_name( $newblogname );
    850898
    851899                                if ( $active_signup == 'blog' || $active_signup == 'all' )
    852                                         /* translators: %s: site address */
    853                                         printf( '<p><em>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</em></p>',
     900                                        echo '<p><em>' .
     901                                        sprintf(
     902                                                /* translators: %s: site address */
     903                                                __( 'The site you were looking for, %s, does not exist, but you can create it now!' ),
    854904                                                '<strong>' . $newblog . '</strong>'
    855                                         );
     905                                        ) . '</em></p>';
    856906                                else
    857                                         /* translators: %s: site address */
    858                                         printf( '<p><em>' . __( 'The site you were looking for, %s, does not exist.' ) . '</em></p>',
     907                                        echo '<p><em>' .
     908                                        sprintf(
     909                                                /* translators: %s: site address */
     910                                                __( 'The site you were looking for, %s, does not exist.' ),
    859911                                                '<strong>' . $newblog . '</strong>'
    860                                         );
     912                                        ) . '</em></p>';
    861913                        }
    862914                        break;
    863915        }