Skip to content

Commit

Permalink
[Metrics UI] Fix No Data preview pluralization (#74399)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Zacqary and elasticmachine authored Aug 10, 2020
1 parent 6eb0d11 commit 8f15621
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 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 {boldedResultsNumber} of no data."
values={{
noData: <strong>{previewResult.resultTotals.noData}</strong>,
boldedResultsNumber: (
<strong>
{i18n.translate(
'xpack.infra.metrics.alertFlyout.alertPreviewNoDataResultNumber',
{
defaultMessage:
'{noData, plural, one {was # result} other {were # results}}',
values: {
noData: previewResult.resultTotals.noData,
},
}
)}
</strong>
),
}}
/>
) : null}{' '}
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -8830,7 +8830,8 @@
"xpack.infra.metrics.alertFlyout.alertPreviewErrorResult": "一部のデータを評価するときにエラーが発生しました。",
"xpack.infra.metrics.alertFlyout.alertPreviewGroups": "{numberOfGroups} {groupName}",
"xpack.infra.metrics.alertFlyout.alertPreviewGroupsAcross": "すべてを対象にする",
"xpack.infra.metrics.alertFlyout.alertPreviewNoDataResult": "データがない {noData}結果がありました。",
"xpack.infra.metrics.alertFlyout.alertPreviewNoDataResult": "データがない {boldedResultsNumber}結果がありました。",
"xpack.infra.metrics.alertFlyout.alertPreviewNoDataResultNumber": "{noData}",
"xpack.infra.metrics.alertFlyout.alertPreviewResult": "このアラートは{firedTimes}回発生しました",
"xpack.infra.metrics.alertFlyout.alertPreviewResultLookback": "過去{lookback}",
"xpack.infra.metrics.alertFlyout.conditions": "条件",
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8832,7 +8832,8 @@
"xpack.infra.metrics.alertFlyout.alertPreviewErrorResult": "尝试评估部分数据时发生错误。",
"xpack.infra.metrics.alertFlyout.alertPreviewGroups": "{numberOfGroups} 个{groupName}",
"xpack.infra.metrics.alertFlyout.alertPreviewGroupsAcross": "在",
"xpack.infra.metrics.alertFlyout.alertPreviewNoDataResult": "存在 {noData} 个无数据结果。",
"xpack.infra.metrics.alertFlyout.alertPreviewNoDataResult": "存在 {boldedResultsNumber} 个无数据结果。",
"xpack.infra.metrics.alertFlyout.alertPreviewNoDataResultNumber": "{noData}",
"xpack.infra.metrics.alertFlyout.alertPreviewResult": "此告警将发生 {firedTimes}",
"xpack.infra.metrics.alertFlyout.alertPreviewResultLookback": "在过去 {lookback}。",
"xpack.infra.metrics.alertFlyout.conditions": "条件",
Expand Down

0 comments on commit 8f15621

Please sign in to comment.