Skip to content

Commit

Permalink
[Metrics UI] Fix No Data preview pluralization
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacqary committed Aug 5, 2020
1 parent e23c5ea commit 07fa4da
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,22 @@ export const AlertPreview: React.FC<Props> = (props) => {
{showNoDataResults && previewResult.resultTotals.noData ? (
<FormattedMessage
id="xpack.infra.metrics.alertFlyout.alertPreviewNoDataResult"
defaultMessage="There {noData, plural, one {was # result} other {were # results}} of no data."
defaultMessage="There {noDataNumberForPluralization, plural, one {was} other {were}} {boldedResultsNumber} of no data."
values={{
noData: <strong>{previewResult.resultTotals.noData}</strong>,
noDataNumberForPluralization: previewResult.resultTotals.noData,
boldedResultsNumber: (
<strong>
{i18n.translate(
'xpack.infra.metrics.alertFlyout.alertPreviewNoDataResultNumber',
{
defaultMessage: '{noData, plural, one {# result} other {# results}}',
values: {
noData: previewResult.resultTotals.noData,
},
}
)}
</strong>
),
}}
/>
) : null}{' '}
Expand Down

0 comments on commit 07fa4da

Please sign in to comment.