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/includes/class-wp-ms-themes-list-table.php

    r45634 r45926  
    301301            switch ( $type ) {
    302302                case 'all':
    303                     $text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'themes' );
     303                    /* translators: %s: number of themes */
     304                    $text = _nx(
     305                        'All <span class="count">(%s)</span>',
     306                        'All <span class="count">(%s)</span>',
     307                        $count,
     308                        'themes'
     309                    );
    304310                    break;
    305311                case 'enabled':
    306                     $text = _nx( 'Enabled <span class="count">(%s)</span>', 'Enabled <span class="count">(%s)</span>', $count, 'themes' );
     312                    /* translators: %s: number of themes */
     313                    $text = _nx(
     314                        'Enabled <span class="count">(%s)</span>',
     315                        'Enabled <span class="count">(%s)</span>',
     316                        $count,
     317                        'themes'
     318                    );
    307319                    break;
    308320                case 'disabled':
    309                     $text = _nx( 'Disabled <span class="count">(%s)</span>', 'Disabled <span class="count">(%s)</span>', $count, 'themes' );
     321                    /* translators: %s: number of themes */
     322                    $text = _nx(
     323                        'Disabled <span class="count">(%s)</span>',
     324                        'Disabled <span class="count">(%s)</span>',
     325                        $count,
     326                        'themes'
     327                    );
    310328                    break;
    311329                case 'upgrade':
    312                     $text = _nx( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'themes' );
     330                    /* translators: %s: number of themes */
     331                    $text = _nx(
     332                        'Update Available <span class="count">(%s)</span>',
     333                        'Update Available <span class="count">(%s)</span>',
     334                        $count,
     335                        'themes'
     336                    );
    313337                    break;
    314338                case 'broken':
    315                     $text = _nx( 'Broken <span class="count">(%s)</span>', 'Broken <span class="count">(%s)</span>', $count, 'themes' );
     339                    /* translators: %s: number of themes */
     340                    $text = _nx(
     341                        'Broken <span class="count">(%s)</span>',
     342                        'Broken <span class="count">(%s)</span>',
     343                        $count,
     344                        'themes'
     345                    );
    316346                    break;
    317347            }
     
    573603
    574604        if ( $theme->get( 'Version' ) ) {
     605            /* translators: %s: theme version */
    575606            $theme_meta[] = sprintf( __( 'Version %s' ), $theme->display( 'Version' ) );
    576607        }
     608
     609        /* translators: %s: theme author */
    577610        $theme_meta[] = sprintf( __( 'By %s' ), $theme->display( 'Author' ) );
    578611
Note: See TracChangeset for help on using the changeset viewer.