Skip to content

Commit f10c38b

Browse files
committed
fix: locale and it's tests after dropping commit
1 parent c27e4fd commit f10c38b

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

src/locale/ku.js

+26-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
// Kurdish [ku]
22
import dayjs from 'dayjs'
3-
import {
4-
englishToArabicNumbersMap,
5-
arabicToEnglishNumbersMap
6-
} from '../constant'
3+
4+
export const englishToArabicNumbersMap = {
5+
1: '١',
6+
2: '٢',
7+
3: '٣',
8+
4: '٤',
9+
5: '٥',
10+
6: '٦',
11+
7: '٧',
12+
8: '٨',
13+
9: '٩',
14+
0: '٠'
15+
}
16+
17+
const arabicToEnglishNumbersMap = {
18+
'١': '1',
19+
'٢': '2',
20+
'٣': '3',
21+
'٤': '4',
22+
'٥': '5',
23+
'٦': '6',
24+
'٧': '7',
25+
'٨': '8',
26+
'٩': '9',
27+
'٠': '0'
28+
}
729

830
const months = [
931
'کانوونی دووەم',
@@ -68,4 +90,3 @@ const locale = {
6890
dayjs.locale(locale, null, true)
6991

7092
export default locale
71-

test/locale/ku.test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import moment from 'moment'
22
import MockDate from 'mockdate'
33
import dayjs from '../../src'
4-
import locale from '../../src/locale/ku'
4+
import locale, { englishToArabicNumbersMap } from '../../src/locale/ku'
55
import preParsePostFormat from '../../src/plugin/preParsePostFormat'
6-
import { englishToArabicNumbersMap } from '../../src/constant'
76

87
dayjs.extend(preParsePostFormat)
98

0 commit comments

Comments
 (0)