From 8703ed6e8af48006378a809469e43ef7451c019f Mon Sep 17 00:00:00 2001 From: Justin Shroeder Date: Wed, 29 Jun 2016 11:05:01 -0400 Subject: [PATCH 1/2] Adds oes support for potato/potatoes, volcano/volcanoes, hero/heroes --- lib/inflections/en.php | 2 +- tests/cases/singular_to_plural.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/inflections/en.php b/lib/inflections/en.php index 6764837..ce4d279 100644 --- a/lib/inflections/en.php +++ b/lib/inflections/en.php @@ -25,7 +25,7 @@ ->plural('/^(ax|test)is$/i', '\1es') ->plural('/(alias|status)$/i', '\1es') ->plural('/(bu)s$/i', '\1ses') - ->plural('/(buffal|tomat)o$/i', '\1oes') + ->plural('/(buffal|tomat|potat|volcan|her)o$/i', '\1oes') ->plural('/([ti])um$/i', '\1a') ->plural('/([ti])a$/i', '\1a') ->plural('/sis$/i', 'ses') diff --git a/tests/cases/singular_to_plural.php b/tests/cases/singular_to_plural.php index 58620c5..3954724 100755 --- a/tests/cases/singular_to_plural.php +++ b/tests/cases/singular_to_plural.php @@ -75,6 +75,9 @@ "photo" => "photos", "buffalo" => "buffaloes", "tomato" => "tomatoes", + "potato" => "potatoes", + "volcano" => "volcanoes", + "hero" => "heroes", "dwarf" => "dwarves", "elf" => "elves", "information" => "information", @@ -121,5 +124,5 @@ "half" => "halves", "knife" => "knives", "leaf" => "leaves", - "loaf" => "loaves" + "loaf" => "loaves", ); From a01f479b5d2f67fad936ba333f5cdc848b7184de Mon Sep 17 00:00:00 2001 From: Justin Shroeder Date: Wed, 29 Jun 2016 11:07:51 -0400 Subject: [PATCH 2/2] Adds oes support for potato/potatoes, volcano/volcanoes, hero/heroes --- tests/cases/singular_to_plural.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cases/singular_to_plural.php b/tests/cases/singular_to_plural.php index 3954724..3b0869a 100755 --- a/tests/cases/singular_to_plural.php +++ b/tests/cases/singular_to_plural.php @@ -124,5 +124,5 @@ "half" => "halves", "knife" => "knives", "leaf" => "leaves", - "loaf" => "loaves", + "loaf" => "loaves" );