Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: apply capitalization guidelines - iteration 4 (#12343) #12450

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
);
});

Expand All @@ -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.',
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ const FilterBar: React.FC<FiltersBarProps> = ({
buttonSize="sm"
onClick={handleResetAll}
>
{t('Reset All')}
{t('Reset all')}
</Button>
<Button
buttonStyle="primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,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>
Expand All @@ -135,7 +135,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"
Expand Down Expand Up @@ -177,7 +177,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],
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,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'
);
}

Expand Down Expand Up @@ -352,7 +352,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

Expand Down Expand Up @@ -480,7 +480,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}
Expand Down Expand Up @@ -513,7 +513,7 @@ export function FilterConfigModal({
onEdit={onTabEdit}
addIcon={
<StyledAddFilterBox>
<PlusOutlined /> <span>{t('Add Filter')}</span>
<PlusOutlined /> <span>{t('Add filter')}</span>
</StyledAddFilterBox>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const FiltersList = ({ setEditFilter, setDataset }: FiltersListProps) => {
</Button>
<span
role="button"
title="Edit Dashboard"
title="Edit dashboard"
tabIndex={0}
className="action-button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function useFilterScopeTree(): {
children: [],
key: DASHBOARD_ROOT_ID,
type: DASHBOARD_ROOT_TYPE,
title: t('All Panels'),
title: t('All panels'),
};

// We need to get only nodes that have charts as children or grandchildren
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/datasource/ChangeDatasourceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
42 changes: 21 additions & 21 deletions superset-frontend/src/datasource/DatasourceEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function ColumnCollectionTable({
{showExpression && (
<Field
fieldKey="expression"
label={t('SQL Expression')}
label={t('SQL expression')}
control={
<TextAreaControl
language="markdown"
Expand Down Expand Up @@ -164,21 +164,21 @@ function ColumnCollectionTable({
{allowEditDataType && (
<Field
fieldKey="type"
label={t('Data Type')}
label={t('Data type')}
control={
<SelectControl choices={DATA_TYPES} name="type" freeForm />
}
/>
)}
<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">
Expand Down Expand Up @@ -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={{
Expand Down Expand Up @@ -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 ' +
Expand Down Expand Up @@ -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',
)}
Expand Down Expand Up @@ -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}
/>
}
Expand Down Expand Up @@ -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>
Expand All @@ -857,45 +857,45 @@ 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',
)}
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',
)}
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')}
/>
}
/>
Expand Down Expand Up @@ -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}
Expand Down