WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/30/2018 12:13:53 PM (14 months ago)
Author:
jrf
Message:

I18n: Improve translators comments [1].

  • Add missing translators comments.
  • Fix placement of some translators comments. Translators 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 translators comments.

Patch 44360-src.2.diff of the series.

Props garyj, alvarogois, michielatyoast
See #44360

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-signup.php

    r43571 r43595  
    324324    $errors     = $filtered_results['errors'];
    325325
     326    /* translators: %s: Network's site name. */
    326327    echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), get_network()->site_name ) . '</h2>';
    327328
     
    330331    }
    331332    ?>
    332     <p><?php printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name ); ?></p>
     333    <p>
     334        <?php
     335        /* translators: %s: Current user's display name. */
     336        printf( __( 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!' ), $current_user->display_name );
     337        ?>
     338    </p>
    333339
    334340    <?php
     
    956962
    957963                if ( $active_signup == 'blog' || $active_signup == 'all' ) {
    958                     /* translators: %s: site address */
    959964                    printf(
     965                        /* translators: %s: site address */
    960966                        '<p><em>' . __( 'The site you were looking for, %s, does not exist, but you can create it now!' ) . '</em></p>',
    961967                        '<strong>' . $newblog . '</strong>'
    962968                    );
    963                 } else {                  /* translators: %s: site address */
     969                } else {
    964970                    printf(
     971                        /* translators: %s: site address */
    965972                        '<p><em>' . __( 'The site you were looking for, %s, does not exist.' ) . '</em></p>',
    966973                        '<strong>' . $newblog . '</strong>'
Note: See TracChangeset for help on using the changeset viewer.