use FormattedMessage instead of i18n.translate (#105841) (#105965)

This commit is contained in:
Greg Thompson 2021-07-16 11:44:14 -05:00 committed by GitHub
parent 7c280f27a8
commit 4463abf202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -712,11 +712,13 @@ export const getEuiContextMapping = () => {
defaultMessage: 'Next page, {page}',
values: { page },
}),
'euiPagination.pageOfTotalCompressed': ({ page, total }: EuiValues) =>
i18n.translate('core.euiPagination.pageOfTotalCompressed', {
defaultMessage: '{page} of {total}',
values: { page, total },
}),
'euiPagination.pageOfTotalCompressed': ({ page, total }: EuiValues) => (
<FormattedMessage
id="core.euiPagination.pageOfTotalCompressed"
defaultMessage="{page} of {total}"
values={{ page, total }}
/>
),
'euiPagination.previousPage': ({ page }: EuiValues) =>
i18n.translate('core.euiPagination.previousPage', {
defaultMessage: 'Previous page, {page}',