We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bd8716 commit 4e00747Copy full SHA for 4e00747
packages/react-devtools-shared/src/devtools/views/utils.js
@@ -205,6 +205,27 @@ export function pluralize(word: string): string {
205
return word;
206
}
207
208
+ // Bail out if it's already plural.
209
+ switch (word) {
210
+ case 'men':
211
+ case 'women':
212
+ case 'children':
213
+ case 'feet':
214
+ case 'teeth':
215
+ case 'mice':
216
+ case 'people':
217
+ return word;
218
+ }
219
+
220
+ if (
221
+ /(ches|shes|ses|xes|zes)$/i.test(word) ||
222
+ /[^s]ies$/i.test(word) ||
223
+ /ves$/i.test(word) ||
224
+ /[^s]s$/i.test(word)
225
+ ) {
226
227
228
229
switch (word) {
230
case 'man':
231
return 'men';
0 commit comments