Skip to content

Commit 54bfdcf

Browse files
committed
i18n
1 parent 54f5cc9 commit 54bfdcf

8 files changed

Lines changed: 19 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 3.0.11
1+
## 3.0.10
22

33
`2023-11-06`
44

CHANGELOG_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 3.0.11
1+
## 3.0.10
22

33
`2023-11-06`
44

chat2db-client/src/blocks/Setting/AiSetting/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ export default function SettingAI(props: IProps) {
2828
setLoading(true);
2929
try {
3030
const res = await getUser();
31-
// 向cookie中写入当前用户id
32-
// const date = new Date('2030-12-30 12:30:00').toUTCString();
33-
// document.cookie = `CHAT2DB.USER_ID=${res?.id};Expires=${date}`;
3431
setUserInfo(res);
3532
} finally {
3633
setLoading(false);

chat2db-client/src/components/SearchResult/TableBox/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ interface ITableProps {
4343
className?: string;
4444
outerQueryResultData: IManageResultData;
4545
executeSqlParams: any;
46+
tableBoxId: string;
4647
}
4748

4849
interface IViewTableCellData {
@@ -91,7 +92,7 @@ const defaultPaginationConfig: IResultConfig = {
9192
};
9293

9394
export default function TableBox(props: ITableProps) {
94-
const { className, outerQueryResultData } = props;
95+
const { className, outerQueryResultData, tableBoxId } = props;
9596
const [viewTableCellData, setViewTableCellData] = useState<IViewTableCellData | null>(null);
9697
const [, contextHolder] = message.useMessage();
9798
const [paginationConfig, setPaginationConfig] = useState<IResultConfig>(defaultPaginationConfig);
@@ -1077,6 +1078,7 @@ export default function TableBox(props: ITableProps) {
10771078
/>
10781079
</div>
10791080
<div className={classnames(styles.toolBarItem, styles.refreshBar)}>
1081+
{/* 刷新 */}
10801082
<Popover mouseEnterDelay={0.8} content={i18n('common.button.refresh')} trigger="hover">
10811083
<div
10821084
onClick={() => {
@@ -1210,7 +1212,7 @@ export default function TableBox(props: ITableProps) {
12101212

12111213
return (
12121214
<div className={classnames(className, styles.tableBox, { [styles.noDataTableBox]: !tableData.length })}>
1213-
{activeSearchResult.id === queryResultData.uuid && renderContent()}
1215+
{activeSearchResult.id === tableBoxId && renderContent()}
12141216
<Modal
12151217
title={viewTableCellData?.name}
12161218
open={!!viewTableCellData?.name}

chat2db-client/src/components/SearchResult/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export default forwardRef((props: IProps, ref: ForwardedRef<ISearchResultRef>) =
103103
<div className={styles.successResultContent}>
104104
{needTable ? (
105105
<TableBox
106+
tableBoxId={queryResultData.uuid}
106107
key={queryResultData.uuid}
107108
outerQueryResultData={queryResultData}
108109
executeSqlParams={props.executeSqlParams}

chat2db-client/src/components/Tabs/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import classnames from 'classnames';
33
import Iconfont from '@/components/Iconfont';
44
import styles from './index.less';
55
import { Popover, Dropdown } from 'antd';
6+
import i18n from '@/i18n';
67

78
export interface ITabItem {
89
prefixIcon?: string | React.ReactNode;
@@ -163,21 +164,21 @@ export default memo<IProps>((props) => {
163164

164165
const closeTabsMenu = [
165166
{
166-
label: '关闭',
167+
label: i18n('common.button.close'),
167168
key: 'close',
168169
onClick: () => {
169170
deleteTab(t);
170171
},
171172
},
172-
{
173-
label: '关闭其他',
173+
{
174+
label: i18n('common.button.closeOthers'),
174175
key: 'closeOther',
175176
onClick: () => {
176177
deleteOtherTab(t);
177178
},
178179
},
179180
{
180-
label: '关闭所有',
181+
label: i18n('common.button.closeAll'),
181182
key: 'closeAll',
182183
onClick: () => {
183184
deleteAllTab();

chat2db-client/src/i18n/en-us/common.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,7 @@ export default {
114114
'common.button.setNull': 'Set NULL',
115115
'common.button.setDefault': 'Set DEFAULT',
116116
'common.button.viewData': 'View/Edit Data',
117+
'common.button.close': 'Close',
118+
'common.button.closeAll': 'Close all',
119+
'common.button.closeOthers': 'Close others',
117120
};

chat2db-client/src/i18n/zh-cn/common.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,9 @@ export default {
113113
'common.button.setNull': '设置为NULL',
114114
'common.button.setDefault': '设置为默认值',
115115
'common.button.viewData': '查看/修改数据',
116+
'common.button.close': '关闭',
117+
'common.button.closeAll': '全部关闭',
118+
'common.button.closeOthers': '关闭其他',
119+
116120

117121
};

0 commit comments

Comments
 (0)