Skip to content

Commit 07fa4da

Browse files
committed
[Metrics UI] Fix No Data preview pluralization
1 parent e23c5ea commit 07fa4da

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

x-pack/plugins/infra/public/alerting/common/components/alert_preview.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,22 @@ export const AlertPreview: React.FC<Props> = (props) => {
186186
{showNoDataResults && previewResult.resultTotals.noData ? (
187187
<FormattedMessage
188188
id="xpack.infra.metrics.alertFlyout.alertPreviewNoDataResult"
189-
defaultMessage="There {noData, plural, one {was # result} other {were # results}} of no data."
189+
defaultMessage="There {noDataNumberForPluralization, plural, one {was} other {were}} {boldedResultsNumber} of no data."
190190
values={{
191-
noData: <strong>{previewResult.resultTotals.noData}</strong>,
191+
noDataNumberForPluralization: previewResult.resultTotals.noData,
192+
boldedResultsNumber: (
193+
<strong>
194+
{i18n.translate(
195+
'xpack.infra.metrics.alertFlyout.alertPreviewNoDataResultNumber',
196+
{
197+
defaultMessage: '{noData, plural, one {# result} other {# results}}',
198+
values: {
199+
noData: previewResult.resultTotals.noData,
200+
},
201+
}
202+
)}
203+
</strong>
204+
),
192205
}}
193206
/>
194207
) : null}{' '}

0 commit comments

Comments
 (0)