mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore: Localization of superset pt. 3 (#22938)
Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
} from '@superset-ui/core';
|
||||
import {
|
||||
D3_FORMAT_DOCS,
|
||||
D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT,
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
sections,
|
||||
@@ -137,9 +138,7 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
default: 'SMART_NUMBER',
|
||||
choices: D3_FORMAT_OPTIONS,
|
||||
description: `${t(
|
||||
'D3 format syntax: https://github.com/d3/d3-format',
|
||||
)} ${t('Only applies when "Label Type" is set to show values.')}`,
|
||||
description: `${D3_FORMAT_DOCS} ${D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -21,10 +21,12 @@ import { t } from '@superset-ui/core';
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT,
|
||||
sections,
|
||||
sharedControls,
|
||||
ControlStateMapping,
|
||||
getStandardizedControls,
|
||||
D3_FORMAT_DOCS,
|
||||
} from '@superset-ui/chart-controls';
|
||||
import { DEFAULT_FORM_DATA, EchartsFunnelLabelTypeType } from './types';
|
||||
import { legendSection } from '../controls';
|
||||
@@ -112,9 +114,7 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
default: numberFormat,
|
||||
choices: D3_FORMAT_OPTIONS,
|
||||
description: `${t(
|
||||
'D3 format syntax: https://github.com/d3/d3-format',
|
||||
)} ${t('Only applies when "Label Type" is set to show values.')}`,
|
||||
description: `${D3_FORMAT_DOCS} ${D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
ControlPanelConfig,
|
||||
ControlPanelsContainerProps,
|
||||
D3_FORMAT_DOCS,
|
||||
D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT,
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
sections,
|
||||
@@ -120,9 +121,7 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
default: numberFormat,
|
||||
choices: D3_FORMAT_OPTIONS,
|
||||
description: `${t(
|
||||
'D3 format syntax: https://github.com/d3/d3-format',
|
||||
)} ${t('Only applies when "Label Type" is set to show values.')}`,
|
||||
description: `${D3_FORMAT_DOCS} ${D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT}`,
|
||||
tokenSeparators: ['\n', '\t', ';'],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
D3_FORMAT_DOCS,
|
||||
D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT,
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
sections,
|
||||
@@ -137,9 +138,7 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
default: numberFormat,
|
||||
choices: D3_FORMAT_OPTIONS,
|
||||
description: `${t(
|
||||
'D3 format syntax: https://github.com/d3/d3-format. ',
|
||||
)} ${t('Only applies when "Label Type" is set to show values.')}`,
|
||||
description: `${D3_FORMAT_DOCS} ${D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
ControlPanelConfig,
|
||||
ControlPanelsContainerProps,
|
||||
D3_FORMAT_DOCS,
|
||||
D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT,
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
getStandardizedControls,
|
||||
@@ -130,9 +131,7 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
default: numberFormat,
|
||||
choices: D3_FORMAT_OPTIONS,
|
||||
description: `${t(
|
||||
'D3 format syntax: https://github.com/d3/d3-format',
|
||||
)} ${t('Only applies when "Label Type" is set to show values.')}`,
|
||||
description: `${D3_FORMAT_DOCS} ${D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { EchartsTimeseriesSeriesType } from '../types';
|
||||
import { DEFAULT_FORM_DATA } from '../constants';
|
||||
import { DEFAULT_FORM_DATA, TIME_SERIES_DESCRIPTION_TEXT } from '../constants';
|
||||
import {
|
||||
legendSection,
|
||||
onlyTotalControl,
|
||||
@@ -182,9 +182,7 @@ const config: ControlPanelConfig = {
|
||||
config: {
|
||||
...sharedControls.x_axis_time_format,
|
||||
default: 'smart_date',
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${t(
|
||||
'When using other than adaptive formatting, labels may overlap.',
|
||||
)}`,
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${TIME_SERIES_DESCRIPTION_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -31,7 +31,10 @@ import {
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { OrientationType } from '../../types';
|
||||
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||
import {
|
||||
DEFAULT_FORM_DATA,
|
||||
TIME_SERIES_DESCRIPTION_TEXT,
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
richTooltipSection,
|
||||
@@ -150,9 +153,7 @@ function createAxisControl(axis: 'x' | 'y'): ControlSetRow[] {
|
||||
config: {
|
||||
...sharedControls.x_axis_time_format,
|
||||
default: 'smart_date',
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${t(
|
||||
'When using other than adaptive formatting, labels may overlap.',
|
||||
)}`,
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${TIME_SERIES_DESCRIPTION_TEXT}`,
|
||||
visibility: ({ controls }: ControlPanelsContainerProps) =>
|
||||
isXAxis ? isVertical(controls) : isHorizontal(controls),
|
||||
},
|
||||
|
||||
@@ -28,7 +28,10 @@ import {
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { EchartsTimeseriesSeriesType } from '../../types';
|
||||
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||
import {
|
||||
DEFAULT_FORM_DATA,
|
||||
TIME_SERIES_DESCRIPTION_TEXT,
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
richTooltipSection,
|
||||
@@ -169,9 +172,7 @@ const config: ControlPanelConfig = {
|
||||
config: {
|
||||
...sharedControls.x_axis_time_format,
|
||||
default: 'smart_date',
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${t(
|
||||
'When using other than adaptive formatting, labels may overlap.',
|
||||
)}`,
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${TIME_SERIES_DESCRIPTION_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -27,7 +27,10 @@ import {
|
||||
sharedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||
import {
|
||||
DEFAULT_FORM_DATA,
|
||||
TIME_SERIES_DESCRIPTION_TEXT,
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
richTooltipSection,
|
||||
@@ -112,9 +115,7 @@ const config: ControlPanelConfig = {
|
||||
config: {
|
||||
...sharedControls.x_axis_time_format,
|
||||
default: 'smart_date',
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${t(
|
||||
'When using other than adaptive formatting, labels may overlap.',
|
||||
)}`,
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${TIME_SERIES_DESCRIPTION_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -27,7 +27,10 @@ import {
|
||||
sharedControls,
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { DEFAULT_FORM_DATA } from '../../constants';
|
||||
import {
|
||||
DEFAULT_FORM_DATA,
|
||||
TIME_SERIES_DESCRIPTION_TEXT,
|
||||
} from '../../constants';
|
||||
import {
|
||||
legendSection,
|
||||
richTooltipSection,
|
||||
@@ -111,9 +114,7 @@ const config: ControlPanelConfig = {
|
||||
config: {
|
||||
...sharedControls.x_axis_time_format,
|
||||
default: 'smart_date',
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${t(
|
||||
'When using other than adaptive formatting, labels may overlap.',
|
||||
)}`,
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${TIME_SERIES_DESCRIPTION_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
} from '@superset-ui/chart-controls';
|
||||
|
||||
import { EchartsTimeseriesSeriesType } from '../../types';
|
||||
import { DEFAULT_FORM_DATA } from '../constants';
|
||||
import { DEFAULT_FORM_DATA, TIME_SERIES_DESCRIPTION_TEXT } from '../constants';
|
||||
import {
|
||||
legendSection,
|
||||
richTooltipSection,
|
||||
@@ -166,9 +166,7 @@ const config: ControlPanelConfig = {
|
||||
config: {
|
||||
...sharedControls.x_axis_time_format,
|
||||
default: 'smart_date',
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${t(
|
||||
'When using other than adaptive formatting, labels may overlap.',
|
||||
)}`,
|
||||
description: `${D3_TIME_FORMAT_DOCS}. ${TIME_SERIES_DESCRIPTION_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { sections } from '@superset-ui/chart-controls';
|
||||
import { t } from '@superset-ui/core';
|
||||
import {
|
||||
OrientationType,
|
||||
EchartsTimeseriesSeriesType,
|
||||
@@ -63,3 +64,7 @@ export const DEFAULT_FORM_DATA: EchartsTimeseriesFormData = {
|
||||
percentageThreshold: 0,
|
||||
orientation: OrientationType.vertical,
|
||||
};
|
||||
|
||||
export const TIME_SERIES_DESCRIPTION_TEXT: string = t(
|
||||
'When using other than adaptive formatting, labels may overlap',
|
||||
);
|
||||
|
||||
@@ -21,6 +21,7 @@ import { t } from '@superset-ui/core';
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
D3_FORMAT_DOCS,
|
||||
D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT,
|
||||
D3_FORMAT_OPTIONS,
|
||||
D3_TIME_FORMAT_OPTIONS,
|
||||
sections,
|
||||
@@ -113,9 +114,7 @@ const config: ControlPanelConfig = {
|
||||
renderTrigger: true,
|
||||
default: numberFormat,
|
||||
choices: D3_FORMAT_OPTIONS,
|
||||
description: `${t(
|
||||
'D3 format syntax: https://github.com/d3/d3-format. ',
|
||||
)} ${t('Only applies when "Label Type" is set to show values.')}`,
|
||||
description: `${D3_FORMAT_DOCS} ${D3_NUMBER_FORMAT_DESCRIPTION_VALUES_TEXT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user