~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-includes/locale.php

  • Committer: Nick Moffitt
  • Date: 2016-04-14 10:43:32 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: nick.moffitt@canonical.com-20160414104332-61kvsia27qpmjquk
new upstream release 4.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
                // See http://php.net/number_format
188
188
 
189
189
                /* translators: $thousands_sep argument for http://php.net/number_format, default is , */
190
 
                $trans = __('number_format_thousands_sep');
191
 
                $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
 
190
                $thousands_sep = __( 'number_format_thousands_sep' );
 
191
 
 
192
                if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
 
193
                        // Replace space with a non-breaking space to avoid wrapping.
 
194
                        $thousands_sep = str_replace( ' ', ' ', $thousands_sep );
 
195
                } else {
 
196
                        // PHP < 5.4.0 does not support multiple bytes in thousands separator.
 
197
                        $thousands_sep = str_replace( array( '&nbsp;', '&#160;' ), ' ', $thousands_sep );
 
198
                }
 
199
 
 
200
                $this->number_format['thousands_sep'] = ( 'number_format_thousands_sep' === $thousands_sep ) ? ',' : $thousands_sep;
192
201
 
193
202
                /* translators: $dec_point argument for http://php.net/number_format, default is . */
194
 
                $trans = __('number_format_decimal_point');
195
 
                $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
 
203
                $decimal_point = __( 'number_format_decimal_point' );
 
204
 
 
205
                $this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point;
196
206
 
197
207
                // Set text direction.
198
208
                if ( isset( $GLOBALS['text_direction'] ) )
208
218
        }
209
219
 
210
220
        /**
 
221
         * Outputs an admin notice if the /build directory must be used for RTL.
 
222
         *
211
223
         * @since 3.8.0
 
224
         * @access public
212
225
         */
213
226
        public function rtl_src_admin_notice() {
214
227
                /* translators: %s: Name of the directory (build) */