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
This commit is contained in:
Felix Arntz 2017-01-20 16:52:39 +00:00
parent 8d8f5616b7
commit 8062df694f
2 changed files with 25 additions and 9 deletions

View File

@ -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.

View File

@ -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 '<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>';
echo '<div class="mu_alert">';
_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 <a href="%s">Options page</a>.' ), esc_url( network_admin_url( 'settings.php' ) ) );
echo '</div>';
}
$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;