-
Notifications
You must be signed in to change notification settings - Fork 2
/
lang.js
499 lines (452 loc) · 15.1 KB
/
lang.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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
// Nodeedit for Moment of inspiration 1.0, Max Smirnov (RU), Frenchy Pilou (FR). Copyright (C) 2018
// Localization lib
var lang = { LANGUAGE: "EN" }
lang.dictionaries = {
RU: {
"New" : "Новый",
"Load" : "Загрузить",
"Open" : "Открыть",
"Save" : "Сохранить",
"Save as" : "Сохранить как",
"Apply" : "Применить",
"Run" : "Запуск",
"Stop" : "Стоп",
"Step" : "Шаг",
"Nodeeditor files" : "Файлы блоков",
"Node" : "Блоки",
"Macro" : "Макро",
"Basic" : "Основные",
"Logic" : "Логика",
"Points" : "Точки",
"Curves" : "Кривые",
"Solids" : "Геометр.тела",
"Construct" : "Построение",
"Transform" : "Преобразование",
"Objects" : "Объекты",
"Widget" : "Регуляторы",
"Create" : "Создать",
"Import" : "Импортировать",
"Export" : "Экспортировать",
"Type" : "Тип",
"In" : "Вход",
"Input" : "Вход",
"Inputs" : "Входы",
"Out" : "Выход",
"Output" : "Выход",
"Outputs" : "Выходы",
"Colors" : "Цвет",
"Remove" : "Удалить",
"Remove Slot" : "Удалить ячейку",
"Cut" : "Вырезать",
"Copy" : "Копировать",
"Paste" : "Вставить",
"Update" : "Обновить",
"Clear" : "Очистить",
"Close" : "Закрыть",
"Numbers" : "Числа",
"Default" : "Обычный",
"Red" : "Красный",
"Green" : "Зелёный",
"Blue" : "Синий",
"Title" : "Имя",
"Mode" : "Режим",
"Operator" : "Оператор",
"Style" : "Стиль",
// Nodes
"Const" : "Константа",
"Point" : "Точка",
"Math" : "Формула",
"Interp" : "Интерполяция",
"Random" : "Случ.число",
"Quartz" : "Кварц",
"Length" : "Длина",
"Concat" : "Объединить",
"Progression" : "Прогрессия",
"Extract" : "Извлечь",
"Compare" : "Сравнить",
"Split" : "Разделить",
"InterpPts" : "ИнтерпТчк",
"MathPts" : "ФормулаТчк",
"TextPts" : "ТекстТчк",
"SpherePts" : "СфераТчк",
"PolygonPts" : "МногоугТчк",
"TransformPts" : "ТрансформТчк",
"MovePts" : "СдвигТчк",
"RotatePts" : "ВращениеТчк",
"ScalePts" : "МасштабТчк",
"JitterPts" : "ВибрацияТчк",
"ConvertPts" : "ПреобразоватьТчк",
"CloneToPts" : "КлонПоТчк",
"Line" : "Линия",
"Circle" : "Круг",
"Rectangle" : "Прямоугольник",
"Polygon" : "Многоугольник",
"Star" : "Звезда",
"Curve" : "Кривая",
"Polyline" : "Ломаная",
"Cone" : "Конус",
"Cylinder" : "Цилиндр",
"Sphere" : "Сфера",
"Polyhedron" : "Многогранник",
"Loft" : "ПстПоСечениям",
"Sweep" : "ПстПоРельсам",
"Extrude" : "ПстВыдавливанием",
"Revolve" : "ПстВращением",
"Difference" : "ПстВычитанием",
"Intersection" : "ПстПересечением",
"Union" : "ПстОбъединением",
"Move" : "Сдвиг",
"Orient" : "Ориентация",
"Rotate" : "Вращение",
"Twist" : "Кручение",
"Flow" : "Обтекание",
"Circular Array" : "Полярный массив",
"Clone" : "Клон",
"Selected" : "Выделенные",
"Get by name" : "Выбор по имени",
"Get by style" : "Выбор по стилю",
"ObjtoArray" : "ПреобрМассив",
"BoundingBox" : "Границы",
"Knob" : "Ручка",
"Slider" : "Ползунок",
"Slider2D" : "Ползунок2D",
"Range" : "Диапазон",
"Switch" : "Кнопка",
// Properties dropdown list elements
"#All" : "Все",
"#Arithmetic" : "Арифметическая",
"#Average" : "Усредненный",
"#Both pointy" : "Оба острые",
"#Both sides" : "В обе стороны",
"#Button" : "Кнопка",
"#CatmullRom" : "Сплайн Кэтмалла-Рома",
"#Circumscribed" : "Описанный",
"#Cosine" : "Косинусный",
"#Cross" : "Перекрёстный",
"#Cubic" : "Кубический",
"#Curve" : "Кривая",
"#Curves U" : "Кривые U",
"#Curves V" : "Кривые V",
"#Cycled" : "Циклический",
"#Dodecahedron" : "Додекаэдр",
"#Explode" : "Взрыв",
"#Fixed" : "Фиксированный",
"#FritschCarlson" : "Сплайн Фритча-Карлсона",
"#Geometric" : "Геометрическая",
"#Hermite" : "Сплайн Эрмита",
"#Hexahedron" : "Гексаэдр",
"#Icosahedron" : "Икосаэдр",
"#Incremental" : "Возрастающий",
"#Inscribed" : "Вписанный",
"#Interpcurve" : "Интерполяционная кривая",
"#Linear" : "Линейный",
"#Long" : "Длинный",
"#Loose" : "Свободный",
"#No" : "Нет",
"#Normal" : "Нормальный",
"#Octahedron" : "Октаэдр",
"#Off" : "Выкл",
"#On" : "Вкл",
"#Points" : "Точки",
"#Pointy end" : "Острый конец",
"#Pointy start" : "Острое начало",
"#Regular" : "Обычные",
"#Repeat" : "Повтор",
"#RepeatY" : "ПовторY",
"#RepeatZ" : "ПовторZ",
"#rX" : "УголX",
"#rY" : "УголY",
"#rZ" : "УголZ",
"#Scale" : "Масштаб",
"#Short" : "Кроткий",
"#Step" : "Шаг",
"#Straight" : "Прямой",
"#Switch" : "Переключатель",
"#Tetrahedron" : "Тетраэдр",
"#Tic-tac" : "Тик-так",
"#Twist" : "Кручение",
"#Union" : "Цельный",
"#Yes" : "Да",
// Properties
"Angle" : "Угол",
"Array" : "Массив",
"Base objects" : "Базовые",
"Base" : "Основание",
"BBox Center" : "Центр",
"C" : "К",
"Cap ends" : "Торцы",
"Center" : "Центр",
"Closed" : "Замкнуть",
"Corners" : "Углы",
"Count" : "Кол-во",
"Digits X" : "Разряд X",
"Digits Y" : "Разряд Y",
"Digits" : "Разряд",
"Distance" : "Расстояние",
"Edges" : "Ребра",
"Element" : "Элемент",
"End" : "Конец",
"Ends" : "Концы",
"Factor" : "Фактор",
"Frame" : "Фрейм",
"From" : "От",
"Height" : "Высота",
"Intersecters" : "Пересекаемые",
"L" : "Д",
"Mask" : "Маска",
"Max X" : "Макс X",
"Max Y" : "Макс Y",
"Max" : "Макс",
"Min X" : "Мин X",
"Min Y" : "Мин Y",
"Min" : "Мин",
"Name" : "Имя",
"Num" : "Числа",
"Obj" : "Объекты",
"Object" : "Объект",
"Preset" : "Установка",
"Profile" : "Профиль",
"Pts" : "Точки",
"Radius" : "Радиус",
"Rails" : "Рельсы",
"Ratio" : "Пропорции",
"Scale" : "Масштаб",
"Sides" : "Стороны",
"Start" : "Начало",
"Subtracters" : "Вычитаемые",
"Target" : "Цель",
"To" : "До",
"U num" : "U кол-во",
"U range" : "U диапазон",
"V num" : "V кол-во",
"V range" : "V диапазон",
"Value X" : "Значение X",
"Value Y" : "Значение Y",
"Value" : "Значение",
"W num" : "W кол-во",
"W range" : "W диапазон",
"Width" : "Ширина"
},
FR: {
"New" : "Nouveau",
"Load" : "Charger",
"Open" : "Ouvrir",
"Save" : "Sauver",
"Save as" : "Enregistrer sous",
"Apply" : "Appliquer",
"Run" : "Lancer",
// "Stop" : "?Stop",
"Step" : "Pas à Pas",
// "Nodeeditor files" : "?Nodeeditor files",
"Node" : "Nœud",
// "Macro" : "?Macro",
"Basic" : "De Base",
"Logic" : "Logique",
// "Points" : "?Points",
"Curves" : "Courbes",
"Solids" : "Solides",
"Construct" : "Construire",
"Transform" : "Transforme",
"Objects" : "Objets",
// "Widget" : "?Widget",
"Create" : "Créer",
"Import" : "Importer",
// "Export" : "?Export",
"In" : "De",
"Input" : "Entrée",
"Inputs" : "Entrées",
"Out" : "Vers",
"Output" : "Sortie",
"Outputs" : "Sorties",
"Colors" : "Couleurs",
"Remove" : "Retirer",
// "Remove Slot" : "?Remove Slot",
// "Cut" : "?Cut",
"Copy" : "Copier",
// "Paste" : "?Paste",
// "Update" : "?Update",
"Clear" : "Effacer",
// "Close" : "?Close",
"Numbers" : "Nombres",
"Default" : "Défaut",
"Red" : "Rouge",
"Green" : "Vert",
"Blue" : "Bleu",
"Title" : "Titre",
// "Mode" : "?Mode",
// "Operator" : "?Operator",
// "Style" : "?Style",
"Const" : "Constante",
// "Point" : "?Point",
// "Math" : "?Math",
"Interp" : "Interpole",
"Random" : "Aléatoire",
"Length" : "Longueur",
"Concat" : "Concaténer",
"Extract" : "Extraire",
// "Compare" : "?Compare",
"Split" : "Sépare",
"InterpPts" : "InterpolePts",
// "MathPts" : "?MathPts",
"TextPts" : "TextePts",
"SpherePts" : "SphèrePts",
"PolygonPts" : "PolygonePts",
"TransformPts" : "TransformePts",
"MovePts" : "BougePts",
"RotatePts" : "PivotePts",
"ScalePts" : "TaillePts",
"JitterPts" : "AgitePts",
"ConvertPts" : "ConvertitPts",
"CloneToPts" : "CloneVersPts",
"Line" : "Ligne",
"Circle" : "Cercle",
// "Rectangle" : "?Rectangle",
"Polygon" : "Polygone",
"Star" : "Etoile",
"Curve" : "Courbe",
"Polyline" : "PolyLigne",
// "Cone" : "?Cone",
"Cylinder" : "Cylindre",
"Sphere" : "Sphère",
"Polyhedron" : "Polyhèdre",
"Loft" : "Surface Tendue",
"Sweep" : "Tubage",
// "Extrude" : "?Extrude",
"Revolve" : "Révolution",
"Difference" : "Différence",
// "Intersection" : "?Intersection",
// "Union" : "?Union",
"Move" : "Bouge",
"Orient" : "Oriente",
"Rotate" : "Rotation",
"Twist" : "Torsion",
"Flow" : "Enrober",
"Circular Array" : "Trame Circulaire",
// "Clone" : "?Clone",
"Selected" : "Sélectionné",
"Get by name" : "Donné par Nom",
"Get by style" : "Donné par Style",
"ObjtoArray" : "ObjVersTrame",
"BoundingBox" : "Boîte Englobante",
"Knob" : "Potar",
"Slider" : "Curseur",
"Slider2D" : "Curseur2D",
"Range" : "Intervalle",
// "Switch" : "?Switch",
// "#All" : "?#All",
// "#Arithmetic" : "?#Arithmetic",
// "#Average" : "?#Average",
// "#Both pointy" : "?#Both pointy",
// "#Both sides" : "?#Both sides",
"#Button" : "Bouton",
// "#CatmullRom" : "?#CatmullRom",
// "#Circumscribed" : "?#Circumscribed",
// "#Cosine" : "?#Cosine",
// "#Cross" : "?#Cross",
// "#Cubic" : "?#Cubic",
"#Curve" : "Courbe",
// "#Curves U" : "?#Curves U",
// "#Curves V" : "?#Curves V",
// "#Cycled" : "?#Cycled",
// "#Dodecahedron" : "?#Dodecahedron",
// "#Explode" : "?#Explode",
// "#Fixed" : "?#Fixed",
// "#FritschCarlson" : "?#FritschCarlson",
// "#Geometric" : "?#Geometric",
// "#Hermite" : "?#Hermite",
// "#Hexahedron" : "?#Hexahedron",
// "#Icosahedron" : "?#Icosahedron",
// "#Incremental" : "?#Incremental",
// "#Inscribed" : "?#Inscribed",
// "#Interpcurve" : "?#Interpcurve",
// "#Linear" : "?#Linear",
// "#Long" : "?#Long",
// "#Loose" : "?#Loose",
// "#No" : "?#No",
// "#Normal" : "?#Normal",
// "#Octahedron" : "?#Octahedron",
// "#Off" : "?#Off",
// "#On" : "?#On",
// "#Points" : "?#Points",
// "#Pointy end" : "?#Pointy end",
// "#Pointy start" : "?#Pointy start",
// "#Regular" : "?#Regular",
// "#Repeat" : "?#Repeat",
// "#RepeatY" : "?#RepeatY",
// "#RepeatZ" : "?#RepeatZ",
// "#rX" : "?#rX",
// "#rY" : "?#rY",
// "#rZ" : "?#rZ",
"#Scale" : "Taille",
// "#Short" : "?#Short",
"#Step" : "Pas à Pas",
// "#Straight" : "?#Straight",
// "#Switch" : "?#Switch",
// "#Tetrahedron" : "?#Tetrahedron",
// "#Tic-tac" : "?#Tic-tac",
"#Twist" : "Torsion",
// "#Union" : "?#Union",
// "#Yes" : "?#Yes",
// "Angle" : "?Angle",
"Array" : "Trame",
"Base objects" : "Objets de Base",
"BBox Center" : "Centre Boîte",
// "Cap ends" : "?Cap ends",
"Center" : "Centre",
// "Closed" : "?Closed",
"Corners" : "Coins",
"Count" : "Nombre",
"Digits X" : "N de Déc X",
"Digits Y" : "N de Déc Y",
"Digits" : "N de Déc",
// "Distance" : "?Distance",
// "Edges" : "?Edges",
// "Element" : "?Element",
// "End" : "?End",
// "Ends" : "?Ends",
"Factor" : "Facteur",
"Frame" : "Repère",
"From" : "De",
"Height" : "Hauteur",
"Intersecters" : "Intersecteurs",
"Mask" : "Masque",
// "Name" : "?Name",
// "Num" : "?Num",
// "Obj" : "?Obj",
"Object" : "Objet",
// "Preset" : "?Preset",
"Profile" : "Profil",
// "Pts" : "?Pts",
"Radius" : "Rayon",
// "Rails" : "?Rails",
// "Ratio" : "?Ratio",
"Scale" : "Taille",
"Sides" : "Côtés",
// "Start" : "?Start",
"Subtracters" : "Soustracteurs",
"Target" : "Cible",
"To" : "Vers",
// "U num" : "?U num",
"U range" : "U Intervalle",
// "V num" : "?V num",
"V range" : "V Intervalle",
"Value X" : "Valeur X",
"Value Y" : "Valeur Y",
"Value" : "Valeur",
// "W num" : "?W num",
"W range" : "W intervalle",
"Width" : "Largeur"
},
DE: {
},
EN :{
}
}
lang.getTranslation = function( st, prefix ) { var x=(prefix)?prefix+st:st; if (this.dictionaries[this.LANGUAGE][x]) { return this.dictionaries[this.LANGUAGE][x] } else { return st } }
lang.add = function ( lng, obj ) { if (this.dictionaries[lng] === undefined) this.dictionaries[lng]={}; for (var i in obj) this.dictionaries[lng][i] = obj[i]; }
lang.set = function( lng ) { if (this.dictionaries[lng] === undefined) this.dictionaries[lng]={}; this.LANGUAGE=lng; }
lang.detect = function()
{
var languages = ["English", "EN", "French", "FR", "German", "DE", "Italian", "IT", "Dutch", "NL", "Russian", "RU"], l = moi.ui.language, p = languages.indexOf(l);
if (NeParameters.lang === undefined ) { this.set(( p>0 )?languages[p+1]:"EN") } else { this.set(NeParameters.lang) }
}