diff --git a/packages/i18n/src/common/en-US.lang.ts b/packages/i18n/src/common/en-US.lang.ts index 4c53ad1568..1d53d3e02d 100644 --- a/packages/i18n/src/common/en-US.lang.ts +++ b/packages/i18n/src/common/en-US.lang.ts @@ -1507,6 +1507,14 @@ export const localizationBundle = { 'webview.webviewTagUnavailable': 'webview is unsupported on non-electron env, please use iframe instead', + // #region notebook + 'notebook.kernel.panel.empty': 'No content found.', + 'notebook.kernel.panel.title': 'Running Terminals and Kernels', + 'notebook.kernel.panel.opened.pages': 'Opened Pages', + 'notebook.kernel.panel.running.kernels': 'Running Kernels', + 'notebook.kernel.close.all.confirmation': 'Are you sure you want to close all?', + // #endregion notebook + ...browserViews, ...editorLocalizations, ...mergeConflicts, diff --git a/packages/i18n/src/common/zh-CN.lang.ts b/packages/i18n/src/common/zh-CN.lang.ts index 17fe721a7b..7ff8674523 100644 --- a/packages/i18n/src/common/zh-CN.lang.ts +++ b/packages/i18n/src/common/zh-CN.lang.ts @@ -1268,6 +1268,14 @@ export const localizationBundle = { 'webview.webviewTagUnavailable': '非 Electron 环境不支持 webview 标签,请使用 iframe 标签', + // #region notebook + 'notebook.kernel.panel.empty': '暂无内容', + 'notebook.kernel.panel.title': '运行的终端和内核', + 'notebook.kernel.panel.opened.pages': '已开启的标签页', + 'notebook.kernel.panel.running.kernels': '运行的内核', + 'notebook.kernel.close.all.confirmation': '你确定要关闭全部吗?', + // #endregion notebook + ...browserViews, ...editorLocalizations, ...mergeConflicts, diff --git a/packages/notebook/src/browser/kernel-panel/collapse/index.tsx b/packages/notebook/src/browser/kernel-panel/collapse/index.tsx index 7dab93dc84..6fad72a5dd 100644 --- a/packages/notebook/src/browser/kernel-panel/collapse/index.tsx +++ b/packages/notebook/src/browser/kernel-panel/collapse/index.tsx @@ -2,7 +2,7 @@ import { CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons'; import { ConfigProvider, Empty, Popconfirm, message, theme } from 'antd'; import React, { useEffect, useState } from 'react'; -import { useInjectable } from '@opensumi/ide-core-browser'; +import { localize, useInjectable } from '@opensumi/ide-core-browser'; import { IThemeService } from '@opensumi/ide-theme/lib/common'; import { @@ -23,7 +23,11 @@ const getCollapseContentView = ( ) => { if (!items) { return ( - + ); } @@ -41,9 +45,9 @@ const getCollapseContentView = ( const getCollapseHeaderLabel = (type: LibroPanelCollapseItemType) => { switch (type) { case LibroPanelCollapseItemType.PAGE: - return '已开启的标签页'; + return localize('notebook.kernel.panel.opened.pages'); case LibroPanelCollapseItemType.KERNEL: - return '运行的内核'; + return localize('notebook.kernel.panel.running.kernels'); } }; @@ -80,9 +84,9 @@ export const LibroCollapse: React.FC = (props: Props) => {
{ if (props.shutdownAll) { props @@ -96,7 +100,7 @@ export const LibroCollapse: React.FC = (props: Props) => { } }} > - 关闭全部 + {localize('editor.closeAllInGroup')}
diff --git a/packages/notebook/src/browser/kernel-panel/kernel-panel-view.tsx b/packages/notebook/src/browser/kernel-panel/kernel-panel-view.tsx index 0c4d1025a1..d67335b466 100644 --- a/packages/notebook/src/browser/kernel-panel/kernel-panel-view.tsx +++ b/packages/notebook/src/browser/kernel-panel/kernel-panel-view.tsx @@ -3,7 +3,7 @@ import { Container } from '@difizen/mana-app'; import { useEffect, useState } from 'react'; import React from 'react'; -import { useInjectable } from '@opensumi/ide-core-browser'; +import { localize, useInjectable } from '@opensumi/ide-core-browser'; import { IThemeService } from '@opensumi/ide-theme/lib/common'; import { ManaContainer } from '../mana'; @@ -78,7 +78,7 @@ export const KernelPanel: React.FC = () => { return (
-
运行的终端和内核
+
{localize('notebook.kernel.panel.title')}