Make WordPress Core

Ticket #31840: 31840.diff

File 31840.diff, 8.0 KB (added by wonderboymusic, 11 years ago)
  • src/wp-admin/includes/network.php

     
    120120        $has_ports = strstr( $hostname, ':' );
    121121        if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) {
    122122                echo '<div class="error"><p><strong>' . __( 'ERROR:') . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>';
    123                 echo '<p>' . sprintf( __( 'You cannot use port numbers such as <code>%s</code>.' ), $has_ports ) . '</p>';
     123                echo '<p>' . sprintf( __( 'You cannot use port numbers such as %s.' ), '<code>' . $has_ports . '</code>' ) . '</p>';
    124124                echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>';
    125125                echo '</div>';
    126126                include( ABSPATH . 'wp-admin/admin-footer.php' );
     
    197197                if ( $is_www ) :
    198198                ?>
    199199                <h3><?php esc_html_e( 'Server Address' ); ?></h3>
    200                 <p><?php printf( __( 'We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the <code>www</code> prefix with an address like <code>%2$s</code> but any links will not have the <code>www</code> prefix.' ), substr( $hostname, 4 ), $hostname ); ?></p>
     200                <p><?php printf(
     201                        /* translators: 1: site url 2: host name 3. www */
     202                        __( 'We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.' ),
     203                        '<code>' . substr( $hostname, 4 ) . '</code>',
     204                        '<code>' . $hostname . '</code>',
     205                        '<code>www</code>'
     206                ); ?></p>
    201207                <table class="form-table">
    202208                        <tr>
    203209                                <th scope='row'><?php esc_html_e( 'Server Address' ); ?></th>
    204210                                <td>
    205                                         <?php printf( __( 'The internet address of your network will be <code>%s</code>.' ), $hostname ); ?>
     211                                        <?php printf(
     212                                                /* translators: host name */
     213                                                __( 'The internet address of your network will be %s.' ),
     214                                                '<code>' . $hostname . '</code>'
     215                                        ); ?>
    206216                                </td>
    207217                        </tr>
    208218                </table>
     
    242252                        <tr>
    243253                                <th scope='row'><?php esc_html_e( 'Server Address' ); ?></th>
    244254                                <td>
    245                                         <?php printf( __( 'The internet address of your network will be <code>%s</code>.' ), $hostname ); ?>
     255                                        <?php printf(
     256                                                /* translators: host name */
     257                                                __( 'The internet address of your network will be %s.' ),
     258                                                '<code>' . $hostname . '</code>'
     259                                        ); ?>
    246260                                </td>
    247261                        </tr>
    248262                <?php endif; ?>
     
    331345                <h3><?php esc_html_e( 'Enabling the Network' ); ?></h3>
    332346                <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
    333347                <div class="updated inline"><p><?php
    334                         if ( file_exists( $home_path . '.htaccess' ) )
    335                                 printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), '.htaccess' );
    336                         elseif ( file_exists( $home_path . 'web.config' ) )
    337                                 printf( __( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> and <code>%s</code> files.' ), 'web.config' );
    338                         else
    339                                 _e( '<strong>Caution:</strong> We recommend you back up your existing <code>wp-config.php</code> file.' );
     348                        if ( file_exists( $home_path . '.htaccess' ) ) {
     349                                printf(
     350                                        /* translators: 1: wp-config.php 2: .htaccess */
     351                                        __( '<strong>Caution:</strong> We recommend you back up your existing %1$s and %2$s files.' ),
     352                                        '<code>wp-config.php</code>',
     353                                        '<code>.htaccess</code>'
     354                                );
     355                        } elseif ( file_exists( $home_path . 'web.config' ) ) {
     356                                printf(
     357                                        /* translators: 1: wp-config.php 2: web.config */
     358                                        __( '<strong>Caution:</strong> We recommend you back up your existing %1$s and %2$s files.' ),
     359                                        '<code>wp-config.php</code>',
     360                                        '<code>web.config</code>'
     361                                );
     362                        } else {
     363                                printf(
     364                                        /* translators: 1: wp-config.php */
     365                                        __( '<strong>Caution:</strong> We recommend you back up your existing %s file.' ),
     366                                        '<code>wp-config.php</code>'
     367                                );
     368                        }
    340369                ?></p></div>
    341370<?php
    342371        }
    343372?>
    344373                <ol>
    345                         <li><p><?php printf( __( 'Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That&#8217;s all, stop editing! Happy blogging. */</code>:' ), $location_of_wp_config ); ?></p>
     374                        <li><p><?php printf(
     375                                /* translators: 1: wp-config.php 2: location of wp-config file */
     376                                __( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading <code>/* That&#8217;s all, stop editing! Happy blogging. */</code>:' ),
     377                                '<code>wp-config.php</code>',
     378                                '<code>' . $location_of_wp_config . '</code>'
     379                        ); ?></p>
    346380                                <textarea class="code" readonly="readonly" cols="100" rows="7">
    347381define('MULTISITE', true);
    348382define('SUBDOMAIN_INSTALL', <?php echo $subdomain_install ? 'true' : 'false'; ?>);
     
    376410        <p>
    377411                <?php
    378412                        if ( 1 == $num_keys_salts ) {
    379                                 _e( 'This unique authentication key is also missing from your <code>wp-config.php</code> file.' );
     413                                printf(
     414                                        /* translators: 1: wp-config.php */
     415                                        __( 'This unique authentication key is also missing from your %s file.' ),
     416                                        '<code>wp-config.php</code>'
     417                                );
    380418                        } else {
    381                                 _e( 'These unique authentication keys are also missing from your <code>wp-config.php</code> file.' );
     419                                printf(
     420                                        /* translators: 1: wp-config.php */
     421                                        __( 'These unique authentication keys are also missing from your %s file.' ),
     422                                        '<code>wp-config.php</code>'
     423                                );
    382424                        }
    383425                ?>
    384426                <?php _e( 'To make your installation more secure, you should also add:' ); ?>
     
    443485';
    444486
    445487                echo '<li><p>';
    446                 /* translators: 1: a filename like .htaccess. 2: a file path. */
    447                 printf( __( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ),
    448                         '<code>web.config</code>', '<code>' . $home_path . '</code>' );
     488                printf(
     489                        /* translators: 1: a filename like .htaccess. 2: a file path. */
     490                        __( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ),
     491                        '<code>web.config</code>',
     492                        '<code>' . $home_path . '</code>'
     493                );
    449494                echo '</p>';
    450495                if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' )
    451496                        echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
     
    480525EOF;
    481526
    482527                echo '<li><p>';
    483                 /* translators: 1: a filename like .htaccess. 2: a file path. */
    484                 printf( __( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ),
    485                         '<code>.htaccess</code>', '<code>' . $home_path . '</code>' );
     528                printf(
     529                        /* translators: 1: a filename like .htaccess. 2: a file path. */
     530                        __( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ),
     531                        '<code>.htaccess</code>',
     532                        '<code>' . $home_path . '</code>'
     533                );
    486534                echo '</p>';
    487535                if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' )
    488536                        echo '<p><strong>' . __('Warning:') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
  • src/wp-admin/network.php

     
    3838}
    3939
    4040if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) {
    41         wp_die( __( 'You must define the <code>WP_ALLOW_MULTISITE</code> constant as true in your wp-config.php file to allow creation of a Network.' ) );
     41        wp_die(
     42                printf(
     43                        /* translators: 1: WP_ALLOW_MULTISITE 2: wp-config.php */
     44                        __( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ),
     45                        '<code>WP_ALLOW_MULTISITE</code>',
     46                        '<code>wp-config.php</code>'
     47                )
     48        );
    4249}
    4350
    4451if ( is_network_admin() ) {