diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-07 00:21:12 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-07 00:21:12 +0200 |
commit | 351c15d28e0444fd8a78c510a0c4d62ed433c758 (patch) | |
tree | b97aae6ec45c1b341075da147fb9e333246c19f7 /i18n/catalog.go |
Genesis commit
Diffstat (limited to 'i18n/catalog.go')
-rw-r--r-- | i18n/catalog.go | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/i18n/catalog.go b/i18n/catalog.go new file mode 100644 index 0000000..f01b375 --- /dev/null +++ b/i18n/catalog.go @@ -0,0 +1,79 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package i18n + +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_GB": &dictionary{index: en_GBIndex, data: en_GBData}, + "nl_NL": &dictionary{index: nl_NLIndex, data: nl_NLData}, + } + fallback := language.MustParse("en-GB") + cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) + if err != nil { + panic(err) + } + message.DefaultCatalog = cat +} + +var messageKeyToIndex = map[string]int{ + "Banknotes": 4, + "Coin Collecting": 2, + "Coins": 3, + "Discord": 6, + "Eurozone Languages": 11, + "Feel free to contact us!": 8, + "Found a mistake or want to contribute missing information?": 7, + "Home": 0, + "Jargon": 5, + "News": 1, + "Other Languages": 12, + "Select Your Language": 9, + "Select your preferred language to use on the site.": 10, +} + +var en_GBIndex = []uint32{ // 14 elements + 0x00000000, 0x00000005, 0x0000000a, 0x0000001a, + 0x00000020, 0x0000002a, 0x00000031, 0x00000039, + 0x00000074, 0x0000008d, 0x000000a2, 0x000000d5, + 0x000000e8, 0x000000f8, +} // Size: 80 bytes + +const en_GBData string = "" + // Size: 248 bytes + "\x02Home\x02News\x02Coin Collecting\x02Coins\x02Banknotes\x02Jargon\x02D" + + "iscord\x02Found a mistake or want to contribute missing information?\x02" + + "Feel free to contact us!\x02Select Your Language\x02Select your preferre" + + "d language to use on the site.\x02Eurozone Languages\x02Other Languages" + +var nl_NLIndex = []uint32{ // 14 elements + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 80 bytes + +const nl_NLData string = "" + +// Total table size 408 bytes (0KiB); checksum: E5CA15 |