Apply capitalization guidelines - iteration 4 (#12343) (#12450)

This commit is contained in:
Michael S. Molina
2021-01-22 15:11:38 -03:00
committed by GitHub
parent 5d3265b6db
commit fc20e8b594
11 changed files with 38 additions and 38 deletions

View File

@@ -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.',
);
});
});

View File

@@ -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>
)}

View File

@@ -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>

View File

@@ -452,7 +452,7 @@ const FilterBar: React.FC<FiltersBarProps> = ({
buttonSize="sm"
onClick={handleResetAll}
>
{t('Reset All')}
{t('Reset all')}
</Button>
<Button
buttonStyle="primary"

View File

@@ -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>
@@ -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"
@@ -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],
)}

View File

@@ -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'
);
}
@@ -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
@@ -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}
@@ -513,7 +513,7 @@ export function FilterConfigModal({
onEdit={onTabEdit}
addIcon={
<StyledAddFilterBox>
<PlusOutlined /> <span>{t('Add Filter')}</span>
<PlusOutlined /> <span>{t('Add filter')}</span>
</StyledAddFilterBox>
}
>

View File

@@ -53,7 +53,7 @@ const FiltersList = ({ setEditFilter, setDataset }: FiltersListProps) => {
</Button>
<span
role="button"
title="Edit Dashboard"
title="Edit dashboard"
tabIndex={0}
className="action-button"
>

View File

@@ -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

View File

@@ -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) {

View File

@@ -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}

View File

@@ -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}