Skip to content

Commit

Permalink
Apply capitalization guidelines - iteration 1 (apache#12343)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Jan 12, 2021
1 parent 078a8a1 commit e25d043
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ({
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/chart/chartAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export function runAnnotationQuery(
dispatch(
annotationQueryFailed(
annotation,
{ error: 'Query Timeout' },
{ error: 'Query timeout' },
sliceKey,
),
);
Expand Down
14 changes: 7 additions & 7 deletions superset-frontend/src/common/components/common.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/AnchorLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/EditableTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/OmniContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
Expand All @@ -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} />
)}
Expand All @@ -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">
Expand Down Expand Up @@ -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>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type FrameType =
| 'Calendar'
| 'Custom'
| 'Advanced'
| 'No Filter';
| 'No filter';

export type DateTimeGrainType =
| 'second'
Expand Down
8 changes: 4 additions & 4 deletions superset-frontend/src/explore/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
18 changes: 9 additions & 9 deletions superset-frontend/src/explore/controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(),
Expand All @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -433,7 +433,7 @@ export const controls = {

size: {
...metric,
label: t('Bubble Size'),
label: t('Bubble size'),
default: null,
},

Expand Down Expand Up @@ -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]),
Expand All @@ -489,7 +489,7 @@ export const controls = {

label_colors: {
type: 'ColorMapControl',
label: t('Color Map'),
label: t('Color map'),
default: {},
renderTrigger: true,
mapStateToProps: state => ({
Expand Down

0 comments on commit e25d043

Please sign in to comment.