Make WordPress Core


Ignore:
Timestamp:
03/31/2015 06:44:46 PM (9 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-admin/plugins.php

    r31811 r31941  
    284284                    }
    285285                    $plugins_to_delete = count( $plugin_info );
    286                     echo '<h2>' . _n( 'Delete Plugin', 'Delete Plugins', $plugins_to_delete ) . '</h2>';
    287286                ?>
    288                 <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
    289                 <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo _n( 'This plugin may be active on other sites in the network.', 'These plugins may be active on other sites in the network.', $plugins_to_delete ); ?></p></div>
     287                <?php if ( 1 == $plugins_to_delete ) : ?>
     288                    <h2><?php _e( 'Delete Plugin' ); ?></h2>
     289                    <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
     290                        <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This plugin may be active on other sites in the network.' ); ?></p></div>
     291                    <?php endif; ?>
     292                    <p><?php _e( 'You are about to remove the following plugin:' ); ?></p>
     293                <?php else: ?>
     294                    <h2><?php _e( 'Delete Plugins' ); ?></h2>
     295                    <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
     296                        <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These plugins may be active on other sites in the network.' ); ?></p></div>
     297                    <?php endif; ?>
     298                    <p><?php _e( 'You are about to remove the following plugins:' ); ?></p>
    290299                <?php endif; ?>
    291                 <p><?php echo _n( 'You are about to remove the following plugin:', 'You are about to remove the following plugins:', $plugins_to_delete ); ?></p>
    292300                    <ul class="ul-disc">
    293301                        <?php
Note: See TracChangeset for help on using the changeset viewer.