Skip to content

Commit

Permalink
Improve wording when creating a space (#26915)
Browse files Browse the repository at this point in the history
* copy tweaks

* update save space toast

* adjust save toast
  • Loading branch information
legrego authored and chrisronline committed Dec 12, 2018
1 parent fb4b925 commit 5f4da6d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,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}
Expand Down Expand Up @@ -250,7 +250,7 @@ class ManageSpacePageUI extends Component<Props, State> {
return (
<FormattedMessage
id="xpack.spaces.management.manageSpacePage.createSpaceTitle"
defaultMessage="Create space"
defaultMessage="Create a space"
/>
);
};
Expand Down Expand Up @@ -406,7 +406,7 @@ class ManageSpacePageUI extends Component<Props, State> {
{
id:
'xpack.spaces.management.manageSpacePage.spaceSuccessfullySavedNotificationMessage',
defaultMessage: '{name} was saved',
defaultMessage: `Space {name} was saved.`,
},
{
name: `'${name}'`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('validateSpaceName', () => {

expect(validator.validateSpaceName(space)).toEqual({
isInvalid: true,
error: `Name is required`,
error: `Name is required.`,
});
});

Expand All @@ -42,7 +42,7 @@ describe('validateSpaceName', () => {

expect(validator.validateSpaceName(space)).toEqual({
isInvalid: true,
error: `Name is required`,
error: `Name is required.`,
});
});

Expand All @@ -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.`,
});
});
});
Expand All @@ -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.`,
});
});
});
Expand All @@ -102,7 +102,7 @@ describe('validateURLIdentifier', () => {

expect(validator.validateURLIdentifier(space)).toEqual({
isInvalid: true,
error: `URL identifier is required`,
error: `URL identifier is required.`,
});
});

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

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

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

0 comments on commit 5f4da6d

Please sign in to comment.