hub/catalog_gen.go

69 lines
1.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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": 5,
"%s logo": 1,
"Dead simple WebSub hub": 2,
"How to publish and consume?": 3,
"What the spec?": 4,
"version": 0,
}
var enIndex = []uint32{ // 7 elements
0x00000000, 0x00000008, 0x00000013, 0x0000002a,
0x00000046, 0x00000055, 0x00000067,
} // Size: 52 bytes
const enData string = "" + // Size: 103 bytes
"\x02version\x02%[1]s logo\x02Dead simple WebSub hub\x02How to publish an" +
"d consume?\x02What the spec?\x02%[1]d subscribers"
var ruIndex = []uint32{ // 7 elements
0x00000000, 0x0000000d, 0x00000022, 0x00000045,
0x0000007a, 0x00000090, 0x000000ad,
} // Size: 52 bytes
const ruData string = "" + // Size: 173 bytes
"\x02версия\x02логотип %[1]s\x02Простейший хаб WebSub\x02Как публиковать " +
"и принимать?\x02В чём спека?\x02%[1]d подписчиков"
// Total table size 380 bytes (0KiB); checksum: 7D8C2E8B