WordPress.org

Make WordPress Core


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

    r31696 r31941  
    217217<h2><?php _e('Delete Users'); ?></h2>
    218218<?php if ( isset( $_REQUEST['error'] ) ) : ?>
    219 <div class="error">
    220     <p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p>
    221 </div>
     219    <div class="error">
     220        <p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'Please select an option.' ); ?></p>
     221    </div>
    222222<?php endif; ?>
    223 <p><?php echo _n( 'You have specified this user for deletion:', 'You have specified these users for deletion:', count( $userids ) ); ?></p>
     223
     224<?php if ( 1 == count( $userids ) ) : ?>
     225    <p><?php _e( 'You have specified this user for deletion:' ); ?></p>
     226<?php else : ?>
     227    <p><?php _e( 'You have specified these users for deletion:' ); ?></p>
     228<?php endif; ?>
     229
    224230<ul>
    225231<?php
     
    237243    </ul>
    238244<?php if ( $go_delete ) : ?>
    239     <fieldset><p><legend><?php echo _n( 'What should be done with content owned by this user?', 'What should be done with content owned by these users?', $go_delete ); ?></legend></p>
     245    <?php if ( 1 == $go_delete ) : ?>
     246        <fieldset><p><legend><?php _e( 'What should be done with content owned by this user?' ); ?></legend></p>
     247    <?php else : ?>
     248        <fieldset><p><legend><?php _e( 'What should be done with content owned by these users?' ); ?></legend></p>
     249    <?php endif; ?>
    240250    <ul style="list-style:none;">
    241251        <li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" />
     
    380390        case 'del_many':
    381391            $delete_count = isset($_GET['delete_count']) ? (int) $_GET['delete_count'] : 0;
    382             $messages[] = '<div id="message" class="updated"><p>' . sprintf( _n( 'User deleted.', '%s users deleted.', $delete_count ), number_format_i18n( $delete_count ) ) . '</p></div>';
     392            if ( 1 == $delete_count ) {
     393                $message = __( 'User deleted.' );
     394            } else {
     395                $message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
     396            }
     397            $messages[] = '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
    383398            break;
    384399        case 'add':
Note: See TracChangeset for help on using the changeset viewer.