@difizen/libro-lab 0.2.35 → 0.2.36

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 (63) hide show
  1. package/es/command/lab-command.d.ts.map +1 -1
  2. package/es/command/lab-command.js +31 -35
  3. package/es/command/lab-menu-contribution.d.ts.map +1 -1
  4. package/es/command/lab-menu-contribution.js +197 -39
  5. package/es/command/menu-bar-view.d.ts.map +1 -1
  6. package/es/command/menu-bar-view.js +6 -1
  7. package/es/common/icon.d.ts.map +1 -1
  8. package/es/common/icon.js +21 -36
  9. package/es/editor-viewer/empty-icon.d.ts +3 -0
  10. package/es/editor-viewer/empty-icon.d.ts.map +1 -0
  11. package/es/editor-viewer/empty-icon.js +495 -0
  12. package/es/editor-viewer/empty.svg +136 -0
  13. package/es/editor-viewer/libro-default-viewer.d.ts.map +1 -1
  14. package/es/editor-viewer/libro-default-viewer.js +4 -6
  15. package/es/kernel-and-terminal-panel/collapse/index.d.ts.map +1 -1
  16. package/es/kernel-and-terminal-panel/collapse/index.js +10 -9
  17. package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.d.ts.map +1 -1
  18. package/es/kernel-and-terminal-panel/kernel-and-terminal-panel-view.js +6 -1
  19. package/es/kernel-and-terminal-panel/panel-command.d.ts.map +1 -1
  20. package/es/kernel-and-terminal-panel/panel-command.js +3 -2
  21. package/es/kernel-manager/index.d.ts.map +1 -1
  22. package/es/kernel-manager/index.js +7 -2
  23. package/es/lang-switcher/index.d.ts +7 -0
  24. package/es/lang-switcher/index.d.ts.map +1 -0
  25. package/es/lang-switcher/index.js +58 -0
  26. package/es/layout/footer/current-file-footer-view.d.ts.map +1 -1
  27. package/es/layout/footer/current-file-footer-view.js +2 -1
  28. package/es/layout/footer/status-footer-view.d.ts.map +1 -1
  29. package/es/layout/footer/status-footer-view.js +12 -11
  30. package/es/layout/layout-service.d.ts +2 -0
  31. package/es/layout/layout-service.d.ts.map +1 -1
  32. package/es/layout/layout-service.js +15 -4
  33. package/es/layout/layout.d.ts.map +1 -1
  34. package/es/layout/layout.js +3 -2
  35. package/es/module.d.ts.map +1 -1
  36. package/es/module.js +14 -1
  37. package/es/toc/libro-toc-panel-view.d.ts.map +1 -1
  38. package/es/toc/libro-toc-panel-view.js +7 -2
  39. package/es/welcome/entry-point-view.d.ts.map +1 -1
  40. package/es/welcome/entry-point-view.js +5 -4
  41. package/es/welcome/welcome-view.d.ts.map +1 -1
  42. package/es/welcome/welcome-view.js +8 -3
  43. package/package.json +8 -6
  44. package/src/command/lab-command.ts +31 -35
  45. package/src/command/{lab-menu-contribution.ts → lab-menu-contribution.tsx} +47 -39
  46. package/src/command/menu-bar-view.tsx +2 -1
  47. package/src/common/icon.tsx +0 -8
  48. package/src/editor-viewer/empty-icon.tsx +425 -0
  49. package/src/editor-viewer/empty.svg +136 -0
  50. package/src/editor-viewer/libro-default-viewer.tsx +7 -7
  51. package/src/kernel-and-terminal-panel/collapse/index.tsx +11 -10
  52. package/src/kernel-and-terminal-panel/kernel-and-terminal-panel-view.tsx +5 -1
  53. package/src/kernel-and-terminal-panel/panel-command.tsx +3 -2
  54. package/src/kernel-manager/index.tsx +3 -2
  55. package/src/lang-switcher/index.tsx +36 -0
  56. package/src/layout/footer/current-file-footer-view.tsx +2 -1
  57. package/src/layout/footer/status-footer-view.tsx +13 -13
  58. package/src/layout/layout-service.ts +7 -0
  59. package/src/layout/layout.tsx +3 -2
  60. package/src/module.tsx +17 -0
  61. package/src/toc/libro-toc-panel-view.tsx +3 -2
  62. package/src/welcome/entry-point-view.tsx +40 -37
  63. package/src/welcome/welcome-view.tsx +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-lab",
3
- "version": "0.2.35",
3
+ "version": "0.2.36",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro",
@@ -34,17 +34,19 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@ant-design/icons": "^5.1.0",
37
- "@difizen/libro-core": "^0.2.35",
38
- "@difizen/libro-jupyter": "^0.2.35",
37
+ "@difizen/libro-core": "^0.2.36",
38
+ "@difizen/libro-jupyter": "^0.2.36",
39
39
  "@difizen/libro-kernel": "^0.2.35",
40
- "@difizen/libro-prompt-cell": "^0.2.35",
41
- "@difizen/libro-sql-cell": "^0.2.35",
42
- "@difizen/libro-terminal": "^0.2.35",
40
+ "@difizen/libro-prompt-cell": "^0.2.36",
41
+ "@difizen/libro-sql-cell": "^0.2.36",
42
+ "@difizen/libro-terminal": "^0.2.36",
43
43
  "@difizen/libro-toc": "^0.2.35",
44
44
  "@difizen/libro-cofine-editor-core": "^0.2.35",
45
45
  "@difizen/libro-language-client": "^0.2.35",
46
46
  "@difizen/libro-widget": "^0.2.35",
47
+ "@difizen/libro-l10n": "^0.2.36",
47
48
  "@difizen/mana-app": "latest",
49
+ "@difizen/mana-l10n": "latest",
48
50
  "@difizen/mana-common": "latest",
49
51
  "@difizen/mana-react": "latest",
50
52
  "classnames": "^2.3.2",
@@ -3,10 +3,6 @@ export const LabCommands = {
3
3
  id: 'libro-lab-header-menu-help-about',
4
4
  label: '关于',
5
5
  },
6
- // OpenTerminal: {
7
- // id: 'libro-lab-header-menu-terminal-open',
8
- // label: '新建终端',
9
- // },
10
6
  Save: {
11
7
  id: 'libro-lab-save',
12
8
  label: '保存',
@@ -18,126 +14,126 @@ export const LabCommands = {
18
14
  },
19
15
  RedoCellAction: {
20
16
  id: 'libro-lab-header-menu-edit-redo-cell-action',
21
- label: `恢复单元格操作`,
17
+ label: '恢复 Cell 操作',
22
18
  },
23
19
  UndoCellAction: {
24
20
  id: 'libro-lab-header-menu-edit-undo-cell-action',
25
- label: `撤销单元格操作`,
21
+ label: '撤销 Cell 操作',
26
22
  },
27
23
  CutCell: {
28
24
  id: 'libro-lab-header-menu-edit-cut-cell',
29
- label: `剪切单元格`,
25
+ label: '剪切 Cell',
30
26
  },
31
27
  CopyCell: {
32
28
  id: 'libro-lab-header-menu-edit-copy-cell',
33
- label: `复制单元格`,
29
+ label: '复制 Cell',
34
30
  },
35
31
  PasteCellAbove: {
36
32
  id: 'libro-lab-header-menu-edit-paste-cell-above',
37
- label: `在上方粘贴单元格`,
33
+ label: '在上方粘贴 Cell',
38
34
  },
39
35
  PasteCellBelow: {
40
36
  id: 'libro-lab-header-menu-edit-paste-cell-below',
41
- label: `在下方粘贴单元格`,
37
+ label: '在下方粘贴 Cell',
42
38
  },
43
39
  PasteAndReplaceCell: {
44
40
  id: 'libro-lab-header-menu-edit-paste-and-replace-cell',
45
- label: `粘贴单元格并替换`,
41
+ label: '粘贴 Cell 并替换',
46
42
  },
47
43
  DeleteCell: {
48
44
  id: 'libro-lab-header-menu-edit-delete-cell',
49
- label: `删除单元格`,
45
+ label: '删除 Cell',
50
46
  },
51
47
  SelectAll: {
52
48
  id: 'libro-lab-header-menu-edit-select-all',
53
- label: `选择所有单元格`,
49
+ label: '选择所有 Cell',
54
50
  },
55
51
  DeselectAll: {
56
52
  id: 'libro-lab-header-menu-edit-deselect-all',
57
- label: `取消选择所有单元格`,
53
+ label: '取消选择所有 Cell',
58
54
  },
59
55
  MoveCellUp: {
60
56
  id: 'libro-lab-header-menu-edit-move-cell-up',
61
- label: `上移单元格`,
57
+ label: '上移 Cell',
62
58
  },
63
59
  MoveCellDown: {
64
60
  id: 'libro-lab-header-menu-edit-move-cell-down',
65
- label: `下移单元格`,
61
+ label: '下移 Cell',
66
62
  },
67
63
  SplitCellAntCursor: {
68
64
  id: 'libro-lab-header-menu-edit-split-cell-at-cursor',
69
- label: `切分单元格`,
65
+ label: '切分 Cell',
70
66
  },
71
67
  MergeCellAbove: {
72
68
  id: 'libro-lab-header-menu-edit-merge-cell-above',
73
- label: `合并上方单元格`,
69
+ label: '合并上方 Cell',
74
70
  },
75
71
  MergeCellBelow: {
76
72
  id: 'libro-lab-header-menu-edit-merge-cell-below',
77
- label: `合并下方单元格`,
73
+ label: '合并下方 Cell',
78
74
  },
79
75
  MergeCells: {
80
76
  id: 'libro-lab-header-menu-edit-merge-cells',
81
- label: `合并选中单元格`,
77
+ label: '合并选中 Cell',
82
78
  },
83
79
  ClearCellOutput: {
84
80
  id: 'libro-lab-header-menu-edit-clear-cell-outputs',
85
- label: `清空输出`,
81
+ label: '清空输出',
86
82
  },
87
83
  ClearAllCellOutput: {
88
84
  id: 'libro-lab-header-menu-edit-clear-all-cell-outputs',
89
- label: `清空所有输出`,
85
+ label: '清空所有输出',
90
86
  },
91
87
  HideOrShowCellCode: {
92
88
  id: 'libro-lab-header-menu-view-hide-or-show-cell-code',
93
- label: `隐藏/显示所选单元格代码`,
89
+ label: '隐藏/显示所选 Cell 代码',
94
90
  },
95
91
  HideOrShowOutputs: {
96
92
  id: 'libro-lab-header-menu-view-hide-or-show-outputs',
97
- label: `隐藏/显示所选单元格输出`,
93
+ label: '隐藏/显示所选 Cell 输出',
98
94
  },
99
95
  EnableOutputScrolling: {
100
96
  id: 'libro-lab-header-menu-view-enable-output-scrolling',
101
- label: `固定输出高度`,
97
+ label: '固定输出高度',
102
98
  },
103
99
  DisableOutputScrolling: {
104
100
  id: 'libro-lab-header-menu-view-disable-output-scrolling',
105
- label: `取消固定输出高度`,
101
+ label: '取消固定输出高度',
106
102
  },
107
103
  RestartAndRunToSelected: {
108
104
  id: 'libro-lab-header-menu-run-restart-and-run-to-selected',
109
- label: '重启并执行至选中单元格',
105
+ label: '重启并运行至选中 Cell',
110
106
  },
111
107
  RestartRunAll: {
112
108
  id: 'libro-lab-header-menu-run-restart-run-all',
113
- label: '重启并执行全部单元格',
109
+ label: '重启并运行全部 Cell',
114
110
  },
115
111
  RunAllAbove: {
116
112
  id: 'libro-lab-header-menu-run-all-above',
117
- label: `执行上方所有单元格`,
113
+ label: '运行之前所有 Cell',
118
114
  },
119
115
  RunAllBelow: {
120
116
  id: 'libro-lab-header-menu-run-all-below',
121
- label: `执行下方所有单元格`,
117
+ label: '运行当前及之后 Cell',
122
118
  },
123
119
  RunAllCells: {
124
120
  id: 'libro-lab-header-menu-run-all-cells',
125
- label: `执行全部单元格`,
121
+ label: '运行全部 Cell',
126
122
  },
127
123
  RunCell: {
128
124
  id: 'libro-lab-header-menu-run-cell',
129
- label: `执行选中单元格`,
125
+ label: '运行选中 Cell',
130
126
  },
131
127
  RunCellAndInsertBelow: {
132
128
  id: 'libro-lab-header-menu-run-cell-and-insert-below',
133
- label: `执行选中并向下插入一个单元格`,
129
+ label: '运行选中并向下插入一个 Cell',
134
130
  },
135
131
  RunCellAndSelectNext: {
136
132
  id: 'libro-lab-header-menu-run-cell-and-select-next',
137
- label: `执行并选中下一个单元格`,
133
+ label: '运行并选中下一个 Cell',
138
134
  },
139
135
  ToggleBottom: {
140
136
  id: 'libro-lab-toggle-bottom',
141
- label: `切换底部面板`,
137
+ label: '切换底部面板',
142
138
  },
143
139
  };
@@ -18,6 +18,7 @@ import {
18
18
  singleton,
19
19
  ViewManager,
20
20
  } from '@difizen/mana-app';
21
+ import { l10n } from '@difizen/mana-l10n';
21
22
 
22
23
  import { LibroLabLayoutSlots } from '../layout/index.js';
23
24
  import { LayoutService } from '../layout/layout-service.js';
@@ -51,76 +52,83 @@ export class LabMenu
51
52
  }
52
53
 
53
54
  registerMenus(menu: MenuRegistry) {
54
- menu.registerSubmenu(LabMenus.FILE, { label: '文件' });
55
- menu.registerSubmenu(LabMenus.EDIT, { label: '编辑' });
56
- menu.registerSubmenu(LabMenus.VIEW, { label: '视图' });
57
- menu.registerSubmenu(LabMenus.RUN, { label: '运行' });
58
- menu.registerSubmenu(LabMenus.TERMINAL, { label: '终端' });
59
- menu.registerSubmenu(LabMenus.HELP, { label: '帮助' });
55
+ menu.registerSubmenu(LabMenus.FILE, { label: () => <div>{l10n.t('文件')}</div> });
56
+ menu.registerSubmenu(LabMenus.EDIT, { label: () => <div>{l10n.t('编辑')}</div> });
57
+ menu.registerSubmenu(LabMenus.VIEW, { label: () => <div>{l10n.t('视图')}</div> });
58
+ menu.registerSubmenu(LabMenus.RUN, { label: () => <div>{l10n.t('运行')}</div> });
59
+ menu.registerSubmenu(LabMenus.TERMINAL, {
60
+ label: () => <div>{l10n.t('终端')}</div>,
61
+ });
62
+ menu.registerSubmenu(LabMenus.HELP, { label: () => <div>{l10n.t('帮助')}</div> });
60
63
  menu.registerMenuAction(LabMenus.TERMINAL, {
61
64
  id: TerminalCommands['OpenTerminal'].id,
62
65
  command: TerminalCommands['OpenTerminal'].id,
63
- label: TerminalCommands['OpenTerminal'].label,
66
+ label: () => (
67
+ <div>
68
+ {TerminalCommands['OpenTerminal'].label &&
69
+ l10n.t(TerminalCommands['OpenTerminal'].label)}
70
+ </div>
71
+ ),
64
72
  });
65
73
  menu.registerMenuAction(LabMenus.HELP, {
66
74
  id: LabCommands.About.id,
67
75
  command: LabCommands.About.id,
68
- label: LabCommands.About.label,
76
+ label: () => <div>{l10n.t(LabCommands.About.label)}</div>,
69
77
  });
70
78
  menu.registerMenuAction(LabMenus.FILE, {
71
79
  id: LabCommands.Save.id,
72
80
  command: LabCommands.Save.id,
73
- label: LabCommands.Save.label,
81
+ label: () => <div>{l10n.t(LabCommands.Save.label)}</div>,
74
82
  });
75
83
  menu.registerMenuAction(LabMenus.FILE, {
76
84
  id: LabCommands.CreateFile.id,
77
85
  command: LabCommands.CreateFile.id,
78
- label: LabCommands.CreateFile.label,
86
+ label: () => <div>{l10n.t(LabCommands.CreateFile.label)}</div>,
79
87
  });
80
88
  menu.registerMenuAction(LabMenus.EDIT, {
81
89
  id: LabCommands.UndoCellAction.id,
82
90
  command: LabCommands.UndoCellAction.id,
83
- label: LabCommands.UndoCellAction.label,
91
+ label: () => <div>{l10n.t(LabCommands.UndoCellAction.label)}</div>,
84
92
  });
85
93
  menu.registerMenuAction(LabMenus.EDIT, {
86
94
  id: LabCommands.RedoCellAction.id,
87
95
  command: LabCommands.RedoCellAction.id,
88
- label: LabCommands.RedoCellAction.label,
96
+ label: () => <div>{l10n.t(LabCommands.RedoCellAction.label)}</div>,
89
97
  });
90
98
  menu.registerMenuAction(LabMenus.EDIT, {
91
99
  id: LabCommands.CutCell.id,
92
100
  command: LabCommands.CutCell.id,
93
- label: LabCommands.CutCell.label,
101
+ label: () => <div>{l10n.t(LabCommands.CutCell.label)}</div>,
94
102
  });
95
103
  menu.registerMenuAction(LabMenus.EDIT, {
96
104
  id: LabCommands.CopyCell.id,
97
105
  command: LabCommands.CopyCell.id,
98
- label: LabCommands.CopyCell.label,
106
+ label: () => <div>{l10n.t(LabCommands.CopyCell.label)}</div>,
99
107
  });
100
108
  menu.registerMenuAction(LabMenus.EDIT, {
101
109
  id: LabCommands.PasteCellBelow.id,
102
110
  command: LabCommands.PasteCellBelow.id,
103
- label: LabCommands.PasteCellBelow.label,
111
+ label: () => <div>{l10n.t(LabCommands.PasteCellBelow.label)}</div>,
104
112
  });
105
113
  menu.registerMenuAction(LabMenus.EDIT, {
106
114
  id: LabCommands.PasteCellAbove.id,
107
115
  command: LabCommands.PasteCellAbove.id,
108
- label: LabCommands.PasteCellAbove.label,
116
+ label: () => <div>{l10n.t(LabCommands.PasteCellAbove.label)}</div>,
109
117
  });
110
118
  menu.registerMenuAction(LabMenus.EDIT, {
111
119
  id: LabCommands.PasteAndReplaceCell.id,
112
120
  command: LabCommands.PasteAndReplaceCell.id,
113
- label: LabCommands.PasteAndReplaceCell.label,
121
+ label: () => <div>{l10n.t(LabCommands.PasteAndReplaceCell.label)}</div>,
114
122
  });
115
123
  menu.registerMenuAction(LabMenus.EDIT, {
116
124
  id: LabCommands.DeleteCell.id,
117
125
  command: LabCommands.DeleteCell.id,
118
- label: LabCommands.DeleteCell.label,
126
+ label: () => <div>{l10n.t(LabCommands.DeleteCell.label)}</div>,
119
127
  });
120
128
  menu.registerMenuAction(LabMenus.EDIT, {
121
129
  id: LabCommands.SelectAll.id,
122
130
  command: LabCommands.SelectAll.id,
123
- label: LabCommands.SelectAll.label,
131
+ label: () => <div>{l10n.t(LabCommands.SelectAll.label)}</div>,
124
132
  });
125
133
  // menu.registerMenuAction(HeaderMenus.EDIT, {
126
134
  // id: LabCommands.DeselectAll.id,
@@ -130,102 +138,102 @@ export class LabMenu
130
138
  menu.registerMenuAction(LabMenus.EDIT, {
131
139
  id: LabCommands.MoveCellUp.id,
132
140
  command: LabCommands.MoveCellUp.id,
133
- label: LabCommands.MoveCellUp.label,
141
+ label: () => <div>{l10n.t(LabCommands.MoveCellUp.label)}</div>,
134
142
  });
135
143
  menu.registerMenuAction(LabMenus.EDIT, {
136
144
  id: LabCommands.MoveCellDown.id,
137
145
  command: LabCommands.MoveCellDown.id,
138
- label: LabCommands.MoveCellDown.label,
146
+ label: () => <div>{l10n.t(LabCommands.MoveCellDown.label)}</div>,
139
147
  });
140
148
  menu.registerMenuAction(LabMenus.EDIT, {
141
149
  id: LabCommands.SplitCellAntCursor.id,
142
150
  command: LabCommands.SplitCellAntCursor.id,
143
- label: LabCommands.SplitCellAntCursor.label,
151
+ label: () => <div>{l10n.t(LabCommands.SplitCellAntCursor.label)}</div>,
144
152
  });
145
153
  menu.registerMenuAction(LabMenus.EDIT, {
146
154
  id: LabCommands.MergeCells.id,
147
155
  command: LabCommands.MergeCells.id,
148
- label: LabCommands.MergeCells.label,
156
+ label: () => <div>{l10n.t(LabCommands.MergeCells.label)}</div>,
149
157
  });
150
158
  menu.registerMenuAction(LabMenus.EDIT, {
151
159
  id: LabCommands.MergeCellAbove.id,
152
160
  command: LabCommands.MergeCellAbove.id,
153
- label: LabCommands.MergeCellAbove.label,
161
+ label: () => <div>{l10n.t(LabCommands.MergeCellAbove.label)}</div>,
154
162
  });
155
163
  menu.registerMenuAction(LabMenus.EDIT, {
156
164
  id: LabCommands.MergeCellBelow.id,
157
165
  command: LabCommands.MergeCellBelow.id,
158
- label: LabCommands.MergeCellBelow.label,
166
+ label: () => <div>{l10n.t(LabCommands.MergeCellBelow.label)}</div>,
159
167
  });
160
168
  menu.registerMenuAction(LabMenus.EDIT, {
161
169
  id: LabCommands.ClearCellOutput.id,
162
170
  command: LabCommands.ClearCellOutput.id,
163
- label: LabCommands.ClearCellOutput.label,
171
+ label: () => <div>{l10n.t(LabCommands.ClearCellOutput.label)}</div>,
164
172
  });
165
173
  menu.registerMenuAction(LabMenus.EDIT, {
166
174
  id: LabCommands.ClearAllCellOutput.id,
167
175
  command: LabCommands.ClearAllCellOutput.id,
168
- label: LabCommands.ClearAllCellOutput.label,
176
+ label: () => <div>{l10n.t(LabCommands.ClearAllCellOutput.label)}</div>,
169
177
  });
170
178
  menu.registerMenuAction(LabMenus.VIEW, {
171
179
  id: LabCommands.HideOrShowCellCode.id,
172
180
  command: LabCommands.HideOrShowCellCode.id,
173
- label: LabCommands.HideOrShowCellCode.label,
181
+ label: () => <div>{l10n.t(LabCommands.HideOrShowCellCode.label)}</div>,
174
182
  });
175
183
  menu.registerMenuAction(LabMenus.VIEW, {
176
184
  id: LabCommands.HideOrShowOutputs.id,
177
185
  command: LabCommands.HideOrShowOutputs.id,
178
- label: LabCommands.HideOrShowOutputs.label,
186
+ label: () => <div>{l10n.t(LabCommands.HideOrShowOutputs.label)}</div>,
179
187
  });
180
188
  menu.registerMenuAction(LabMenus.VIEW, {
181
189
  id: LabCommands.EnableOutputScrolling.id,
182
190
  command: LabCommands.EnableOutputScrolling.id,
183
- label: LabCommands.EnableOutputScrolling.label,
191
+ label: () => <div>{l10n.t(LabCommands.EnableOutputScrolling.label)}</div>,
184
192
  });
185
193
  menu.registerMenuAction(LabMenus.VIEW, {
186
194
  id: LabCommands.DisableOutputScrolling.id,
187
195
  command: LabCommands.DisableOutputScrolling.id,
188
- label: LabCommands.DisableOutputScrolling.label,
196
+ label: () => <div>{l10n.t(LabCommands.DisableOutputScrolling.label)}</div>,
189
197
  });
190
198
  menu.registerMenuAction(LabMenus.RUN, {
191
199
  id: LabCommands.RunCell.id,
192
200
  command: LabCommands.RunCell.id,
193
- label: LabCommands.RunCell.label,
201
+ label: () => <div>{l10n.t(LabCommands.RunCell.label)}</div>,
194
202
  });
195
203
  menu.registerMenuAction(LabMenus.RUN, {
196
204
  id: LabCommands.RunAllAbove.id,
197
205
  command: LabCommands.RunAllAbove.id,
198
- label: LabCommands.RunAllAbove.label,
206
+ label: () => <div>{l10n.t(LabCommands.RunAllAbove.label)}</div>,
199
207
  });
200
208
  menu.registerMenuAction(LabMenus.RUN, {
201
209
  id: LabCommands.RunAllBelow.id,
202
210
  command: LabCommands.RunAllBelow.id,
203
- label: LabCommands.RunAllBelow.label,
211
+ label: () => <div>{l10n.t(LabCommands.RunAllBelow.label)}</div>,
204
212
  });
205
213
  menu.registerMenuAction(LabMenus.RUN, {
206
214
  id: LabCommands.RunAllCells.id,
207
215
  command: LabCommands.RunAllCells.id,
208
- label: LabCommands.RunAllCells.label,
216
+ label: () => <div>{l10n.t(LabCommands.RunAllCells.label)}</div>,
209
217
  });
210
218
  menu.registerMenuAction(LabMenus.RUN, {
211
219
  id: LabCommands.RunCellAndSelectNext.id,
212
220
  command: LabCommands.RunCellAndSelectNext.id,
213
- label: LabCommands.RunCellAndSelectNext.label,
221
+ label: () => <div>{l10n.t(LabCommands.RunCellAndSelectNext.label)}</div>,
214
222
  });
215
223
  menu.registerMenuAction(LabMenus.RUN, {
216
224
  id: LabCommands.RunCellAndInsertBelow.id,
217
225
  command: LabCommands.RunCellAndInsertBelow.id,
218
- label: LabCommands.RunCellAndInsertBelow.label,
226
+ label: () => <div>{l10n.t(LabCommands.RunCellAndInsertBelow.label)}</div>,
219
227
  });
220
228
  menu.registerMenuAction(LabMenus.RUN, {
221
229
  id: LabCommands.RestartRunAll.id,
222
230
  command: LabCommands.RestartRunAll.id,
223
- label: LabCommands.RestartRunAll.label,
231
+ label: () => <div>{l10n.t(LabCommands.RestartRunAll.label)}</div>,
224
232
  });
225
233
  menu.registerMenuAction(LabMenus.RUN, {
226
234
  id: LabCommands.RestartAndRunToSelected.id,
227
235
  command: LabCommands.RestartAndRunToSelected.id,
228
- label: LabCommands.RestartAndRunToSelected.label,
236
+ label: () => <div>{l10n.t(LabCommands.RestartAndRunToSelected.label)}</div>,
229
237
  });
230
238
  }
231
239
  registerCommands(commands: CommandRegistry) {
@@ -7,6 +7,7 @@ import {
7
7
  singleton,
8
8
  view,
9
9
  } from '@difizen/mana-app';
10
+ import { l10n } from '@difizen/mana-l10n';
10
11
  import { forwardRef } from 'react';
11
12
 
12
13
  export const ManaMenubarComponent = forwardRef(function GithubLinkComponent() {
@@ -22,7 +23,7 @@ export class MenuBarView extends BaseView {
22
23
  constructor() {
23
24
  super();
24
25
  this.title.icon = MacCommandOutlined;
25
- this.title.label = '菜单';
26
+ this.title.label = () => <div>{l10n.t('菜单')}</div>;
26
27
  this.id = 'menu-bar';
27
28
  }
28
29
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
1
  import { CodeFilled } from '@ant-design/icons';
3
2
  import './index.less';
4
3
 
@@ -90,7 +89,6 @@ export function Loadding(props: IProps) {
90
89
  xmlnsXlink="http://www.w3.org/1999/xlink"
91
90
  className="libro-lab-loadding"
92
91
  >
93
- <title>形状结合</title>
94
92
  <g id="整体框架部分" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
95
93
  <g
96
94
  id="1.1容器加载中-关闭提示"
@@ -121,7 +119,6 @@ export function TerminalIcon(props: IProps) {
121
119
  xmlns="http://www.w3.org/2000/svg"
122
120
  xmlnsXlink="http://www.w3.org/1999/xlink"
123
121
  >
124
- <title>编组</title>
125
122
  <g id="整体框架部分" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
126
123
  <g
127
124
  id="1.2容器加载完成"
@@ -202,7 +199,6 @@ export function PreferenceIcon(props: IProps) {
202
199
  xmlns="http://www.w3.org/2000/svg"
203
200
  xmlnsXlink="http://www.w3.org/1999/xlink"
204
201
  >
205
- <title>政策</title>
206
202
  <g
207
203
  id="整体框架部分"
208
204
  stroke="none"
@@ -246,7 +242,6 @@ export function KeybindIcon(props: IProps) {
246
242
  xmlns="http://www.w3.org/2000/svg"
247
243
  xmlnsXlink="http://www.w3.org/1999/xlink"
248
244
  >
249
- <title>键盘</title>
250
245
  <g
251
246
  id="整体框架部分"
252
247
  stroke="none"
@@ -295,7 +290,6 @@ export function SuccIcon(props: IProps) {
295
290
  xmlnsXlink="http://www.w3.org/1999/xlink"
296
291
  className="libro-lab-success"
297
292
  >
298
- <title>编组 12</title>
299
293
  <g
300
294
  id="整体框架部分"
301
295
  stroke="none"
@@ -335,7 +329,6 @@ export function KernelAndTerminal() {
335
329
  xmlns="http://www.w3.org/2000/svg"
336
330
  xmlnsXlink="http://www.w3.org/1999/xlink"
337
331
  >
338
- <title>app store-fill</title>
339
332
  <g
340
333
  id="代码片段"
341
334
  stroke="none"
@@ -381,7 +374,6 @@ export function openedPage() {
381
374
  xmlns="http://www.w3.org/2000/svg"
382
375
  xmlnsXlink="http://www.w3.org/1999/xlink"
383
376
  >
384
- <title>广告主流水@2x</title>
385
377
  <g
386
378
  id="kernel管理面板"
387
379
  stroke="none"