Ticket #19924: 19924.diff
| File 19924.diff, 3.0 KB (added by , 14 years ago) |
|---|
-
wp-includes/locale.php
186 186 /* translators: $dec_point argument for http://php.net/number_format, default is . */ 187 187 $trans = __('number_format_decimal_point'); 188 188 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; 189 } 189 190 190 // Locale-specific tweaks 191 if ( self::is_locale_rtl( get_locale() ) ) 192 $this->text_direction = 'rtl'; 193 191 function set_text_direction() { 194 192 // Import the $text_direction global. 195 193 if ( isset( $GLOBALS['text_direction'] ) ) 196 194 $this->text_direction = $GLOBALS['text_direction']; 195 // Check against our defined RTL list. 196 elseif ( self::is_locale_rtl( get_locale() ) ) 197 $this->text_direction = 'rtl'; 197 198 } 198 199 199 200 /** -
wp-includes/l10n.php
380 380 function load_default_textdomain() { 381 381 $locale = get_locale(); 382 382 383 load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );383 $result = load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" ); 384 384 385 385 if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists( WP_LANG_DIR . "/admin-$locale.mo" ) ) { 386 386 load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" ); 387 return ;387 return $result; 388 388 } 389 389 390 390 if ( is_admin() ) … … 393 393 if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) 394 394 load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" ); 395 395 396 return $result; 396 397 } 397 398 398 399 /** -
wp-settings.php
258 258 wp_templating_constants( ); 259 259 260 260 // Load the default text localization domain. 261 load_default_textdomain();262 263 // Find the blog locale.264 261 $locale = get_locale(); 265 $locale_file = WP_LANG_DIR . "/$locale.php"; 266 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) 267 require( $locale_file ); 268 unset($locale_file); 262 if ( $locale_loaded = load_default_textdomain() ) { 263 $locale_file = WP_LANG_DIR . "/$locale.php"; 264 if ( ( 0 === validate_file( $locale_file ) ) && is_readable( $locale_file ) ) 265 require( $locale_file ); 266 unset( $locale_file ); 267 } 269 268 270 // Pull in locale data after loading text domain.271 269 require_once( ABSPATH . WPINC . '/locale.php' ); 272 270 273 271 /** … … 277 275 */ 278 276 $GLOBALS['wp_locale'] = new WP_Locale(); 279 277 278 if ( $locale_loaded ) 279 $GLOBALS['wp_locale']->set_text_direction(); 280 unset( $locale_loaded ); 281 280 282 // Load the functions for the active theme, for both parent and child theme if applicable. 281 283 if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { 282 284 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )