Apply capitalization guidelines - iteration 6 (#12343) (#12452)

This commit is contained in:
Michael S. Molina 2021-01-22 02:45:44 -03:00 committed by GitHub
parent 8532e6d9e1
commit 2a587f6cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 43 additions and 43 deletions

View File

@ -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',
});
});

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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;
}

View File

@ -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

View File

@ -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',

View File

@ -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',
},

View File

@ -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>],
[

View File

@ -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,
});

View File

@ -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'),
},