Skip to content

Commit

Permalink
[Discover] Update toast copy (#134178)
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta authored Jun 13, 2022
1 parent 7604d3b commit 23f091b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('copyValueToClipboard', () => {
'"bool_enabled"\nfalse\ntrue'
);
expect(discoverServiceMock.toastNotifications.addInfo).toHaveBeenCalledWith({
title: 'Copied values of "bool_enabled" column to clipboard',
title: 'Values of "bool_enabled" column copied to clipboard',
});
});

Expand All @@ -142,8 +142,8 @@ describe('copyValueToClipboard', () => {

expect(result).toBe('"scripted_string"\n"hi there"\n"\'=1+2"";=1+2"');
expect(discoverServiceMock.toastNotifications.addWarning).toHaveBeenCalledWith({
title: 'Copied values of "scripted_string" column to clipboard',
text: 'It may contain formulas whose values have been escaped.',
title: 'Values of "scripted_string" column copied to clipboard',
text: 'Values may contain formulas that are escaped.',
});
});
});
4 changes: 2 additions & 2 deletions src/plugins/discover/public/utils/copy_value_to_clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { convertNameToString } from './convert_value_to_string';
const WARNING_FOR_FORMULAS = i18n.translate(
'discover.grid.copyEscapedValueWithFormulasToClipboardWarningText',
{
defaultMessage: 'It may contain formulas whose values have been escaped.',
defaultMessage: 'Values may contain formulas that are escaped.',
}
);
const COPY_FAILED_ERROR_MESSAGE = i18n.translate('discover.grid.copyFailedErrorText', {
Expand Down Expand Up @@ -107,7 +107,7 @@ export const copyColumnValuesToClipboard = async ({
}

const toastTitle = i18n.translate('discover.grid.copyColumnValuesToClipboard.toastTitle', {
defaultMessage: 'Copied values of "{column}" column to clipboard',
defaultMessage: 'Values of "{column}" column copied to clipboard',
values: { column: columnId },
});

Expand Down

0 comments on commit 23f091b

Please sign in to comment.