sunrize 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/package.json +4 -4
  2. package/src/Application/Application.js +53 -52
  3. package/src/Application/Dashboard.js +5 -5
  4. package/src/Application/Footer.js +3 -3
  5. package/src/Application/GetText.js +1 -1
  6. package/src/Application/Sidebar.js +3 -3
  7. package/src/Application/Tabs.js +2 -2
  8. package/src/Controls/AddPrototypePopover.js +3 -3
  9. package/src/Controls/EditUserDefinedFieldPopover.js +4 -4
  10. package/src/Controls/ExportNodePopover.js +1 -1
  11. package/src/Controls/ImportNodePopover.js +1 -1
  12. package/src/Controls/RenameNodeInput.js +2 -2
  13. package/src/Controls/RenameNodePopover.js +1 -1
  14. package/src/Editors/BrowserSize.js +3 -3
  15. package/src/Editors/Console.js +3 -3
  16. package/src/Editors/Library.js +6 -6
  17. package/src/Editors/OutlineEditor.js +284 -73
  18. package/src/Editors/OutlineView.js +339 -192
  19. package/src/Editors/SceneProperties.js +18 -18
  20. package/src/Editors/ScriptEditor.js +24 -24
  21. package/src/Tools/Core/X3DNodeTool.js +8 -8
  22. package/src/Tools/Geometry2D/Arc2DTool.js +2 -2
  23. package/src/Tools/Geometry2D/ArcClose2DTool.js +2 -2
  24. package/src/Tools/Geometry2D/Circle2DTool.js +2 -2
  25. package/src/Tools/Geometry2D/Disk2DTool.js +2 -2
  26. package/src/Tools/Geometry2D/Rectangle2DTool.js +2 -2
  27. package/src/Tools/Geometry3D/BoxTool.js +2 -2
  28. package/src/Tools/Geometry3D/ConeTool.js +2 -2
  29. package/src/Tools/Geometry3D/CylinderTool.js +2 -2
  30. package/src/Tools/Geometry3D/SphereTool.js +2 -2
  31. package/src/Tools/Sound/SoundTool.js +8 -8
  32. package/src/Undo/Editor.js +252 -107
  33. package/src/Undo/UndoManager.js +10 -10
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.4.1",
4
+ "version": "1.5.0",
5
5
  "description": "A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -81,7 +81,7 @@
81
81
  "dependencies": {
82
82
  "capitalize": "^2.0.4",
83
83
  "console": "^0.7.2",
84
- "electron": "^28.1.4",
84
+ "electron": "^28.2.0",
85
85
  "electron-prompt": "^1.7.0",
86
86
  "electron-squirrel-startup": "^1.0.0",
87
87
  "electron-tabs": "^1.0.4",
@@ -90,7 +90,7 @@
90
90
  "jquery-ui-dist": "^1.13.2",
91
91
  "jstree": "^3.3.16",
92
92
  "material-icons": "^1.13.12",
93
- "material-symbols": "^0.14.5",
93
+ "material-symbols": "^0.14.6",
94
94
  "md5": "^2.3.0",
95
95
  "monaco-editor": "^0.45.0",
96
96
  "node-clipboardy": "^1.0.3",
@@ -99,7 +99,7 @@
99
99
  "spectrum-colorpicker2": "^2.0.10",
100
100
  "string-similarity": "^4.0.4",
101
101
  "update-electron-app": "^3.0.0",
102
- "x_ite": "^9.2.1"
102
+ "x_ite": "^9.2.2"
103
103
  },
104
104
  "config": {
105
105
  "forge": {
@@ -54,8 +54,8 @@ module .exports = class Application
54
54
 
55
55
  this .menuOptions = {
56
56
  defaultEditMenu: false,
57
- undoLabel: _ ("Undo"),
58
- redoLabel: _ ("Redo"),
57
+ undoLabel: _("Undo"),
58
+ redoLabel: _("Redo"),
59
59
  };
60
60
 
61
61
  this .config .setDefaultValues ({
@@ -94,8 +94,9 @@ module .exports = class Application
94
94
  electron .ipcMain .on ("change-menu", (event, object) => this .updateMenu (object));
95
95
  electron .ipcMain .on ("context-menu", (event, id, menu) => this .contextMenu (id, menu));
96
96
 
97
- electron .ipcMain .handle ("file-path", async (event, options) => await this .showDialog (options));
98
- electron .ipcMain .handle ("fullname", async () => await (await import ("fullname")) .default ());
97
+ electron .ipcMain .handle ("open-files", async (event, urls) => this .openFiles (urls));
98
+ electron .ipcMain .handle ("file-path", async (event, options) => await this .showDialog (options));
99
+ electron .ipcMain .handle ("fullname", async () => await (await import ("fullname")) .default ());
99
100
 
100
101
  await electron .app .whenReady ();
101
102
  await this .updateMenu ();
@@ -171,7 +172,7 @@ module .exports = class Application
171
172
  role: "fileMenu",
172
173
  submenu: [
173
174
  {
174
- label: _ ("New File"),
175
+ label: _("New File"),
175
176
  accelerator: "CmdOrCtrl+N",
176
177
  click: () =>
177
178
  {
@@ -180,7 +181,7 @@ module .exports = class Application
180
181
  },
181
182
  { type: "separator" },
182
183
  {
183
- label: _ ("Open..."),
184
+ label: _("Open..."),
184
185
  accelerator: "CmdOrCtrl+O",
185
186
  click: async () =>
186
187
  {
@@ -193,7 +194,7 @@ module .exports = class Application
193
194
  },
194
195
  },
195
196
  {
196
- label: _ ("Open Location..."),
197
+ label: _("Open Location..."),
197
198
  accelerator: "Shift+CmdOrCtrl+O",
198
199
  click: async () =>
199
200
  {
@@ -239,7 +240,7 @@ module .exports = class Application
239
240
  },
240
241
  { type: "separator" },
241
242
  {
242
- label: _ ("Save"),
243
+ label: _("Save"),
243
244
  accelerator: "CmdOrCtrl+S",
244
245
  click: () =>
245
246
  {
@@ -247,7 +248,7 @@ module .exports = class Application
247
248
  },
248
249
  },
249
250
  {
250
- label: _ ("Save As..."),
251
+ label: _("Save As..."),
251
252
  accelerator: "Shift+CmdOrCtrl+S",
252
253
  click: async () =>
253
254
  {
@@ -262,7 +263,7 @@ module .exports = class Application
262
263
  },
263
264
  },
264
265
  {
265
- label: _ ("Save A Copy..."),
266
+ label: _("Save A Copy..."),
266
267
  click: async () =>
267
268
  {
268
269
  const response = await this .showSaveDialog (this .currentFile);
@@ -276,7 +277,7 @@ module .exports = class Application
276
277
  },
277
278
  },
278
279
  {
279
- label: _ ("Save All"),
280
+ label: _("Save All"),
280
281
  accelerator: "Alt+CmdOrCtrl+S",
281
282
  click: () =>
282
283
  {
@@ -285,7 +286,7 @@ module .exports = class Application
285
286
  },
286
287
  { type: "separator" },
287
288
  {
288
- label: _ ("Auto Save"),
289
+ label: _("Auto Save"),
289
290
  type: "checkbox",
290
291
  checked: this .config .autoSave,
291
292
  click: () =>
@@ -299,7 +300,7 @@ module .exports = class Application
299
300
  ... exportPath ?
300
301
  [
301
302
  {
302
- label: util .format (_ ("Export As %s"), path .basename (exportPath)),
303
+ label: util .format (_("Export As %s"), path .basename (exportPath)),
303
304
  accelerator: "CmdOrCtrl+E",
304
305
  click: async () =>
305
306
  {
@@ -310,7 +311,7 @@ module .exports = class Application
310
311
  }
311
312
  ] : [ ],
312
313
  {
313
- label: _ ("Export As..."),
314
+ label: _("Export As..."),
314
315
  accelerator: "Shift+CmdOrCtrl+E",
315
316
  click: async () =>
316
317
  {
@@ -330,7 +331,7 @@ module .exports = class Application
330
331
  },
331
332
  { type: "separator" },
332
333
  {
333
- label: _ ("Scene Properties..."),
334
+ label: _("Scene Properties..."),
334
335
  accelerator: "CmdOrCtrl+I",
335
336
  click: () =>
336
337
  {
@@ -350,7 +351,7 @@ module .exports = class Application
350
351
  {
351
352
  label: this .menuOptions .undoLabel,
352
353
  accelerator: "CmdOrCtrl+Z",
353
- enabled: this .menuOptions .undoLabel !== _ ("Undo"),
354
+ enabled: this .menuOptions .undoLabel !== _("Undo"),
354
355
  click: () =>
355
356
  {
356
357
  this .mainWindow .webContents .send ("undo");
@@ -359,7 +360,7 @@ module .exports = class Application
359
360
  {
360
361
  label: this .menuOptions .redoLabel,
361
362
  accelerator: "Shift+CmdOrCtrl+Z",
362
- enabled: this .menuOptions .redoLabel !== _ ("Redo"),
363
+ enabled: this .menuOptions .redoLabel !== _("Redo"),
363
364
  click: () =>
364
365
  {
365
366
  this .mainWindow .webContents .send ("redo");
@@ -367,7 +368,7 @@ module .exports = class Application
367
368
  },
368
369
  { type: "separator" },
369
370
  {
370
- label: _ ("Cut"),
371
+ label: _("Cut"),
371
372
  accelerator: "CmdOrCtrl+X",
372
373
  click: () =>
373
374
  {
@@ -375,7 +376,7 @@ module .exports = class Application
375
376
  },
376
377
  },
377
378
  {
378
- label: _ ("Copy"),
379
+ label: _("Copy"),
379
380
  accelerator: "CmdOrCtrl+C",
380
381
  click: () =>
381
382
  {
@@ -383,7 +384,7 @@ module .exports = class Application
383
384
  },
384
385
  },
385
386
  {
386
- label: _ ("Paste"),
387
+ label: _("Paste"),
387
388
  accelerator: "CmdOrCtrl+V",
388
389
  click: () =>
389
390
  {
@@ -391,7 +392,7 @@ module .exports = class Application
391
392
  },
392
393
  },
393
394
  {
394
- label: _ ("Delete"),
395
+ label: _("Delete"),
395
396
  accelerator: "CmdOrCtrl+Backspace",
396
397
  click: () =>
397
398
  {
@@ -401,10 +402,10 @@ module .exports = class Application
401
402
  ],
402
403
  },
403
404
  {
404
- label: _ ("Selection"),
405
+ label: _("Selection"),
405
406
  submenu: [
406
407
  {
407
- label: _ ("Select All"),
408
+ label: _("Select All"),
408
409
  accelerator: "CmdOrCtrl+A",
409
410
  click: () =>
410
411
  {
@@ -412,7 +413,7 @@ module .exports = class Application
412
413
  },
413
414
  },
414
415
  {
415
- label: _ ("Deselect All"),
416
+ label: _("Deselect All"),
416
417
  accelerator: "Shift+CmdOrCtrl+A",
417
418
  click: () =>
418
419
  {
@@ -421,21 +422,21 @@ module .exports = class Application
421
422
  },
422
423
  { type: "separator" },
423
424
  {
424
- label: _ ("Hide Unselected Objects"),
425
+ label: _("Hide Unselected Objects"),
425
426
  click: () =>
426
427
  {
427
428
  this .mainWindow .webContents .send ("hide-unselected-objects");
428
429
  },
429
430
  },
430
431
  {
431
- label: _ ("Show Selected Objects"),
432
+ label: _("Show Selected Objects"),
432
433
  click: () =>
433
434
  {
434
435
  this .mainWindow .webContents .send ("show-selected-objects");
435
436
  },
436
437
  },
437
438
  {
438
- label: _ ("Show All Objects"),
439
+ label: _("Show All Objects"),
439
440
  click: () =>
440
441
  {
441
442
  this .mainWindow .webContents .send ("show-all-objects");
@@ -443,7 +444,7 @@ module .exports = class Application
443
444
  },
444
445
  { type: "separator" },
445
446
  {
446
- label: _ ("Remove Empty Groups"),
447
+ label: _("Remove Empty Groups"),
447
448
  click: () =>
448
449
  {
449
450
  this .mainWindow .webContents .send ("remove-empty-groups");
@@ -452,7 +453,7 @@ module .exports = class Application
452
453
  ],
453
454
  },
454
455
  {
455
- label: _ ("View"),
456
+ label: _("View"),
456
457
  submenu: [
457
458
  {
458
459
  role: "reload",
@@ -484,10 +485,10 @@ module .exports = class Application
484
485
  },
485
486
  { type: "separator" },
486
487
  {
487
- label: _ ("Outline Editor"),
488
+ label: _("Outline Editor"),
488
489
  submenu: [
489
490
  {
490
- label: _ ("Expand ExternProto Declarations"),
491
+ label: _("Expand ExternProto Declarations"),
491
492
  type: "checkbox",
492
493
  checked: this .config .expandExternProtoDeclarations,
493
494
  click: () =>
@@ -497,7 +498,7 @@ module .exports = class Application
497
498
  },
498
499
  },
499
500
  {
500
- label: _ ("Expand Prototype Instances"),
501
+ label: _("Expand Prototype Instances"),
501
502
  type: "checkbox",
502
503
  checked: this .config .expandPrototypeInstances,
503
504
  click: () =>
@@ -507,7 +508,7 @@ module .exports = class Application
507
508
  },
508
509
  },
509
510
  {
510
- label: _ ("Expand Inline Nodes"),
511
+ label: _("Expand Inline Nodes"),
511
512
  type: "checkbox",
512
513
  checked: this .config .expandInlineNodes,
513
514
  click: () =>
@@ -520,10 +521,10 @@ module .exports = class Application
520
521
  },
521
522
  { type: "separator" },
522
523
  {
523
- label: _ ("Primitive Quality"),
524
+ label: _("Primitive Quality"),
524
525
  submenu: [
525
526
  {
526
- label: _ ("High"),
527
+ label: _("High"),
527
528
  type: "radio",
528
529
  checked: this .config .primitiveQuality === "HIGH",
529
530
  click: () =>
@@ -533,7 +534,7 @@ module .exports = class Application
533
534
  },
534
535
  },
535
536
  {
536
- label: _ ("Medium"),
537
+ label: _("Medium"),
537
538
  type: "radio",
538
539
  checked: this .config .primitiveQuality === "MEDIUM" || this .config .primitiveQuality === undefined,
539
540
  click: () =>
@@ -543,7 +544,7 @@ module .exports = class Application
543
544
  },
544
545
  },
545
546
  {
546
- label: _ ("Low"),
547
+ label: _("Low"),
547
548
  type: "radio",
548
549
  checked: this .config .primitiveQuality === "LOW",
549
550
  click: () =>
@@ -555,10 +556,10 @@ module .exports = class Application
555
556
  ],
556
557
  },
557
558
  {
558
- label: _ ("Texture Quality"),
559
+ label: _("Texture Quality"),
559
560
  submenu: [
560
561
  {
561
- label: _ ("High"),
562
+ label: _("High"),
562
563
  type: "radio",
563
564
  checked: this .config .textureQuality === "HIGH",
564
565
  click: () =>
@@ -568,7 +569,7 @@ module .exports = class Application
568
569
  },
569
570
  },
570
571
  {
571
- label: _ ("Medium"),
572
+ label: _("Medium"),
572
573
  type: "radio",
573
574
  checked: this .config .textureQuality === "MEDIUM" || this .config .textureQuality === undefined,
574
575
  click: () =>
@@ -578,7 +579,7 @@ module .exports = class Application
578
579
  },
579
580
  },
580
581
  {
581
- label: _ ("Low"),
582
+ label: _("Low"),
582
583
  type: "radio",
583
584
  checked: this .config .textureQuality === "LOW",
584
585
  click: () =>
@@ -590,7 +591,7 @@ module .exports = class Application
590
591
  ],
591
592
  },
592
593
  {
593
- label: _ ("Display Rubberband"),
594
+ label: _("Display Rubberband"),
594
595
  type: "checkbox",
595
596
  checked: this .config .rubberband,
596
597
  click: () =>
@@ -600,7 +601,7 @@ module .exports = class Application
600
601
  },
601
602
  },
602
603
  {
603
- label: _ ("Display Timings"),
604
+ label: _("Display Timings"),
604
605
  type: "checkbox",
605
606
  checked: this .config .timings,
606
607
  click: () =>
@@ -611,7 +612,7 @@ module .exports = class Application
611
612
  },
612
613
  { type: "separator" },
613
614
  {
614
- label: _ ("Show Library..."),
615
+ label: _("Show Library..."),
615
616
  accelerator: "Shift+CmdOrCtrl+L",
616
617
  click: () =>
617
618
  {
@@ -628,7 +629,7 @@ module .exports = class Application
628
629
  label: "Layout",
629
630
  submenu: [
630
631
  {
631
- label: _ ("Browser Size..."),
632
+ label: _("Browser Size..."),
632
633
  click: () =>
633
634
  {
634
635
  this .mainWindow .webContents .send ("browser-size");
@@ -811,7 +812,7 @@ module .exports = class Application
811
812
  properties: ["openFile", "multiSelections"],
812
813
  filters: filters ?? [
813
814
  {
814
- name: _ ("X3D Document"),
815
+ name: _("X3D Document"),
815
816
  extensions: ["x3d", "x3dz", "x3dj", "x3djz", "x3dv", "x3dvz", "wrl", "wrz", "wrl.gz", "vrml", "gltf", "glb", "obj", "stl", "ply", "svg"],
816
817
  },
817
818
  ],
@@ -841,12 +842,12 @@ module .exports = class Application
841
842
  defaultPath: defaultPath,
842
843
  properties: ["createDirectory", "showOverwriteConfirmation"],
843
844
  filters : [
844
- { name: _ ("X3D XML Document"), extensions: ["x3d"] },
845
- { name: _ ("X3D XML Document GZipped"), extensions: ["x3dz"] },
846
- { name: _ ("X3D JSON Document"), extensions: ["x3dj"] },
847
- { name: _ ("X3D JSON Document GZipped"), extensions: ["x3djz"] },
848
- { name: _ ("X3D VRML Classic Document"), extensions: ["x3dv"] },
849
- { name: _ ("X3D VRML Classic Document GZipped"), extensions: ["x3dvz"] },
845
+ { name: _("X3D XML Document"), extensions: ["x3d"] },
846
+ { name: _("X3D XML Document GZipped"), extensions: ["x3dz"] },
847
+ { name: _("X3D JSON Document"), extensions: ["x3dj"] },
848
+ { name: _("X3D JSON Document GZipped"), extensions: ["x3djz"] },
849
+ { name: _("X3D VRML Classic Document"), extensions: ["x3dv"] },
850
+ { name: _("X3D VRML Classic Document GZipped"), extensions: ["x3dvz"] },
850
851
  ],
851
852
  });
852
853
 
@@ -21,7 +21,7 @@ module .exports = class Dashboard extends Interface
21
21
  {
22
22
  this .handButton = $("<span></span>")
23
23
  .addClass (["image-icon", "hand"])
24
- .attr ("title", _ ("Switch to browser mode."))
24
+ .attr ("title", _("Switch to browser mode."))
25
25
  .appendTo (this .toolbar)
26
26
  .on ("click", () => this .hand ());
27
27
 
@@ -29,13 +29,13 @@ module .exports = class Dashboard extends Interface
29
29
 
30
30
  this .arrowButton = $("<span></span>")
31
31
  .addClass (["image-icon", "arrow"])
32
- .attr ("title", _ ("Switch to edit mode."))
32
+ .attr ("title", _("Switch to edit mode."))
33
33
  .appendTo (this .toolbar)
34
34
  .on ("click", () => this .arrow ());
35
35
 
36
36
  this .playButton = $("<span></span>")
37
37
  .addClass (["material-icons"])
38
- .attr ("title", _ ("Toggle browser update."))
38
+ .attr ("title", _("Toggle browser update."))
39
39
  .css ({ position: "relative", left: "-1px", "font-weight": "bold" })
40
40
  .text ("play_arrow")
41
41
  .appendTo (this .toolbar)
@@ -45,14 +45,14 @@ module .exports = class Dashboard extends Interface
45
45
 
46
46
  this .viewAllButton = $("<span></span>")
47
47
  .addClass (["material-symbols-outlined"])
48
- .attr ("title", _ ("Look at selected objects."))
48
+ .attr ("title", _("Look at selected objects."))
49
49
  .text ("center_focus_strong")
50
50
  .appendTo (this .toolbar)
51
51
  .on ("click", () => this .viewAll ());
52
52
 
53
53
  this .straightenButton = $("<span></span>")
54
54
  .addClass (["material-symbols-outlined", "active"])
55
- .attr ("title", _ ("Straighten horizon."))
55
+ .attr ("title", _("Straighten horizon."))
56
56
  .text ("wb_twilight")
57
57
  .appendTo (this .toolbar)
58
58
  .on ("click", () => this .straighten (!this .browser .getBrowserOption ("StraightenHorizon")));
@@ -16,11 +16,11 @@ module .exports = class Footer extends Tabs
16
16
 
17
17
  addTabs ()
18
18
  {
19
- this .addTextTab ("console", _ ("Console"))
20
- this .addTextTab ("script-editor", _ ("Script Editor"))
19
+ this .addTextTab ("console", _("Console"))
20
+ this .addTextTab ("script-editor", _("Script Editor"))
21
21
 
22
22
  if (process .env .SUNRISE_ENVIRONMENT === "DEVELOPMENT")
23
- this .addTextTab ("animation-editor", _ ("Animation Editor"))
23
+ this .addTextTab ("animation-editor", _("Animation Editor"))
24
24
 
25
25
  this .console = new Console (this .getPanel ("console"))
26
26
  }
@@ -1,6 +1,6 @@
1
1
  "use strict"
2
2
 
3
- function _ (string)
3
+ function _(string)
4
4
  {
5
5
  return string
6
6
  }
@@ -17,12 +17,12 @@ module .exports = class Sidebar extends Tabs
17
17
  addTabs ()
18
18
  {
19
19
  if (process .env .SUNRISE_ENVIRONMENT === "DEVELOPMENT")
20
- this .addIconTab ("file-manager", "description", _ ("File Manager"))
20
+ this .addIconTab ("file-manager", "description", _("File Manager"))
21
21
 
22
- this .addIconTab ("outline-editor", "list", _ ("Outline Editor"))
22
+ this .addIconTab ("outline-editor", "list", _("Outline Editor"))
23
23
 
24
24
  if (process .env .SUNRISE_ENVIRONMENT === "DEVELOPMENT")
25
- this .addIconTab ("node-inspector", "visibility", _ ("Node Inspector"))
25
+ this .addIconTab ("node-inspector", "visibility", _("Node Inspector"))
26
26
 
27
27
  this .outlineEditor = new OutlineEditor (this .getPanel ("outline-editor"))
28
28
  }
@@ -239,9 +239,9 @@ module .exports = new class Tabs
239
239
  {
240
240
  tab .url = fileURL;
241
241
 
242
- tab .setTitle ((fileURL .startsWith ("id:") ? _ ("New Scene") : path .basename (decodeURIComponent (new URL (fileURL) .pathname))) + (saved ? "" : "*"));
242
+ tab .setTitle ((fileURL .startsWith ("id:") ? _("New Scene") : path .basename (decodeURIComponent (new URL (fileURL) .pathname))) + (saved ? "" : "*"));
243
243
 
244
- $(tab .element) .find (".tab-title") .attr ("title", fileURL .startsWith ("id:") ? _ ("Currently still unsaved.") : decodeURI (fileURL));
244
+ $(tab .element) .find (".tab-title") .attr ("title", fileURL .startsWith ("id:") ? _("Currently still unsaved.") : decodeURI (fileURL));
245
245
 
246
246
  electron .ipcRenderer .send ("title", tab .getTitle ());
247
247
 
@@ -35,7 +35,7 @@ $.fn.addPrototypePopover = function (executionContext, type)
35
35
  .appendTo (content)
36
36
 
37
37
  const nameInput = $("<input></input>")
38
- .attr ("placeholder", _ ("Enter name"))
38
+ .attr ("placeholder", _("Enter name"))
39
39
  .appendTo (content)
40
40
 
41
41
  // Create tooltip.
@@ -67,7 +67,7 @@ $.fn.addPrototypePopover = function (executionContext, type)
67
67
  {
68
68
  const name = executionContext .getUniqueExternProtoName (nameInput .val ())
69
69
 
70
- UndoManager .shared .beginUndo (_ ("Add Extern Proto Declaration »%s«"), name)
70
+ UndoManager .shared .beginUndo (_("Add Extern Proto Declaration »%s«"), name)
71
71
 
72
72
  const externproto = Editor .addExternProtoDeclaration (executionContext, name)
73
73
 
@@ -86,7 +86,7 @@ $.fn.addPrototypePopover = function (executionContext, type)
86
86
  {
87
87
  const name = executionContext .getUniqueProtoName (nameInput .val ())
88
88
 
89
- UndoManager .shared .beginUndo (_ ("Add Proto Declaration »%s«"), name)
89
+ UndoManager .shared .beginUndo (_("Add Proto Declaration »%s«"), name)
90
90
 
91
91
  const
92
92
  proto = Editor .addProtoDeclaration (executionContext, name),
@@ -92,11 +92,11 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
92
92
  .appendTo (content);
93
93
 
94
94
  const nameInput = $("<input></input>")
95
- .attr ("placeholder", _ ("Enter name"))
95
+ .attr ("placeholder", _("Enter name"))
96
96
  .appendTo (content);
97
97
 
98
98
  const okButton = $("<button></button>")
99
- .text (_ ("Apply"))
99
+ .text (_("Apply"))
100
100
  .on ("click", confirm)
101
101
  .appendTo (content);
102
102
 
@@ -189,7 +189,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
189
189
 
190
190
  if (type === field .getType ())
191
191
  {
192
- UndoManager .shared .beginUndo (_ ("Edit Field »%s«"), field .getName ());
192
+ UndoManager .shared .beginUndo (_("Edit Field »%s«"), field .getName ());
193
193
  Editor .updateUserDefinedField (executionContext, node, field, accessType, name);
194
194
  UndoManager .shared .endUndo ();
195
195
  }
@@ -199,7 +199,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
199
199
  index = fields .indexOf (field),
200
200
  newField = new X3D [typeName] ();
201
201
 
202
- UndoManager .shared .beginUndo (_ ("Change Type of Field »%s«"), field .getName ());
202
+ UndoManager .shared .beginUndo (_("Change Type of Field »%s«"), field .getName ());
203
203
 
204
204
  newField .setAccessType (accessType);
205
205
  newField .setName (name);
@@ -16,7 +16,7 @@ $.fn.exportNodePopover = function (node, oldExportedName)
16
16
  const scene = node .getExecutionContext ();
17
17
 
18
18
  const nameInput = $("<input></input>")
19
- .attr ("placeholder", _ ("Enter exported name"))
19
+ .attr ("placeholder", _("Enter exported name"))
20
20
  .val (oldExportedName ?? scene .getUniqueExportName (node .getName ()));
21
21
 
22
22
  // Create tooltip.
@@ -16,7 +16,7 @@ $.fn.importNodePopover = function (inlineNode, exportedName, oldImportedName)
16
16
  const executionContext = inlineNode .getExecutionContext ();
17
17
 
18
18
  const nameInput = $("<input></input>")
19
- .attr ("placeholder", _ ("Enter imported name"))
19
+ .attr ("placeholder", _("Enter imported name"))
20
20
  .val (oldImportedName ?? executionContext .getUniqueImportName (exportedName));
21
21
 
22
22
  // Create tooltip.
@@ -48,7 +48,7 @@ $.fn.renameNodeInput = function (node)
48
48
 
49
49
  const externproto = node;
50
50
 
51
- UndoManager .shared .beginUndo (_ ("Update Extern Proto Declaration »%s«"), name);
51
+ UndoManager .shared .beginUndo (_("Update Extern Proto Declaration »%s«"), name);
52
52
 
53
53
  Editor .updateExternProtoDeclaration (executionContext, name, externproto);
54
54
 
@@ -68,7 +68,7 @@ $.fn.renameNodeInput = function (node)
68
68
 
69
69
  const proto = node;
70
70
 
71
- UndoManager .shared .beginUndo (_ ("Update Proto Declaration »%s«"), name);
71
+ UndoManager .shared .beginUndo (_("Update Proto Declaration »%s«"), name);
72
72
 
73
73
  Editor .updateProtoDeclaration (executionContext, name, proto);
74
74
 
@@ -12,7 +12,7 @@ $.fn.renameNodePopover = function (node)
12
12
  // Create content.
13
13
 
14
14
  const nameInput = $("<input></input>")
15
- .attr ("placeholder", _ ("Enter name"))
15
+ .attr ("placeholder", _("Enter name"))
16
16
  .renameNodeInput (node)
17
17
 
18
18
  // Create tooltip.
@@ -30,7 +30,7 @@ module .exports = new class BrowserSize extends Dialog
30
30
  $("<tr></tr>")
31
31
  .append ($("<th></th>")
32
32
  .attr ("colspan", "2")
33
- .text (_ ("Browser Size")))
33
+ .text (_("Browser Size")))
34
34
  .appendTo (this .table .header)
35
35
 
36
36
  this .enabled = $("<input></input>")
@@ -44,7 +44,7 @@ module .exports = new class BrowserSize extends Dialog
44
44
  .append (this .enabled)
45
45
  .append ($("<label></label>")
46
46
  .attr ("for", "browser-size-enabled")
47
- .text (_ ("Enabled"))))
47
+ .text (_("Enabled"))))
48
48
  .appendTo (this .table .body)
49
49
 
50
50
  this .numerator = $("<input></input>")
@@ -65,7 +65,7 @@ module .exports = new class BrowserSize extends Dialog
65
65
 
66
66
  $("<tr></tr>")
67
67
  .append ($("<th></th>")
68
- .text (_ ("Aspect Ratio")))
68
+ .text (_("Aspect Ratio")))
69
69
  .append ($("<td></td>")
70
70
  .append (this .numerator)
71
71
  .append (slash)