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 f659d66fee6fed7e18c3b2d40bd7894c8f8a216b Author: Michael S. Molina <[email protected]> AuthorDate: Fri Jan 22 15:11:38 2021 -0300 Apply capitalization guidelines - iteration 4 (#12343) (#12450) --- .../nativeFilters/NativeFiltersModal_spec.tsx | 4 +-- .../dashboard/components/SliceHeaderControls.jsx | 4 +-- .../components/nativeFilters/CascadePopover.tsx | 2 +- .../components/nativeFilters/FilterBar.tsx | 2 +- .../components/nativeFilters/FilterConfigForm.tsx | 6 ++-- .../components/nativeFilters/FilterConfigModal.tsx | 8 ++--- .../components/nativeFilters/FiltersList.tsx | 2 +- .../dashboard/components/nativeFilters/state.ts | 2 +- .../src/dashboard/util/newComponentFactory.js | 2 +- .../src/datasource/ChangeDatasourceModal.tsx | 2 +- .../src/datasource/DatasourceEditor.jsx | 42 +++++++++++----------- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/superset-frontend/spec/javascripts/dashboard/components/nativeFilters/NativeFiltersModal_spec.tsx b/superset-frontend/spec/javascripts/dashboard/components/nativeFilters/NativeFiltersModal_spec.tsx index d3f552f..a3329c3 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/nativeFilters/NativeFiltersModal_spec.tsx +++ b/superset-frontend/spec/javascripts/dashboard/components/nativeFilters/NativeFiltersModal_spec.tsx @@ -109,7 +109,7 @@ describe('FiltersConfigModal', () => { await clickCancel(); expect(onCancel.mock.calls).toHaveLength(0); expect(wrapper.find(Alert).text()).toContain( - 'Are you sure you want to cancel? "New Filter" will not be saved.', + 'Are you sure you want to cancel? "New filter" will not be saved.', ); }); @@ -119,7 +119,7 @@ describe('FiltersConfigModal', () => { await clickCancel(); expect(onCancel.mock.calls).toHaveLength(0); expect(wrapper.find(Alert).text()).toContain( - 'Are you sure you want to cancel? "New Filter" and "New Filter" will not be saved.', + 'Are you sure you want to cancel? "New filter" and "New filter" will not be saved.', ); }); }); diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls.jsx b/superset-frontend/src/dashboard/components/SliceHeaderControls.jsx index f985fe8..dcd142c 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls.jsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls.jsx @@ -199,7 +199,7 @@ class SliceHeaderControls extends React.PureComponent { : item} </div> )); - const resizeLabel = isFullSize ? t('Minimize Chart') : t('Maximize Chart'); + const resizeLabel = isFullSize ? t('Minimize chart') : t('Maximize chart'); const menu = ( <Menu onClick={this.handleMenuClick} @@ -228,7 +228,7 @@ class SliceHeaderControls extends React.PureComponent { {this.props.supersetCanExplore && ( <Menu.Item key={MENU_KEYS.EXPLORE_CHART}> - {t('View Chart in Explore')} + {t('View chart in Explore')} </Menu.Item> )} diff --git a/superset-frontend/src/dashboard/components/nativeFilters/CascadePopover.tsx b/superset-frontend/src/dashboard/components/nativeFilters/CascadePopover.tsx index c7519b4..2b92370 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/CascadePopover.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/CascadePopover.tsx @@ -118,7 +118,7 @@ const CascadePopover: React.FC<CascadePopoverProps> = ({ <StyledTitleBox> <StyledTitle> <StyledIcon name="edit" /> - {t('Select Parent Filters')} ({totalChildren}) + {t('Select parent filters')} ({totalChildren}) </StyledTitle> <StyledIcon name="close" onClick={() => onVisibleChange(false)} /> </StyledTitleBox> diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx index bc66d53..abd189a 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx @@ -452,7 +452,7 @@ const FilterBar: React.FC<FiltersBarProps> = ({ buttonSize="sm" onClick={handleResetAll} > - {t('Reset All')} + {t('Reset all')} </Button> <Button buttonStyle="primary" diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx index 461250d..bdeb972 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx @@ -132,7 +132,7 @@ export const FilterConfigForm: React.FC<FilterConfigFormProps> = ({ <p>{t('You have removed this filter.')}</p> <div> <Button type="primary" onClick={() => restore(filterId)}> - {t('Restore Filter')} + {t('Restore filter')} </Button> </div> </RemovedContent> @@ -150,7 +150,7 @@ export const FilterConfigForm: React.FC<FilterConfigFormProps> = ({ <StyledContainer> <StyledFormItem name={['filters', filterId, 'name']} - label={<StyledLabel>{t('Filter Name')}</StyledLabel>} + label={<StyledLabel>{t('Filter name')}</StyledLabel>} initialValue={filterToEdit?.name} rules={[{ required: !removed, message: t('Name is required') }]} data-test="name-input" @@ -200,7 +200,7 @@ export const FilterConfigForm: React.FC<FilterConfigFormProps> = ({ </StyledFormItem> <StyledFormItem name={['filters', filterId, 'parentFilter']} - label={<StyledLabel>{t('Parent Filter')}</StyledLabel>} + label={<StyledLabel>{t('Parent filter')}</StyledLabel>} initialValue={parentFilterOptions.find( ({ value }) => value === filterToEdit?.cascadeParentIds[0], )} diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx index 2be67db..c2aad91 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx @@ -286,7 +286,7 @@ export function FilterConfigModal({ function getFilterTitle(id: string) { return ( - formValues.filters[id]?.name ?? filterConfigMap[id]?.name ?? 'New Filter' + formValues.filters[id]?.name ?? filterConfigMap[id]?.name ?? 'New filter' ); } @@ -353,7 +353,7 @@ export function FilterConfigModal({ return formValues; } catch (error) { - console.warn('Filter Configuration Failed:', error); + console.warn('Filter configuration failed:', error); if (!error.errorFields || !error.errorFields.length) return null; // not a validation error @@ -484,7 +484,7 @@ export function FilterConfigModal({ return ( <StyledModal visible={isOpen} - title={t('Filter Configuration and Scoping')} + title={t('Filter configuration and scoping')} width="55%" onCancel={handleCancel} onOk={onOk} @@ -517,7 +517,7 @@ export function FilterConfigModal({ onEdit={onTabEdit} addIcon={ <StyledAddFilterBox> - <PlusOutlined /> <span>{t('Add Filter')}</span> + <PlusOutlined /> <span>{t('Add filter')}</span> </StyledAddFilterBox> } > diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersList.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersList.tsx index 5c91bf6..f85e31b 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersList.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersList.tsx @@ -53,7 +53,7 @@ const FiltersList = ({ setEditFilter, setDataset }: FiltersListProps) => { </Button> <span role="button" - title="Edit Dashboard" + title="Edit dashboard" tabIndex={0} className="action-button" > diff --git a/superset-frontend/src/dashboard/components/nativeFilters/state.ts b/superset-frontend/src/dashboard/components/nativeFilters/state.ts index 37b7198..6a5388e 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/state.ts +++ b/superset-frontend/src/dashboard/components/nativeFilters/state.ts @@ -88,7 +88,7 @@ export function useFilterScopeTree(): { children: [], key: DASHBOARD_ROOT_ID, type: DASHBOARD_ROOT_TYPE, - title: t('All Panels'), + title: t('All panels'), }; buildTree(layout[DASHBOARD_ROOT_ID], tree, layout, charts); return { treeData: [tree], layout }; diff --git a/superset-frontend/src/dashboard/util/newComponentFactory.js b/superset-frontend/src/dashboard/util/newComponentFactory.js index 1c3d2cf..d3f3a82 100644 --- a/superset-frontend/src/dashboard/util/newComponentFactory.js +++ b/superset-frontend/src/dashboard/util/newComponentFactory.js @@ -50,7 +50,7 @@ const typeToDefaultMetaData = { [MARKDOWN_TYPE]: { width: GRID_DEFAULT_CHART_WIDTH, height: 50 }, [ROW_TYPE]: { background: BACKGROUND_TRANSPARENT }, [TABS_TYPE]: null, - [TAB_TYPE]: { text: 'New Tab' }, + [TAB_TYPE]: { text: 'New tab' }, }; function uuid(type) { diff --git a/superset-frontend/src/datasource/ChangeDatasourceModal.tsx b/superset-frontend/src/datasource/ChangeDatasourceModal.tsx index c2b43eb..5c144e4 100644 --- a/superset-frontend/src/datasource/ChangeDatasourceModal.tsx +++ b/superset-frontend/src/datasource/ChangeDatasourceModal.tsx @@ -220,7 +220,7 @@ const ChangeDatasourceModal: FunctionComponent<ChangeDatasourceModalProps> = ({ show={show} onHide={onHide} responsive - title={t('Change Dataset')} + title={t('Change dataset')} width={confirmChange ? '432px' : ''} height={confirmChange ? 'auto' : '480px'} hideFooter={!confirmChange} diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 4427b22..ca19a5c 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -132,7 +132,7 @@ function ColumnCollectionTable({ {showExpression && ( <Field fieldKey="expression" - label={t('SQL Expression')} + label={t('SQL expression')} control={ <TextAreaControl language="markdown" @@ -164,7 +164,7 @@ function ColumnCollectionTable({ {allowEditDataType && ( <Field fieldKey="type" - label={t('Data Type')} + label={t('Data type')} control={ <SelectControl choices={DATA_TYPES} name="type" freeForm /> } @@ -172,13 +172,13 @@ function ColumnCollectionTable({ )} <Field fieldKey="python_date_format" - label={t('Datetime Format')} + label={t('Datetime format')} description={ /* Note the fragmented translations may not work. */ <div> {t('The pattern of timestamp format. For strings use ')} <a href="https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior"> - {t('python datetime string pattern')} + {t('Python datetime string pattern')} </a> {t(' expression which needs to adhere to the ')} <a href="https://en.wikipedia.org/wiki/ISO_8601"> @@ -207,10 +207,10 @@ function ColumnCollectionTable({ } columnLabels={{ column_name: t('Column'), - type: t('Data Type'), - groupby: t('Is Dimension'), - is_dttm: t('Is Temporal'), - filterable: t('Is Filterable'), + type: t('Data type'), + groupby: t('Is dimension'), + is_dttm: t('Is temporal'), + filterable: t('Is filterable'), }} onChange={onChange} itemRenderers={{ @@ -537,7 +537,7 @@ class DatasourceEditor extends React.PureComponent { {this.state.isSqla && ( <Field fieldKey="fetch_values_predicate" - label={t('Autocomplete Query Predicate')} + label={t('Autocomplete query predicate')} description={t( 'When using "Autocomplete filters", this can be used to improve performance ' + 'of the query fetching the values. Use this option to apply a ' + @@ -599,7 +599,7 @@ class DatasourceEditor extends React.PureComponent { > <Field fieldKey="cache_timeout" - label={t('Cache Timeout')} + label={t('Cache timeout')} description={t( 'The duration of time in seconds before the cache is invalidated', )} @@ -702,14 +702,14 @@ class DatasourceEditor extends React.PureComponent { /> <Field fieldKey="table_name" - label={t('dataset name')} + label={t('Dataset name')} control={ <TextControl controlId="table_name" onChange={table => { this.onDatasourcePropChange('table_name', table); }} - placeholder={t('dataset name')} + placeholder={t('Dataset name')} disabled={!this.state.isEditMode} /> } @@ -835,7 +835,7 @@ class DatasourceEditor extends React.PureComponent { columnLabels={{ metric_name: t('Metric'), verbose_name: t('Label'), - expression: t('SQL Expression'), + expression: t('SQL expression'), }} expandFieldset={ <FormContainer> @@ -857,13 +857,13 @@ class DatasourceEditor extends React.PureComponent { /> <Field fieldKey="d3format" - label={t('D3 Format')} + label={t('D3 format')} control={ <TextControl controlId="d3format" placeholder="%y/%m/%d" /> } /> <Field - label={t('Warning Message')} + label={t('Warning message')} fieldKey="warning_text" description={t( 'Warning message to display in the metric selector', @@ -871,12 +871,12 @@ class DatasourceEditor extends React.PureComponent { control={ <TextControl controlId="warning_text" - placeholder={t('Warning Message')} + placeholder={t('Warning message')} /> } /> <Field - label={t('Certified By')} + label={t('Certified by')} fieldKey="certified_by" description={t( 'Person or group that has certified this metric', @@ -884,18 +884,18 @@ class DatasourceEditor extends React.PureComponent { control={ <TextControl controlId="certified_by" - placeholder={t('Certified By')} + placeholder={t('Certified by')} /> } /> <Field - label={t('Certification Details')} + label={t('Certification details')} fieldKey="certification_details" description={t('Details of the certification')} control={ <TextControl controlId="certification_details" - placeholder={t('Certification Details')} + placeholder={t('Certification details')} /> } /> @@ -1024,7 +1024,7 @@ class DatasourceEditor extends React.PureComponent { tab={ <CollectionTabTitle collection={this.state.calculatedColumns} - title={t('Calculated Columns')} + title={t('Calculated columns')} /> } key={3}
