You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/01/25 13:11:38 UTC
[superset] 02/38: chore: apply capitalization guidelines -
iteration 1 (#12447)
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 968ab8d22f2e9c57226eeee953d18e2a647cdd14
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Tue Jan 12 15:47:55 2021 -0300
chore: apply capitalization guidelines - iteration 1 (#12447)
Apply capitalization guidelines defined in #12343
Use sentence casing for most places.
---
.../javascripts/utils/getControlsForVizType_spec.js | 2 +-
superset-frontend/src/chart/chartAction.js | 2 +-
.../src/common/components/common.stories.tsx | 14 +++++++-------
superset-frontend/src/components/AnchorLink.jsx | 2 +-
superset-frontend/src/components/EditableTitle.tsx | 2 +-
superset-frontend/src/components/OmniContainer.jsx | 2 +-
.../controls/DateFilterControl/DateFilterControl.tsx | 12 ++++++------
.../components/controls/DateFilterControl/constants.ts | 2 +-
.../components/controls/DateFilterControl/types.ts | 2 +-
superset-frontend/src/explore/constants.js | 8 ++++----
superset-frontend/src/explore/controls.jsx | 18 +++++++++---------
11 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/superset-frontend/spec/javascripts/utils/getControlsForVizType_spec.js b/superset-frontend/spec/javascripts/utils/getControlsForVizType_spec.js
index 3819782..6e06b18 100644
--- a/superset-frontend/spec/javascripts/utils/getControlsForVizType_spec.js
+++ b/superset-frontend/spec/javascripts/utils/getControlsForVizType_spec.js
@@ -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 => ({
diff --git a/superset-frontend/src/chart/chartAction.js b/superset-frontend/src/chart/chartAction.js
index 802208e..74ed410 100644
--- a/superset-frontend/src/chart/chartAction.js
+++ b/superset-frontend/src/chart/chartAction.js
@@ -301,7 +301,7 @@ export function runAnnotationQuery(
dispatch(
annotationQueryFailed(
annotation,
- { error: 'Query Timeout' },
+ { error: 'Query timeout' },
sliceKey,
),
);
diff --git a/superset-frontend/src/common/components/common.stories.tsx b/superset-frontend/src/common/components/common.stories.tsx
index dab4951..6c9abb0 100644
--- a/superset-frontend/src/common/components/common.stories.tsx
+++ b/superset-frontend/src/common/components/common.stories.tsx
@@ -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>
diff --git a/superset-frontend/src/components/AnchorLink.jsx b/superset-frontend/src/components/AnchorLink.jsx
index 26d9ed7..f98bd66 100644
--- a/superset-frontend/src/components/AnchorLink.jsx
+++ b/superset-frontend/src/components/AnchorLink.jsx
@@ -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}
/>
diff --git a/superset-frontend/src/components/EditableTitle.tsx b/superset-frontend/src/components/EditableTitle.tsx
index 4085bad..5f4f7a4 100644
--- a/superset-frontend/src/components/EditableTitle.tsx
+++ b/superset-frontend/src/components/EditableTitle.tsx
@@ -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.")
}
diff --git a/superset-frontend/src/components/OmniContainer.jsx b/superset-frontend/src/components/OmniContainer.jsx
index 22a4c50..e641a7c 100644
--- a/superset-frontend/src/components/OmniContainer.jsx
+++ b/superset-frontend/src/components/OmniContainer.jsx
@@ -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)`
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterControl.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterControl.tsx
index fc440a2..6903c2c 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterControl.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterControl.tsx
@@ -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>
);
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/constants.ts b/superset-frontend/src/explore/components/controls/DateFilterControl/constants.ts
index d1ec0a8..175b36c 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/constants.ts
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/constants.ts
@@ -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[] = [
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts b/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts
index 5b264b9..1d400de 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/types.ts
@@ -26,7 +26,7 @@ export type FrameType =
| 'Calendar'
| 'Custom'
| 'Advanced'
- | 'No Filter';
+ | 'No filter';
export type DateTimeGrainType =
| 'second'
diff --git a/superset-frontend/src/explore/constants.js b/superset-frontend/src/explore/constants.js
index 2232fe5..4a771d0 100644
--- a/superset-frontend/src/explore/constants.js
+++ b/superset-frontend/src/explore/constants.js
@@ -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 = {
diff --git a/superset-frontend/src/explore/controls.jsx b/superset-frontend/src/explore/controls.jsx
index c94f9d0..dfbfd21 100644
--- a/superset-frontend/src/explore/controls.jsx
+++ b/superset-frontend/src/explore/controls.jsx
@@ -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 => ({