Make WordPress Core

Changeset 18002


Ignore:
Timestamp:
05/23/2011 05:33:33 AM (15 years ago)
Author:
nacin
Message:

Prepare the Credits page to handle translators. see #17532.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/credits.php

    r18001 r18002  
    6464    echo '<p>' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
    6565        'http://wordpress.org/about/',
    66         _x( 'http://codex.wordpress.org/Contributing_to_WordPress', 'Url to the codex documentation on contributing to WordPress used on the credits page' ) ) . '</p>';
     66        /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
     67        __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
    6768    include( './admin-footer.php' );
    6869    exit;
     
    8788
    8889foreach ( (array) $results['lists'] as $group_slug => $members ) {
    89     $title = translate( $results['groups'][ $group_slug ] );
    90     if ( isset( $results['data']['placeholders'][ $group_slug ] ) )
    91         $title = vsprintf( $title, $results['data']['placeholders'][ $group_slug ] );
     90    if ( $group_slug === 'translators' ) {
     91        // Considered a special slug in the API response. (Also, will never be returned for en_US.)
     92        /* translators: use the name of your own language here */
     93        $title = __( 'English Translators' );
     94        if ( 'English Translators' == $title )
     95            $title = __( 'Translators' );
     96    } else {
     97        $title = translate( $results['groups'][ $group_slug ] );
     98        if ( isset( $results['data']['placeholders'][ $group_slug ] ) )
     99            $title = vsprintf( $title, $results['data']['placeholders'][ $group_slug ] );
     100    }
     101
    92102    echo '<h3 class="wp-props-group">' . $title . "</h3>\n\n";
    93103    array_walk( $members, '_wp_credits_add_profile_link', $results['data']['profile_prefix'] );
     
    98108?>
    99109<p class="clear"><?php printf( __( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
    100                                 _x( 'http://codex.wordpress.org/Contributing_to_WordPress', 'Url to the codex documentation on contributing to WordPress used on the credits page' ) ); ?></p>
     110    /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
     111    __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ); ?></p>
    101112
    102113</div>
     
    111122__( 'Recent Rockstars' );
    112123__( 'Core Contributors to WordPress %s' );
    113 __( 'Translators for %s' );
    114124__( 'Cofounder, Project Lead' );
    115125__( 'Lead Developer' );
     
    120130__( 'XML-RPC Developer' );
    121131__( 'Internationalization' );
    122 __( 'Twenty Eleven' );
    123132
    124133?>
Note: See TracChangeset for help on using the changeset viewer.