Skip to content

Commit

Permalink
Apply capitalization guidelines - iteration 9 (#12343) (#12455)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Jan 22, 2021
1 parent 217034e commit 7838f03
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ describe('dashboard list view', () => {
cy.get('[data-test="listview-table"]').should('be.visible');
// check dashboard list view header
cy.get('[data-test="sort-header"]').eq(1).contains('Title');
cy.get('[data-test="sort-header"]').eq(2).contains('Modified By');
cy.get('[data-test="sort-header"]').eq(2).contains('Modified by');
cy.get('[data-test="sort-header"]').eq(3).contains('Status');
cy.get('[data-test="sort-header"]').eq(4).contains('Modified');
cy.get('[data-test="sort-header"]').eq(5).contains('Created By');
cy.get('[data-test="sort-header"]').eq(5).contains('Created by');
cy.get('[data-test="sort-header"]').eq(6).contains('Owners');
cy.get('[data-test="sort-header"]').eq(7).contains('Actions');
cy.get('[data-test="table-row"]').should('have.length', 4); // failed, xit-ed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ describe('DatabaseModal', () => {
});

it('renders "Add Database" header when no database is included', () => {
expect(wrapper.find('h4').text()).toEqual('Add Database');
expect(wrapper.find('h4').text()).toEqual('Add database');
});

it('renders "Edit Database" header when database prop is included', () => {
expect(editWrapper.find('h4').text()).toEqual('Edit Database');
expect(editWrapper.find('h4').text()).toEqual('Edit database');
});

it('renders a Tabs menu', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function DashboardCard({
{canDelete && (
<Menu.Item>
<ConfirmStatusChange
title={t('Please Confirm')}
title={t('Please confirm')}
description={
<>
{t('Are you sure you want to delete')}{' '}
Expand Down
14 changes: 7 additions & 7 deletions superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function DashboardList(props: DashboardListProps) {
},
},
}: any) => <a href={changedByUrl}>{changedByName}</a>,
Header: t('Modified By'),
Header: t('Modified by'),
accessor: 'changed_by.first_name',
size: 'xl',
},
Expand Down Expand Up @@ -248,7 +248,7 @@ function DashboardList(props: DashboardListProps) {
},
}: any) =>
createdBy ? `${createdBy.first_name} ${createdBy.last_name}` : '',
Header: t('Created By'),
Header: t('Created by'),
accessor: 'created_by',
disableSortBy: true,
size: 'xl',
Expand Down Expand Up @@ -280,7 +280,7 @@ function DashboardList(props: DashboardListProps) {
<span className="actions">
{canDelete && (
<ConfirmStatusChange
title={t('Please Confirm')}
title={t('Please confirm')}
description={
<>
{t('Are you sure you want to delete')}{' '}
Expand Down Expand Up @@ -377,7 +377,7 @@ function DashboardList(props: DashboardListProps) {
paginate: true,
},
{
Header: t('Created By'),
Header: t('Created by'),
id: 'created_by',
input: 'select',
operator: FilterOperators.relationOneMany,
Expand Down Expand Up @@ -438,13 +438,13 @@ function DashboardList(props: DashboardListProps) {
{
desc: true,
id: 'changed_on_delta_humanized',
label: 'Recently Modified',
label: 'Recently modified',
value: 'recently_modified',
},
{
desc: false,
id: 'changed_on_delta_humanized',
label: 'Least Recently Modified',
label: 'Least recently modified',
value: 'least_recently_modified',
},
];
Expand All @@ -469,7 +469,7 @@ function DashboardList(props: DashboardListProps) {
const subMenuButtons: SubMenuProps['buttons'] = [];
if (canDelete || canExport) {
subMenuButtons.push({
name: t('Bulk Select'),
name: t('Bulk select'),
buttonStyle: 'secondary',
onClick: toggleBulkSelect,
});
Expand Down
8 changes: 4 additions & 4 deletions superset-frontend/src/views/CRUD/data/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export const commonMenuData = {
usesRouter: true,
},
{
name: 'Saved Queries',
label: t('Saved Queries'),
name: 'Saved queries',
label: t('Saved queries'),
url: '/savedqueryview/list/',
usesRouter: true,
},
{
name: 'Query History',
label: t('Query History'),
name: 'Query history',
label: t('Query history'),
url: '/superset/sqllab/history/',
usesRouter: true,
},
Expand Down
12 changes: 6 additions & 6 deletions superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
Header: (
<TooltipWrapper
label="allow-run-async-header"
tooltip={t('Asynchronous Query Execution')}
tooltip={t('Asynchronous query execution')}
placement="top"
>
<span>{t('AQE')}</span>
Expand All @@ -225,7 +225,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
Header: (
<TooltipWrapper
label="allow-dml-header"
tooltip={t('Allow Data Manipulation Language')}
tooltip={t('Allow data manipulation language')}
placement="top"
>
<span>{t('DML')}</span>
Expand All @@ -240,7 +240,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
},
{
accessor: 'allow_csv_upload',
Header: t('CSV Upload'),
Header: t('CSV upload'),
Cell: ({
row: {
original: { allow_csv_upload: allowCSVUpload },
Expand All @@ -261,7 +261,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
{
accessor: 'created_by',
disableSortBy: true,
Header: t('Created By'),
Header: t('Created by'),
Cell: ({
row: {
original: { created_by: createdBy },
Expand All @@ -276,7 +276,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
original: { changed_on_delta_humanized: changedOn },
},
}: any) => changedOn,
Header: t('Last Modified'),
Header: t('Last modified'),
accessor: 'changed_on_delta_humanized',
size: 'xl',
},
Expand Down Expand Up @@ -369,7 +369,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
Header: (
<TooltipWrapper
label="allow-run-async-filter-header"
tooltip={t('Asynchronous Query Execution')}
tooltip={t('Asynchronous query execution')}
placement="top"
>
<span>{t('AQE')}</span>
Expand Down
32 changes: 16 additions & 16 deletions superset-frontend/src/views/CRUD/data/database/DatabaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
title={
<h4>
<StyledIcon name="database" />
{isEditMode ? t('Edit Database') : t('Add Database')}
{isEditMode ? t('Edit database') : t('Add database')}
</h4>
}
>
Expand All @@ -366,7 +366,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
>
<StyledInputContainer>
<div className="control-label">
{t('Database Name')}
{t('Database name')}
<span className="required">*</span>
</div>
<div className="input-container">
Expand Down Expand Up @@ -396,7 +396,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
onChange={onInputChange}
/>
<Button buttonStyle="primary" onClick={testConnection} cta>
{t('Test Connection')}
{t('Test connection')}
</Button>
</div>
<div className="helper">
Expand All @@ -414,13 +414,13 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
</Tabs.TabPane>
<Tabs.TabPane tab={<span>{t('Performance')}</span>} key="2">
<StyledInputContainer>
<div className="control-label">{t('Chart Cache Timeout')}</div>
<div className="control-label">{t('Chart cache timeout')}</div>
<div className="input-container">
<input
type="number"
name="cache_timeout"
value={db ? db.cache_timeout || '' : ''}
placeholder={t('Chart Cache Timeout')}
placeholder={t('Chart cache timeout')}
onChange={onInputChange}
/>
</div>
Expand All @@ -440,7 +440,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
checked={db ? !!db.allow_run_async : false}
onChange={onInputChange}
/>
<div>{t('Asynchronous Query Execution')}</div>
<div>{t('Asynchronous query execution')}</div>
<InfoTooltip
tooltip={t(
'Operate the database in asynchronous mode, meaning that the queries ' +
Expand All @@ -452,7 +452,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
</div>
</StyledInputContainer>
</Tabs.TabPane>
<Tabs.TabPane tab={<span>{t('SQL Lab Settings')}</span>} key="3">
<Tabs.TabPane tab={<span>{t('SQL Lab settings')}</span>} key="3">
<StyledInputContainer>
<StyledInputContainer>
<div className="input-container">
Expand Down Expand Up @@ -518,7 +518,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
checked={db ? !!db.allow_multi_schema_metadata_fetch : false}
onChange={onInputChange}
/>
<div>{t('Allow Multi Schema Metadata Fetch')}</div>
<div>{t('Allow multi schema metadata fetch')}</div>
<InfoTooltip
tooltip={t(
'Allow SQL Lab to fetch a list of all tables and all views across all database ' +
Expand All @@ -530,13 +530,13 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
</StyledInputContainer>
</StyledInputContainer>
<StyledInputContainer>
<div className="control-label">{t('CTAS Schema')}</div>
<div className="control-label">{t('CTAS schema')}</div>
<div className="input-container">
<input
type="text"
name="force_ctas_schema"
value={db ? db.force_ctas_schema || '' : ''}
placeholder={t('CTAS Schema')}
placeholder={t('CTAS schema')}
onChange={onInputChange}
/>
</div>
Expand All @@ -550,12 +550,12 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
</Tabs.TabPane>
<Tabs.TabPane tab={<span>{t('Security')}</span>} key="4">
<StyledInputContainer>
<div className="control-label">{t('Secure Extra')}</div>
<div className="control-label">{t('Secure extra')}</div>
<div className="input-container">
<StyledJsonEditor
name="encrypted_extra"
value={db ? db.encrypted_extra || '' : ''}
placeholder={t('Secure Extra')}
placeholder={t('Secure extra')}
onChange={(json: string) =>
onEditorChange(json, 'encrypted_extra')
}
Expand All @@ -579,12 +579,12 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
</div>
</StyledInputContainer>
<StyledInputContainer>
<div className="control-label">{t('Root Certificate')}</div>
<div className="control-label">{t('Root certificate')}</div>
<div className="input-container">
<textarea
name="server_cert"
value={db ? db.server_cert || '' : ''}
placeholder={t('Root Certificate')}
placeholder={t('Root certificate')}
onChange={onTextChange}
/>
</div>
Expand Down Expand Up @@ -625,7 +625,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
checked={db ? !!db.allow_csv_upload : false}
onChange={onInputChange}
/>
<div>{t('Allow Data Upload')}</div>
<div>{t('Allow data upload')}</div>
<InfoTooltip
tooltip={t(
'If selected, please set the schemas allowed for data upload in Extra.',
Expand All @@ -639,7 +639,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
<StyledJsonEditor
name="extra"
value={(db && db.extra) ?? defaultExtra}
placeholder={t('Secure Extra')}
placeholder={t('Secure extra')}
onChange={(json: string) => onEditorChange(json, 'extra')}
width="100%"
height="160px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const DatasetModal: FunctionComponent<DatasetModalProps> = ({
title={
<>
<StyledIcon name="warning-solid" />
{t('Add Dataset')}
{t('Add dataset')}
</>
}
>
Expand Down
8 changes: 4 additions & 4 deletions superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
return (
<TooltipWrapper
label="physical-dataset"
tooltip={t('Physical Dataset')}
tooltip={t('Physical dataset')}
>
<Icon name="dataset-physical" />
</TooltipWrapper>
Expand All @@ -211,7 +211,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
return (
<TooltipWrapper
label="virtual-dataset"
tooltip={t('Virtual Dataset')}
tooltip={t('Virtual dataset')}
>
<Icon name="dataset-virtual" />
</TooltipWrapper>
Expand Down Expand Up @@ -289,7 +289,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
original: { changed_by_name: changedByName },
},
}: any) => changedByName,
Header: t('Modified By'),
Header: t('Modified by'),
accessor: 'changed_by.first_name',
size: 'xl',
},
Expand Down Expand Up @@ -465,7 +465,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({

if (canDelete || canExport) {
buttonArr.push({
name: t('Bulk Select'),
name: t('Bulk select'),
onClick: toggleBulkSelect,
buttonStyle: 'secondary',
});
Expand Down
8 changes: 4 additions & 4 deletions superset-frontend/src/views/CRUD/data/query/QueryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
fetchData,
} = useListViewResource<QueryObject>(
'query',
t('Query History'),
t('Query history'),
addDangerToast,
false,
);
Expand Down Expand Up @@ -126,7 +126,7 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
);

const menuData: SubMenuProps = {
activeChild: 'Query History',
activeChild: 'Query history',
...commonMenuData,
};

Expand Down Expand Up @@ -222,7 +222,7 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
},
{
accessor: QueryObjectColumns.tab_name,
Header: t('Tab Name'),
Header: t('Tab name'),
size: 'xl',
},
{
Expand Down Expand Up @@ -386,7 +386,7 @@ function QueryList({ addDangerToast, addSuccessToast }: QueryListProps) {
paginate: true,
},
{
Header: t('Time Range'),
Header: t('Time range'),
id: 'start_time',
input: 'datetime_range',
operator: FilterOperators.between,
Expand Down
Loading

0 comments on commit 7838f03

Please sign in to comment.