hub/catalog_gen.go

72 lines
2.1 KiB
Go
Raw Permalink 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": 5,
"%s logo": 1,
"Dead simple WebSub hub": 2,
"How to publish and consume?": 3,
"What the spec?": 4,
"version": 0,
2023-03-12 07:33:08 +00:00
}
var enIndex = []uint32{ // 7 elements
0x00000000, 0x00000008, 0x00000013, 0x0000002a,
0x00000046, 0x00000055, 0x00000092,
} // Size: 52 bytes
2023-03-12 07:33:08 +00:00
const enData string = "" + // Size: 146 bytes
"\x02version\x02%[1]s logo\x02Dead simple WebSub hub\x02How to publish an" +
"d consume?\x02What the spec?\x14\x01\x81\x01\x00=\x00\x0f\x02no subscrib" +
"ers=\x01\x0f\x02one subscriber\x00\x12\x02%[1]d subscribers"
2023-03-12 07:33:08 +00:00
var ruIndex = []uint32{ // 7 elements
0x00000000, 0x0000000d, 0x00000022, 0x00000045,
0x0000007a, 0x00000090, 0x00000111,
} // Size: 52 bytes
2023-03-12 07:33:08 +00:00
const ruData string = "" + // Size: 273 bytes
"\x02версия\x02логотип %[1]s\x02Простейший хаб WebSub\x02Как публиковать " +
"и принимать?\x02В чём спека?\x14\x01\x81\x01\x00=\x00\x1e\x02без подпис" +
"чиков=\x01\x1c\x02один подписчик\x04\x1b\x02%[1]d подписчика\x00\x1d" +
"\x02%[1]d подписчиков"
2023-03-12 07:33:08 +00:00
// Total table size 523 bytes (0KiB); checksum: 6AB3BB61