Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (5 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-bulk-theme-upgrader-skin.php

    r43598 r45926  
    2121    public function add_strings() {
    2222        parent::add_strings();
    23         /* translators: 1: name of theme being updated, 2: number of updating themes, 3: total number of themes being updated */
     23        /* translators: 1: theme name, 2: number of the theme, 3: total number of themes being updated */
    2424        $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' );
    2525    }
     
    4444    public function bulk_footer() {
    4545        parent::bulk_footer();
     46
    4647        $update_actions = array(
    47             'themes_page'  => '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>',
    48             'updates_page' => '<a href="' . self_admin_url( 'update-core.php' ) . '" target="_parent">' . __( 'Return to WordPress Updates page' ) . '</a>',
     48            'themes_page'  => sprintf(
     49                '<a href="%s" target="_parent">%s</a>',
     50                self_admin_url( 'themes.php' ),
     51                __( 'Return to Themes page' )
     52            ),
     53            'updates_page' => sprintf(
     54                '<a href="%s" target="_parent">%s</a>',
     55                self_admin_url( 'update-core.php' ),
     56                __( 'Return to WordPress Updates page' )
     57            ),
    4958        );
     59
    5060        if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) {
    5161            unset( $update_actions['themes_page'] );
Note: See TracChangeset for help on using the changeset viewer.