Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8004 (closed defect: wontfix)

Opened 1 year ago

Last modified 5 months ago

[PATCH] Fix for incorrect singularization for words ending in "series"

Reported by: daveverwer Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveSupport Version: edge
Severity: minor Keywords: singularize
Cc:

Description

Singularization of words ending in "series" was incorrect due to the special case for "series" itself, this included some reasonably commonly used words:

>> "series".singularize     => "series"     (correct)
>> "nurseries".singularize  => "nurseries"  (incorrect)
>> "miseries".singularize   => "miseries"   (incorrect)

The patch makes the original singular rule more specific to "series" itself which lets words like "miseries" and "nurseries" fall back to existing rules that work for them.

Note: Pluralization is not affected as the original rule is singular only.

Note: The inclusion of logic for hyphenated words ending in "series" may be too specific for a general patch, however without it this patch would have broken existing code which relied on singularization for things like "mini-series" so I have included it as it does not add any additional inflector rules.

Attachments

series_singularization_patch.diff (1.2 kB) - added by daveverwer on 04/05/07 05:04:34.
Patch diff

Change History

04/05/07 05:04:34 changed by daveverwer

  • attachment series_singularization_patch.diff added.

Patch diff

04/05/07 06:49:14 changed by daveverwer

More information on how the bug was found (real world example) and further discussion.

04/05/07 14:54:50 changed by josh

  • keywords changed from singularize to singularize verified.

04/12/07 02:32:04 changed by dcmanges

According to comments in #7199 inflections are "closed". I'll leave this open for somebody else to confirm.

04/18/07 18:04:28 changed by daveverwer

I can understand them being closed for additions but I would consider this a pure bug fix.

07/19/07 23:12:50 changed by mpalmer

  • keywords changed from singularize verified to singularize.

According to #7199, even bugfixes are closed off. I don't understand why, but I don't think this patch will make it in when #7199 didn't.

02/02/08 08:33:08 changed by kampers

  • status changed from new to closed.
  • resolution set to wontfix.

I'd suggest checking out the new acts_as_good_speeler plugin, which is very open for patches and overrides the built-in inflector.

Closing this since Inflector patches are still apparently closed, otherwise.