-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathbase.ts
More file actions
149 lines (147 loc) · 3.49 KB
/
base.ts
File metadata and controls
149 lines (147 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
const typeTemplate = '${label} is not a valid ${type}'
export const base = {
locale: 'en',
common: {
confirm: 'Confirm',
cancel: 'Cancel',
loading: 'Loading',
close: 'Close',
},
Calendar: {
title: 'Date selection',
confirm: 'Confirm',
start: 'start',
end: 'end',
startAndEnd: 'start/end',
today: 'today',
markItems: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
yearAndMonth: '${year}/${month}',
},
Cascader: {
placeholder: 'Selecting',
},
Dialog: {
ok: 'OK',
},
DatePicker: {
tillNow: 'Till Now',
},
ErrorBlock: {
default: {
title: 'Oops, something went wrong',
description: 'Please wait a minute and try again',
},
busy: {
title: 'Oops, not loading',
description: 'Try to refresh the page',
},
disconnected: {
title: 'Network is busy',
description: 'Try to refresh the page',
},
empty: {
title: "Hmm, couldn't find that...",
description: 'Want to try a new search?',
},
},
Form: {
required: 'Required',
optional: 'Optional',
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
enum: '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date',
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate,
},
string: {
len: '${label} must be ${len} characters',
min: '${label} must be at least ${min} characters',
max: '${label} must be up to ${max} characters',
range: '${label} must be between ${min}-${max} characters',
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} must be minimum ${min}',
max: '${label} must be maximum ${max}',
range: '${label} must be between ${min}-${max}',
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}',
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}',
},
},
},
ImageUploader: {
uploading: 'Uploading...',
upload: 'Upload',
},
InfiniteScroll: {
noMore: 'No more',
failedToLoad: 'Failed to load',
retry: 'Retry',
},
Input: {
clear: 'clear',
},
Mask: {
name: 'Mask',
},
Modal: {
ok: 'OK',
},
NumberKeyboard: {
backspace: 'backspace',
},
PasscodeInput: {
name: 'Passcode Input',
},
PullToRefresh: {
pulling: 'Scroll down to refresh',
canRelease: 'Release to refresh immediately',
complete: 'Refresh successful',
},
SearchBar: {
name: 'Search Bar',
},
Slider: {
name: 'Slider',
},
Stepper: {
decrease: 'decrease',
increase: 'increase',
},
Switch: {
name: 'Switch',
},
Selector: {
name: 'Selector',
},
TextArea: {
clear: 'clear',
},
}
export type Locale = typeof base