From 7b7cc187e7f3f20939e8b60acd635f002e6cc61c Mon Sep 17 00:00:00 2001 From: slice Date: Mon, 16 Jul 2018 18:18:14 -0700 Subject: [PATCH] pluralize indicative in DegradedNotice comp --- priv/frontend/src/components/DegradedNotice.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/priv/frontend/src/components/DegradedNotice.js b/priv/frontend/src/components/DegradedNotice.js index d83777c..fe5e088 100644 --- a/priv/frontend/src/components/DegradedNotice.js +++ b/priv/frontend/src/components/DegradedNotice.js @@ -6,11 +6,13 @@ import './DegradedNotice.css' const DegradedNotice = ({ services }) => { const keys = Object.keys(services) const serviceNames = keys.join(', ') + const plural = keys.length === 1 ? '' : 's' + const indicative = keys.length === 1 ? 'is' : 'are' return (
-
{keys.length} service{plural} are unreachable
+
{keys.length} service{plural} {indicative} unreachable

elstat is having trouble contacting {serviceNames}.