@@ -180,7 +180,7 @@ @implementation TTTStringInflector (Localization)
180
180
181
181
/* *
182
182
Inflection rules adapted from Active Support
183
- Copyright (c) 2005-2012 David Heinemeier Hansson
183
+ Copyright (c) 2005-2020 David Heinemeier Hansson
184
184
185
185
Permission is hereby granted, free of charge, to any person obtaining
186
186
a copy of this software and associated documentation files (the
@@ -228,6 +228,8 @@ - (void)addPluralizationRulesForEnUSLocale {
228
228
[self addSingularRule: @" (ss)$" withReplacement: @" $1" ];
229
229
[self addSingularRule: @" (n)ews$" withReplacement: @" $1ews" ];
230
230
[self addSingularRule: @" ([ti])a$" withReplacement: @" $1um" ];
231
+ [self addSingularRule: @" ((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$" withReplacement: @" $1sis" ];
232
+ [self addSingularRule: @" (^analy)(sis|ses)$$" withReplacement: @" $1sis" ];
231
233
[self addSingularRule: @" ([^f])ves$" withReplacement: @" $1fe" ];
232
234
[self addSingularRule: @" (hive)s$" withReplacement: @" $1" ];
233
235
[self addSingularRule: @" (tive)s$" withReplacement: @" $1" ];
@@ -255,7 +257,6 @@ - (void)addPluralizationRulesForEnUSLocale {
255
257
[self addIrregularWithSingular: @" child" plural: @" children" ];
256
258
[self addIrregularWithSingular: @" sex" plural: @" sexes" ];
257
259
[self addIrregularWithSingular: @" move" plural: @" moves" ];
258
- [self addIrregularWithSingular: @" cow" plural: @" cattle" ];
259
260
[self addIrregularWithSingular: @" zombie" plural: @" zombies" ];
260
261
261
262
[self addUncountable: @" equipment" ];
@@ -267,6 +268,7 @@ - (void)addPluralizationRulesForEnUSLocale {
267
268
[self addUncountable: @" fish" ];
268
269
[self addUncountable: @" sheep" ];
269
270
[self addUncountable: @" jeans" ];
271
+ [self addUncountable: @" police" ];
270
272
}
271
273
272
274
@end
0 commit comments