forked from quisquous/cactbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_replacement.js
340 lines (336 loc) · 7.75 KB
/
common_replacement.js
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
// TODO: maybe this should be structured identically to a timelineReplace section.
// It's awkward to refer to these string keys, so name them as replaceSync[keys.sealKey].
export const syncKeys = {
seal: '(?<=00:0839:)(.*) will be sealed off(?: in (?:[0-9]+ seconds)?)?',
unseal: 'is no longer sealed',
engage: 'Engage!',
};
const textKeys = {
// Match directions in replaceText
// eg: `(N)`, `(SW)`, `(NE/NW)`, etc.
E: '(?<= \\(|\\/)E(?=\\)|\\/)',
N: '(?<= \\(|\\/)N(?=\\)|\\/)',
S: '(?<= \\(|\\/)S(?=\\)|\\/)',
W: '(?<= \\(|\\/)W(?=\\)|\\/)',
NE: '(?<= \\(|\\/)NE(?=\\)|\\/)',
NW: '(?<= \\(|\\/)NW(?=\\)|\\/)',
SE: '(?<= \\(|\\/)SE(?=\\)|\\/)',
SW: '(?<= \\(|\\/)SW(?=\\)|\\/)',
// Match Roles in replaceText
// eg: `(Tank)`, `(Healer)`, `(DPS)`, etc
Tank: '(?<= \\(|\\/)Tanks?(?=\\)|\\/)',
Healer: '(?<= \\(|\\/)Healers?(?=\\)|\\/)',
DPS: '(?<= \\(|\\/)DPS(?=\\)|\\/)',
// Match `--1--` style text.
Number: '--(\\s*\\d+\\s*)--',
};
export const commonReplacement = {
replaceSync: {
[syncKeys.seal]: {
en: '$1 will be sealed off',
de: 'Noch 15 Sekunden, bis sich (?:(?:der|die|das) )?(?:Zugang zu(?:[rm]| den)? )?$1 schließt',
fr: 'Fermeture d(?:e|u|es) $1 dans',
ja: '$1の封鎖まであと',
cn: '距$1被封锁还有',
ko: '15초 후에 $1(?:이|가) 봉쇄됩니다',
},
[syncKeys.unseal]: {
en: 'is no longer sealed',
de: 'öffnet sich (?:wieder|erneut)',
fr: 'Ouverture ',
ja: 'の封鎖が解かれた',
cn: '的封锁解除了',
ko: '의 봉쇄가 해제되었습니다',
},
[syncKeys.engage]: {
en: 'Engage!',
de: 'Start!',
fr: 'À l\'attaque',
ja: '戦闘開始!',
cn: '战斗开始!',
ko: '전투 시작!',
},
},
replaceText: {
'--adds spawn--': {
de: '--adds spawn--',
fr: '--apparition d\'adds--',
ja: '--雑魚出現--',
cn: '--小怪出现--',
ko: '--쫄 소환--',
},
'--adds targetable--': {
de: '--adds anvisierbar--',
fr: '--adds ciblables--',
ja: '--雑魚ターゲット可能--',
cn: '--小怪可选中--',
ko: '--쫄 타겟 가능--',
},
'--center--': {
de: '--mitte--',
fr: '--centre--',
ja: '--センター--',
cn: '--中央--',
ko: '--중앙--',
},
'--clones appear--': {
de: '--klone erscheinen--',
fr: '--apparition des clones--',
ja: '--幻影出現--',
cn: '--克隆 体 出现--',
ko: '--분신 소환--',
},
'--corner--': {
de: '--ecke--',
fr: '--coin--',
ja: '--コーナー--',
cn: '--角落--',
ko: '--구석--',
},
'--dps burn--': {
de: '--dps burn--',
fr: '--burn dps--',
ja: '--火力出せ--',
cn: '--转火--',
ko: '--딜 체크--',
},
'--east--': {
de: '--osten--',
fr: '--est--',
ja: '--東--',
cn: '--东--',
ko: '--동쪽--',
},
'Enrage': {
de: 'Finalangriff',
fr: 'Enrage',
ja: '時間切れ',
cn: '狂暴',
ko: '전멸기',
},
'--jump--': {
de: '--sprung--',
fr: '--saut--',
ja: '--ジャンプ--',
cn: '--跳--',
ko: '--점프--',
},
'--knockback--': {
de: '--Rückstoß--',
fr: '--poussée--',
ja: '--ノックバック--',
cn: '--击退--',
ko: '--넉백--',
},
'--middle--': {
de: '--mitte--',
fr: '--milieu--',
ja: '--中央--',
cn: '--中间--',
ko: '--중앙--',
},
'--north--': {
de: '--norden--',
fr: '--nord--',
ja: '--北--',
cn: '--北--',
ko: '--북쪽--',
},
'--northeast--': {
de: '--nordosten--',
fr: '--nord-est--',
ja: '--北東--',
cn: '--东北--',
ko: '--북동--',
},
'--northwest--': {
de: '--nordwesten--',
fr: '--nord-ouest--',
ja: '--北西--',
cn: '--西北--',
ko: '--북서--',
},
'--rotate--': {
de: '--rotieren--',
fr: '--rotation--',
ja: '--回転--',
cn: '--龙回转--',
ko: '--회전--',
},
'--south--': {
de: '--süden--',
fr: '--sud--',
ja: '--南--',
cn: '--南--',
ko: '--남쪽--',
},
'--southeast--': {
de: '--südosten--',
fr: '--sud-est--',
ja: '--南東--',
cn: '--东南--',
ko: '--남동--',
},
'--southwest--': {
de: '--südwesten--',
fr: '--sud-ouest--',
ja: '--南西--',
cn: '--西南--',
ko: '--남서--',
},
'--split--': {
de: '--teilen--',
fr: '--division--',
ja: '--分裂--',
cn: '--分裂--',
ko: '--분열--',
},
'--stun--': {
de: '--Betäubung--',
fr: '--étourdissement--',
ja: '--スタン--',
cn: '--击晕--',
ko: '--기절--',
},
'--sync--': {
de: '--synchronisation--',
fr: '--synchronisation--',
ja: '--シンク--',
cn: '--同步化--',
ko: '--동기화--',
},
'--([0-9]+x )?targetable--': {
de: '--$1anvisierbar--',
fr: '--$1ciblable--',
ja: '--$1ターゲット可能--',
cn: '--$1可选中--',
ko: '--$1타겟 가능--',
},
'--teleport--': {
de: '--teleportation--',
fr: '--téléportation--',
ja: '--テレポート--',
cn: '--傳送--',
ko: '--순간 이동--',
},
'--untargetable--': {
de: '--nich anvisierbar--',
fr: '--non ciblable--',
ja: '--ターゲット不可--',
cn: '--无法选中--',
ko: '--타겟 불가능--',
},
'--west--': {
de: '--westen--',
fr: '--ouest--',
ja: '--西--',
cn: '--西--',
ko: '--서쪽--',
},
[textKeys.E]: {
de: 'O',
fr: 'E',
ja: '東',
cn: '东',
ko: '동',
},
[textKeys.N]: {
de: 'N',
fr: 'N',
ja: '北',
cn: '北',
ko: '북',
},
[textKeys.S]: {
de: 'S',
fr: 'S',
ja: '南',
cn: '南',
ko: '남',
},
[textKeys.W]: {
de: 'W',
fr: 'O',
ja: '西',
cn: '西',
ko: '서',
},
[textKeys.NE]: {
de: 'NO',
fr: 'NE',
ja: '北東',
cn: '东北',
ko: '북동',
},
[textKeys.NW]: {
de: 'NW',
fr: 'NO',
ja: '北西',
cn: '西北',
ko: '북서',
},
[textKeys.SE]: {
de: 'SO',
fr: 'SE',
ja: '南東',
cn: '东南',
ko: '남동',
},
[textKeys.SW]: {
de: 'SW',
fr: 'SO',
ja: '南西',
cn: '西南',
ko: '남서',
},
[textKeys.Tank]: {
de: 'Tank',
fr: 'Tank',
ja: 'タンク',
cn: '坦克',
ko: '탱커',
},
[textKeys.Healer]: {
de: 'Heiler',
fr: 'Healer',
ja: 'ヒーラー',
cn: '治疗',
ko: '힐러',
},
[textKeys.DPS]: {
de: 'DPS',
fr: 'DPS',
ja: 'DPS',
cn: 'DPS',
ko: '딜러',
},
[textKeys.Number]: {
de: '--$1--',
fr: '--$1--',
ja: '--$1--',
cn: '--$1--',
ko: '--$1--',
},
},
};
// Keys into commonReplacement objects that represent "partial" translations,
// in the sense that even if it applies, there still needs to be another
// translation for it to be complete. These keys should be exactly the same
// as the keys from the commonReplacement block above.
export const partialCommonReplacementKeys = [
// Because the zone name needs to be translated here, this is partial.
syncKeys.seal,
// Directions
textKeys.E,
textKeys.N,
textKeys.S,
textKeys.W,
textKeys.NE,
textKeys.NW,
textKeys.SE,
textKeys.SW,
// Roles
textKeys.Tank,
textKeys.Healer,
textKeys.DPS,
];