git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@72 5ecf4fe2-1ee6-0310-87b1-e25e094e27de

This commit is contained in:
David Heinemeier Hansson 2004-12-07 15:35:50 +00:00
parent e7444da160
commit c63b2fef56
1 changed files with 13 additions and 12 deletions

View File

@ -63,17 +63,18 @@ module Inflector
def singular_rules #:doc: def singular_rules #:doc:
[ [
[/(x|ch|ss)es$/, '\1'], [/(x|ch|ss)es$/, '\1'],
[/([^aeiouy]|qu)ies$/, '\1y'], [/movies$/, 'movie'],
[/([lr])ves$/, '\1f'], [/([^aeiouy]|qu)ies$/, '\1y'],
[/([^f])ves$/, '\1fe'], [/([lr])ves$/, '\1f'],
[/(analy|ba|diagno|parenthe|progno|synop|the)ses$/, '\1sis'], [/([^f])ves$/, '\1fe'],
[/([ti])a$/, '\1um'], [/(analy|ba|diagno|parenthe|progno|synop|the)ses$/, '\1sis'],
[/people$/, 'person'], [/([ti])a$/, '\1um'],
[/men$/, 'man'], [/people$/, 'person'],
[/status$/, 'status'], [/men$/, 'man'],
[/children$/, 'child'], [/status$/, 'status'],
[/s$/, ''] [/children$/, 'child'],
] [/s$/, '']
]
end end
end end