@difizen/libro-core 0.2.43 → 0.2.45

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.
@@ -1 +1 @@
1
- {"version":3,"file":"restart-clear-outputs-modal.d.ts","sourceRoot":"","sources":["../../src/toolbar/restart-clear-outputs-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,wBAAgB,gCAAgC,CAAC,EAC/C,OAAO,EACP,KAAK,EACL,IAAI,GACL,EAAE,cAAc,CAAC,SAAS,CAAC,2CAoB3B;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,CAAC,SAAS,CAGxD,CAAC"}
1
+ {"version":3,"file":"restart-clear-outputs-modal.d.ts","sourceRoot":"","sources":["../../src/toolbar/restart-clear-outputs-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAMnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,wBAAgB,gCAAgC,CAAC,EAC/C,OAAO,EACP,KAAK,EACL,IAAI,GACL,EAAE,cAAc,CAAC,SAAS,CAAC,2CAsB3B;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,CAAC,SAAS,CAGxD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { l10n } from '@difizen/mana-l10n';
1
2
  import { Modal } from 'antd';
2
3
  import { useCallback } from 'react';
3
4
  import { NotebookCommands } from "../command/index.js";
@@ -12,7 +13,7 @@ export function RestartClearOutputModalComponent(_ref) {
12
13
  // eslint-disable-next-line react-hooks/exhaustive-deps
13
14
  }, [data]);
14
15
  return /*#__PURE__*/_jsx(Modal, {
15
- title: "Restart Kernel?",
16
+ title: l10n.t('清空输出并重启 Kernel?'),
16
17
  open: visible,
17
18
  onOk: handleRestart,
18
19
  onCancel: function onCancel() {
@@ -21,7 +22,9 @@ export function RestartClearOutputModalComponent(_ref) {
21
22
  width: '400px',
22
23
  centered: true,
23
24
  className: "libro-restart-kernel-modal",
24
- children: "Do you want to restart the current kernel? All variables will be lost."
25
+ okText: l10n.t('确定'),
26
+ cancelText: l10n.t('取消'),
27
+ children: l10n.t('确定清空输出并重启当前 Kernel 吗?所有变量都将丢失。')
25
28
  });
26
29
  }
27
30
  export var RestartClearOutputModal = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-core",
3
- "version": "0.2.43",
3
+ "version": "0.2.45",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@ant-design/icons": "^5.1.0",
37
- "@difizen/libro-code-editor": "^0.2.43",
38
- "@difizen/libro-common": "^0.2.43",
39
- "@difizen/libro-shared-model": "^0.2.43",
40
- "@difizen/libro-virtualized": "^0.2.43",
37
+ "@difizen/libro-code-editor": "^0.2.45",
38
+ "@difizen/libro-common": "^0.2.45",
39
+ "@difizen/libro-shared-model": "^0.2.45",
40
+ "@difizen/libro-virtualized": "^0.2.45",
41
41
  "@difizen/mana-app": "latest",
42
42
  "@difizen/mana-l10n": "latest",
43
43
  "@difizen/mana-react": "latest",
@@ -1,4 +1,5 @@
1
1
  import type { ModalItemProps, ModalItem } from '@difizen/mana-app';
2
+ import { l10n } from '@difizen/mana-l10n';
2
3
  import { Modal } from 'antd';
3
4
  import { useCallback } from 'react';
4
5
 
@@ -18,15 +19,17 @@ export function RestartClearOutputModalComponent({
18
19
 
19
20
  return (
20
21
  <Modal
21
- title="Restart Kernel?"
22
+ title={l10n.t('清空输出并重启 Kernel?')}
22
23
  open={visible}
23
24
  onOk={handleRestart}
24
25
  onCancel={() => close()}
25
26
  width={'400px'}
26
27
  centered={true}
27
28
  className="libro-restart-kernel-modal"
29
+ okText={l10n.t('确定')}
30
+ cancelText={l10n.t('取消')}
28
31
  >
29
- Do you want to restart the current kernel? All variables will be lost.
32
+ {l10n.t('确定清空输出并重启当前 Kernel 吗?所有变量都将丢失。')}
30
33
  </Modal>
31
34
  );
32
35
  }