forked from FooSoft/yomichan-import
-
Notifications
You must be signed in to change notification settings - Fork 5
/
jmdict_constants.go
223 lines (211 loc) ยท 6.47 KB
/
jmdict_constants.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
package yomitan
type LangCode struct {
language string
code string
}
const (
edrdgAttribution = "This publication has included material from the JMdict (EDICT, etc.) dictionary files in accordance with the licence provisions of the Electronic Dictionaries Research Group. See http://www.edrdg.org/"
prioritySymbol = "โ
"
rareSymbol = "๐
"
irregularSymbol = "โ "
outdatedSymbol = "โฌ"
defaultSymbol = "ใ"
priorityTagName = "โญ"
rareKanjiTagName = "R"
rareKanaTagName = "r"
irregularTagName = "โ ๏ธ"
outdatedTagName = "โฌ"
atejiTagName = "ateji"
gikunTagName = "gikun"
langMarker = "'๐ '"
noteMarker = "'๐ '"
infoMarker = "'โน๏ธ '"
refMarker = "'โก๏ธ '"
antonymMarker = "'๐ '"
)
var ISOtoFlag = map[string]string{
"": "'๐ฌ๐ง '",
"eng": "'๐ฌ๐ง '",
"dut": "'๐ณ๐ฑ '",
"fre": "'๐ซ๐ท '",
"ger": "'๐ฉ๐ช '",
"hun": "'๐ญ๐บ '",
"ita": "'๐ฎ๐น '",
"jpn": "'๐ฏ๐ต '",
"rus": "'๐ท๐บ '",
"slv": "'๐ธ๐ฎ '",
"spa": "'๐ช๐ธ '",
"swe": "'๐ธ๐ช '",
}
var langNameToCode = map[string]string{
"": "eng",
"english": "eng",
"english_extra": "eng",
"dutch": "dut",
"french": "fre",
"german": "ger",
"hungarian": "hun",
"italian": "ita",
"russian": "rus",
"slovenian": "slv",
"spanish": "spa",
"swedish": "swe",
}
var glossTypeCodeToName = map[LangCode]string{
LangCode{"eng", "lit"}: "literally",
LangCode{"eng", "fig"}: "figuratively",
LangCode{"eng", "expl"}: "", // don't need to tell the user that an explanation is an explanation
LangCode{"eng", "tm"}: "trademark",
}
var refNoteHint = map[LangCode]string{
LangCode{"eng", "xref"}: "see",
LangCode{"eng", "ant"}: "antonym",
}
var sourceLangTypeCodeToType = map[LangCode]string{
LangCode{"eng", "part"}: "partial",
LangCode{"eng", ""}: "", // implied "full"
}
var langCodeToName = map[LangCode]string{
LangCode{"eng", "afr"}: "Afrikaans",
LangCode{"eng", "ain"}: "Ainu",
LangCode{"eng", "alg"}: "Algonquian",
LangCode{"eng", "amh"}: "Amharic",
LangCode{"eng", "ara"}: "Arabic",
LangCode{"eng", "arn"}: "Mapudungun",
LangCode{"eng", "bnt"}: "Bantu",
LangCode{"eng", "bre"}: "Breton",
LangCode{"eng", "bul"}: "Bulgarian",
LangCode{"eng", "bur"}: "Burmese",
LangCode{"eng", "chi"}: "Chinese",
LangCode{"eng", "chn"}: "Chinook Jargon",
LangCode{"eng", "cze"}: "Czech",
LangCode{"eng", "dan"}: "Danish",
LangCode{"eng", "dut"}: "Dutch",
LangCode{"eng", "eng"}: "English",
LangCode{"eng", "epo"}: "Esperanto",
LangCode{"eng", "est"}: "Estonian",
LangCode{"eng", "fil"}: "Filipino",
LangCode{"eng", "fin"}: "Finnish",
LangCode{"eng", "fre"}: "French",
LangCode{"eng", "geo"}: "Georgian",
LangCode{"eng", "ger"}: "German",
LangCode{"eng", "glg"}: "Galician",
LangCode{"eng", "grc"}: "Ancient Greek",
LangCode{"eng", "gre"}: "Modern Greek",
LangCode{"eng", "haw"}: "Hawaiian",
LangCode{"eng", "heb"}: "Hebrew",
LangCode{"eng", "hin"}: "Hindi",
LangCode{"eng", "hun"}: "Hungarian",
LangCode{"eng", "ice"}: "Icelandic",
LangCode{"eng", "ind"}: "Indonesian",
LangCode{"eng", "ita"}: "Italian",
LangCode{"eng", "khm"}: "Khmer",
LangCode{"eng", "kor"}: "Korean",
LangCode{"eng", "kur"}: "Kurdish",
LangCode{"eng", "lat"}: "Latin",
LangCode{"eng", "lit"}: "Lithuanian",
LangCode{"eng", "mal"}: "Malayalam",
LangCode{"eng", "mao"}: "Maori",
LangCode{"eng", "may"}: "Malay",
LangCode{"eng", "mnc"}: "Manchu",
LangCode{"eng", "mol"}: "Moldavian", // ISO 639 deprecated (https://iso639-3.sil.org/code/mol)
LangCode{"eng", "mon"}: "Mongolian",
LangCode{"eng", "nor"}: "Norwegian",
LangCode{"eng", "per"}: "Persian",
LangCode{"eng", "pol"}: "Polish",
LangCode{"eng", "por"}: "Portuguese",
LangCode{"eng", "rum"}: "Romanian",
LangCode{"eng", "rus"}: "Russian",
LangCode{"eng", "san"}: "Sanskrit",
LangCode{"eng", "scr"}: "Croatian", // Code doesn't seem to exist in ISO 639. Should be "hrv" instead? (https://iso639-3.sil.org/code/hrv)
LangCode{"eng", "slo"}: "Slovak",
LangCode{"eng", "slv"}: "Slovenian",
LangCode{"eng", "som"}: "Somali",
LangCode{"eng", "spa"}: "Spanish",
LangCode{"eng", "swa"}: "Swahili",
LangCode{"eng", "swe"}: "Swedish",
LangCode{"eng", "tah"}: "Tahitian",
LangCode{"eng", "tam"}: "Tamil",
LangCode{"eng", "tgl"}: "Tagalog",
LangCode{"eng", "tha"}: "Thai",
LangCode{"eng", "tib"}: "Tibetan",
LangCode{"eng", "tur"}: "Turkish",
LangCode{"eng", "ukr"}: "Ukrainian",
LangCode{"eng", "urd"}: "Urdu",
LangCode{"eng", "uzb"}: "Uzbek",
LangCode{"eng", "vie"}: "Vietnamese",
LangCode{"eng", "yid"}: "Yiddish",
}
// https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
var ISOtoHTML = map[string]string{
"afr": "af", // Afrikaans
"ain": "ain", // Ainu
"alg": "alg", // Algonquian
"amh": "am", // Amharic
"ara": "ar", // Arabic
"arn": "arn", // Mapudungun
"bnt": "bnt", // Bantu
"bre": "br", // Breton
"bul": "bg", // Bulgarian
"bur": "my", // Burmese
"chi": "zh", // Chinese
"chn": "chn", // Chinook Jargon
"cze": "cs", // Czech
"dan": "da", // Danish
"dut": "nl", // Dutch
"eng": "en", // English
"epo": "eo", // Esperanto
"est": "et", // Estonian
"fil": "fil", // Filipino
"fin": "fi", // Finnish
"fre": "fr", // French
"geo": "ka", // Georgian
"ger": "de", // German
"glg": "gl", // Galician
"grc": "grc", // Ancient Greek
"gre": "el", // Modern Greek
"haw": "haw", // Hawaiian
"heb": "he", // Hebrew
"hin": "hi", // Hindi
"hun": "hu", // Hungarian
"ice": "is", // Icelandic
"ind": "id", // Indonesian
"ita": "it", // Italian
"jpn": "ja", // Japanese
"khm": "km", // Khmer
"kor": "ko", // Korean
"kur": "ku", // Kurdish
"lat": "la", // Latin
"lit": "lt", // Lithuanian
"mal": "ml", // Malayalam
"mao": "mi", // Maori
"may": "ms", // Malay
"mnc": "mnc", // Manchu
"mol": "ro", // Moldavian
"mon": "mn", // Mongolian
"nor": "no", // Norwegian
"per": "fa", // Persian
"pol": "pl", // Polish
"por": "pt", // Portuguese
"rum": "ro", // Romanian
"rus": "ru", // Russian
"san": "sa", // Sanskrit
"scr": "hr", // Croatian
"slo": "sk", // Slovak
"slv": "sl", // Slovenian
"som": "so", // Somali
"spa": "es", // Spanish
"swa": "sw", // Swahili
"swe": "sv", // Swedish
"tah": "ty", // Tahitian
"tam": "ta", // Tamil
"tgl": "tl", // Tagalog
"tha": "th", // Thai
"tib": "bo", // Tibetan
"tur": "tr", // Turkish
"ukr": "uk", // Ukrainian
"urd": "ur", // Urdu
"uzb": "uz", // Uzbek
"vie": "vi", // Vietnamese
"yid": "yi", // Yiddish
}