Make WordPress Core


Ignore:
Timestamp:
09/29/2017 11:41:06 AM (7 years ago)
Author:
SergeyBiryukov
Message:

I18N: Use a consistent pattern for translator comments for placeholders in Customizer and widget strings.

Props danieltj, Rahmohn.
Fixes #41974.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r41205 r41640  
    711711        $some_non_rendered_areas_messages = array();
    712712        $some_non_rendered_areas_messages[1] = html_entity_decode(
    713             /* translators: placeholder is the number of other widget areas registered but not rendered */
    714713            __( 'Your theme has 1 other widget area, but this particular page doesn’t display it.' ),
    715714            ENT_QUOTES,
     
    719718        for ( $non_rendered_count = 2; $non_rendered_count < $registered_sidebar_count; $non_rendered_count++ ) {
    720719            $some_non_rendered_areas_messages[ $non_rendered_count ] = html_entity_decode( sprintf(
    721                 /* translators: placeholder is the number of other widget areas registered but not rendered */
     720                /* translators: %s: the number of other widget areas registered but not rendered */
    722721                _n(
    723722                    'Your theme has %s other widget area, but this particular page doesn&#8217;t display it.',
     
    731730        if ( 1 === $registered_sidebar_count ) {
    732731            $no_areas_shown_message = html_entity_decode( sprintf(
    733                 /* translators: placeholder is the total number of widget areas registered */
    734732                __( 'Your theme has 1 widget area, but this particular page doesn&#8217;t display it.' )
    735733            ), ENT_QUOTES, get_bloginfo( 'charset' ) );
    736734        } else {
    737735            $no_areas_shown_message = html_entity_decode( sprintf(
    738                 /* translators: placeholder is the total number of widget areas registered */
     736                /* translators: %s: the total number of widget areas registered */
    739737                _n(
    740738                    'Your theme has %s widget area, but this particular page doesn&#8217;t display it.',
     
    764762                'reorderModeOff'   => __( 'Reorder mode closed' ),
    765763                'reorderLabelOn'   => esc_attr__( 'Reorder widgets' ),
    766                 /* translators: placeholder is the count for the number of widgets found */
     764                /* translators: %d: the number of widgets found */
    767765                'widgetsFound'     => __( 'Number of widgets found: %d' ),
    768766                'noWidgetsFound'   => __( 'No widgets found.' ),
Note: See TracChangeset for help on using the changeset viewer.