Skip to content

Commit

Permalink
Differentiate singular vs plural for document count
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry350 committed Apr 27, 2020
1 parent aeaac32 commit e3f201c
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ const documentCountPrefix = i18n.translate('xpack.infra.logs.alertFlyout.documen
defaultMessage: 'when',
});

const documentCountValue = i18n.translate('xpack.infra.logs.alertFlyout.documentCountValue', {
defaultMessage: 'Log entries',
});

const getComparatorOptions = (): Array<{
value: Comparator;
text: string;
Expand All @@ -55,6 +51,11 @@ export const DocumentCount: React.FC<Props> = ({ comparator, value, updateCount,
const [isComparatorPopoverOpen, setComparatorPopoverOpenState] = useState(false);
const [isValuePopoverOpen, setIsValuePopoverOpen] = useState(false);

const documentCountValue = i18n.translate('xpack.infra.logs.alertFlyout.documentCountValue', {
defaultMessage: '{value, plural, one {log entry} other {log entries}}',
values: { value },
});

return (
<EuiFlexGroup gutterSize="s">
<EuiFlexItem grow={false}>
Expand Down

0 comments on commit e3f201c

Please sign in to comment.