summaryrefslogtreecommitdiffhomepage
path: root/i18n/catalog.go
blob: ccf4068749f846f0c0e9b959653b1decd742dc68 (plain) (blame)
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
// 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{
	"About":                    13,
	"About Us":                 1,
	"Banknotes":                10,
	"Coin Collecting":          8,
	"Coins":                    9,
	"Contact Us":               4,
	"Discord":                  12,
	"Eurozone Languages":       24,
	"Feel free to contact us!": 16,
	"Found a mistake or want to contribute missing information?": 15,
	"Home":                 6,
	"Jargon":               11,
	"Language":             14,
	"News":                 7,
	"Open Source":          2,
	"Other Languages":      25,
	"Page not found":       0,
	"Select Your Language": 22,
	"Select your preferred language to use on the site.": 23,
	"The Euro Cash Compendium":                           17,
	"This website is an open project, and a collaboration between developers, translators, and researchers. All source code, data, images, and more for the website are open source and can be found %shere%s. This site is licensed under the BSD 0-Clause license giving you the full freedom to do whatever you would like with any of the content on this site.": 3,
	"United in": 18,
	"Welcome to the Euro Cash Compendium. This sites aims to be a resource for you to discover everything there is to know about the coins and banknotes of the Euro, a currency that spans 26 countries and 350 million people. We also have dedicated sections of the site for collectors.":                                                                                                                                                                                                               21,
	"While we try to stay as up-to-date as possible and to fact check our information, it is always possible that we get something wrong, lack a translation, or are missing some piece of data you may have. In such a case don’t hesitate to contact us; we’ll try to get the site updated or fixed as soon as possible. You are always free to contribute via a git patch if you are more technically included, but if not you can always send an email to %s or contact ‘@onetruemangoman’ on Discord.": 5,
	"cash":      20,
	"diversity": 19,
}

var en_GBIndex = []uint32{ // 27 elements
	0x00000000, 0x0000000f, 0x00000018, 0x00000024,
	0x00000189, 0x00000194, 0x00000385, 0x0000038a,
	0x0000038f, 0x0000039f, 0x000003a5, 0x000003af,
	0x000003b6, 0x000003be, 0x000003c4, 0x000003cd,
	0x00000408, 0x00000421, 0x0000043a, 0x00000444,
	0x0000044e, 0x00000453, 0x0000056b, 0x00000580,
	0x000005b3, 0x000005c6, 0x000005d6,
} // Size: 132 bytes

const en_GBData string = "" + // Size: 1494 bytes
	"\x02Page not found\x02About Us\x02Open Source\x02This website is an open" +
	" project, and a collaboration between developers, translators, and resea" +
	"rchers. All source code, data, images, and more for the website are open" +
	" source and can be found %[1]shere%[2]s. This site is licensed under the" +
	" BSD 0-Clause license giving you the full freedom to do whatever you wou" +
	"ld like with any of the content on this site.\x02Contact Us\x02While we " +
	"try to stay as up-to-date as possible and to fact check our information," +
	" it is always possible that we get something wrong, lack a translation, " +
	"or are missing some piece of data you may have. In such a case don’t hes" +
	"itate to contact us; we’ll try to get the site updated or fixed as soon " +
	"as possible. You are always free to contribute via a git patch if you ar" +
	"e more technically included, but if not you can always send an email to " +
	"%[1]s or contact ‘@onetruemangoman’ on Discord.\x02Home\x02News\x02Coin " +
	"Collecting\x02Coins\x02Banknotes\x02Jargon\x02Discord\x02About\x02Langua" +
	"ge\x02Found a mistake or want to contribute missing information?\x02Feel" +
	" free to contact us!\x02The Euro Cash Compendium\x02United in\x02diversi" +
	"ty\x02cash\x02Welcome to the Euro Cash Compendium. This sites aims to be" +
	" a resource for you to discover everything there is to know about the co" +
	"ins and banknotes of the Euro, a currency that spans 26 countries and 35" +
	"0 million people. We also have dedicated sections of the site for collec" +
	"tors.\x02Select Your Language\x02Select your preferred language to use o" +
	"n the site.\x02Eurozone Languages\x02Other Languages"

var nl_NLIndex = []uint32{ // 27 elements
	0x00000000, 0x00000000, 0x00000000, 0x00000000,
	0x00000000, 0x00000000, 0x00000000, 0x00000000,
	0x00000000, 0x00000000, 0x00000000, 0x00000000,
	0x00000000, 0x00000000, 0x00000000, 0x00000000,
	0x00000000, 0x00000000, 0x00000000, 0x00000000,
	0x00000000, 0x00000000, 0x00000000, 0x00000000,
	0x00000000, 0x00000000, 0x00000000,
} // Size: 132 bytes

const nl_NLData string = ""

// Total table size 1758 bytes (1KiB); checksum: 8485E573