From 29aa25c4af58f17156a3db7e801254d52beba338 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Fri, 20 Jan 2017 16:51:59 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@39929 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-signup.php | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/wp-signup.php b/src/wp-signup.php index 6cf96b5cf0..89230ff793 100644 --- a/src/wp-signup.php +++ b/src/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;