Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (5 years 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/includes/class-wp-posts-list-table.php

    r45742 r45926  
    306306
    307307            $mine_inner_html = sprintf(
     308                /* translators: %s: number of posts */
    308309                _nx(
    309310                    'Mine <span class="count">(%s)</span>',
     
    326327
    327328        $all_inner_html = sprintf(
     329            /* translators: %s: number of posts */
    328330            _nx(
    329331                'All <span class="count">(%s)</span>',
     
    375377
    376378            $sticky_inner_html = sprintf(
     379                /* translators: %s: number of posts */
    377380                _nx(
    378381                    'Sticky <span class="count">(%s)</span>',
     
    918921            ?>
    919922            <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
    920                 <?php printf( __( 'Select %s' ), _draft_or_post_title() ); ?>
     923                <?php
     924                    /* translators: %s: post title */
     925                    printf( __( 'Select %s' ), _draft_or_post_title() );
     926                ?>
    921927            </label>
    922928            <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
     
    9941000                $lock_holder   = get_userdata( $lock_holder );
    9951001                $locked_avatar = get_avatar( $lock_holder->ID, 18 );
    996                 $locked_text   = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
     1002                /* translators: %s: user's display name */
     1003                $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
    9971004            } else {
    9981005                $locked_avatar = '';
     
    10671074
    10681075            if ( $time_diff > 0 && $time_diff < DAY_IN_SECONDS ) {
     1076                /* translators: %s: Human-readable time difference */
    10691077                $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) );
    10701078            } else {
Note: See TracChangeset for help on using the changeset viewer.