Changes in trunk/wp-includes/l10n.php [19059:20788]
- File:
-
- 1 edited
-
trunk/wp-includes/l10n.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r19059 r20788 273 273 * @param string $singular Single form to be i18ned 274 274 * @param string $plural Plural form to be i18ned 275 * @param string $domain Optional. The domain identifier the text will be retrieved in 275 276 * @return array array($singular, $plural) 276 277 */ 277 function _n_noop( $singular, $plural ) {278 return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null );278 function _n_noop( $singular, $plural, $domain = null ) { 279 return array( 0 => $singular, 1 => $plural, 'singular' => $singular, 'plural' => $plural, 'context' => null, 'domain' => $domain ); 279 280 } 280 281 … … 284 285 * @see _n_noop() 285 286 */ 286 function _nx_noop( $singular, $plural, $context ) {287 return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context );287 function _nx_noop( $singular, $plural, $context, $domain = null ) { 288 return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context, 'domain' => $domain ); 288 289 } 289 290 … … 294 295 * @param array $nooped_plural Array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop() 295 296 * @param int $count Number of objects 296 * @param string $domain Optional. The domain identifier the text should be retrieved in 297 * @param string $domain Optional. The domain identifier the text should be retrieved in. If $nooped_plural contains 298 * a domain passed to _n_noop() or _nx_noop(), it will override this value. 297 299 */ 298 300 function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) { 301 if ( $nooped_plural['domain'] ) 302 $domain = $nooped_plural['domain']; 303 299 304 if ( $nooped_plural['context'] ) 300 305 return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain ); … … 383 388 load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" ); 384 389 385 if ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK) ) {390 if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists( WP_LANG_DIR . "/admin-$locale.mo" ) ) { 386 391 load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" ); 387 } 392 return; 393 } 394 395 if ( is_admin() ) 396 load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" ); 397 398 if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) 399 load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" ); 400 388 401 } 389 402 … … 528 541 foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 529 542 $lang_file = basename($lang_file, '.mo'); 530 if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) ) 543 if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) && 544 0 !== strpos( $lang_file, 'admin-' )) 531 545 $languages[] = $lang_file; 532 546 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)