hub/catalog_gen.go

68 lines
1.7 KiB
Go
Raw Normal View History

2023-03-12 07:33:08 +00:00
// 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{
"en": &dictionary{index: enIndex, data: enData},
"ru": &dictionary{index: ruIndex, data: ruData},
}
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{
"%d subscribers": 4,
"%s logo": 0,
"Dead simple WebSub hub": 1,
"How to publish and consume?": 2,
"What the spec?": 3,
}
var enIndex = []uint32{ // 6 elements
0x00000000, 0x0000000b, 0x00000022, 0x0000003e,
0x0000004d, 0x0000005f,
} // Size: 48 bytes
const enData string = "" + // Size: 95 bytes
"\x02%[1]s logo\x02Dead simple WebSub hub\x02How to publish and consume?" +
"\x02What the spec?\x02%[1]d subscribers"
var ruIndex = []uint32{ // 6 elements
0x00000000, 0x00000015, 0x00000038, 0x0000006d,
0x00000083, 0x000000a0,
} // Size: 48 bytes
const ruData string = "" + // Size: 160 bytes
"\x02логотип %[1]s\x02Простейший хаб WebSub\x02Как публиковать и принимат" +
"ь?\x02В чём спека?\x02%[1]d подписчиков"
// Total table size 351 bytes (0KiB); checksum: D963980B