Changes in trunk/wp-includes/l10n.php [15138:16438]
- File:
-
- 1 edited
-
trunk/wp-includes/l10n.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r15138 r16438 268 268 * ... 269 269 * $message = $messages[$type]; 270 * $usable_text = sprintf( _n($message[0], $message[1], $count), $count);270 * $usable_text = sprintf( translate_nooped_plural( $message, $count ), $count ); 271 271 * 272 272 * @since 2.5 273 * @param $single Single form to be i18ned274 * @param $plural Plural form to be i18ned273 * @param string $single Single form to be i18ned 274 * @param string $plural Plural form to be i18ned 275 275 * @return array array($single, $plural) 276 276 */ 277 function _n_noop( $sing le, $plural ) {278 return array( $single, $plural );277 function _n_noop( $singular, $plural ) { 278 return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null ); 279 279 } 280 280 … … 284 284 * @see _n_noop() 285 285 */ 286 function _nx_noop( $single, $plural, $context ) { 287 return array( $single, $plural, $context ); 286 function _nx_noop( $singular, $plural, $context ) { 287 return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context ); 288 } 289 290 /** 291 * Translate the result of _n_noop() or _nx_noop() 292 * 293 * @since 3.1 294 * @param array $nooped_plural array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop() 295 * @param int $count number of objects 296 * @param string $domain Optional. The domain identifier the text should be retrieved in 297 */ 298 function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) { 299 if ( $nooped_plural['context'] ) 300 return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain ); 301 else 302 return _n( $nooped_plural['singular'], $nooped_plural['plural'], $count, $domain ); 288 303 } 289 304
Note: See TracChangeset
for help on using the changeset viewer.