Skip to content

Commit

Permalink
fix: 修复中英文标点符号
Browse files Browse the repository at this point in the history
  • Loading branch information
wjgogogo committed Dec 1, 2023
1 parent 1207fa0 commit 8a3a95b
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/s2-core/src/common/i18n/en_US.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const EN_US = {
小计: 'Total',
总计: 'Total',
总和: 'SUM',
总和: '(SUM)',
: 'items',
已选择: 'selected',
序号: 'Index',
Expand All @@ -16,4 +16,5 @@ export const EN_US = {
升序: 'ASC',
降序: 'DESC',
不排序: 'No order',
',': ', ',
};
3 changes: 2 additions & 1 deletion packages/s2-core/src/common/i18n/zh_CN.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const ZH_CN = {
小计: '小计',
总计: '总计',
总和: '总和',
总和: '(总和)',
: '项',
已选择: '已选择',
序号: '序号',
Expand All @@ -16,4 +16,5 @@ export const ZH_CN = {
降序: '降序',
组内降序: '组内降序',
不排序: '不排序',
',': ',',
};
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export const StrategySheetDataTooltip: React.FC<CustomTooltipProps> = ({
)}
{rowDescription && (
<div className={tooltipCls('description')}>
{i18n('说明')}: {rowDescription}
{i18n('说明')}
{rowDescription}
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const StrategySheetRowTooltip: React.FC<CustomTooltipProps> = ({
<div className={tooltipCls('value')}>{rowName}</div>
{description && (
<div className={tooltipCls('description')}>
{i18n('说明')}: {description}
{i18n('说明')}
{description}
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const TooltipDescription: React.FC<TooltipDescriptionProps> = ({
<>
{description && (
<div className={`${TOOLTIP_PREFIX_CLS}-description`}>
{i18n('说明')}{description}
{i18n('说明')}
{description}
</div>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
type TooltipDetailListItem,
type TooltipHeadInfo,
TOOLTIP_PREFIX_CLS,
i18n,
} from '@antv/s2';

export const TooltipHead: React.FC<TooltipHeadInfo> = (props) => {
Expand All @@ -11,7 +12,7 @@ export const TooltipHead: React.FC<TooltipHeadInfo> = (props) => {
return (
<div className={`${TOOLTIP_PREFIX_CLS}-head-info-list`}>
{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('/')}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export const TooltipSummary: React.FC<TooltipSummaryProps> = React.memo(
>
{name ? (
<span className={`${TOOLTIP_PREFIX_CLS}-summary-key`}>
{name}{i18n('总和')})
{name}
{i18n('总和')}
</span>
) : (
<span className={`${TOOLTIP_PREFIX_CLS}-summary-key`}>
Expand Down
2 changes: 1 addition & 1 deletion packages/s2-shared/src/constant/i18n/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const EN_US: Record<string, string> = {
'按以下规则进行排序(优先级由低到高)':
'Order according to the following rules (from low to high priority)',
: 'By',
说明: 'Description',
说明: 'Description: ',

// export
复制原始数据: 'Copy raw data',
Expand Down
2 changes: 1 addition & 1 deletion packages/s2-shared/src/constant/i18n/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ZH_CN: Record<string, string> = {
'按以下规则进行排序(优先级由低到高)':
'按以下规则进行排序(优先级由低到高)',
: '按',
说明: '说明',
说明: '说明',

// export
复制原始数据: '复制原始数据',
Expand Down

0 comments on commit 8a3a95b

Please sign in to comment.