Skip to content

Commit 5d58fcf

Browse files
committed
fix: use current i18n lang for numeral formatting
1 parent e03d8cc commit 5d58fcf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import numeral from 'numeral';
22
import _ from 'lodash';
33

4+
import {i18n} from './i18n';
45
import {MEGABYTE, TERABYTE, DAY_IN_SECONDS, GIGABYTE} from './constants';
56

67
import locales from 'numeral/locales'; // eslint-disable-line no-unused-vars
7-
numeral.locale('ru');
8-
numeral.localeData().delimiters.decimal = '.';
8+
9+
numeral.locale(i18n.lang);
910

1011
export const formatBytes = (bytes) => {
1112
return numeral(bytes).format('0 ib').replace('i', '');

0 commit comments

Comments
 (0)