From 8062df694fd22ce2df81201c958722acf4fe7c74 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Fri, 20 Jan 2017 16:52:39 +0000 Subject: [PATCH] Multisite: Correct and improve i18n strings in `wp-signup.php`. The strings addressing the network administrator in `wp-signup.php` were still using the old terminology of blogs and sites. Furthermore concatenation of the strings has been removed to make them i18n-friendly. Props jignesh.nakrani, SergeyBiryukov. Fixes #39611. Built from https://develop.svn.wordpress.org/trunk@39929 git-svn-id: http://core.svn.wordpress.org/trunk@39866 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-signup.php | 32 ++++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 7168718d46..3594b5246b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39928'; +$wp_version = '4.8-alpha-39929'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-signup.php b/wp-signup.php index 6cf96b5cf0..89230ff793 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -816,15 +816,31 @@ $active_signup = get_site_option( 'registration', 'none' ); */ $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); -// Make the signup type translatable. -$i18n_signup['all'] = _x('all', 'Multisite active signup type'); -$i18n_signup['none'] = _x('none', 'Multisite active signup type'); -$i18n_signup['blog'] = _x('blog', 'Multisite active signup type'); -$i18n_signup['user'] = _x('user', 'Multisite active signup type'); - if ( is_super_admin() ) { - /* translators: 1: type of site sign-up; 2: network settings URL */ - echo '
' . sprintf( __( 'Greetings Site Administrator! You are currently allowing “%s” registrations. To change or disable registration go to your Options page.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '
'; + echo '
'; + _e( 'Greetings Network Administrator!' ); + echo ' '; + + switch ( $active_signup ) { + case 'none': + _e( 'The network currently disallows registrations.' ); + break; + case 'blog': + _e( 'The network currently allows site registrations.' ); + break; + case 'user': + _e( 'The network currently allows user registrations.' ); + break; + default: + _e( 'The network currently allows both site and user registrations.' ); + break; + } + + echo ' '; + + /* translators: %s: network settings URL */ + printf( __( 'To change or disable registration go to your Options page.' ), esc_url( network_admin_url( 'settings.php' ) ) ); + echo '
'; } $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;