Add translators comments to wp-admin/users.php.

Props ramiy.
Fixes #35885.
Built from https://develop.svn.wordpress.org/trunk@36621


git-svn-id: http://core.svn.wordpress.org/trunk@36588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-02-23 00:05:28 +00:00
parent 13f76b11d1
commit e512f158df
2 changed files with 8 additions and 2 deletions

View File

@ -248,8 +248,10 @@ case 'delete':
foreach ( $userids as $id ) { foreach ( $userids as $id ) {
$user = get_userdata( $id ); $user = get_userdata( $id );
if ( $id == $current_user->ID ) { if ( $id == $current_user->ID ) {
/* translators: 1: user id, 2: user login */
echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n"; echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n";
} else { } else {
/* translators: 1: user id, 2: user login */
echo "<li><input type=\"hidden\" name=\"users[]\" value=\"" . esc_attr($id) . "\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n"; echo "<li><input type=\"hidden\" name=\"users[]\" value=\"" . esc_attr($id) . "\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n";
$go_delete++; $go_delete++;
} }
@ -374,10 +376,13 @@ case 'remove':
$id = (int) $id; $id = (int) $id;
$user = get_userdata( $id ); $user = get_userdata( $id );
if ( $id == $current_user->ID && !is_super_admin() ) { if ( $id == $current_user->ID && !is_super_admin() ) {
/* translators: 1: user id, 2: user login */
echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n"; echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>The current user will not be removed.</strong>'), $id, $user->user_login) . "</li>\n";
} elseif ( !current_user_can('remove_user', $id) ) { } elseif ( !current_user_can('remove_user', $id) ) {
echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>You don\'t have permission to remove this user.</strong>'), $id, $user->user_login) . "</li>\n"; /* translators: 1: user id, 2: user login */
echo "<li>" . sprintf(__('ID #%1$s: %2$s <strong>You don&#8217;t have permission to remove this user.</strong>'), $id, $user->user_login) . "</li>\n";
} else { } else {
/* translators: 1: user id, 2: user login */
echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n"; echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf(__('ID #%1$s: %2$s'), $id, $user->user_login) . "</li>\n";
$go_remove = true; $go_remove = true;
} }
@ -427,6 +432,7 @@ default:
break; break;
case 'add': case 'add':
if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) { if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) {
/* translators: %s: edit page url */
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( __( 'New user created. <a href="%s">Edit user</a>' ), $messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( __( 'New user created. <a href="%s">Edit user</a>' ),
esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '</p></div>'; self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '</p></div>';

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.5-alpha-36620'; $wp_version = '4.5-alpha-36621';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.