WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/31/2015 06:44:46 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Decouple strings where the singular and plural form are not just the same string with different numbers, but essentially two different strings.

This allows for using proper plural forms in languages with more than two forms, and also resolves string conflicts when the same string is present in both singular and plural form.

fixes #28502.

File:
1 edited

Legend:

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

    r31698 r31941  
    13521352        $num_locations  = count( array_keys( $locations ) );
    13531353
     1354        if ( 1 == $num_locations ) {
     1355            $description = __( 'Your theme supports one menu. Select which menu you would like to use.' );
     1356        } else {
     1357            $description = sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) );
     1358        }
     1359
    13541360        $this->add_section( 'nav', array(
    13551361            'title'          => __( 'Navigation' ),
    13561362            'theme_supports' => 'menus',
    13571363            'priority'       => 100,
    1358             'description'    => sprintf( _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . "\n\n" . __('You can edit your menu content on the Menus screen in the Appearance section.'),
     1364            'description'    => $description . "\n\n" . __( 'You can edit your menu content on the Menus screen in the Appearance section.' ),
    13591365        ) );
    13601366
Note: See TracChangeset for help on using the changeset viewer.