Make WordPress Core

09/01/2019 05:12:43 PM (5 years ago)

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.

1 edited


  • trunk/src/wp-admin/options-reading.php

    r45913 r45926  
    2525        'content' => '<p>' . __( 'This screen contains the settings that affect the display of your content.' ) . '</p>' .
    2626            '<p>' . sprintf(
    27                 /* translators: %s: URL to Pages screen */
     27                /* translators: %s: URL to create a new page */
    2828                __( 'You can choose what&#8217;s displayed on the homepage of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static homepage, you first need to create two <a href="%s">Pages</a>. One will become the homepage, and the other will be where your posts are displayed.' ),
    2929                'post-new.php?post_type=page'
    9292    <p><label>
    9393        <input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
    94         <?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
     94        <?php
     95        printf(
     96            /* translators: %s: URL to Pages screen */
     97            __( 'A <a href="%s">static page</a> (select below)' ),
     98            'edit.php?post_type=page'
     99        );
     100        ?>
    95101    </label>
    96102    </p>
    99105    <?php
    100106    printf(
     107        /* translators: %s: select field to choose the front page */
    101108        __( 'Homepage: %s' ),
    102109        wp_dropdown_pages(
    115122    <?php
    116123    printf(
     124        /* translators: %s: select field to choose the page for posts */
    117125        __( 'Posts page: %s' ),
    118126        wp_dropdown_pages(
Note: See TracChangeset for help on using the changeset viewer.