From f6d2c30fa7cd21c7e824efb2ce100461d61f0eee Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 18 Sep 2015 18:17:26 +0000 Subject: [PATCH] Network Setup: don't use `` in translation strings in `wp-admin/network` files. Props ramiy. Fixes #31840. git-svn-id: https://develop.svn.wordpress.org/trunk@34292 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/network.php | 86 ++++++++++++++++++++++++------- src/wp-admin/network.php | 9 +++- 2 files changed, 75 insertions(+), 20 deletions(-) diff --git a/src/wp-admin/includes/network.php b/src/wp-admin/includes/network.php index 13004494f7..433e5f9f64 100644 --- a/src/wp-admin/includes/network.php +++ b/src/wp-admin/includes/network.php @@ -120,7 +120,7 @@ function network_step1( $errors = false ) { $has_ports = strstr( $hostname, ':' ); if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) { echo '

' . __( 'ERROR:') . ' ' . __( 'You cannot install a network of sites with your server address.' ) . '

'; - echo '

' . sprintf( __( 'You cannot use port numbers such as %s.' ), $has_ports ) . '

'; + echo '

' . sprintf( __( 'You cannot use port numbers such as %s.' ), '' . $has_ports . '' ) . '

'; echo '' . __( 'Return to Dashboard' ) . ''; echo ''; include( ABSPATH . 'wp-admin/admin-footer.php' ); @@ -197,12 +197,22 @@ function network_step1( $errors = false ) { if ( $is_www ) : ?>

-

%1$s before enabling the network feature. It will still be possible to visit your site using the www prefix with an address like %2$s but any links will not have the www prefix.' ), substr( $hostname, 4 ), $hostname ); ?>

+

' . substr( $hostname, 4 ) . '', + '' . $hostname . '', + 'www' + ); ?>

- %s.' ), $hostname ); ?> + ' . $hostname . '' + ); ?>
@@ -242,7 +252,11 @@ function network_step1( $errors = false ) { - %s.' ), $hostname ); ?> + ' . $hostname . '' + ); ?> @@ -331,18 +345,38 @@ function network_step2( $errors = false ) {

Caution: We recommend you back up your existing wp-config.php and %s files.' ), '.htaccess' ); - elseif ( file_exists( $home_path . 'web.config' ) ) - printf( __( 'Caution: We recommend you back up your existing wp-config.php and %s files.' ), 'web.config' ); - else - _e( 'Caution: We recommend you back up your existing wp-config.php file.' ); + if ( file_exists( $home_path . '.htaccess' ) ) { + printf( + /* translators: 1: wp-config.php 2: .htaccess */ + __( 'Caution: We recommend you back up your existing %1$s and %2$s files.' ), + 'wp-config.php', + '.htaccess' + ); + } elseif ( file_exists( $home_path . 'web.config' ) ) { + printf( + /* translators: 1: wp-config.php 2: web.config */ + __( 'Caution: We recommend you back up your existing %1$s and %2$s files.' ), + 'wp-config.php', + 'web.config' + ); + } else { + printf( + /* translators: 1: wp-config.php */ + __( 'Caution: We recommend you back up your existing %s file.' ), + 'wp-config.php' + ); + } ?>

    -
  1. wp-config.php file in %s above the line reading /* That’s all, stop editing! Happy blogging. */:' ), $location_of_wp_config ); ?>

    +
  2. above the line reading /* That’s all, stop editing! Happy blogging. */:' ), + 'wp-config.php', + '' . $location_of_wp_config . '' + ); ?>