Onboarding: Format product count ranges numbers without decimals (https://github.com/woocommerce/woocommerce-admin/pull/3316)

* Format product count ranges numbers without decimals

* Don't pass format method as argument to getNumberRangeString
This commit is contained in:
Joshua T Flowers 2019-12-04 07:13:42 +08:00 committed by GitHub
parent fa2ab220c9
commit 7e2aa85235
1 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ import { keys, get, pickBy } from 'lodash';
/**
* WooCommerce dependencies
*/
import { numberFormat } from 'lib/number-format';
import { formatValue } from 'lib/number-format';
import { getSetting, CURRENCY as currency } from '@woocommerce/wc-admin-settings';
/**
@ -138,18 +138,18 @@ class BusinessDetails extends Component {
return keys( pickBy( values ) ).filter( name => this.extensions.includes( name ) );
}
getNumberRangeString( min, max = false, format = numberFormat ) {
getNumberRangeString( min, max = false ) {
if ( ! max ) {
return sprintf(
_x( '%s+', 'store product count or revenue', 'woocommerce-admin' ),
format( min )
formatValue( 'number', min )
);
}
return sprintf(
_x( '%1$s - %2$s', 'store product count or revenue range', 'woocommerce-admin' ),
format( min ),
format( max )
formatValue( 'number', min ),
formatValue( 'number', max )
);
}