From c50720376fa6ee8678e7767660450cd91d7ce0fc Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 11 Dec 2018 08:31:37 -0500 Subject: [PATCH] Improve wording when creating a space (#26915) * copy tweaks * update save space toast * adjust save toast --- .../management/edit_space/manage_space_page.tsx | 6 +++--- .../views/management/lib/validate_space.test.ts | 12 ++++++------ .../public/views/management/lib/validate_space.ts | 10 +++++----- .../__snapshots__/spaces_grid_pages.test.tsx.snap | 2 +- .../management/spaces_grid/spaces_grid_page.tsx | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/x-pack/plugins/spaces/public/views/management/edit_space/manage_space_page.tsx b/x-pack/plugins/spaces/public/views/management/edit_space/manage_space_page.tsx index 8a2398e695dd2..38fef24422df0 100644 --- a/x-pack/plugins/spaces/public/views/management/edit_space/manage_space_page.tsx +++ b/x-pack/plugins/spaces/public/views/management/edit_space/manage_space_page.tsx @@ -207,7 +207,7 @@ class ManageSpacePageUI extends Component { 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 { return ( ); }; @@ -400,7 +400,7 @@ class ManageSpacePageUI extends Component { { id: 'xpack.spaces.management.manageSpacePage.spaceSuccessfullySavedNotificationMessage', - defaultMessage: '{name} was saved', + defaultMessage: `Space {name} was saved.`, }, { name: `'${name}'`, diff --git a/x-pack/plugins/spaces/public/views/management/lib/validate_space.test.ts b/x-pack/plugins/spaces/public/views/management/lib/validate_space.test.ts index 04d81a9479498..fbf11c87f8df0 100644 --- a/x-pack/plugins/spaces/public/views/management/lib/validate_space.test.ts +++ b/x-pack/plugins/spaces/public/views/management/lib/validate_space.test.ts @@ -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 "-".', }); }); diff --git a/x-pack/plugins/spaces/public/views/management/lib/validate_space.ts b/x-pack/plugins/spaces/public/views/management/lib/validate_space.ts index cc935ce653b58..a40c0bf6efb40 100644 --- a/x-pack/plugins/spaces/public/views/management/lib/validate_space.ts +++ b/x-pack/plugins/spaces/public/views/management/lib/validate_space.ts @@ -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 "-".', } ) ); diff --git a/x-pack/plugins/spaces/public/views/management/spaces_grid/__snapshots__/spaces_grid_pages.test.tsx.snap b/x-pack/plugins/spaces/public/views/management/spaces_grid/__snapshots__/spaces_grid_pages.test.tsx.snap index bebda86fa9721..7cce15ce0643f 100644 --- a/x-pack/plugins/spaces/public/views/management/spaces_grid/__snapshots__/spaces_grid_pages.test.tsx.snap +++ b/x-pack/plugins/spaces/public/views/management/spaces_grid/__snapshots__/spaces_grid_pages.test.tsx.snap @@ -51,7 +51,7 @@ exports[`SpacesGridPage renders as expected 1`] = ` type="button" > diff --git a/x-pack/plugins/spaces/public/views/management/spaces_grid/spaces_grid_page.tsx b/x-pack/plugins/spaces/public/views/management/spaces_grid/spaces_grid_page.tsx index 6a840680104aa..117cc538da6fd 100644 --- a/x-pack/plugins/spaces/public/views/management/spaces_grid/spaces_grid_page.tsx +++ b/x-pack/plugins/spaces/public/views/management/spaces_grid/spaces_grid_page.tsx @@ -139,7 +139,7 @@ class SpacesGridPageUI extends Component { > );