-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalog.go
124 lines (95 loc) · 3.02 KB
/
catalog.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
package main
import (
"golang.org/x/text/language"
"golang.org/x/text/message"
"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
}
func init() {
dict := map[string]catalog.Dictionary{
"ar": &dictionary{index: arIndex, data: arData},
"bn": &dictionary{index: bnIndex, data: bnData},
"en": &dictionary{index: enIndex, data: enData},
"es": &dictionary{index: esIndex, data: esData},
"fr": &dictionary{index: frIndex, data: frData},
"ht": &dictionary{index: htIndex, data: htData},
"ko": &dictionary{index: koIndex, data: koData},
"pl": &dictionary{index: plIndex, data: plData},
"ru": &dictionary{index: ruIndex, data: ruData},
"ur": &dictionary{index: urIndex, data: urData},
"zh": &dictionary{index: zhIndex, data: zhData},
}
fallback := language.MustParse("en")
cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback))
if err != nil {
panic(err)
}
message.DefaultCatalog = cat
}
var messageKeyToIndex = map[string]int{
"NYC Council Legislation Search": 0,
"NYC Council Members": 2,
"NYC Local Laws of %d": 1,
}
var arIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const arData string = ""
var bnIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const bnData string = ""
var enIndex = []uint32{ // 4 elements
0x00000000, 0x0000001f, 0x00000037, 0x0000004b,
} // Size: 40 bytes
const enData string = "" + // Size: 75 bytes
"\x02NYC Council Legislation Search\x02NYC Local Laws of %[1]d\x02NYC Cou" +
"ncil Members"
var esIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const esData string = ""
var frIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const frData string = ""
var htIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const htData string = ""
var koIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const koData string = ""
var plIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const plData string = ""
var ruIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const ruData string = ""
var urIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const urData string = ""
var zhIndex = []uint32{ // 4 elements
0x00000000, 0x00000000, 0x00000000, 0x00000000,
} // Size: 40 bytes
const zhData string = ""
// Total table size 515 bytes (0KiB); checksum: 843C9B9E