mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Security Solution] [Endpoint] Fixes capitalizations in texts and update translations (#123929)
* Fixes capitalizations in texts and update translations. Also update unit tests * Fixes test * Fix policy related test
This commit is contained in:
parent
3c6e36c25e
commit
8527ffc1f6
16 changed files with 31 additions and 30 deletions
|
@ -151,7 +151,7 @@ describe('When event filters delete modal is shown', () => {
|
|||
});
|
||||
|
||||
expect(coreStart.notifications.toasts.addSuccess).toHaveBeenCalledWith(
|
||||
'"tic-tac-toe" has been removed from the Event Filters list.'
|
||||
'"tic-tac-toe" has been removed from the event filters list.'
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -170,7 +170,7 @@ describe('When event filters delete modal is shown', () => {
|
|||
});
|
||||
|
||||
expect(coreStart.notifications.toasts.addDanger).toHaveBeenCalledWith(
|
||||
'Unable to remove "tic-tac-toe" from the Event Filters list. Reason: oh oh'
|
||||
'Unable to remove "tic-tac-toe" from the event filters list. Reason: oh oh'
|
||||
);
|
||||
expect(showDeleteModal(getCurrentState())).toBe(true);
|
||||
});
|
||||
|
|
|
@ -58,7 +58,7 @@ export const EventFilterDeleteModal = memo<{}>(() => {
|
|||
if (wasDeleted) {
|
||||
toasts.addSuccess(
|
||||
i18n.translate('xpack.securitySolution.eventFilters.deletionDialog.deleteSuccess', {
|
||||
defaultMessage: '"{name}" has been removed from the Event Filters list.',
|
||||
defaultMessage: '"{name}" has been removed from the event filters list.',
|
||||
values: { name: eventFilter?.name },
|
||||
})
|
||||
);
|
||||
|
@ -73,7 +73,7 @@ export const EventFilterDeleteModal = memo<{}>(() => {
|
|||
toasts.addDanger(
|
||||
i18n.translate('xpack.securitySolution.eventFilters.deletionDialog.deleteFailure', {
|
||||
defaultMessage:
|
||||
'Unable to remove "{name}" from the Event Filters list. Reason: {message}',
|
||||
'Unable to remove "{name}" from the event filters list. Reason: {message}',
|
||||
values: { name: eventFilter?.name, message: deleteError.message },
|
||||
})
|
||||
);
|
||||
|
|
|
@ -257,7 +257,7 @@ export const EventFiltersFlyout: React.FC<EventFiltersFlyoutProps> = memo(
|
|||
<EuiLink target="_blank" href={`${docLinks.links.securitySolution.eventFilters}`}>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.eventFilters.docsLink"
|
||||
defaultMessage="Event Filters documentation."
|
||||
defaultMessage="Event filters documentation."
|
||||
/>
|
||||
</EuiLink>
|
||||
</EuiCallOut>
|
||||
|
|
|
@ -119,7 +119,7 @@ describe('When on the host isolation exceptions delete modal', () => {
|
|||
await waitFor(expect(deleteOneHostIsolationExceptionItemMock).toHaveBeenCalled);
|
||||
|
||||
expect(coreStart.notifications.toasts.addSuccess).toHaveBeenCalledWith(
|
||||
'"some name" has been removed from the Host isolation exceptions list.'
|
||||
'"some name" has been removed from the host isolation exceptions list.'
|
||||
);
|
||||
expect(onCancel).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
@ -140,7 +140,7 @@ describe('When on the host isolation exceptions delete modal', () => {
|
|||
await waitFor(expect(deleteOneHostIsolationExceptionItemMock).toHaveBeenCalled);
|
||||
|
||||
expect(coreStart.notifications.toasts.addDanger).toHaveBeenCalledWith(
|
||||
'Unable to remove "some name" from the Host isolation exceptions list. Reason: That\'s not true. That\'s impossible'
|
||||
'Unable to remove "some name" from the host isolation exceptions list. Reason: That\'s not true. That\'s impossible'
|
||||
);
|
||||
expect(onCancel).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export const HostIsolationExceptionDeleteModal = memo(
|
|||
'xpack.securitySolution.hostIsolationExceptions.deletionDialog.deleteFailure',
|
||||
{
|
||||
defaultMessage:
|
||||
'Unable to remove "{name}" from the Host isolation exceptions list. Reason: {message}',
|
||||
'Unable to remove "{name}" from the host isolation exceptions list. Reason: {message}',
|
||||
values: { name: item?.name, message: error.message },
|
||||
}
|
||||
)
|
||||
|
@ -63,7 +63,7 @@ export const HostIsolationExceptionDeleteModal = memo(
|
|||
'xpack.securitySolution.hostIsolationExceptions.deletionDialog.deleteSuccess',
|
||||
{
|
||||
defaultMessage:
|
||||
'"{name}" has been removed from the Host isolation exceptions list.',
|
||||
'"{name}" has been removed from the host isolation exceptions list.',
|
||||
values: { name: item?.name },
|
||||
}
|
||||
)
|
||||
|
@ -87,7 +87,7 @@ export const HostIsolationExceptionDeleteModal = memo(
|
|||
<EuiModalHeaderTitle>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.deletionDialog.title"
|
||||
defaultMessage="Delete Host isolation exception"
|
||||
defaultMessage="Delete host isolation exception"
|
||||
/>
|
||||
</EuiModalHeaderTitle>
|
||||
</EuiModalHeader>
|
||||
|
|
|
@ -30,14 +30,14 @@ export const HostIsolationExceptionsEmptyState = memo<{
|
|||
<h2>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.listEmpty.title"
|
||||
defaultMessage="Add your first Host isolation exception"
|
||||
defaultMessage="Add your first host isolation exception"
|
||||
/>
|
||||
</h2>
|
||||
}
|
||||
body={
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.listEmpty.message"
|
||||
defaultMessage="Add a Host isolation exception to allow isolated hosts to communicate with specific IPs."
|
||||
defaultMessage="Add a host isolation exception to allow isolated hosts to communicate with specific IPs."
|
||||
/>
|
||||
}
|
||||
actions={[
|
||||
|
@ -48,7 +48,7 @@ export const HostIsolationExceptionsEmptyState = memo<{
|
|||
>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.listEmpty.addButton"
|
||||
defaultMessage="Add Host isolation exception"
|
||||
defaultMessage="Add host isolation exception"
|
||||
/>
|
||||
</EuiButton>,
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ export const IP_LABEL = i18n.translate(
|
|||
export const IP_ERROR = i18n.translate(
|
||||
'xpack.securitySolution.hostIsolationExceptions.form.ip.error',
|
||||
{
|
||||
defaultMessage: 'The ip is invalid. Only IPv4 with optional CIDR is supported',
|
||||
defaultMessage: 'The IP is invalid. Only IPv4 with optional CIDR is supported',
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ describe('When on the host isolation exceptions page', () => {
|
|||
await waitForApiCall();
|
||||
expect(renderResult.getByTestId('searchExceptions')).toBeTruthy();
|
||||
expect(renderResult.getByTestId('hostIsolationExceptions-totalCount').textContent).toBe(
|
||||
'Showing 1 exception'
|
||||
'Showing 1 host isolation exception'
|
||||
);
|
||||
expect(renderResult.getByTestId('policiesSelectorButton')).toBeTruthy();
|
||||
});
|
||||
|
|
|
@ -214,7 +214,7 @@ export const HostIsolationExceptionsList = () => {
|
|||
subtitle={
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.list.pageSubTitle"
|
||||
defaultMessage="Add a Host isolation exception to allow isolated hosts to communicate with specific IPs."
|
||||
defaultMessage="Add a host isolation exception to allow isolated hosts to communicate with specific IPs."
|
||||
/>
|
||||
}
|
||||
actions={
|
||||
|
@ -228,7 +228,7 @@ export const HostIsolationExceptionsList = () => {
|
|||
>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.list.addButton"
|
||||
defaultMessage="Add Host isolation exception"
|
||||
defaultMessage="Add host isolation exception"
|
||||
/>
|
||||
</EuiButton>
|
||||
) : (
|
||||
|
@ -256,7 +256,7 @@ export const HostIsolationExceptionsList = () => {
|
|||
placeholder={i18n.translate(
|
||||
'xpack.securitySolution.hostIsolationExceptions.search.placeholder',
|
||||
{
|
||||
defaultMessage: 'Search on the fields below: name, description, ip',
|
||||
defaultMessage: 'Search on the fields below: name, description, IP',
|
||||
}
|
||||
)}
|
||||
/>
|
||||
|
@ -264,7 +264,7 @@ export const HostIsolationExceptionsList = () => {
|
|||
<EuiText color="subdued" size="xs" data-test-subj="hostIsolationExceptions-totalCount">
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.hostIsolationExceptions.list.totalCount"
|
||||
defaultMessage="Showing {total, plural, one {# exception} other {# exceptions}}"
|
||||
defaultMessage="Showing {total, plural, one {# host isolation exception} other {# host isolation exceptions}}"
|
||||
values={{ total: listItems.length }}
|
||||
/>
|
||||
</EuiText>
|
||||
|
|
|
@ -63,7 +63,7 @@ describe('Policy details host isolation exceptions tab', () => {
|
|||
render(emptyList);
|
||||
expect(
|
||||
renderResult.getByTestId('policyDetailsHostIsolationExceptionsSearchCount')
|
||||
).toHaveTextContent('Showing 0 exceptions');
|
||||
).toHaveTextContent('Showing 0 host isolation exceptions');
|
||||
expect(renderResult.getByTestId('searchField')).toBeTruthy();
|
||||
});
|
||||
|
||||
|
|
|
@ -160,7 +160,8 @@ export const PolicyHostIsolationExceptionsList = ({
|
|||
return i18n.translate(
|
||||
'xpack.securitySolution.endpoint.policy.hostIsolationExceptions.list.totalItemCount',
|
||||
{
|
||||
defaultMessage: 'Showing {totalItemsCount, plural, one {# exception} other {# exceptions}}',
|
||||
defaultMessage:
|
||||
'Showing {totalItemsCount, plural, one {# host isolation exception} other {# host isolation exceptions}}',
|
||||
values: { totalItemsCount: pagination.totalItemCount },
|
||||
}
|
||||
);
|
||||
|
@ -179,7 +180,7 @@ export const PolicyHostIsolationExceptionsList = ({
|
|||
placeholder={i18n.translate(
|
||||
'xpack.securitySolution.endpoint.policy.hostIsolationExceptions.list.search.placeholder',
|
||||
{
|
||||
defaultMessage: 'Search on the fields below: name, description, ip',
|
||||
defaultMessage: 'Search on the fields below: name, description, IP',
|
||||
}
|
||||
)}
|
||||
defaultValue={urlParams.filter}
|
||||
|
|
|
@ -109,7 +109,7 @@ describe('Policy details host isolation exceptions tab', () => {
|
|||
render();
|
||||
expect(
|
||||
await renderResult.findByTestId('policyHostIsolationExceptionsTabSubtitle')
|
||||
).toHaveTextContent('There are 4 exceptions associated with this policy');
|
||||
).toHaveTextContent('There are 4 host isolation exceptions associated with this policy');
|
||||
});
|
||||
|
||||
it('should apply a filter when requested from location search params', async () => {
|
||||
|
|
|
@ -89,7 +89,7 @@ export const PolicyHostIsolationExceptionsTab = ({ policy }: { policy: PolicyDat
|
|||
return policySearchedExceptionsListRequest.data ? (
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.endpoint.policy.hostIsolationExceptions.list.about"
|
||||
defaultMessage="There {count, plural, one {is} other {are}} {count} {count, plural, =1 {exception} other {exceptions}} associated with this policy. Click here to {link}"
|
||||
defaultMessage="There {count, plural, one {is} other {are}} {count} {count, plural, =1 {host isolation exception} other {host isolation exceptions}} associated with this policy. Click here to {link}"
|
||||
values={{
|
||||
count: allPolicyExceptionsListRequest.data?.total,
|
||||
link,
|
||||
|
|
|
@ -66,7 +66,7 @@ describe('TrustedAppsNotifications', () => {
|
|||
});
|
||||
|
||||
expect(notifications.toasts.addSuccess).toBeCalledWith({
|
||||
text: '"trusted app 3" has been removed from the Trusted Applications list.',
|
||||
text: '"trusted app 3" has been removed from the trusted applications list.',
|
||||
title: 'Successfully removed',
|
||||
});
|
||||
expect(notifications.toasts.addDanger).not.toBeCalled();
|
||||
|
@ -91,7 +91,7 @@ describe('TrustedAppsNotifications', () => {
|
|||
|
||||
expect(notifications.toasts.addSuccess).not.toBeCalled();
|
||||
expect(notifications.toasts.addDanger).toBeCalledWith({
|
||||
text: 'Unable to remove "trusted app 3" from the Trusted Applications list. Reason: Not Found',
|
||||
text: 'Unable to remove "trusted app 3" from the trusted applications list. Reason: Not Found',
|
||||
title: 'Removal failure',
|
||||
});
|
||||
});
|
||||
|
|
|
@ -29,7 +29,7 @@ const getDeletionErrorMessage = (error: ServerApiError, entry: Immutable<Trusted
|
|||
}),
|
||||
text: i18n.translate('xpack.securitySolution.trustedapps.deletionError.text', {
|
||||
defaultMessage:
|
||||
'Unable to remove "{name}" from the Trusted Applications list. Reason: {message}',
|
||||
'Unable to remove "{name}" from the trusted applications list. Reason: {message}',
|
||||
values: { name: entry.name, message: error.message },
|
||||
}),
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ const getDeletionSuccessMessage = (entry: Immutable<TrustedApp>) => {
|
|||
defaultMessage: 'Successfully removed',
|
||||
}),
|
||||
text: i18n.translate('xpack.securitySolution.trustedapps.deletionSuccess.text', {
|
||||
defaultMessage: '"{name}" has been removed from the Trusted Applications list.',
|
||||
defaultMessage: '"{name}" has been removed from the trusted applications list.',
|
||||
values: { name: entry?.name },
|
||||
}),
|
||||
};
|
||||
|
@ -55,7 +55,7 @@ const getCreationSuccessMessage = (entry: Immutable<NewTrustedApp>) => {
|
|||
text: i18n.translate(
|
||||
'xpack.securitySolution.trustedapps.createTrustedAppFlyout.successToastTitle',
|
||||
{
|
||||
defaultMessage: '"{name}" has been added to the Trusted Applications list.',
|
||||
defaultMessage: '"{name}" has been added to the trusted applications list.',
|
||||
values: { name: entry.name },
|
||||
}
|
||||
),
|
||||
|
|
|
@ -595,7 +595,7 @@ describe('When on the Trusted Apps Page', () => {
|
|||
|
||||
it('should show success toast notification', () => {
|
||||
expect(coreStart.notifications.toasts.addSuccess.mock.calls[0][0]).toEqual({
|
||||
text: '"Generated Exception (3xnng)" has been added to the Trusted Applications list.',
|
||||
text: '"Generated Exception (3xnng)" has been added to the trusted applications list.',
|
||||
title: 'Success!',
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue