WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (4 months 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/edit-tags.php

    r45683 r45926  
    243243    $help = '';
    244244    if ( 'category' == $taxonomy ) {
    245         $help = '<p>' . sprintf( __( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ), 'options-writing.php' ) . '</p>';
     245        $help = '<p>' . sprintf(
     246            /* translators: %s: URL to Writing Settings screen */
     247            __( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ),
     248            'options-writing.php'
     249        ) . '</p>';
    246250    } elseif ( 'link_category' == $taxonomy ) {
    247251        $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
     
    597601    <?php if ( current_user_can( 'import' ) ) : ?>
    598602    <p>
    599         <?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ); ?>
     603        <?php
     604        printf(
     605            /* translators: %s: URL to Categories to Tags Converter tool */
     606            __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ),
     607            esc_url( $import_link )
     608        );
     609        ?>
    600610    </p>
    601611    <?php endif; ?>
     
    603613<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
    604614<div class="form-wrap edit-term-notes">
    605 <p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ); ?></p>
     615<p>
     616    <?php
     617    printf(
     618        /* translators: %s: URL to Categories to Tags Converter tool */
     619        __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ),
     620        esc_url( $import_link )
     621    );
     622    ?>
     623    </p>
    606624</div>
    607625    <?php
Note: See TracChangeset for help on using the changeset viewer.