Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/17/2015 01:27:06 PM (10 years ago)
Author:
boonebgorges
Message:

Improved plural forms for localizable strings.

Strings that are intended for use only in the case of a single item should not
be bundled with strings intended for use with plurals, as this pattern does not
work with languages that use the singular nominal form for numbers other than
one. See https://core.trac.wordpress.org/ticket/28502#comment:23.

This changeset also fixes a few places where a formatted string, rather than a
raw integer, was being passed as the $count value to _n().

Props SergeyBiryukov.
Fixes #6368.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-admin.php

    r9759 r9765  
    18951895            case 'delete' :
    18961896                $header_text = __( 'Delete Pending Accounts', 'buddypress' );
    1897                 $helper_text = _n( 'You are about to delete the following account:', 'You are about to delete the following accounts:', count( $signup_ids ), 'buddypress' );
     1897                if ( 1 == count( $signup_ids ) ) {
     1898                    $helper_text = __( 'You are about to delete the following account:', 'buddypress' );
     1899                } else {
     1900                    $helper_text = __( 'You are about to delete the following accounts:', 'buddypress' );
     1901                }
    18981902                break;
    18991903
    19001904            case 'activate' :
    19011905                $header_text = __( 'Activate Pending Accounts', 'buddypress' );
    1902                 $helper_text = _n( 'You are about to activate the following account:', 'You are about to activate the following accounts:', count( $signup_ids ), 'buddypress' );
     1906                if ( 1 == count( $signup_ids ) ) {
     1907                    $helper_text = __( 'You are about to activate the following account:', 'buddypress' );
     1908                } else {
     1909                    $helper_text = __( 'You are about to activate the following accounts:', 'buddypress' );
     1910                }
    19031911                break;
    19041912
    19051913            case 'resend' :
    19061914                $header_text = __( 'Resend Activation Emails', 'buddypress' );
    1907                 $helper_text = _n( 'You are about to resend an activation email to the following account:', 'You are about to resend activation emails to the following accounts:', count( $signup_ids ), 'buddypress' );
     1915                if ( 1 == count( $signup_ids ) ) {
     1916                    $helper_text = __( 'You are about to resend an activation email to the following account:', 'buddypress' );
     1917                } else {
     1918                    $helper_text = __( 'You are about to resend an activation email to the following accounts:', 'buddypress' );
     1919                }
    19081920                break;
    19091921        }
Note: See TracChangeset for help on using the changeset viewer.