This is an automated email from the ASF dual-hosted git repository. villebro pushed a commit to branch 1.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 6d22b42e41e1304c201b779a023efa640aa6a78c Author: Michael S. Molina <[email protected]> AuthorDate: Fri Jan 22 02:45:44 2021 -0300 Apply capitalization guidelines - iteration 6 (#12343) (#12452) --- .../explore/components/SelectControl_spec.jsx | 8 +++---- .../DateFilterControl/frame/AdvancedFrame.tsx | 2 +- .../DateFilterControl/frame/CustomFrame.tsx | 4 ++-- .../components/controls/FilterBoxItemControl.jsx | 10 ++++---- .../explore/components/controls/SelectControl.jsx | 6 ++--- .../controls/TimeSeriesColumnControl.jsx | 12 +++++----- .../src/explore/controlPanels/Separator.js | 2 +- .../src/explore/controlPanels/TimeTable.js | 2 +- .../src/explore/controlPanels/sections.jsx | 28 +++++++++++----------- .../src/filters/components/Range/index.ts | 4 ++-- .../src/filters/components/Select/controlPanel.ts | 8 +++---- 11 files changed, 43 insertions(+), 43 deletions(-) diff --git a/superset-frontend/spec/javascripts/explore/components/SelectControl_spec.jsx b/superset-frontend/spec/javascripts/explore/components/SelectControl_spec.jsx index 35a0fcc..2c76ce4 100644 --- a/superset-frontend/spec/javascripts/explore/components/SelectControl_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/components/SelectControl_spec.jsx @@ -78,7 +78,7 @@ describe('SelectControl', () => { onChange: sinon.spy(), }; wrapper.setProps(selectAllProps); - wrapper.instance().onChange([{ meta: true, value: 'Select All' }]); + wrapper.instance().onChange([{ meta: true, value: 'Select all' }]); expect(selectAllProps.onChange.calledWith(expectedValues)).toBe(true); }); @@ -207,7 +207,7 @@ describe('SelectControl', () => { expect(wrapper.instance().optionsRemaining()).toEqual(2); }); }); - describe('with Select All', () => { + describe('with Select all', () => { it('does not count it', () => { const props = { ...defaultProps, multi: true, allowAll: true }; const wrapper = mount(<SelectControl {...props} />); @@ -234,9 +234,9 @@ describe('SelectControl', () => { }; wrapper.setProps(selectAllProps); expect(wrapper.instance().getOptions(selectAllProps)).toContainEqual({ - label: 'Select All', + label: 'Select all', meta: true, - value: 'Select All', + value: 'Select all', }); }); diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/frame/AdvancedFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/frame/AdvancedFrame.tsx index 93ce72f..39a695c 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/frame/AdvancedFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/frame/AdvancedFrame.tsx @@ -48,7 +48,7 @@ export function AdvancedFrame(props: FrameComponentProps) { return ( <> - <div className="section-title">{t('Configure Advanced Time Range')}</div> + <div className="section-title">{t('Configure advanced time range')}</div> <div className="control-label">{t('START')}</div> <Input key="since" diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/frame/CustomFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/frame/CustomFrame.tsx index 2ad8e63..553aea9 100644 --- a/superset-frontend/src/explore/components/controls/DateFilterControl/frame/CustomFrame.tsx +++ b/superset-frontend/src/explore/components/controls/DateFilterControl/frame/CustomFrame.tsx @@ -118,7 +118,7 @@ export function CustomFrame(props: FrameComponentProps) { return ( <div data-test="custom-frame"> - <div className="section-title">{t('Configure Custom Time Range')}</div> + <div className="section-title">{t('Configure custom time range')}</div> <Row gutter={24}> <Col span={12}> <div className="control-label">{t('START')}</div> @@ -226,7 +226,7 @@ export function CustomFrame(props: FrameComponentProps) { </Row> {sinceMode === 'relative' && untilMode === 'relative' && ( <div className="control-anchor-to"> - <div className="control-label">{t('ANCHOR TO')}</div> + <div className="control-label">{t('Anchor to')}</div> <Row align="middle"> <Col> <Radio.Group diff --git a/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx b/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx index da7a003..418de45 100644 --- a/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx +++ b/superset-frontend/src/explore/components/controls/FilterBoxItemControl.jsx @@ -181,7 +181,7 @@ export default class FilterBoxItemControl extends React.Component { } /> <FormRow - label={t('Sort Metric')} + label={t('Sort metric')} tooltip={t('Metric to sort the results by')} control={ <SelectControl @@ -201,7 +201,7 @@ export default class FilterBoxItemControl extends React.Component { } /> <FormRow - label={t('Sort Ascending')} + label={t('Sort ascending')} tooltip={t('Check for sorting ascending')} isCheckbox control={ @@ -212,7 +212,7 @@ export default class FilterBoxItemControl extends React.Component { } /> <FormRow - label={t('Allow Multiple Selections')} + label={t('Allow multiple selections')} isCheckbox tooltip={t( 'Multiple selections allowed, otherwise filter ' + @@ -228,7 +228,7 @@ export default class FilterBoxItemControl extends React.Component { } /> <FormRow - label={t('Search All Filter Options')} + label={t('Search all filter options')} tooltip={t( 'By default, each filter loads at most 1000 choices at the initial page load. ' + 'Check this box if you have more than 1000 filter values and want to enable dynamically ' + @@ -278,7 +278,7 @@ export default class FilterBoxItemControl extends React.Component { trigger="click" placement="right" content={this.renderPopover()} - title={t('Filter Configuration')} + title={t('Filter configuration')} > <InfoTooltipWithTrigger icon="edit" diff --git a/superset-frontend/src/explore/components/controls/SelectControl.jsx b/superset-frontend/src/explore/components/controls/SelectControl.jsx index 799ded9..e192c17 100644 --- a/superset-frontend/src/explore/components/controls/SelectControl.jsx +++ b/superset-frontend/src/explore/components/controls/SelectControl.jsx @@ -184,7 +184,7 @@ export default class SelectControl extends React.PureComponent { } isMetaSelectAllOption(o) { - return o.meta && o.meta === true && o.label === 'Select All'; + return o.meta && o.meta === true && o.label === 'Select all'; } optionsIncludesSelectAll(o) { @@ -205,8 +205,8 @@ export default class SelectControl extends React.PureComponent { } createMetaSelectAllOption() { - const option = { label: 'Select All', meta: true }; - option[this.props.valueKey] = 'Select All'; + const option = { label: 'Select all', meta: true }; + option[this.props.valueKey] = 'Select all'; return option; } diff --git a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx index e981720..5e9e8ee 100644 --- a/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx +++ b/superset-frontend/src/explore/components/controls/TimeSeriesColumnControl.jsx @@ -45,7 +45,7 @@ const propTypes = { }; const defaultProps = { - label: t('Time Series Columns'), + label: t('Time series columns'), tooltip: '', colType: '', width: '', @@ -65,14 +65,14 @@ const comparisonTypeOptions = [ { value: 'value', label: 'Actual value' }, { value: 'diff', label: 'Difference' }, { value: 'perc', label: 'Percentage' }, - { value: 'perc_change', label: 'Percentage Change' }, + { value: 'perc_change', label: 'Percentage change' }, ]; const colTypeOptions = [ - { value: 'time', label: 'Time Comparison' }, + { value: 'time', label: 'Time comparison' }, { value: 'contrib', label: 'Contribution' }, { value: 'spark', label: 'Sparkline' }, - { value: 'avg', label: 'Period Average' }, + { value: 'avg', label: 'Period average' }, ]; export default class TimeSeriesColumnControl extends React.Component { @@ -209,7 +209,7 @@ export default class TimeSeriesColumnControl extends React.Component { )} {['time', 'avg'].indexOf(this.state.colType) >= 0 && this.formRow( - 'Time Lag', + 'Time lag', 'Number of periods to compare against', 'time-lag', <FormControl @@ -221,7 +221,7 @@ export default class TimeSeriesColumnControl extends React.Component { )} {['spark'].indexOf(this.state.colType) >= 0 && this.formRow( - 'Time Ratio', + 'Time ratio', 'Number of periods to ratio against', 'time-ratio', <FormControl diff --git a/superset-frontend/src/explore/controlPanels/Separator.js b/superset-frontend/src/explore/controlPanels/Separator.js index aaca4a6..588adea 100644 --- a/superset-frontend/src/explore/controlPanels/Separator.js +++ b/superset-frontend/src/explore/controlPanels/Separator.js @@ -29,7 +29,7 @@ export default { name: 'markup_type', config: { type: 'SelectControl', - label: t('Markup Type'), + label: t('Markup type'), clearable: false, choices: formatSelectOptions(['markdown', 'html']), default: 'markdown', diff --git a/superset-frontend/src/explore/controlPanels/TimeTable.js b/superset-frontend/src/explore/controlPanels/TimeTable.js index c370f30..3d72176 100644 --- a/superset-frontend/src/explore/controlPanels/TimeTable.js +++ b/superset-frontend/src/explore/controlPanels/TimeTable.js @@ -35,7 +35,7 @@ export default { name: 'column_collection', config: { type: 'CollectionControl', - label: t('Time Series Columns'), + label: t('Time series columns'), validators: [validateNonEmpty], controlName: 'TimeSeriesColumnControl', }, diff --git a/superset-frontend/src/explore/controlPanels/sections.jsx b/superset-frontend/src/explore/controlPanels/sections.jsx index 29e7cda..d69a69e 100644 --- a/superset-frontend/src/explore/controlPanels/sections.jsx +++ b/superset-frontend/src/explore/controlPanels/sections.jsx @@ -28,7 +28,7 @@ export const druidTimeSeries = { }; export const datasourceAndVizType = { - label: t('Chart Type'), + label: t('Chart type'), expanded: true, controlSetRows: [ ['datasource'], @@ -56,7 +56,7 @@ export const datasourceAndVizType = { name: 'url_params', config: { type: 'HiddenControl', - label: t('URL Parameters'), + label: t('URL parameters'), hidden: true, description: t('Extra parameters for use in jinja templated queries'), }, @@ -75,7 +75,7 @@ export const datasourceAndVizType = { }; export const colorScheme = { - label: t('Color Scheme'), + label: t('Color scheme'), controlSetRows: [['color_scheme', 'label_colors']], }; @@ -87,7 +87,7 @@ export const sqlaTimeSeries = { }; export const annotations = { - label: t('Annotations and Layers'), + label: t('Annotations and layers'), tabOverride: 'data', expanded: true, controlSetRows: [ @@ -98,7 +98,7 @@ export const annotations = { type: 'AnnotationLayerControl', label: '', default: [], - description: 'Annotation Layers', + description: 'Annotation layers', renderTrigger: true, tabOverride: 'data', }, @@ -121,7 +121,7 @@ export const NVD3TimeSeries = [ name: 'order_desc', config: { type: 'CheckboxControl', - label: t('Sort Descending'), + label: t('Sort descending'), default: true, description: t('Whether to sort descending or ascending'), }, @@ -140,7 +140,7 @@ export const NVD3TimeSeries = [ ], }, { - label: t('Advanced Analytics'), + label: t('Advanced analytics'), tabOverride: 'data', description: t( 'This section contains options ' + @@ -148,13 +148,13 @@ export const NVD3TimeSeries = [ 'of query results', ), controlSetRows: [ - [<h1 className="section-header">{t('Rolling Window')}</h1>], + [<h1 className="section-header">{t('Rolling window')}</h1>], [ { name: 'rolling_type', config: { type: 'SelectControl', - label: t('Rolling Function'), + label: t('Rolling function'), default: 'None', choices: formatSelectOptions([ 'None', @@ -185,7 +185,7 @@ export const NVD3TimeSeries = [ name: 'min_periods', config: { type: 'TextControl', - label: t('Min Periods'), + label: t('Min periods'), isInt: true, description: t( 'The minimum number of rolling periods required to show ' + @@ -197,7 +197,7 @@ export const NVD3TimeSeries = [ }, }, ], - [<h1 className="section-header">{t('Time Comparison')}</h1>], + [<h1 className="section-header">{t('Time comparison')}</h1>], [ { name: 'time_compare', @@ -205,7 +205,7 @@ export const NVD3TimeSeries = [ type: 'SelectControl', multi: true, freeForm: true, - label: t('Time Shift'), + label: t('Time shift'), choices: formatSelectOptions([ '1 day', '1 week', @@ -231,7 +231,7 @@ export const NVD3TimeSeries = [ label: t('Calculation type'), default: 'values', choices: [ - ['values', 'Actual Values'], + ['values', 'Actual values'], ['absolute', 'Absolute difference'], ['percentage', 'Percentage change'], ['ratio', 'Ratio'], @@ -244,7 +244,7 @@ export const NVD3TimeSeries = [ }, }, ], - [<h1 className="section-header">{t('Python Functions')}</h1>], + [<h1 className="section-header">{t('Python functions')}</h1>], // eslint-disable-next-line jsx-a11y/heading-has-content [<h2 className="section-header">pandas.resample</h2>], [ diff --git a/superset-frontend/src/filters/components/Range/index.ts b/superset-frontend/src/filters/components/Range/index.ts index 4a77fbb..73fbfa7 100644 --- a/superset-frontend/src/filters/components/Range/index.ts +++ b/superset-frontend/src/filters/components/Range/index.ts @@ -25,8 +25,8 @@ import thumbnail from './images/thumbnail.png'; export default class AntdRangeFilterPlugin extends ChartPlugin { constructor() { const metadata = new ChartMetadata({ - name: t('Range Filter Plugin'), - description: 'Range Filter Plugin using AntD', + name: t('Range filter plugin'), + description: 'Range filter plugin using AntD', isNativeFilter: true, thumbnail, }); diff --git a/superset-frontend/src/filters/components/Select/controlPanel.ts b/superset-frontend/src/filters/components/Select/controlPanel.ts index 2432396..22ef1b2 100644 --- a/superset-frontend/src/filters/components/Select/controlPanel.ts +++ b/superset-frontend/src/filters/components/Select/controlPanel.ts @@ -44,7 +44,7 @@ const config: ControlPanelConfig = { name: 'multiSelect', config: { type: 'CheckboxControl', - label: t('Multiple Select'), + label: t('Multiple select'), default: multiSelect, description: t('Allow selecting multiple values'), }, @@ -55,7 +55,7 @@ const config: ControlPanelConfig = { name: 'enableEmptyFilter', config: { type: 'CheckboxControl', - label: t('Enable Empty Filter'), + label: t('Enable empty filter'), default: enableEmptyFilter, description: t( 'When selection is empty, should an always false filter event be emitted', @@ -68,7 +68,7 @@ const config: ControlPanelConfig = { name: 'inverseSelection', config: { type: 'CheckboxControl', - label: t('Inverse Selection'), + label: t('Inverse selection'), default: inverseSelection, description: t('Exclude selected values'), }, @@ -79,7 +79,7 @@ const config: ControlPanelConfig = { name: 'showSearch', config: { type: 'CheckboxControl', - label: t('Search Field'), + label: t('Search field'), default: showSearch, description: t('Allow typing search terms'), },
