I18N: Improve translator comments.

* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-09-01 17:12:43 +00:00
parent 425d6fd925
commit a7513ac8e0
139 changed files with 1906 additions and 542 deletions

View File

@@ -289,10 +289,10 @@ switch ( $wp_list_table->current_action() ) {
foreach ( $all_userids as $id ) {
$user = get_userdata( $id );
if ( $id == $current_user->ID ) {
/* translators: 1: user id, 2: user login */
/* 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";
} else {
/* translators: 1: user id, 2: user login */
/* 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";
$go_delete++;
}
@@ -427,10 +427,10 @@ switch ( $wp_list_table->current_action() ) {
$id = (int) $id;
$user = get_userdata( $id );
if ( ! current_user_can( 'remove_user', $id ) ) {
/* translators: 1: user id, 2: user login */
/* translators: 1: user ID, 2: user login */
echo '<li>' . sprintf( __( 'ID #%1$s: %2$s <strong>Sorry, you are not allowed to remove this user.</strong>' ), $id, $user->user_login ) . "</li>\n";
} else {
/* translators: 1: user id, 2: user login */
/* 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";
$go_remove = true;
}
@@ -484,6 +484,7 @@ switch ( $wp_list_table->current_action() ) {
if ( 1 == $delete_count ) {
$message = __( 'User deleted.' );
} else {
/* translators: %s: number of users */
$message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
}
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';