[6.x] Improve wording when creating a space (#26915) (#26960)

Backports the following commits to 6.x:
 - Improve wording when creating a space  (#26915)
This commit is contained in:
Larry Gregory 2018-12-11 09:31:02 -05:00 committed by GitHub
parent 0dbf35bc7e
commit 08ff0ef54e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 16 deletions

View file

@ -207,7 +207,7 @@ class ManageSpacePageUI extends Component<Props, State> {
name="description"
placeholder={intl.formatMessage({
id: 'xpack.spaces.management.manageSpacePage.hereMagicHappensPlaceholder',
defaultMessage: 'This is where the magic happens',
defaultMessage: 'This is where the magic happens.',
})}
value={description}
onChange={this.onDescriptionChange}
@ -244,7 +244,7 @@ class ManageSpacePageUI extends Component<Props, State> {
return (
<FormattedMessage
id="xpack.spaces.management.manageSpacePage.createSpaceTitle"
defaultMessage="Create space"
defaultMessage="Create a space"
/>
);
};
@ -400,7 +400,7 @@ class ManageSpacePageUI extends Component<Props, State> {
{
id:
'xpack.spaces.management.manageSpacePage.spaceSuccessfullySavedNotificationMessage',
defaultMessage: '{name} was saved',
defaultMessage: `Space {name} was saved.`,
},
{
name: `'${name}'`,

View file

@ -30,7 +30,7 @@ describe('validateSpaceName', () => {
expect(validator.validateSpaceName(space)).toEqual({
isInvalid: true,
error: `Name is required`,
error: `Name is required.`,
});
});
@ -42,7 +42,7 @@ describe('validateSpaceName', () => {
expect(validator.validateSpaceName(space)).toEqual({
isInvalid: true,
error: `Name is required`,
error: `Name is required.`,
});
});
@ -54,7 +54,7 @@ describe('validateSpaceName', () => {
expect(validator.validateSpaceName(space)).toEqual({
isInvalid: true,
error: `Name must not exceed 1024 characters`,
error: `Name must not exceed 1024 characters.`,
});
});
});
@ -78,7 +78,7 @@ describe('validateSpaceDescription', () => {
expect(validator.validateSpaceDescription(space)).toEqual({
isInvalid: true,
error: `Description must not exceed 2000 characters`,
error: `Description must not exceed 2000 characters.`,
});
});
});
@ -102,7 +102,7 @@ describe('validateURLIdentifier', () => {
expect(validator.validateURLIdentifier(space)).toEqual({
isInvalid: true,
error: `URL identifier is required`,
error: `URL identifier is required.`,
});
});
@ -114,7 +114,7 @@ describe('validateURLIdentifier', () => {
expect(validator.validateURLIdentifier(space)).toEqual({
isInvalid: true,
error: 'URL identifier can only contain a-z, 0-9, and the characters "_" and "-"',
error: 'URL identifier can only contain a-z, 0-9, and the characters "_" and "-".',
});
});

View file

@ -35,7 +35,7 @@ export class SpaceValidator {
if (!space.name || !space.name.trim()) {
return invalid(
i18n.translate('xpack.spaces.management.validateSpace.requiredNameErrorMessage', {
defaultMessage: 'Name is required',
defaultMessage: 'Name is required.',
})
);
}
@ -43,7 +43,7 @@ export class SpaceValidator {
if (space.name.length > 1024) {
return invalid(
i18n.translate('xpack.spaces.management.validateSpace.nameMaxLengthErrorMessage', {
defaultMessage: 'Name must not exceed 1024 characters',
defaultMessage: 'Name must not exceed 1024 characters.',
})
);
}
@ -59,7 +59,7 @@ export class SpaceValidator {
if (space.description && space.description.length > 2000) {
return invalid(
i18n.translate('xpack.spaces.management.validateSpace.describeMaxLengthErrorMessage', {
defaultMessage: 'Description must not exceed 2000 characters',
defaultMessage: 'Description must not exceed 2000 characters.',
})
);
}
@ -79,7 +79,7 @@ export class SpaceValidator {
if (!space.id) {
return invalid(
i18n.translate('xpack.spaces.management.validateSpace.urlIdentifierRequiredErrorMessage', {
defaultMessage: 'URL identifier is required',
defaultMessage: 'URL identifier is required.',
})
);
}
@ -90,7 +90,7 @@ export class SpaceValidator {
'xpack.spaces.management.validateSpace.urlIdentifierAllowedCharactersErrorMessage',
{
defaultMessage:
'URL identifier can only contain a-z, 0-9, and the characters "_" and "-"',
'URL identifier can only contain a-z, 0-9, and the characters "_" and "-".',
}
)
);

View file

@ -51,7 +51,7 @@ exports[`SpacesGridPage renders as expected 1`] = `
type="button"
>
<FormattedMessage
defaultMessage="Create space"
defaultMessage="Create a space"
id="xpack.spaces.management.spacesGridPage.createSpaceButtonLabel"
values={Object {}}
/>

View file

@ -139,7 +139,7 @@ class SpacesGridPageUI extends Component<Props, State> {
>
<FormattedMessage
id="xpack.spaces.management.spacesGridPage.createSpaceButtonLabel"
defaultMessage="Create space"
defaultMessage="Create a space"
/>
</EuiButton>
);