From d265a3a79d5a042fef911147dfe07bae458ff26f Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 23 May 2011 05:33:33 +0000 Subject: [PATCH] Prepare the Credits page to handle translators. see #17532. git-svn-id: http://svn.automattic.com/wordpress/trunk@18002 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/credits.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/wp-admin/credits.php b/wp-admin/credits.php index 834cafc7e..c1ee3a5d8 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -63,7 +63,8 @@ $results = wp_credits(); if ( ! $results ) { echo '

' . sprintf( __( 'WordPress is created by a worldwide team of passionate individuals. Get involved in WordPress.' ), 'http://wordpress.org/about/', - _x( 'http://codex.wordpress.org/Contributing_to_WordPress', 'Url to the codex documentation on contributing to WordPress used on the credits page' ) ) . '

'; + /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */ + __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '

'; include( './admin-footer.php' ); exit; } @@ -86,9 +87,18 @@ foreach ( (array) $results['people'] as $group_slug => $members ) { } foreach ( (array) $results['lists'] as $group_slug => $members ) { - $title = translate( $results['groups'][ $group_slug ] ); - if ( isset( $results['data']['placeholders'][ $group_slug ] ) ) - $title = vsprintf( $title, $results['data']['placeholders'][ $group_slug ] ); + if ( $group_slug === 'translators' ) { + // Considered a special slug in the API response. (Also, will never be returned for en_US.) + /* translators: use the name of your own language here */ + $title = __( 'English Translators' ); + if ( 'English Translators' == $title ) + $title = __( 'Translators' ); + } else { + $title = translate( $results['groups'][ $group_slug ] ); + if ( isset( $results['data']['placeholders'][ $group_slug ] ) ) + $title = vsprintf( $title, $results['data']['placeholders'][ $group_slug ] ); + } + echo '

' . $title . "

\n\n"; array_walk( $members, '_wp_credits_add_profile_link', $results['data']['profile_prefix'] ); shuffle( $members ); @@ -97,7 +107,8 @@ foreach ( (array) $results['lists'] as $group_slug => $members ) { ?>

Get involved in WordPress.' ), - _x( 'http://codex.wordpress.org/Contributing_to_WordPress', 'Url to the codex documentation on contributing to WordPress used on the credits page' ) ); ?>

+ /* translators: Url to the codex documentation on contributing to WordPress used on the credits page */ + __( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ); ?>

\ No newline at end of file