Ticket #10373: 10373.3.diff
File 10373.3.diff, 1.7 KB (added by , 9 years ago) |
---|
-
src/wp-includes/locale.php
190 190 // See http://php.net/number_format 191 191 192 192 /* translators: $thousands_sep argument for http://php.net/number_format, default is , */ 193 $trans = __('number_format_thousands_sep'); 194 $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans; 193 $thousands_sep = __( 'number_format_thousands_sep' ); 195 194 195 if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) { 196 // Replace space with a non-breaking space to avoid wrapping. 197 $non_breaking_space = html_entity_decode( ' ', ENT_QUOTES, get_option( 'blog_charset' ) ); 198 $thousands_sep = str_replace( ' ', $non_breaking_space, $thousands_sep ); 199 } else { 200 // PHP < 5.4.0 does not support multiple bytes in thousands separator. 201 $thousands_sep = str_replace( array( ' ', ' ' ), ' ', $thousands_sep ); 202 } 203 204 $this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep; 205 196 206 /* translators: $dec_point argument for http://php.net/number_format, default is . */ 197 $trans = __('number_format_decimal_point'); 198 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; 207 $decimal_point = __( 'number_format_decimal_point' ); 199 208 209 $this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point; 210 200 211 // Set text direction. 201 212 if ( isset( $GLOBALS['text_direction'] ) ) 202 213 $this->text_direction = $GLOBALS['text_direction'];