More avoidance of plurals to describe singular lists
authorCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 15:34:32 +0000 (08:34 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 15:34:32 +0000 (08:34 -0700)
And I'm not worrying about internationalization here.

empathy/empathy.jsx

index 3869b3a249f12ff169a62e7dca85a789c4beb2da..e887b1b8b9b1af33ddc76aa751613f66a2253205 100644 (file)
@@ -570,13 +570,16 @@ class Ambiguities extends React.PureComponent {
     }
 
     let still_waiting = null;
-    if (Object.keys(this.props.players_judging).length) {
+    const judging_players = Object.keys(this.props.players_judging);
+    if (judging_players.length) {
       still_waiting = [
         <p>
-          Still waiting for the following players:
+          Still waiting for the following player
+          {judging_players.length > 1 ? 's' : '' }
+          :
         </p>,
         <ul>
-          {Object.keys(this.props.players_judging).map(player => {
+          {judging_players.map(player => {
             return (
               <li
                 key={player}
@@ -740,13 +743,16 @@ class ActivePrompt extends React.PureComponent {
     }
 
     let still_waiting = null;
-    if (Object.keys(this.props.players_answering).length) {
+    const answering_players = Object.keys(this.props.players_answering);;
+    if (answering_players.length) {
       still_waiting = [
         <p>
-          Still waiting for the following players:
+          Still waiting for the following player
+          {answering_players.length > 1 ? 's' : ''}
+          :
         </p>,
         <ul>
-           {Object.keys(this.props.players_answering).map(player => {
+           {answering_players.map(player => {
              return (
                <li
                  key={player}