From 8a3a95b5950ccfa33bebf5a2943cd2b049bce421 Mon Sep 17 00:00:00 2001 From: wjgogogo <906626481@qq.com> Date: Fri, 1 Dec 2023 15:16:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=AD=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=A0=87=E7=82=B9=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/s2-core/src/common/i18n/en_US.ts | 3 ++- packages/s2-core/src/common/i18n/zh_CN.ts | 3 ++- .../strategy-sheet/custom-tooltip/custom-data-tooltip.tsx | 3 ++- .../strategy-sheet/custom-tooltip/custom-row-tooltip.tsx | 3 ++- .../s2-react/src/components/tooltip/components/description.tsx | 3 ++- .../s2-react/src/components/tooltip/components/head-info.tsx | 3 ++- .../s2-react/src/components/tooltip/components/summary.tsx | 3 ++- packages/s2-shared/src/constant/i18n/en_US.ts | 2 +- packages/s2-shared/src/constant/i18n/zh_CN.ts | 2 +- 9 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packages/s2-core/src/common/i18n/en_US.ts b/packages/s2-core/src/common/i18n/en_US.ts index f067f4b7d9..acabe99a22 100644 --- a/packages/s2-core/src/common/i18n/en_US.ts +++ b/packages/s2-core/src/common/i18n/en_US.ts @@ -1,7 +1,7 @@ export const EN_US = { 小计: 'Total', 总计: 'Total', - 总和: 'SUM', + 总和: '(SUM)', 项: 'items', 已选择: 'selected', 序号: 'Index', @@ -16,4 +16,5 @@ export const EN_US = { 升序: 'ASC', 降序: 'DESC', 不排序: 'No order', + ',': ', ', }; diff --git a/packages/s2-core/src/common/i18n/zh_CN.ts b/packages/s2-core/src/common/i18n/zh_CN.ts index 6e677d4684..45913deb78 100644 --- a/packages/s2-core/src/common/i18n/zh_CN.ts +++ b/packages/s2-core/src/common/i18n/zh_CN.ts @@ -1,7 +1,7 @@ export const ZH_CN = { 小计: '小计', 总计: '总计', - 总和: '总和', + 总和: '(总和)', 项: '项', 已选择: '已选择', 序号: '序号', @@ -16,4 +16,5 @@ export const ZH_CN = { 降序: '降序', 组内降序: '组内降序', 不排序: '不排序', + ',': ',', }; diff --git a/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-data-tooltip.tsx b/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-data-tooltip.tsx index 80bce6d221..9b4938009c 100644 --- a/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-data-tooltip.tsx +++ b/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-data-tooltip.tsx @@ -112,7 +112,8 @@ export const StrategySheetDataTooltip: React.FC = ({ )} {rowDescription && (
- {i18n('说明')}: {rowDescription} + {i18n('说明')} + {rowDescription}
)} diff --git a/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-row-tooltip.tsx b/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-row-tooltip.tsx index d69b744226..fd6f6f3f79 100644 --- a/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-row-tooltip.tsx +++ b/packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/custom-row-tooltip.tsx @@ -22,7 +22,8 @@ export const StrategySheetRowTooltip: React.FC = ({
{rowName}
{description && (
- {i18n('说明')}: {description} + {i18n('说明')} + {description}
)} diff --git a/packages/s2-react/src/components/tooltip/components/description.tsx b/packages/s2-react/src/components/tooltip/components/description.tsx index e21f4fdce9..66c1ac4527 100644 --- a/packages/s2-react/src/components/tooltip/components/description.tsx +++ b/packages/s2-react/src/components/tooltip/components/description.tsx @@ -12,7 +12,8 @@ export const TooltipDescription: React.FC = ({ <> {description && (
- {i18n('说明')}:{description} + {i18n('说明')} + {description}
)} diff --git a/packages/s2-react/src/components/tooltip/components/head-info.tsx b/packages/s2-react/src/components/tooltip/components/head-info.tsx index 9048217a5c..37f0156682 100644 --- a/packages/s2-react/src/components/tooltip/components/head-info.tsx +++ b/packages/s2-react/src/components/tooltip/components/head-info.tsx @@ -3,6 +3,7 @@ import { type TooltipDetailListItem, type TooltipHeadInfo, TOOLTIP_PREFIX_CLS, + i18n, } from '@antv/s2'; export const TooltipHead: React.FC = (props) => { @@ -11,7 +12,7 @@ export const TooltipHead: React.FC = (props) => { return (
{cols.map((item: TooltipDetailListItem) => item.value)?.join('/')} - {cols.length > 0 && rows.length > 0 && ','} + {cols.length > 0 && rows.length > 0 && i18n(',')} {rows.map((item: TooltipDetailListItem) => item.value)?.join('/')}
); diff --git a/packages/s2-react/src/components/tooltip/components/summary.tsx b/packages/s2-react/src/components/tooltip/components/summary.tsx index a0e4a839fa..e41275d68f 100644 --- a/packages/s2-react/src/components/tooltip/components/summary.tsx +++ b/packages/s2-react/src/components/tooltip/components/summary.tsx @@ -33,7 +33,8 @@ export const TooltipSummary: React.FC = React.memo( > {name ? ( - {name} ({i18n('总和')}) + {name} + {i18n('总和')} ) : ( diff --git a/packages/s2-shared/src/constant/i18n/en_US.ts b/packages/s2-shared/src/constant/i18n/en_US.ts index 5137f8ca23..91e3386c9d 100644 --- a/packages/s2-shared/src/constant/i18n/en_US.ts +++ b/packages/s2-shared/src/constant/i18n/en_US.ts @@ -30,7 +30,7 @@ export const EN_US: Record = { '按以下规则进行排序(优先级由低到高)': 'Order according to the following rules (from low to high priority)', 按: 'By', - 说明: 'Description', + 说明: 'Description: ', // export 复制原始数据: 'Copy raw data', diff --git a/packages/s2-shared/src/constant/i18n/zh_CN.ts b/packages/s2-shared/src/constant/i18n/zh_CN.ts index 4763cb138b..681ae4bd17 100644 --- a/packages/s2-shared/src/constant/i18n/zh_CN.ts +++ b/packages/s2-shared/src/constant/i18n/zh_CN.ts @@ -30,7 +30,7 @@ export const ZH_CN: Record = { '按以下规则进行排序(优先级由低到高)': '按以下规则进行排序(优先级由低到高)', 按: '按', - 说明: '说明', + 说明: '说明:', // export 复制原始数据: '复制原始数据',