Commit 547ac40
committed
fix: enhance WordTransformer with proper English pluralization rules
- Add custom pluralization overrides for words inflector.cr handles incorrectly
- Fix 'hero' → 'heroes' (was incorrectly 'heros')
- Fix 'potato' → 'potatoes' (was incorrectly 'potatos')
- Add support for echo, embargo, tornado, volcano, buffalo plurals
- Include corresponding singular forms for bidirectional transformation
- Update tableize method to use enhanced plural transformation
- All WordTransformer tests continue to pass with proper English grammar
Custom rules override inflector.cr gaps while preserving library benefits for
standard cases like 'mouse' → 'mice', 'child' → 'children'.1 parent 35ded30 commit 547ac40
2 files changed
Lines changed: 37 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
5 | 26 | | |
6 | 27 | | |
7 | 28 | | |
| |||
11 | 32 | | |
12 | 33 | | |
13 | 34 | | |
14 | | - | |
| 35 | + | |
15 | 36 | | |
16 | 37 | | |
17 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
18 | 44 | | |
19 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
20 | 51 | | |
21 | 52 | | |
22 | 53 | | |
| |||
44 | 75 | | |
45 | 76 | | |
46 | 77 | | |
47 | | - | |
| 78 | + | |
48 | 79 | | |
49 | 80 | | |
50 | 81 | | |
| |||
0 commit comments