-
Notifications
You must be signed in to change notification settings - Fork 5
/
catalog.go
122 lines (111 loc) · 5.27 KB
/
catalog.go
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
117
118
119
120
121
122
// 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_US": &dictionary{index: en_USIndex, data: en_USData},
"ru": &dictionary{index: ruIndex, data: ruData},
}
fallback := language.MustParse("en-US")
cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback))
if err != nil {
panic(err)
}
message.DefaultCatalog = cat
}
var messageKeyToIndex = map[string]int{
"About": 17,
"Daemon started": 27,
"Daemon stopped": 26,
"Donations": 18,
"Free: %s Trash: %s": 25,
"Help": 16,
"Last synchronized": 5,
"Light theme": 12,
"Notification service unavailable!": 20,
"Notifications": 13,
"Open Yandex.Disk folder": 9,
"Open Yandex.Disk in browser": 10,
"Quit": 19,
"Settings": 11,
"Show daemon output": 8,
"Start daemon": 6,
"Start on start": 14,
"Status: %s": 23,
"Stop daemon": 7,
"Stop on exit": 15,
"Synchronization finished": 29,
"Synchronization started": 28,
"Used: %s/%s": 24,
"Yandex.Disk daemon output": 21,
"busy": 2,
"idle": 0,
"index": 1,
"none": 3,
"paused": 4,
"yd-go is the panel indicator for Yandex.Disk daemon.\n\n\tVersion: %s\n\nCopyleft 2017-%s Sly_tom_cat (slytomcat@mail.ru)\n\n\tLicense: GPL v.3\n\n": 22,
}
var en_USIndex = []uint32{ // 31 elements
0x00000000, 0x00000005, 0x0000000b, 0x00000010,
0x00000015, 0x0000001c, 0x0000002e, 0x0000003b,
0x00000047, 0x0000005a, 0x00000072, 0x0000008e,
0x00000097, 0x000000a3, 0x000000b1, 0x000000c0,
0x000000cd, 0x000000d2, 0x000000d8, 0x000000e2,
0x000000e7, 0x00000109, 0x00000123, 0x000001b8,
0x000001c6, 0x000001d8, 0x000001f1, 0x00000200,
0x0000020f, 0x00000227, 0x00000240,
} // Size: 148 bytes
const en_USData string = "" + // Size: 576 bytes
"\x02idle\x02index\x02busy\x02none\x02paused\x02Last synchronized\x02Star" +
"t daemon\x02Stop daemon\x02Show daemon output\x02Open Yandex.Disk folder" +
"\x02Open Yandex.Disk in browser\x02Settings\x02Light theme\x02Notificati" +
"ons\x02Start on start\x02Stop on exit\x02Help\x02About\x02Donations\x02Q" +
"uit\x02Notification service unavailable!\x02Yandex.Disk daemon output" +
"\x04\x00\x02\x0a\x0a\x8e\x01\x02yd-go is the panel indicator for Yandex." +
"Disk daemon.\x0a\x0a\x09Version: %[1]s\x0a\x0aCopyleft 2017-%[2]s Sly_to" +
"m_cat (slytomcat@mail.ru)\x0a\x0a\x09License: GPL v.3\x02Status: %[1]s" +
"\x02Used: %[1]s/%[2]s\x02Free: %[1]s Trash: %[2]s\x02Daemon stopped\x02D" +
"aemon started\x02Synchronization started\x02Synchronization finished"
var ruIndex = []uint32{ // 31 elements
0x00000000, 0x00000011, 0x00000026, 0x00000041,
0x00000056, 0x00000061, 0x00000099, 0x000000bb,
0x000000df, 0x0000010a, 0x00000134, 0x00000163,
0x00000176, 0x0000018e, 0x000001a5, 0x000001ca,
0x000001f3, 0x00000200, 0x0000021a, 0x00000235,
0x00000240, 0x0000027a, 0x000002a0, 0x0000035e,
0x00000372, 0x00000398, 0x000003c6, 0x000003ec,
0x0000040c, 0x00000434, 0x00000462,
} // Size: 148 bytes
const ruData string = "" + // Size: 1122 bytes
"\x02ожидание\x02индексация\x02синхронизация\x02остановлен\x02пауза\x02По" +
"следние синхронизированные\x02Запустить утилиту\x02Остановить утилиту" +
"\x02Показать вывод утилиты\x02Открыть каталог Yandex.Disk\x02Открыть Yan" +
"dex.Disk в браузере\x02Настройки\x02Светлая тема\x02Уведомления\x02Запус" +
"кать на старте\x02Остановить при выходе\x02Помощь\x02Об индикаторе\x02П" +
"ожертвования\x02Выход\x02Сервис уведомлений недоступен!\x02Вывод утилит" +
"ы Yandex.Disk\x04\x00\x02\x0a\x0a\xb7\x01\x02yd-go это индикатор панели" +
" для утилиты Yandex.Disk.\x0a\x0a\x09Версия: %[1]s\x0a\x0aCopyleft 2017-" +
"%[2]s Sly_tom_cat (slytomcat@mail.ru)\x0a\x0a\x09Лицензия: GPL v.3\x02Ст" +
"атус: %[1]s\x02Использовано: %[1]s/%[2]s\x02Свободно: %[1]s Корзина: %[" +
"2]s\x02Утилита остановлена\x02Утилита запущена\x02Синхронизация начата" +
"\x02Синхронизация закончена"
// Total table size 1994 bytes (1KiB); checksum: 993284CE