WordPress.org

Make WordPress Core

Changeset 39929


Ignore:
Timestamp:
01/20/2017 04:51:59 PM (17 months ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-signup.php

    r38814 r39929  
    817817$active_signup = apply_filters( 'wpmu_active_signup', $active_signup );
    818818
    819 // Make the signup type translatable.
    820 $i18n_signup['all'] = _x('all', 'Multisite active signup type');
    821 $i18n_signup['none'] = _x('none', 'Multisite active signup type');
    822 $i18n_signup['blog'] = _x('blog', 'Multisite active signup type');
    823 $i18n_signup['user'] = _x('user', 'Multisite active signup type');
    824 
    825819if ( is_super_admin() ) {
    826     /* translators: 1: type of site sign-up; 2: network settings URL */
    827     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>';
     820    echo '<div class="mu_alert">';
     821    _e( 'Greetings Network Administrator!' );
     822    echo ' ';
     823
     824    switch ( $active_signup ) {
     825        case 'none':
     826            _e( 'The network currently disallows registrations.' );
     827            break;
     828        case 'blog':
     829            _e( 'The network currently allows site registrations.' );
     830            break;
     831        case 'user':
     832            _e( 'The network currently allows user registrations.' );
     833            break;
     834        default:
     835            _e( 'The network currently allows both site and user registrations.' );
     836            break;
     837    }
     838
     839    echo ' ';
     840
     841    /* translators: %s: network settings URL */
     842    printf( __( 'To change or disable registration go to your <a href="%s">Options page</a>.' ), esc_url( network_admin_url( 'settings.php' ) ) );
     843    echo '</div>';
    828844}
    829845
Note: See TracChangeset for help on using the changeset viewer.