chore: apply capitalization guidelines - iteration 1 (#12447)

Apply capitalization guidelines defined in #12343 

Use sentence casing for most places.
This commit is contained in:
Michael S. Molina 2021-01-12 15:47:55 -03:00 committed by GitHub
parent ed53b0090e
commit 6731cd0be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 33 additions and 33 deletions

View File

@ -83,7 +83,7 @@ describe('getControlsForVizType', () => {
JSON.stringify({
label_colors: {
type: 'ColorMapControl',
label: t('Color Map'),
label: t('Color map'),
default: {},
renderTrigger: true,
mapStateToProps: state => ({

View File

@ -301,7 +301,7 @@ export function runAnnotationQuery(
dispatch(
annotationQueryFailed(
annotation,
{ error: 'Query Timeout' },
{ error: 'Query timeout' },
sliceKey,
),
);

View File

@ -38,14 +38,14 @@ import Collapse from './Collapse';
import { CronPicker, CronError } from './CronPicker';
export default {
title: 'Common Components',
title: 'Common components',
decorators: [withKnobs],
};
export const StyledModal = () => (
<Modal
disablePrimaryButton={false}
onHandledPrimaryAction={action('Primary Action')}
onHandledPrimaryAction={action('Primary action')}
primaryButtonName="Danger"
primaryButtonType="danger"
show
@ -65,14 +65,14 @@ export const StyledTabs = () => (
<Tabs.TabPane
tab="Tab 1"
key="1"
disabled={boolean('Tab 1 Disabled', false)}
disabled={boolean('Tab 1 disabled', false)}
>
Tab 1 Content!
</Tabs.TabPane>
<Tabs.TabPane
tab="Tab 2"
key="2"
disabled={boolean('Tab 2 Disabled', false)}
disabled={boolean('Tab 2 disabled', false)}
>
Tab 2 Content!
</Tabs.TabPane>
@ -88,14 +88,14 @@ export const StyledEditableTabs = () => (
<Tabs.TabPane
tab="Tab 1"
key="1"
disabled={boolean('Tab 1 Disabled', false)}
disabled={boolean('Tab 1 disabled', false)}
>
Tab 1 Content!
</Tabs.TabPane>
<Tabs.TabPane
tab="Tab 2"
key="2"
disabled={boolean('Tab 2 Disabled', false)}
disabled={boolean('Tab 2 disabled', false)}
>
Tab 2 Content!
</Tabs.TabPane>
@ -123,7 +123,7 @@ export const TabsWithDropdownMenu = () => (
</>
}
key="1"
disabled={boolean('Tab 1 Disabled', false)}
disabled={boolean('Tab 1 disabled', false)}
>
Tab 1 Content!
</Tabs.TabPane>

View File

@ -85,7 +85,7 @@ class AnchorLink extends React.PureComponent {
filters,
anchorLinkId,
)}
emailSubject={t('Superset Chart')}
emailSubject={t('Superset chart')}
emailContent={t('Check out this chart in dashboard:')}
placement={placement}
/>

View File

@ -178,7 +178,7 @@ export default function EditableTitle({
label="title"
tooltip={
canEdit
? t('click to edit')
? t('Click to edit')
: noPermitTooltip ||
t("You don't have the rights to alter this title.")
}

View File

@ -41,7 +41,7 @@ const getDashboards = query =>
})),
)
.catch(() => ({
title: t('An error occurred while fethching Dashboards'),
title: t('An error occurred while fetching dashboards'),
}));
const OmniModal = styled(Modal)`

View File

@ -60,7 +60,7 @@ const guessFrame = (timeRange: string): FrameType => {
return 'Calendar';
}
if (timeRange === 'No filter') {
return 'No Filter';
return 'No filter';
}
if (customTimeRangeDecode(timeRange).matchedFlag) {
return 'Custom';
@ -251,7 +251,7 @@ export default function DateFilterControl(props: DateFilterLabelProps) {
};
function onFrame(option: SelectOptionType) {
if (option.value === 'No Filter') {
if (option.value === 'No filter') {
setTimeRangeValue('No filter');
}
setFrame(option.value as FrameType);
@ -266,7 +266,7 @@ export default function DateFilterControl(props: DateFilterLabelProps) {
onChange={onFrame}
className="frame-dropdown"
/>
{frame !== 'No Filter' && <Divider />}
{frame !== 'No filter' && <Divider />}
{frame === 'Common' && (
<CommonFrame value={timeRangeValue} onChange={setTimeRangeValue} />
)}
@ -279,10 +279,10 @@ export default function DateFilterControl(props: DateFilterLabelProps) {
{frame === 'Custom' && (
<CustomFrame value={timeRangeValue} onChange={setTimeRangeValue} />
)}
{frame === 'No Filter' && <div data-test="no-filter" />}
{frame === 'No filter' && <div data-test="no-filter" />}
<Divider />
<div>
<div className="section-title">{t('Actual Time Range')}</div>
<div className="section-title">{t('Actual time range')}</div>
{validTimeRange && <div>{evalResponse}</div>}
{!validTimeRange && (
<IconWrapper className="warning">
@ -321,7 +321,7 @@ export default function DateFilterControl(props: DateFilterLabelProps) {
const title = (
<IconWrapper>
<Icon name="edit-alt" />
<span className="text">{t('Edit Time Range')}</span>
<span className="text">{t('Edit time range')}</span>
</IconWrapper>
);

View File

@ -32,7 +32,7 @@ export const FRAME_OPTIONS: SelectOptionType[] = [
{ value: 'Calendar', label: t('Previous') },
{ value: 'Custom', label: t('Custom') },
{ value: 'Advanced', label: t('Advanced') },
{ value: 'No Filter', label: t('No Filter') },
{ value: 'No filter', label: t('No filter') },
];
export const COMMON_RANGE_OPTIONS: SelectOptionType[] = [

View File

@ -26,7 +26,7 @@ export type FrameType =
| 'Calendar'
| 'Custom'
| 'Advanced'
| 'No Filter';
| 'No filter';
export type DateTimeGrainType =
| 'second'

View File

@ -77,11 +77,11 @@ export const sqlaAutoGeneratedMetricRegex = /^(LONG|DOUBLE|FLOAT)?(SUM|AVG|MAX|M
export const druidAutoGeneratedMetricRegex = /^(LONG|DOUBLE|FLOAT)?(SUM|MAX|MIN|COUNT)\([A-Z0-9_."]*\)$/i;
export const TIME_FILTER_LABELS = {
time_range: t('Time Range'),
granularity_sqla: t('Time Column'),
time_grain_sqla: t('Time Grain'),
time_range: t('Time range'),
granularity_sqla: t('Time column'),
time_grain_sqla: t('Time grain'),
druid_time_origin: t('Origin'),
granularity: t('Time Granularity'),
granularity: t('Time granularity'),
};
export const FILTER_CONFIG_ATTRIBUTES = {

View File

@ -203,13 +203,13 @@ export const controls = {
viz_type: {
type: 'VizTypeControl',
label: t('Visualization Type'),
label: t('Visualization type'),
default: 'table',
description: t('The type of visualization to display'),
},
color_picker: {
label: t('Fixed Color'),
label: t('Fixed color'),
description: t('Use this to define a static color for all circles'),
type: 'ColorPickerControl',
default: PRIMARY_COLOR,
@ -218,14 +218,14 @@ export const controls = {
metric_2: {
...metric,
label: t('Right Axis Metric'),
label: t('Right axis metric'),
clearable: true,
description: t('Choose a metric for right axis'),
},
linear_color_scheme: {
type: 'ColorSchemeControl',
label: t('Linear Color Scheme'),
label: t('Linear color scheme'),
choices: () =>
sequentialSchemeRegistry.values().map(value => [value.id, value.label]),
default: sequentialSchemeRegistry.getDefaultKey(),
@ -238,7 +238,7 @@ export const controls = {
secondary_metric: {
...metric,
label: t('Color Metric'),
label: t('Color metric'),
default: null,
validators: [],
description: t('A metric to use for color'),
@ -385,7 +385,7 @@ export const controls = {
timeseries_limit_metric: {
type: 'MetricsControl',
label: t('Sort By'),
label: t('Sort by'),
default: null,
clearable: true,
description: t('Metric used to define the top series'),
@ -433,7 +433,7 @@ export const controls = {
size: {
...metric,
label: t('Bubble Size'),
label: t('Bubble size'),
default: null,
},
@ -479,7 +479,7 @@ export const controls = {
color_scheme: {
type: 'ColorSchemeControl',
label: t('Color Scheme'),
label: t('Color scheme'),
default: categoricalSchemeRegistry.getDefaultKey(),
renderTrigger: true,
choices: () => categoricalSchemeRegistry.keys().map(s => [s, s]),
@ -489,7 +489,7 @@ export const controls = {
label_colors: {
type: 'ColorMapControl',
label: t('Color Map'),
label: t('Color map'),
default: {},
renderTrigger: true,
mapStateToProps: state => ({