/
locales.go
105 lines (90 loc) · 3.67 KB
/
locales.go
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
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
package locales
import (
"golang.org/x/text/language"
"golang.org/x/text/message/catalog"
)
type dictionary struct {
index []uint32
data string
}
func (d *dictionary) Lookup(key string) (data string, ok bool) {
p, ok := messageKeyToIndex[key]
if !ok {
return "", false
}
start, end := d.index[p], d.index[p+1]
if start == end {
return "", false
}
return d.data[start:end], true
}
var Catalog catalog.Catalog
func init() {
dict := map[string]catalog.Dictionary{
"en_US": &dictionary{index: en_USIndex, data: en_USData},
"zh_CN": &dictionary{index: zh_CNIndex, data: zh_CNData},
}
fallback := language.MustParse("en-US")
cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback))
if err != nil {
panic(err)
}
Catalog = cat
}
var messageKeyToIndex = map[string]int{
"Cannot find JSONDict key": 20,
"Illformat": 21,
"do not known how to deserialize json into this interface type": 16,
"fail to insert object": 0,
"invalid 4 byte rune": 13,
"invalid char": 11,
"invalid hex": 12,
"key not found": 7,
"map key must be string": 17,
"missing input field": 18,
"nil input field": 19,
"not a valid JSONArray": 2,
"not a valid JSONDict": 1,
"not a valid boolean": 5,
"not a valid float": 4,
"not a valid number": 3,
"not a valid string": 6,
"out of index range": 10,
"out of key range": 9,
"unmarshal array length mismatch": 15,
"unmarshal type mismatch": 14,
"unsupported operation": 8,
}
var en_USIndex = []uint32{ // 23 elements
0x00000000, 0x00000016, 0x0000002b, 0x00000041,
0x00000054, 0x00000066, 0x0000007a, 0x0000008d,
0x0000009b, 0x000000b1, 0x000000c2, 0x000000d5,
0x000000e2, 0x000000ee, 0x00000102, 0x0000011a,
0x0000013a, 0x00000178, 0x0000018f, 0x000001a3,
0x000001b3, 0x000001cc, 0x000001d6,
} // Size: 116 bytes
const en_USData string = "" + // Size: 470 bytes
"\x02fail to insert object\x02not a valid JSONDict\x02not a valid JSONArr" +
"ay\x02not a valid number\x02not a valid float\x02not a valid boolean\x02" +
"not a valid string\x02key not found\x02unsupported operation\x02out of k" +
"ey range\x02out of index range\x02invalid char\x02invalid hex\x02invalid" +
" 4 byte rune\x02unmarshal type mismatch\x02unmarshal array length mismat" +
"ch\x02do not known how to deserialize json into this interface type\x02m" +
"ap key must be string\x02missing input field\x02nil input field\x02Canno" +
"t find JSONDict key\x02Illformat"
var zh_CNIndex = []uint32{ // 23 elements
0x00000000, 0x00000017, 0x00000026, 0x00000036,
0x00000046, 0x00000059, 0x0000006c, 0x0000007f,
0x00000095, 0x000000a8, 0x000000c1, 0x000000d8,
0x000000e8, 0x000000fd, 0x0000010b, 0x00000124,
0x00000155, 0x00000155, 0x0000017b, 0x00000191,
0x000001a8, 0x000001bd, 0x000001cd,
} // Size: 116 bytes
const zh_CNData string = "" + // Size: 461 bytes
"\x02插入JSONObject失败\x02不是JSONDict\x02不是JSONArray\x02无数的整数\x02无数的浮点数\x02无效" +
"的布尔值\x02无效的字符串\x02找不到指定键值\x02不支持的操作\x02找不到指定键序列\x02JSON数组下标越界\x02无数的字符" +
"\x02无效的16进制串\x02无效的rune\x02unmarshal类型不匹配\x02unmarshal时Go数组与JSON array长度" +
"不匹配\x02JSON字典的键类型必须是string\x02找不到输入字段\x02输入字段值为null\x02找不到JSONDict键" +
"\x02无效的格式"
// Total table size 1163 bytes (1KiB); checksum: BC36BE3A