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

Improve wording when creating a space #26915

Merged
merged 3 commits into from
Dec 11, 2018
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 @@ -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