Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (7 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-custom-image-header.php

    r45881 r45926  
    119119                                'title'   => __( 'Header Text' ),
    120120                                'content' =>
    121                                         '<p>' . sprintf( __( 'For most themes, the header text is your Site Title and Tagline, as defined in the <a href="%1$s">General Settings</a> section.' ), admin_url( 'options-general.php' ) ) . '<p>' .
     121                                        '<p>' . sprintf(
     122                                                /* translators: %s: URL to General Settings screen */
     123                                                __( 'For most themes, the header text is your Site Title and Tagline, as defined in the <a href="%s">General Settings</a> section.' ),
     124                                                admin_url( 'options-general.php' )
     125                                        ) .
     126                                        '</p>' .
    122127                                        '<p>' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. &#8220;#ff0000&#8221; for red, or by choosing a color using the color picker.' ) . '</p>' .
    123128                                        '<p>' . __( 'Don&#8217;t forget to click &#8220;Save Changes&#8221; when you&#8217;re done!' ) . '</p>',
    … …  
    474479        <p>
    475480                        <?php
    476                                 printf(
    477                                         __( 'You can now manage and live-preview Custom Header in the <a href="%1$s">Customizer</a>.' ),
    478                                         admin_url( 'customize.php?autofocus[control]=header_image' )
    479                                 );
     481                        printf(
     482                                /* translators: %s: URL to header image configuration in Customizer */
     483                                __( 'You can now manage and live-preview Custom Header in the <a href="%s">Customizer</a>.' ),
     484                                admin_url( 'customize.php?autofocus[control]=header_image' )
     485                        );
    480486                        ?>
    481487        </p>
    … …  
    485491                <?php if ( ! empty( $this->updated ) ) { ?>
    486492<div id="message" class="updated">
    487 <p><?php printf( __( 'Header updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) ); ?></p>
     493        <p>
     494                        <?php
     495                        /* translators: %s: Home URL */
     496                        printf( __( 'Header updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) );
     497                        ?>
     498        </p>
    488499</div>
    489500                <?php } ?>
    … …  
    541552                        <?php
    542553                        if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
     554                                /* translators: 1: image width in pixels, 2: image height in pixels */
    543555                                printf( __( 'Images of exactly <strong>%1$d &times; %2$d pixels</strong> will be used as-is.' ) . '<br />', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
    544556                        } elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
    … …  
    723735                        echo '<input type="text" name="text-color" id="text-color" value="' . esc_attr( $header_textcolor ) . '"' . $default_color_attr . ' />';
    724736                        if ( $default_color ) {
     737                                /* translators: %s: Default text color */
    725738                                echo ' <span class="description hide-if-js">' . sprintf( _x( 'Default: %s', 'color' ), esc_html( $default_color ) ) . '</span>';
    726739                        }
Note: See TracChangeset for help on using the changeset viewer.