Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix pluralization of Objective.
Fixes #3921
  • Loading branch information
markstory committed Jul 17, 2013
1 parent aa18a53 commit 7b5122a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/Cake/Test/Case/Utility/InflectorTest.php
Expand Up @@ -117,6 +117,7 @@ public function testInflectingSingulars() {
$this->assertEquals(Inflector::singularize('teeth'), 'tooth');
$this->assertEquals(Inflector::singularize('geese'), 'goose');
$this->assertEquals(Inflector::singularize('feet'), 'foot');
$this->assertEquals(Inflector::singularize('objectives'), 'objective');

$this->assertEquals(Inflector::singularize(''), '');
}
Expand Down Expand Up @@ -177,6 +178,7 @@ public function testInflectingPlurals() {
$this->assertEquals(Inflector::pluralize('tooth'), 'teeth');
$this->assertEquals(Inflector::pluralize('goose'), 'geese');
$this->assertEquals(Inflector::pluralize('foot'), 'feet');
$this->assertEquals(Inflector::pluralize('objective'), 'objectives');
$this->assertEquals(Inflector::pluralize(''), '');
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Inflector.php
Expand Up @@ -125,9 +125,9 @@ class Inflector {
'/(m)ovies$/i' => '\1\2ovie',
'/(s)eries$/i' => '\1\2eries',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/(tive)s$/i' => '\1',
'/([lre])ves$/i' => '\1f',
'/([^fo])ves$/i' => '\1fe',
'/(tive)s$/i' => '\1',
'/(hive)s$/i' => '\1',
'/(drive)s$/i' => '\1',
'/(^analy)ses$/i' => '\1sis',
Expand Down

2 comments on commit 7b5122a

@dereuromark
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will someone update inflector.cakephp.org to work with the current 2.4 branch - including the changes?
I already made the necessary code changes - someone just have to deploy em :)

@markstory
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure how that site gets deployed. Hopefully its a jenkins task that does the work on push.

Please sign in to comment.