From 60294cbcf431e7f21b6665449cd5d8cc881c23f2 Mon Sep 17 00:00:00 2001
From: Joe Portner <5295965+jportner@users.noreply.github.com>
Date: Wed, 9 Sep 2020 08:56:04 -0400
Subject: [PATCH] Update saved object management UI text (#76826)
---
.../__snapshots__/flyout.test.tsx.snap | 8 +-
.../__snapshots__/header.test.tsx.snap | 2 +-
.../objects_table/components/flyout.test.tsx | 4 +
.../objects_table/components/flyout.tsx | 15 ++--
.../objects_table/components/header.tsx | 5 +-
.../components/import_mode_control.tsx | 11 +--
.../components/import_summary.test.tsx | 6 +-
.../components/import_summary.tsx | 23 ++++--
.../components/overwrite_modal.test.tsx | 4 +-
.../components/overwrite_modal.tsx | 6 +-
.../components/copy_mode_control.tsx | 18 +++--
.../components/copy_status_indicator.tsx | 74 +++++++++++--------
.../copy_status_summary_indicator.tsx | 6 +-
.../components/copy_to_space_flyout.test.tsx | 4 +-
.../components/copy_to_space_form.tsx | 2 +-
.../components/processing_copy_to_space.tsx | 42 +++++------
.../components/selectable_spaces_control.tsx | 2 +-
.../unauthorized_prompt.test.tsx.snap | 2 +-
.../unauthorized_prompt.tsx | 2 +-
.../components/share_to_space_flyout.tsx | 39 +++++++---
.../components/share_to_space_form.tsx | 6 +-
.../share_saved_objects_to_space_column.tsx | 2 +-
.../translations/translations/ja-JP.json | 8 --
.../translations/translations/zh-CN.json | 8 --
24 files changed, 162 insertions(+), 137 deletions(-)
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
index 9ad82723c1161..0a330d074fd42 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/flyout.test.tsx.snap
@@ -122,6 +122,8 @@ exports[`Flyout conflicts should allow conflict resolution 1`] = `
grow={false}
>
@@ -420,6 +422,8 @@ exports[`Flyout legacy conflicts should allow conflict resolution 1`] = `
grow={false}
>
@@ -553,7 +557,7 @@ exports[`Flyout should render import step 1`] = `
hasEmptyLabelSpace={false}
label={
@@ -603,6 +607,8 @@ exports[`Flyout should render import step 1`] = `
grow={false}
>
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap
index 642a5030e4ec0..038e1aaf2d8f5 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/__snapshots__/header.test.tsx.snap
@@ -92,7 +92,7 @@ exports[`Header should render normally 1`] = `
color="subdued"
>
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx
index 32462e1e2184d..cc9d2ed160241 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.test.tsx
@@ -267,6 +267,10 @@ describe('Flyout', () => {
expect(component.state('status')).toBe('success');
expect(component.find('EuiFlyout ImportSummary')).toMatchSnapshot();
+ const cancelButton = await component.find(
+ 'EuiButtonEmpty[data-test-subj="importSavedObjectsCancelBtn"]'
+ );
+ expect(cancelButton.prop('disabled')).toBe(true);
});
});
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
index eddca18f9e283..47d82077294cc 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
@@ -729,7 +729,7 @@ export class Flyout extends Component {
label={
}
>
@@ -756,7 +756,7 @@ export class Flyout extends Component {
}
renderFooter() {
- const { status } = this.state;
+ const { isLegacyFile, status } = this.state;
const { done, close } = this.props;
let confirmButton;
@@ -773,7 +773,7 @@ export class Flyout extends Component {
} else if (this.hasUnmatchedReferences) {
confirmButton = (
{
} else {
confirmButton = (
{
return (
-
+
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
index ac8099893d00e..4000d620465a8 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_mode_control.tsx
@@ -51,8 +51,7 @@ const createNewCopiesDisabled = {
tooltip: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.disabledText',
{
- defaultMessage:
- 'Check if each object was previously copied or imported into the destination space.',
+ defaultMessage: 'Check if objects were previously copied or imported.',
}
),
};
@@ -64,21 +63,23 @@ const createNewCopiesEnabled = {
),
tooltip: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.createNewCopies.enabledText',
- { defaultMessage: 'All imported objects will be created with new random IDs.' }
+ {
+ defaultMessage: 'Use this option to create one or more copies of the object.',
+ }
),
};
const overwriteEnabled = {
id: 'overwriteEnabled',
label: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.overwrite.enabledLabel',
- { defaultMessage: 'Automatically try to overwrite conflicts' }
+ { defaultMessage: 'Automatically overwrite conflicts' }
),
};
const overwriteDisabled = {
id: 'overwriteDisabled',
label: i18n.translate(
'savedObjectsManagement.objectsTable.importModeControl.overwrite.disabledLabel',
- { defaultMessage: 'Request action when conflict occurs' }
+ { defaultMessage: 'Request action on conflict' }
),
};
const importOptionsTitle = i18n.translate(
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx
index ed65131b0fc6b..20ac5a903ef22 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.test.tsx
@@ -70,7 +70,7 @@ describe('ImportSummary', () => {
const wrapper = shallowWithI18nProvider();
expect(findHeader(wrapper).childAt(0).props()).toEqual(
- expect.objectContaining({ values: { importCount: 1 } })
+ expect.not.objectContaining({ values: expect.anything() }) // no importCount for singular
);
const countCreated = findCountCreated(wrapper);
expect(countCreated).toHaveLength(1);
@@ -90,7 +90,7 @@ describe('ImportSummary', () => {
const wrapper = shallowWithI18nProvider();
expect(findHeader(wrapper).childAt(0).props()).toEqual(
- expect.objectContaining({ values: { importCount: 1 } })
+ expect.not.objectContaining({ values: expect.anything() }) // no importCount for singular
);
expect(findCountCreated(wrapper)).toHaveLength(0);
const countOverwritten = findCountOverwritten(wrapper);
@@ -110,7 +110,7 @@ describe('ImportSummary', () => {
const wrapper = shallowWithI18nProvider();
expect(findHeader(wrapper).childAt(0).props()).toEqual(
- expect.objectContaining({ values: { importCount: 1 } })
+ expect.not.objectContaining({ values: expect.anything() }) // no importCount for singular
);
expect(findCountCreated(wrapper)).toHaveLength(0);
expect(findCountOverwritten(wrapper)).toHaveLength(0);
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx
index 7949f7d18d350..e2ce3c3695b17 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/import_summary.tsx
@@ -141,7 +141,7 @@ const getCountIndicators = (importItems: ImportItem[]) => {
);
};
-const getStatusIndicator = ({ outcome, errorMessage }: ImportItem) => {
+const getStatusIndicator = ({ outcome, errorMessage = 'Error' }: ImportItem) => {
switch (outcome) {
case 'created':
return (
@@ -168,8 +168,8 @@ const getStatusIndicator = ({ outcome, errorMessage }: ImportItem) => {
type={'alert'}
color={'danger'}
content={i18n.translate('savedObjectsManagement.importSummary.errorOutcomeLabel', {
- defaultMessage: 'Error{message}',
- values: { message: errorMessage ? `: ${errorMessage}` : '' },
+ defaultMessage: '{errorMessage}',
+ values: { errorMessage },
})}
/>
);
@@ -194,11 +194,18 @@ export const ImportSummary = ({ failedImports, successfulImports }: ImportSummar
}
>
-
+ {importItems.length === 1 ? (
+
+ ) : (
+
+ )}
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
index c93bc9e5038df..7576b62552aa2 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.test.tsx
@@ -40,7 +40,7 @@ describe('OverwriteModal', () => {
const wrapper = shallowWithI18nProvider();
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
- `"\\"baz\\" conflicts with an existing object, are you sure you want to overwrite it?"`
+ `"\\"baz\\" conflicts with an existing object. Overwrite it?"`
);
expect(wrapper.find('EuiSuperSelect')).toHaveLength(0);
});
@@ -82,7 +82,7 @@ describe('OverwriteModal', () => {
const wrapper = shallowWithI18nProvider();
expect(wrapper.find('p').text()).toMatchInlineSnapshot(
- `"\\"baz\\" conflicts with multiple existing objects, do you want to overwrite one of them?"`
+ `"\\"baz\\" conflicts with multiple existing objects. Overwrite one?"`
);
expect(wrapper.find('EuiSuperSelect')).toHaveLength(1);
});
diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
index dbe95161cbeae..bf27d407fbe94 100644
--- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
+++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/overwrite_modal.tsx
@@ -98,15 +98,13 @@ export const OverwriteModal = ({ conflict, onFinish }: OverwriteModalProps) => {
const bodyText =
error.type === 'conflict'
? i18n.translate('savedObjectsManagement.objectsTable.overwriteModal.body.conflict', {
- defaultMessage:
- '"{title}" conflicts with an existing object, are you sure you want to overwrite it?',
+ defaultMessage: '"{title}" conflicts with an existing object. Overwrite it?',
values: { title },
})
: i18n.translate(
'savedObjectsManagement.objectsTable.overwriteModal.body.ambiguousConflict',
{
- defaultMessage:
- '"{title}" conflicts with multiple existing objects, do you want to overwrite one of them?',
+ defaultMessage: '"{title}" conflicts with multiple existing objects. Overwrite one?',
values: { title },
}
);
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
index 42fbf8954396e..c3e631e335ea7 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx
@@ -37,8 +37,7 @@ const createNewCopiesDisabled = {
tooltip: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.disabledText',
{
- defaultMessage:
- 'Check if each object was previously copied or imported into the destination space.',
+ defaultMessage: 'Check if objects were previously copied or imported into the space.',
}
),
};
@@ -50,33 +49,36 @@ const createNewCopiesEnabled = {
),
tooltip: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText',
- { defaultMessage: 'All copied objects will be created with new random IDs.' }
+ {
+ defaultMessage:
+ 'Use this option to create one or more copies of the object in the same space.',
+ }
),
};
const overwriteEnabled = {
id: 'overwriteEnabled',
label: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.overwrite.enabledLabel',
- { defaultMessage: 'Automatically try to overwrite conflicts' }
+ { defaultMessage: 'Automatically overwrite conflicts' }
),
};
const overwriteDisabled = {
id: 'overwriteDisabled',
label: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.overwrite.disabledLabel',
- { defaultMessage: 'Request action when conflict occurs' }
+ { defaultMessage: 'Request action on conflict' }
),
};
const includeRelated = {
id: 'includeRelated',
text: i18n.translate('xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.title', {
- defaultMessage: 'Include related saved objects',
+ defaultMessage: 'Include related objects',
}),
tooltip: i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.text',
{
defaultMessage:
- 'This will copy any other objects this has references to -- for example, a dashboard may have references to multiple visualizations.',
+ 'Copy this object and its related objects. For dashboards, related visualizations, index patterns, and saved searches are also copied.',
}
),
};
@@ -86,7 +88,7 @@ const copyOptionsTitle = i18n.translate(
);
const relationshipOptionsTitle = i18n.translate(
'xpack.spaces.management.copyToSpace.copyModeControl.relationshipOptionsTitle',
- { defaultMessage: 'Relationship options' }
+ { defaultMessage: 'Relationship' }
);
const createLabel = ({ text, tooltip }: { text: string; tooltip: string }) => (
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
index 158d7a9a43ef6..d9e1418cdd412 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_indicator.tsx
@@ -5,7 +5,7 @@
*/
import React, { Fragment } from 'react';
-import { EuiLoadingSpinner, EuiIconTip, EuiSpacer } from '@elastic/eui';
+import { EuiLoadingSpinner, EuiIconTip } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { ImportRetry } from '../types';
import { SummarizedCopyToSpaceResult, SummarizedSavedObjectResult } from '..';
@@ -36,13 +36,13 @@ export const CopyStatusIndicator = (props: Props) => {
// the object was overwritten
) : (
// the object was not overwritten
);
return ;
@@ -53,19 +53,19 @@ export const CopyStatusIndicator = (props: Props) => {
// this is an "automatic overwrite", e.g., the "Overwrite all conflicts" option was selected
) : pendingObjectRetry?.overwrite ? (
// this is a manual overwrite, e.g., the individual "Overwrite?" switch was enabled
) : (
// this object is pending success, but it will not result in an overwrite
);
return ;
@@ -80,7 +80,7 @@ export const CopyStatusIndicator = (props: Props) => {
content={
}
/>
@@ -88,28 +88,38 @@ export const CopyStatusIndicator = (props: Props) => {
}
if (hasConflicts) {
- return (
-
-
-
-
-
- }
- />
- );
+ switch (conflict!.error.type) {
+ case 'conflict':
+ return (
+
+
+
+ }
+ />
+ );
+ case 'ambiguous_conflict':
+ return (
+
+
+
+ }
+ />
+ );
+ }
}
return hasMissingReferences ? (
@@ -121,17 +131,17 @@ export const CopyStatusIndicator = (props: Props) => {
overwrite ? (
) : conflict ? (
) : (
)
}
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx
index 4bc7e5cfaf31a..4dfb14e756cd6 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_status_summary_indicator.tsx
@@ -55,7 +55,7 @@ const renderIcon = (props: Props) => {
content={
}
@@ -93,7 +93,7 @@ const renderIcon = (props: Props) => {
content={
}
@@ -119,7 +119,7 @@ const renderIcon = (props: Props) => {
content={
}
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
index dfc908d81887a..e214db22aa9cc 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout.test.tsx
@@ -510,7 +510,7 @@ describe('CopyToSpaceFlyout', () => {
Object {
"color": "warning",
"content": ,
@@ -604,7 +604,7 @@ describe('CopyToSpaceFlyout', () => {
Object {
"color": "danger",
"content": ,
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx
index fdc8d8c73e324..551573feebcdb 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_form.tsx
@@ -51,7 +51,7 @@ export const CopyToSpaceForm = (props: Props) => {
label={
}
fullWidth
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
index ceaa1dc9f5e21..ab8fb0b438f67 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/processing_copy_to_space.tsx
@@ -45,36 +45,30 @@ const renderCopyOptions = ({ createNewCopies, overwrite, includeRelated }: CopyO
defaultMessage="Check for existing objects"
/>
);
- const overwriteLabel = overwrite ? (
-
- ) : (
-
- );
- const includeRelatedLabel = includeRelated ? (
-
- ) : (
-
- );
return (
{!createNewCopies && (
-
+
+ }
+ />
)}
-
+
+ }
+ />
);
};
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx
index 2a8b5e660f38c..d4e12b31b5b4f 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/selectable_spaces_control.tsx
@@ -31,7 +31,7 @@ export const SelectableSpacesControl = (props: Props) => {
content={
}
position="left"
diff --git a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap
index b53b4d6ec7caf..1e761a0f14fc9 100644
--- a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap
+++ b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/__snapshots__/unauthorized_prompt.test.tsx.snap
@@ -7,7 +7,7 @@ exports[`UnauthorizedPrompt renders as expected 1`] = `
data-test-subj="permissionDeniedMessage"
>
diff --git a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx
index dd3f96d94eab4..50f10ec3860df 100644
--- a/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx
+++ b/x-pack/plugins/spaces/public/management/components/unauthorized_prompt/unauthorized_prompt.tsx
@@ -24,7 +24,7 @@ export const UnauthorizedPrompt = () => (
}
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
index 10cc5777cdcff..053fcb4fdabf8 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout.tsx
@@ -104,20 +104,27 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
const title =
currentNamespaces.length === 1
? i18n.translate('xpack.spaces.management.shareToSpace.shareNewSuccessTitle', {
- defaultMessage: 'Saved Object is now shared!',
+ defaultMessage: 'Object is now shared',
})
: i18n.translate('xpack.spaces.management.shareToSpace.shareEditSuccessTitle', {
- defaultMessage: 'Saved Object updated',
+ defaultMessage: 'Object was updated',
});
if (spacesToAdd.length > 0) {
await spacesManager.shareSavedObjectAdd({ type, id }, spacesToAdd);
const spaceNames = spacesToAdd.map(
(spaceId) => spaces.find((space) => space.id === spaceId)!.name
);
- const text = i18n.translate('xpack.spaces.management.shareToSpace.shareAddSuccessText', {
- defaultMessage: `'{object}' was added to the following spaces:\n{spaces}`,
- values: { object: meta.title, spaces: spaceNames.join(', ') },
- });
+ const spaceCount = spaceNames.length;
+ const text =
+ spaceCount === 1
+ ? i18n.translate('xpack.spaces.management.shareToSpace.shareAddSuccessTextSingular', {
+ defaultMessage: `'{object}' was added to 1 space.`,
+ values: { object: meta.title },
+ })
+ : i18n.translate('xpack.spaces.management.shareToSpace.shareAddSuccessTextPlural', {
+ defaultMessage: `'{object}' was added to {spaceCount} spaces.`,
+ values: { object: meta.title, spaceCount },
+ });
toastNotifications.addSuccess({ title, text });
}
if (spacesToRemove.length > 0) {
@@ -125,10 +132,20 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
const spaceNames = spacesToRemove.map(
(spaceId) => spaces.find((space) => space.id === spaceId)!.name
);
- const text = i18n.translate('xpack.spaces.management.shareToSpace.shareRemoveSuccessText', {
- defaultMessage: `'{object}' was removed from the following spaces:\n{spaces}`,
- values: { object: meta.title, spaces: spaceNames.join(', ') },
- });
+ const spaceCount = spaceNames.length;
+ const text =
+ spaceCount === 1
+ ? i18n.translate(
+ 'xpack.spaces.management.shareToSpace.shareRemoveSuccessTextSingular',
+ {
+ defaultMessage: `'{object}' was removed from 1 space.`,
+ values: { object: meta.title },
+ }
+ )
+ : i18n.translate('xpack.spaces.management.shareToSpace.shareRemoveSuccessTextPlural', {
+ defaultMessage: `'{object}' was removed from {spaceCount} spaces.`,
+ values: { object: meta.title, spaceCount },
+ });
toastNotifications.addSuccess({ title, text });
}
onObjectUpdated();
@@ -210,7 +227,7 @@ export const ShareSavedObjectsToSpaceFlyout = (props: Props) => {
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
index 24402fec8d771..ad84ea85d5e54 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/share_to_space_form.tsx
@@ -35,14 +35,14 @@ export const ShareToSpaceForm = (props: Props) => {
title={
}
color="warning"
>
{
label={
}
labelAppend={
diff --git a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx
index e8649faa120be..93d7bb0170519 100644
--- a/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx
+++ b/x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx
@@ -52,7 +52,7 @@ const ColumnDisplay = ({ namespaces, data }: ColumnDataProps) => {
const unauthorizedCount = (namespaces?.filter((namespace) => namespace === '?') ?? []).length;
const unauthorizedTooltip = i18n.translate(
'xpack.spaces.management.shareToSpace.columnUnauthorizedLabel',
- { defaultMessage: 'You do not have permission to view these spaces' }
+ { defaultMessage: `You don't have permission to view these spaces.` }
);
const displayedSpaces = isExpanded
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 8b9409f01087c..89d400f92bce9 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -2880,7 +2880,6 @@
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsDescription": "影響されるオブジェクトのサンプル",
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsName": "影響されるオブジェクトのサンプル",
"savedObjectsManagement.objectsTable.flyout.resolveImportErrorsFileErrorMessage": "ファイルを処理できませんでした。",
- "savedObjectsManagement.objectsTable.flyout.selectFileToImportFormRowLabel": "インポートするファイルを選択してください",
"savedObjectsManagement.objectsTable.header.exportButtonLabel": "{filteredCount, plural, one{# オブジェクト} other {# オブジェクト}}をエクスポート",
"savedObjectsManagement.objectsTable.header.importButtonLabel": "インポート",
"savedObjectsManagement.objectsTable.header.refreshButtonLabel": "更新",
@@ -17600,8 +17599,6 @@
"xpack.spaces.management.copyToSpace.actionTitle": "スペースにコピー",
"xpack.spaces.management.copyToSpace.copyErrorTitle": "保存されたオブジェクトのコピー中にエラーが発生",
"xpack.spaces.management.copyToSpace.copyResultsLabel": "コピー結果",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsMessage": "このスペースには同じID({id})の保存されたオブジェクトが既に存在します。",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsOverwriteMessage": "「上書き」をクリックしてこのバージョンをコピーされたバージョンに置き換えます。",
"xpack.spaces.management.copyToSpace.copyStatus.pendingOverwriteMessage": "保存されたオブジェクトは上書きされます。「スキップ」をクリックしてこの操作をキャンセルします。",
"xpack.spaces.management.copyToSpace.copyStatus.successMessage": "保存されたオブジェクトがコピーされました。",
"xpack.spaces.management.copyToSpace.copyStatus.unresolvableErrorMessage": "この保存されたオブジェクトのコピー中にエラーが発生しました。",
@@ -17610,8 +17607,6 @@
"xpack.spaces.management.copyToSpace.copyStatusSummary.successMessage": "{space}スペースにコピーされました。",
"xpack.spaces.management.copyToSpace.copyToSpacesButton": "{spaceCount} {spaceCount, plural, one {スペース} other {スペース}}にコピー",
"xpack.spaces.management.copyToSpace.disabledCopyToSpacesButton": "コピー",
- "xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel": "関連性のある保存されたオブジェクトを含みません",
- "xpack.spaces.management.copyToSpace.dontOverwriteLabel": "保存されたオブジェクトを上書きしません",
"xpack.spaces.management.copyToSpace.finishCopyToSpacesButton": "終了",
"xpack.spaces.management.copyToSpace.finishedButtonLabel": "コピーが完了しました。",
"xpack.spaces.management.copyToSpace.finishPendingOverwritesCopyToSpacesButton": "{overwriteCount}件のオブジェクトを上書き",
@@ -17619,10 +17614,8 @@
"xpack.spaces.management.copyToSpace.inProgressButtonLabel": "コピーが進行中です。お待ちください。",
"xpack.spaces.management.copyToSpace.noSpacesBody": "コピーできるスペースがありません。",
"xpack.spaces.management.copyToSpace.noSpacesTitle": "スペースがありません",
- "xpack.spaces.management.copyToSpace.overwriteLabel": "保存されたオブジェクトを自動的に上書きしています",
"xpack.spaces.management.copyToSpace.resolveCopyErrorTitle": "保存されたオブジェクトの矛盾の解決中にエラーが発生",
"xpack.spaces.management.copyToSpace.resolveCopySuccessTitle": "上書き成功",
- "xpack.spaces.management.copyToSpace.selectSpacesLabel": "コピー先のスペースを選択してください",
"xpack.spaces.management.copyToSpace.spacesLoadErrorTitle": "利用可能なスペースを読み込み中にエラーが発生",
"xpack.spaces.management.copyToSpaceFlyoutFooter.errorCount": "エラー",
"xpack.spaces.management.copyToSpaceFlyoutFooter.pendingCount": "保留中",
@@ -17701,7 +17694,6 @@
"xpack.spaces.management.spacesGridPage.spacesTitle": "スペース",
"xpack.spaces.management.spacesGridPage.spaceSuccessfullyDeletedNotificationMessage": "「{spaceName}」 スペースが削除されました。",
"xpack.spaces.management.toggleAllFeaturesLink": "(すべて変更)",
- "xpack.spaces.management.unauthorizedPrompt.permissionDeniedDescription": "スペースを管理するパーミッションがありません。",
"xpack.spaces.management.unauthorizedPrompt.permissionDeniedTitle": "パーミッションが拒否されました",
"xpack.spaces.management.validateSpace.describeMaxLengthErrorMessage": "説明は 2000 文字以内でなければなりません。",
"xpack.spaces.management.validateSpace.nameMaxLengthErrorMessage": "名前はは 1024 文字以内でなければなりません。",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index b9fb6340e38cf..4fa6544caf191 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -2881,7 +2881,6 @@
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsDescription": "受影响对象样例",
"savedObjectsManagement.objectsTable.flyout.renderConflicts.columnSampleOfAffectedObjectsName": "受影响对象样例",
"savedObjectsManagement.objectsTable.flyout.resolveImportErrorsFileErrorMessage": "无法处理该文件。",
- "savedObjectsManagement.objectsTable.flyout.selectFileToImportFormRowLabel": "请选择要导入的文件",
"savedObjectsManagement.objectsTable.header.exportButtonLabel": "导出 {filteredCount, plural, one{# 个对象} other {# 个对象}}",
"savedObjectsManagement.objectsTable.header.importButtonLabel": "导入",
"savedObjectsManagement.objectsTable.header.refreshButtonLabel": "刷新",
@@ -17610,8 +17609,6 @@
"xpack.spaces.management.copyToSpace.actionTitle": "复制到工作区",
"xpack.spaces.management.copyToSpace.copyErrorTitle": "复制已保存对象时出错",
"xpack.spaces.management.copyToSpace.copyResultsLabel": "复制结果",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsMessage": "具有匹配 ID ({id}) 的已保存对象在此工作区中已存在。",
- "xpack.spaces.management.copyToSpace.copyStatus.conflictsOverwriteMessage": "单击“覆盖”可将此版本替换为复制的版本。",
"xpack.spaces.management.copyToSpace.copyStatus.pendingOverwriteMessage": "已保存对象将被覆盖。单击“跳过”可取消此操作。",
"xpack.spaces.management.copyToSpace.copyStatus.successMessage": "已保存对象成功复制。",
"xpack.spaces.management.copyToSpace.copyStatus.unresolvableErrorMessage": "复制此已保存对象时出错。",
@@ -17620,8 +17617,6 @@
"xpack.spaces.management.copyToSpace.copyStatusSummary.successMessage": "已成功复制到 {space} 工作区。",
"xpack.spaces.management.copyToSpace.copyToSpacesButton": "复制到 {spaceCount} {spaceCount, plural, one {个工作区} other {个工作区}}",
"xpack.spaces.management.copyToSpace.disabledCopyToSpacesButton": "复制",
- "xpack.spaces.management.copyToSpace.dontIncludeRelatedLabel": "不包括相关已保存对象",
- "xpack.spaces.management.copyToSpace.dontOverwriteLabel": "未覆盖已保存对象",
"xpack.spaces.management.copyToSpace.finishCopyToSpacesButton": "完成",
"xpack.spaces.management.copyToSpace.finishedButtonLabel": "复制已完成。",
"xpack.spaces.management.copyToSpace.finishPendingOverwritesCopyToSpacesButton": "覆盖 {overwriteCount} 个对象",
@@ -17629,10 +17624,8 @@
"xpack.spaces.management.copyToSpace.inProgressButtonLabel": "复制正在进行中。请稍候。",
"xpack.spaces.management.copyToSpace.noSpacesBody": "没有可向其中进行复制的合格工作区。",
"xpack.spaces.management.copyToSpace.noSpacesTitle": "没有可用的工作区",
- "xpack.spaces.management.copyToSpace.overwriteLabel": "正在自动覆盖已保存对象",
"xpack.spaces.management.copyToSpace.resolveCopyErrorTitle": "解决已保存对象冲突时出错",
"xpack.spaces.management.copyToSpace.resolveCopySuccessTitle": "覆盖成功",
- "xpack.spaces.management.copyToSpace.selectSpacesLabel": "选择要向其中进行复制的工作区",
"xpack.spaces.management.copyToSpace.spacesLoadErrorTitle": "加载可用工作区时出错",
"xpack.spaces.management.copyToSpaceFlyoutFooter.errorCount": "错误",
"xpack.spaces.management.copyToSpaceFlyoutFooter.pendingCount": "待处理",
@@ -17711,7 +17704,6 @@
"xpack.spaces.management.spacesGridPage.spacesTitle": "工作区",
"xpack.spaces.management.spacesGridPage.spaceSuccessfullyDeletedNotificationMessage": "已删除 “{spaceName}” 空间。",
"xpack.spaces.management.toggleAllFeaturesLink": "(全部更改)",
- "xpack.spaces.management.unauthorizedPrompt.permissionDeniedDescription": "您没有权限管理空间。",
"xpack.spaces.management.unauthorizedPrompt.permissionDeniedTitle": "权限被拒绝",
"xpack.spaces.management.validateSpace.describeMaxLengthErrorMessage": "描述不能超过 2000 个字符。",
"xpack.spaces.management.validateSpace.nameMaxLengthErrorMessage": "名称不能超过 1024 个字符。",