Skip to content

Commit

Permalink
[8.14] Fix time picker not to show `[object Object]` (#182152
Browse files Browse the repository at this point in the history
…) (#183022)

# Backport

This will backport the following commits from `main` to `8.14`:
- [Fix time picker not to show `[object Object]`
(#182152)](#182152)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Youhei
Sakurai","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-09T10:08:07Z","message":"Fix
time picker not to show `[object Object]` (#182152)\n\n##
Summary\r\n\r\nThis PR fixes one i18n mapping for EUI to render the
`dateFormat` = `MMM\r\nD, YYYY @ HH:mm:ss.SSS` correctly at the
bottom.\r\n\r\nNote: It showed `[object Object]` instead of `MMM D, YYYY
@\r\nHH:mm:ss.SSS` before this fix.\r\n\r\nFixes
https://github.com/elastic/kibana/issues/182099\r\n\r\n## Release
note\r\n\r\nFixes time picker to show allowed formats properly in
absolute tabs.\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"50d674867bdf1af37f6b61a89151e52c5da2bdbd","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-minor","v8.15.0"],"title":"Fix
time picker not to show `[object
Object]`","number":182152,"url":"https://github.com/elastic/kibana/pull/182152","mergeCommit":{"message":"Fix
time picker not to show `[object Object]` (#182152)\n\n##
Summary\r\n\r\nThis PR fixes one i18n mapping for EUI to render the
`dateFormat` = `MMM\r\nD, YYYY @ HH:mm:ss.SSS` correctly at the
bottom.\r\n\r\nNote: It showed `[object Object]` instead of `MMM D, YYYY
@\r\nHH:mm:ss.SSS` before this fix.\r\n\r\nFixes
https://github.com/elastic/kibana/issues/182099\r\n\r\n## Release
note\r\n\r\nFixes time picker to show allowed formats properly in
absolute tabs.\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"50d674867bdf1af37f6b61a89151e52c5da2bdbd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182152","number":182152,"mergeCommit":{"message":"Fix
time picker not to show `[object Object]` (#182152)\n\n##
Summary\r\n\r\nThis PR fixes one i18n mapping for EUI to render the
`dateFormat` = `MMM\r\nD, YYYY @ HH:mm:ss.SSS` correctly at the
bottom.\r\n\r\nNote: It showed `[object Object]` instead of `MMM D, YYYY
@\r\nHH:mm:ss.SSS` before this fix.\r\n\r\nFixes
https://github.com/elastic/kibana/issues/182099\r\n\r\n## Release
note\r\n\r\nFixes time picker to show allowed formats properly in
absolute tabs.\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"50d674867bdf1af37f6b61a89151e52c5da2bdbd"}}]}]
BACKPORT-->

Co-authored-by: Youhei Sakurai <[email protected]>
  • Loading branch information
kibanamachine and sakurai-youhei authored May 9, 2024
1 parent ef0c718 commit 23ed120
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1375,11 +1375,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) => (
<FormattedMessage
id="core.euiAbsoluteTab.dateFormatError"
defaultMessage="Allowed formats: {dateFormat}, ISO 8601, RFC 2822, or Unix timestamp."
values={{ dateFormat }}
/>
),
'euiRelativeTab.fullDescription': ({ unit }: EuiValues) =>
i18n.translate('core.euiRelativeTab.fullDescription', {
defaultMessage: 'The unit is changeable. Currently set to {unit}.',
Expand Down

0 comments on commit 23ed120

Please sign in to comment.