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/update-core.php

    r45734 r45926  
    962962
    963963    if ( ! $mysql_compat && ! $php_compat ) {
    964         return new WP_Error( 'php_mysql_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) . $php_update_message );
     964        return new WP_Error(
     965            'php_mysql_not_compatible',
     966            sprintf(
     967                /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
     968                __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ),
     969                $wp_version,
     970                $required_php_version,
     971                $required_mysql_version,
     972                $php_version,
     973                $mysql_version
     974            ) . $php_update_message
     975        );
    965976    } elseif ( ! $php_compat ) {
    966         return new WP_Error( 'php_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ) . $php_update_message );
     977        return new WP_Error(
     978            'php_not_compatible',
     979            sprintf(
     980                /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
     981                __( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ),
     982                $wp_version,
     983                $required_php_version,
     984                $php_version
     985            ) . $php_update_message
     986        );
    967987    } elseif ( ! $mysql_compat ) {
    968         return new WP_Error( 'mysql_not_compatible', sprintf( __( 'The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ) );
     988        return new WP_Error(
     989            'mysql_not_compatible',
     990            sprintf(
     991                /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
     992                __( 'The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ),
     993                $wp_version,
     994                $required_mysql_version,
     995                $mysql_version
     996            )
     997        );
    969998    }
    970999
     
    13551384
    13561385    // self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional.
    1357     show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
    1358     show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
     1386    show_message(
     1387        '<span class="hide-if-no-js">' . sprintf(
     1388            /* translators: 1: WordPress version, 2: URL to About screen */
     1389            __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ),
     1390            $new_version,
     1391            'about.php?updated'
     1392        ) . '</span>'
     1393    );
     1394    show_message(
     1395        '<span class="hide-if-js">' . sprintf(
     1396            /* translators: 1: WordPress version, 2: URL to About screen */
     1397            __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ),
     1398            $new_version,
     1399            'about.php?updated'
     1400        ) . '</span>'
     1401    );
    13591402    echo '</div>';
    13601403    ?>
Note: See TracChangeset for help on using the changeset viewer.