Make WordPress Core


Ignore:
Timestamp:
06/20/2022 10:55:52 PM (4 years ago)
Author:
johnbillion
Message:

I18N: Correct and improve inline docs and tests for functionality related to nooped plurals.

See #55646, #55652

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/l10n.php

    r53474 r53543  
    588588 *     Array of translation information for the strings.
    589589 *
    590  *     @type string $0        Singular form to be localized. No longer used.
    591  *     @type string $1        Plural form to be localized. No longer used.
    592  *     @type string $singular Singular form to be localized.
    593  *     @type string $plural   Plural form to be localized.
    594  *     @type null   $context  Context information for the translators.
    595  *     @type string $domain   Text domain.
     590 *     @type string      $0        Singular form to be localized. No longer used.
     591 *     @type string      $1        Plural form to be localized. No longer used.
     592 *     @type string      $singular Singular form to be localized.
     593 *     @type string      $plural   Plural form to be localized.
     594 *     @type null        $context  Context information for the translators.
     595 *     @type string|null $domain   Text domain.
    596596 * }
    597597 */
     
    655655
    656656/**
    657  * Translates and retrieves the singular or plural form of a string that's been registered
     657 * Translates and returns the singular or plural form of a string that's been registered
    658658 * with _n_noop() or _nx_noop().
    659659 *
     
    668668 * @since 3.1.0
    669669 *
    670  * @param array  $nooped_plural Array with singular, plural, and context keys, usually the result of _n_noop() or _nx_noop().
     670 * @param array  $nooped_plural {
     671 *     Array that is usually a return value from _n_noop() or _nx_noop().
     672 *
     673 *     @type string      $singular Singular form to be localized.
     674 *     @type string      $plural   Plural form to be localized.
     675 *     @type string|null $context  Context information for the translators.
     676 *     @type string|null $domain   Text domain.
     677 * }
    671678 * @param int    $count         Number of objects.
    672679 * @param string $domain        Optional. Text domain. Unique identifier for retrieving translated strings. If $nooped_plural contains
    673680 *                              a text domain passed to _n_noop() or _nx_noop(), it will override this value. Default 'default'.
    674  * @return string Either $single or $plural translated text.
     681 * @return string Either $singular or $plural translated text.
    675682 */
    676683function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) {
Note: See TracChangeset for help on using the changeset viewer.