WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/users.php

    r45890 r45926  
    290290            $user = get_userdata( $id );
    291291            if ( $id == $current_user->ID ) {
    292                 /* translators: 1: user id, 2: user login */
     292                /* translators: 1: user ID, 2: user login */
    293293                echo '<li>' . sprintf( __( 'ID #%1$s: %2$s <strong>The current user will not be deleted.</strong>' ), $id, $user->user_login ) . "</li>\n";
    294294            } else {
    295                 /* translators: 1: user id, 2: user login */
     295                /* translators: 1: user ID, 2: user login */
    296296                echo '<li><input type="hidden" name="users[]" value="' . esc_attr( $id ) . '" />' . sprintf( __( 'ID #%1$s: %2$s' ), $id, $user->user_login ) . "</li>\n";
    297297                $go_delete++;
     
    428428            $user = get_userdata( $id );
    429429            if ( ! current_user_can( 'remove_user', $id ) ) {
    430                 /* translators: 1: user id, 2: user login */
     430                /* translators: 1: user ID, 2: user login */
    431431                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";
    432432            } else {
    433                 /* translators: 1: user id, 2: user login */
     433                /* translators: 1: user ID, 2: user login */
    434434                echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf( __( 'ID #%1$s: %2$s' ), $id, $user->user_login ) . "</li>\n";
    435435                $go_remove = true;
     
    485485                        $message = __( 'User deleted.' );
    486486                    } else {
     487                        /* translators: %s: number of users */
    487488                        $message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
    488489                    }
Note: See TracChangeset for help on using the changeset viewer.