diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-05-15 11:52:20 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-25 09:43:37 +0200 |
| commit | 76e709193614b3668d3c31a078e667473af20369 (patch) | |
| tree | 66f0e6caf03e19b5034c687e3b4c3cbd904be03a /client/zgotext.go | |
| parent | c1847c9cf76cb17e5b027ac4c0aea99d15852d45 (diff) | |
Initial i18n implementation
Diffstat (limited to 'client/zgotext.go')
| -rw-r--r-- | client/zgotext.go | 272 |
1 files changed, 272 insertions, 0 deletions
diff --git a/client/zgotext.go b/client/zgotext.go new file mode 100644 index 0000000..b1720a4 --- /dev/null +++ b/client/zgotext.go @@ -0,0 +1,272 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package client + +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{ + "da": &dictionary{index: daIndex, data: daData}, + "de": &dictionary{index: deIndex, data: deData}, + "dnk": &dictionary{index: dnkIndex, data: dnkData}, + "en": &dictionary{index: enIndex, data: enData}, + "es": &dictionary{index: esIndex, data: esData}, + "fr": &dictionary{index: frIndex, data: frData}, + "it": &dictionary{index: itIndex, data: itData}, + "nl": &dictionary{index: nlIndex, data: nlData}, + "uk": &dictionary{index: ukIndex, data: ukData}, + } + 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{ + "An error occurred after getting the discovery files for the list of organizations": 6, + "An error occurred after getting the discovery files for the list of servers": 7, + "Client has an invalid state": 4, + "Could not retrieve institute access server with URL: '%s' from discovery": 15, + "Failed internal state transition requested by the client from: '%s' to '%s'": 34, + "Failed to cleanup the VPN connection for the current server": 29, + "Failed to get current server for renewing the session": 32, + "Failed to get the current server to cleanup the connection": 28, + "Failed to set the server with identifier: '%s' as the current": 26, + "Failover failed to complete with gateway: '%s' and mtu: '%d'": 33, + "Identifier: '%s' for server with type: '%d' is not valid": 24, + "Identifier: '%s' for server with type: '%d' is not valid for removal": 27, + "Internal state transition error": 0, + "No secure internet server available to set a location for": 31, + "No suitable profiles could be found": 11, + "Not a valid server type: %v": 23, + "Profile with ID: '%s' could not be obtained from the server": 13, + "Profile with ID: '%s' could not be set": 12, + "Server type: '%v' is not valid to be added": 20, + "Server/organization discovery with Let's Connect is not supported": 5, + "Setting a secure internet location with Let's Connect! is not supported": 30, + "The VPN configuration could not be obtained": 21, + "The authorization procedure failed to complete": 10, + "The client registered with an invalid client ID: '%v'": 1, + "The client registered with an invalid version: '%v'": 2, + "The current profile could not be found": 22, + "The current server could not be found when getting it for expiry": 8, + "The custom server with URL: '%s' could not be added": 19, + "The identifier that was passed to the library is incorrect": 14, + "The institute access server with URL: '%s' could not be added": 16, + "The log file with directory: '%s' failed to initialize": 3, + "The operation for getting a VPN configuration was canceled": 25, + "The secure internet location could not be set": 9, + "The secure internet server with organisation ID: '%s' could not be added": 18, + "The secure internet server with organisation ID: '%s' could not be retrieved from discovery": 17, + "timeout reached": 35, + "with cause:": 36, +} + +var daIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const daData string = "" + +var deIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const deData string = "" + +var dnkIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const dnkData string = "" + +var enIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 0x00000000, 0x00000020, 0x00000059, 0x00000090, + 0x000000ca, 0x000000e6, 0x00000128, 0x0000017a, + 0x000001c6, 0x00000207, 0x00000235, 0x00000264, + 0x00000288, 0x000002b2, 0x000002f1, 0x0000032c, + 0x00000378, 0x000003b9, 0x00000418, 0x00000464, + 0x0000049b, 0x000004c9, 0x000004f5, 0x0000051c, + 0x0000053b, 0x0000057a, 0x000005b5, 0x000005f6, + 0x00000641, 0x0000067c, 0x000006b8, 0x00000700, + // Entry 20 - 3F + 0x0000073a, 0x00000770, 0x000007b3, 0x00000805, + 0x00000815, 0x00000821, +} // Size: 176 bytes + +const enData string = "" + // Size: 2081 bytes + "\x02Internal state transition error\x02The client registered with an inv" + + "alid client ID: '%[1]v'\x02The client registered with an invalid version" + + ": '%[1]v'\x02The log file with directory: '%[1]s' failed to initialize" + + "\x02Client has an invalid state\x02Server/organization discovery with Le" + + "t's Connect is not supported\x02An error occurred after getting the disc" + + "overy files for the list of organizations\x02An error occurred after get" + + "ting the discovery files for the list of servers\x02The current server c" + + "ould not be found when getting it for expiry\x02The secure internet loca" + + "tion could not be set\x02The authorization procedure failed to complete" + + "\x02No suitable profiles could be found\x02Profile with ID: '%[1]s' coul" + + "d not be set\x02Profile with ID: '%[1]s' could not be obtained from the " + + "server\x02The identifier that was passed to the library is incorrect\x02" + + "Could not retrieve institute access server with URL: '%[1]s' from discov" + + "ery\x02The institute access server with URL: '%[1]s' could not be added" + + "\x02The secure internet server with organisation ID: '%[1]s' could not b" + + "e retrieved from discovery\x02The secure internet server with organisati" + + "on ID: '%[1]s' could not be added\x02The custom server with URL: '%[1]s'" + + " could not be added\x02Server type: '%[1]v' is not valid to be added\x02" + + "The VPN configuration could not be obtained\x02The current profile could" + + " not be found\x02Not a valid server type: %[1]v\x02Identifier: '%[1]s' f" + + "or server with type: '%[2]d' is not valid\x02The operation for getting a" + + " VPN configuration was canceled\x02Failed to set the server with identif" + + "ier: '%[1]s' as the current\x02Identifier: '%[1]s' for server with type:" + + " '%[2]d' is not valid for removal\x02Failed to get the current server to" + + " cleanup the connection\x02Failed to cleanup the VPN connection for the " + + "current server\x02Setting a secure internet location with Let's Connect!" + + " is not supported\x02No secure internet server available to set a locati" + + "on for\x02Failed to get current server for renewing the session\x02Failo" + + "ver failed to complete with gateway: '%[1]s' and mtu: '%[2]d'\x02Failed " + + "internal state transition requested by the client from: '%[1]s' to '%[2]" + + "s'\x02timeout reached\x02with cause:" + +var esIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const esData string = "" + +var frIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const frData string = "" + +var itIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const itData string = "" + +var nlIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const nlData string = "" + +var ukIndex = []uint32{ // 38 elements + // Entry 0 - 1F + 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, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + // Entry 20 - 3F + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, +} // Size: 176 bytes + +const ukData string = "" + +// Total table size 3665 bytes (3KiB); checksum: 21098CA7 |
