Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metrics UI] Fix No Data preview pluralization #74399

Merged
merged 4 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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