Better singularize function

Nov 10, 2010 at 3:20 PM

What do you think on improving the singularize function?

I have a People property on my ViewModel, so I wanted to add a SelectedPerson to it, but the Singularize function in the ConventionManager just truncates the final "s" from the Name property...

I'd suggest using something like the singularize_en($word) function, presented on this page: http://drupal.org/files/issues/pluralize.patch

Your thoughts? :)

Coordinator
Nov 10, 2010 at 5:51 PM

I intentionally left out a full implementation in order to keep the framework small. It's pretty easy to plug in your own logic there if you need for that purpose. If you like, you can grab a full featured implementation from the full version of Caliburn here: http://caliburn.codeplex.com/SourceControl/changeset/view/56437#825262

Nov 10, 2010 at 5:58 PM

I did exactly that!!! :) :)