-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
270 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { TLangCode } from '../index'; | ||
|
||
import zhTW from './zh-tw'; | ||
import zhCN from './zh-cn'; | ||
|
||
export type TSymbol<T> = [T, T, T, T, T, T, T, T, T, T]; | ||
|
||
export type TUnit = '1' | '2' | '3'; | ||
|
||
export type TLargeUnit = '4' | '8' | '12' | '16' | '20' | '24' | '28' | '32' | '36' | '40' | '44'; | ||
|
||
export type TUnitMapping = { [unit in TUnit]: string }; | ||
|
||
export type TLargeUnitMapping = { [unit in TLargeUnit]: string }; | ||
|
||
export type TDigitMapping = { | ||
readonly upperCaseMapping: TSymbol<string>; | ||
readonly lowerCaseMapping: TSymbol<string>; | ||
readonly upperCaseUnitMapping: TUnitMapping; | ||
readonly lowerCaseUnitMapping: TUnitMapping; | ||
readonly largeUnitMapping: TLargeUnitMapping; | ||
}; | ||
|
||
export type TDigitLang = { [langCode in TLangCode]: TDigitMapping }; | ||
|
||
const langs: TDigitLang = { | ||
'zh-tw': zhTW, | ||
'zh-cn': zhCN | ||
}; | ||
|
||
export default langs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { TDigitMapping } from './index'; | ||
|
||
const mapping: TDigitMapping = { | ||
upperCaseMapping: ['零', '壹', '贰', '参', '肆', '伍', '陆', '柒', '捌', '玖'], | ||
|
||
lowerCaseMapping: ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'], | ||
|
||
upperCaseUnitMapping: { | ||
'1': '十', | ||
'2': '佰', | ||
'3': '仟' | ||
}, | ||
|
||
lowerCaseUnitMapping: { | ||
'1': '十', | ||
'2': '百', | ||
'3': '千' | ||
}, | ||
|
||
largeUnitMapping: { | ||
'4': '万', | ||
'8': '亿', | ||
'12': '兆', | ||
'16': '京', | ||
'20': '垓', | ||
'24': '秭', | ||
'28': '穰', | ||
'32': '沟', | ||
'36': '涧', | ||
'40': '正', | ||
'44': '载' | ||
} | ||
}; | ||
|
||
export default mapping; |
Oops, something went wrong.