Skip to content

Commit c4e2237

Browse files
committed
Change UI text based on review feedback
1 parent 3734206 commit c4e2237

File tree

9 files changed

+68
-57
lines changed

9 files changed

+68
-57
lines changed

src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const createNewCopiesDisabled = {
5151
tooltip: i18n.translate(
5252
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.disabledText',
5353
{
54-
defaultMessage: 'Check if objects were previously copied or imported into the space.',
54+
defaultMessage: 'Check if objects were previously copied or imported.',
5555
}
5656
),
5757
};
@@ -64,8 +64,7 @@ const createNewCopiesEnabled = {
6464
tooltip: i18n.translate(
6565
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.enabledText',
6666
{
67-
defaultMessage:
68-
'This option enables you to create multiple copies of the object in the same space.',
67+
defaultMessage: 'Use this option to create one or more copies of the object.',
6968
}
7069
),
7170
};

src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('OverwriteModal', () => {
4040
const wrapper = shallowWithI18nProvider(<OverwriteModal {...props} />);
4141

4242
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
43-
`"\\"baz\\" conflicts with an existing object, overwrite it?"`
43+
`"\\"baz\\" conflicts with an existing object. Overwrite it?"`
4444
);
4545
expect(wrapper.find('EuiSuperSelect')).toHaveLength(0);
4646
});
@@ -82,7 +82,7 @@ describe('OverwriteModal', () => {
8282
const wrapper = shallowWithI18nProvider(<OverwriteModal {...props} />);
8383

8484
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
85-
`"\\"baz\\" conflicts with multiple existing objects, overwrite one?"`
85+
`"\\"baz\\" conflicts with multiple existing objects. Overwrite one?"`
8686
);
8787
expect(wrapper.find('EuiSuperSelect')).toHaveLength(1);
8888
});

src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ export const OverwriteModal = ({ conflict, onFinish }: OverwriteModalProps) => {
9898
const bodyText =
9999
error.type === 'conflict'
100100
? i18n.translate('savedObjectsManagement.objectsTable.overwriteModal.body.conflict', {
101-
defaultMessage: '"{title}" conflicts with an existing object, overwrite it?',
101+
defaultMessage: '"{title}" conflicts with an existing object. Overwrite it?',
102102
values: { title },
103103
})
104104
: i18n.translate(
105105
'savedObjectsManagement.objectsTable.overwriteModal.body.ambiguousConflict',
106106
{
107-
defaultMessage: '"{title}" conflicts with multiple existing objects, overwrite one?',
107+
defaultMessage: '"{title}" conflicts with multiple existing objects. Overwrite one?',
108108
values: { title },
109109
}
110110
);

x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const createNewCopiesEnabled = {
5151
'xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText',
5252
{
5353
defaultMessage:
54-
'This option enables you to create multiple copies of the object in the same space.',
54+
'Use this option to create one or more copies of the object in the same space.',
5555
}
5656
),
5757
};
@@ -88,7 +88,7 @@ const copyOptionsTitle = i18n.translate(
8888
);
8989
const relationshipOptionsTitle = i18n.translate(
9090
'xpack.spaces.management.copyToSpace.copyModeControl.relationshipOptionsTitle',
91-
{ defaultMessage: 'Relationship options' }
91+
{ defaultMessage: 'Relationship' }
9292
);
9393

9494
const createLabel = ({ text, tooltip }: { text: string; tooltip: string }) => (

x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const CopyStatusIndicator = (props: Props) => {
5959
// this is a manual overwrite, e.g., the individual "Overwrite?" switch was enabled
6060
<FormattedMessage
6161
id="xpack.spaces.management.copyToSpace.copyStatus.pendingOverwriteMessage"
62-
defaultMessage="Object will be overwritten. Disable to skip."
62+
defaultMessage="Object will be overwritten. Disable 'Overwrite' to skip."
6363
/>
6464
) : (
6565
// this object is pending success, but it will not result in an overwrite
@@ -80,28 +80,46 @@ export const CopyStatusIndicator = (props: Props) => {
8080
content={
8181
<FormattedMessage
8282
id="xpack.spaces.management.copyToSpace.copyStatus.unresolvableErrorMessage"
83-
defaultMessage="There was an error copying this saved object."
83+
defaultMessage="An error occurred copying this object."
8484
/>
8585
}
8686
/>
8787
);
8888
}
8989

9090
if (hasConflicts) {
91-
return (
92-
<EuiIconTip
93-
type={'alert'}
94-
color={'warning'}
95-
content={
96-
<Fragment>
97-
<FormattedMessage
98-
id="xpack.spaces.management.copyToSpace.copyStatus.conflictsMessage"
99-
defaultMessage="An object with this ID already exists in this space. Enable ‘Overwrite’ to replace the existing object."
100-
/>
101-
</Fragment>
102-
}
103-
/>
104-
);
91+
switch (conflict!.error.type) {
92+
case 'conflict':
93+
return (
94+
<EuiIconTip
95+
type={'alert'}
96+
color={'warning'}
97+
content={
98+
<Fragment>
99+
<FormattedMessage
100+
id="xpack.spaces.management.copyToSpace.copyStatus.conflictMessage"
101+
defaultMessage="This conflicts with an existing object. Enable ‘Overwrite’ to replace it."
102+
/>
103+
</Fragment>
104+
}
105+
/>
106+
);
107+
case 'ambiguous_conflict':
108+
return (
109+
<EuiIconTip
110+
type={'alert'}
111+
color={'warning'}
112+
content={
113+
<Fragment>
114+
<FormattedMessage
115+
id="xpack.spaces.management.copyToSpace.copyStatus.ambiguousConflictMessage"
116+
defaultMessage="This conflicts with multiple existing objects. Enable ‘Overwrite’ to replace one."
117+
/>
118+
</Fragment>
119+
}
120+
/>
121+
);
122+
}
105123
}
106124

107125
return hasMissingReferences ? (
@@ -113,17 +131,17 @@ export const CopyStatusIndicator = (props: Props) => {
113131
overwrite ? (
114132
<FormattedMessage
115133
id="xpack.spaces.management.copyToSpace.copyStatus.missingReferencesAutomaticOverwriteMessage"
116-
defaultMessage="This object will be overwritten, but one or more references are missing."
134+
defaultMessage="Object will be overwritten, but one or more references are missing."
117135
/>
118136
) : conflict ? (
119137
<FormattedMessage
120138
id="xpack.spaces.management.copyToSpace.copyStatus.missingReferencesOverwriteMessage"
121-
defaultMessage="This object will be overwritten, but one or more references are missing. Disable to skip."
139+
defaultMessage="Object will be overwritten, but one or more references are missing. Disable 'Overwrite' to skip."
122140
/>
123141
) : (
124142
<FormattedMessage
125143
id="xpack.spaces.management.copyToSpace.copyStatus.missingReferencesMessage"
126-
defaultMessage="This object will be copied, but one or more references are missing."
144+
defaultMessage="Object will be copied, but one or more references are missing."
127145
/>
128146
)
129147
}

x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ describe('CopyToSpaceFlyout', () => {
510510
Object {
511511
"color": "warning",
512512
"content": <FormattedMessage
513-
defaultMessage="This object will be copied, but one or more references are missing."
513+
defaultMessage="Object will be copied, but one or more references are missing."
514514
id="xpack.spaces.management.copyToSpace.copyStatus.missingReferencesMessage"
515515
values={Object {}}
516516
/>,
@@ -604,7 +604,7 @@ describe('CopyToSpaceFlyout', () => {
604604
Object {
605605
"color": "danger",
606606
"content": <FormattedMessage
607-
defaultMessage="There was an error copying this saved object."
607+
defaultMessage="An error occurred copying this object."
608608
id="xpack.spaces.management.copyToSpace.copyStatus.unresolvableErrorMessage"
609609
values={Object {}}
610610
/>,

x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,36 +45,30 @@ const renderCopyOptions = ({ createNewCopies, overwrite, includeRelated }: CopyO
4545
defaultMessage="Check for existing objects"
4646
/>
4747
);
48-
const overwriteLabel = overwrite ? (
49-
<FormattedMessage
50-
id="xpack.spaces.management.copyToSpace.overwriteLabel"
51-
defaultMessage="Automatically overwrite conflicts"
52-
/>
53-
) : (
54-
<FormattedMessage
55-
id="xpack.spaces.management.copyToSpace.dontOverwriteLabel"
56-
defaultMessage="Do not automatically overwrite conflicts"
57-
/>
58-
);
59-
const includeRelatedLabel = includeRelated ? (
60-
<FormattedMessage
61-
id="xpack.spaces.management.copyToSpace.includeRelatedLabel"
62-
defaultMessage="Include related saved objects"
63-
/>
64-
) : (
65-
<FormattedMessage
66-
id="xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel"
67-
defaultMessage="Do not include related saved objects"
68-
/>
69-
);
7048

7149
return (
7250
<EuiListGroup className="spcCopyToSpaceOptionsView" flush>
7351
<EuiListGroupItem iconType="copy" label={createNewCopiesLabel} />
7452
{!createNewCopies && (
75-
<EuiListGroupItem iconType={overwrite ? 'check' : 'cross'} label={overwriteLabel} />
53+
<EuiListGroupItem
54+
iconType={overwrite ? 'check' : 'cross'}
55+
label={
56+
<FormattedMessage
57+
id="xpack.spaces.management.copyToSpace.overwriteLabel"
58+
defaultMessage="Automatically overwrite conflicts"
59+
/>
60+
}
61+
/>
7662
)}
77-
<EuiListGroupItem iconType={includeRelated ? 'check' : 'cross'} label={includeRelatedLabel} />
63+
<EuiListGroupItem
64+
iconType={includeRelated ? 'check' : 'cross'}
65+
label={
66+
<FormattedMessage
67+
id="xpack.spaces.management.copyToSpace.includeRelatedLabel"
68+
defaultMessage="Include related saved objects"
69+
/>
70+
}
71+
/>
7872
</EuiListGroup>
7973
);
8074
};

x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
107107
defaultMessage: 'Object is now shared',
108108
})
109109
: i18n.translate('xpack.spaces.management.shareToSpace.shareEditSuccessTitle', {
110-
defaultMessage: 'Object is updated',
110+
defaultMessage: 'Object was updated',
111111
});
112112
if (spacesToAdd.length > 0) {
113113
await spacesManager.shareSavedObjectAdd({ type, id }, spacesToAdd);
@@ -227,7 +227,7 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
227227
<h2>
228228
<FormattedMessage
229229
id="xpack.spaces.management.shareToSpaceFlyoutHeader"
230-
defaultMessage="Share saved object to space"
230+
defaultMessage="Share to space"
231231
/>
232232
</h2>
233233
</EuiTitle>

x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const ShareToSpaceForm = (props: Props) => {
3535
title={
3636
<FormattedMessage
3737
id="xpack.spaces.management.shareToSpace.shareWarningTitle"
38-
defaultMessage="Editing a shared object applies the changes to all spaces"
38+
defaultMessage="Editing a shared object applies the changes in all spaces"
3939
/>
4040
}
4141
color="warning"

0 commit comments

Comments
 (0)