diff --git a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx index 86ccd91331098c..6d605f25f6f683 100644 --- a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/ping_timestamp.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { i18n } from '@kbn/i18n'; import React, { useContext, useEffect, useState } from 'react'; import useIntersection from 'react-use/lib/useIntersection'; import styled from 'styled-components'; @@ -16,6 +15,7 @@ import { NavButtons } from './nav_buttons'; import { NoImageDisplay } from './no_image_display'; import { StepImageCaption } from './step_image_caption'; import { StepImagePopover } from './step_image_popover'; +import { formatCaptionContent } from './translations'; const StepDiv = styled.div` figure.euiImage { @@ -76,13 +76,7 @@ export const PingTimestamp = ({ timestamp, ping }: Props) => { const imgSrc = stepImages[stepNumber] || data?.src; - const captionContent = i18n.translate('xpack.uptime.synthetics.pingTimestamp.captionContent', { - defaultMessage: 'Step: {stepNumber} {stepName}', - values: { - stepNumber, - stepName: data?.stepName, - }, - }); + const captionContent = formatCaptionContent(stepNumber, data?.maxSteps); const ImageCaption = ( = ({ isOpen={isImagePopoverOpen} > diff --git a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/translations.ts b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/translations.ts index 6e526f42071ec4..ad49143a680572 100644 --- a/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/translations.ts +++ b/x-pack/plugins/uptime/public/components/monitor/ping_list/columns/ping_timestamp/translations.ts @@ -20,3 +20,16 @@ export const imageLoadingSpinnerAriaLabel = i18n.translate( defaultMessage: 'An animated spinner indicating the image is loading', } ); + +export const fullSizeImageAlt = i18n.translate('xpack.uptime.synthetics.thumbnail.fullSize.alt', { + defaultMessage: `A larger version of the screenshot for this journey step's thumbnail.`, +}); + +export const formatCaptionContent = (stepNumber: number, stepName?: number) => + i18n.translate('xpack.uptime.synthetics.pingTimestamp.captionContent', { + defaultMessage: 'Step: {stepNumber} {stepName}', + values: { + stepNumber, + stepName, + }, + });