From 50d674867bdf1af37f6b61a89151e52c5da2bdbd Mon Sep 17 00:00:00 2001 From: Youhei Sakurai Date: Thu, 9 May 2024 19:08:07 +0900 Subject: [PATCH] Fix time picker not to show `[object Object]` (#182152) ## Summary This PR fixes one i18n mapping for EUI to render the `dateFormat` = `MMM D, YYYY @ HH:mm:ss.SSS` correctly at the bottom. Note: It showed `[object Object]` instead of `MMM D, YYYY @ HH:mm:ss.SSS` before this fix. Fixes https://github.com/elastic/kibana/issues/182099 ## Release note Fixes time picker to show allowed formats properly in absolute tabs. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../src/i18n_eui_mapping.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index d01f439fbb978..c7d290f3af603 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -1389,11 +1389,13 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'core.euiDatePopoverContent.nowTabButtonEnd', { defaultMessage: 'Set end date and time to now' } ), - 'euiAbsoluteTab.dateFormatError': ({ dateFormat }: EuiValues) => - i18n.translate('core.euiAbsoluteTab.dateFormatError', { - defaultMessage: 'Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp.', - values: { dateFormat }, - }), + 'euiAbsoluteTab.dateFormatError': ({ dateFormat }: EuiValues) => ( + + ), 'euiRelativeTab.fullDescription': ({ unit }: EuiValues) => i18n.translate('core.euiRelativeTab.fullDescription', { defaultMessage: 'The unit is changeable. Currently set to {unit}.',