From 8be1d484951ff5ca995eaf8edcbcb8b9a5888450 Mon Sep 17 00:00:00 2001 From: Alexander Hofbauer Date: Thu, 1 Aug 2024 12:21:22 +0200 Subject: [PATCH 1/2] [String][EnglishInflector] Fix words ending in 'le', e.g., articles --- Inflector/EnglishInflector.php | 3 +++ Tests/Inflector/EnglishInflectorTest.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Inflector/EnglishInflector.php b/Inflector/EnglishInflector.php index 77ebc13..9557e35 100644 --- a/Inflector/EnglishInflector.php +++ b/Inflector/EnglishInflector.php @@ -121,6 +121,9 @@ final class EnglishInflector implements InflectorInterface // statuses (status) ['sesutats', 8, true, true, 'status'], + // article (articles), ancle (ancles) + ['sel', 3, true, true, 'le'], + // analyses (analysis), ellipses (ellipsis), fungi (fungus), // neuroses (neurosis), theses (thesis), emphases (emphasis), // oases (oasis), crises (crisis), houses (house), bases (base), diff --git a/Tests/Inflector/EnglishInflectorTest.php b/Tests/Inflector/EnglishInflectorTest.php index fb5d043..47bb5ae 100644 --- a/Tests/Inflector/EnglishInflectorTest.php +++ b/Tests/Inflector/EnglishInflectorTest.php @@ -28,10 +28,12 @@ public static function singularizeProvider() ['alumnae', 'alumna'], ['alumni', 'alumnus'], ['analyses', ['analys', 'analyse', 'analysis']], + ['ankles', 'ankle'], ['antennae', 'antenna'], ['antennas', 'antenna'], ['appendices', ['appendex', 'appendix', 'appendice']], ['arches', ['arch', 'arche']], + ['articles', 'article'], ['atlases', ['atlas', 'atlase', 'atlasis']], ['axes', ['ax', 'axe', 'axis']], ['babies', 'baby'], @@ -189,9 +191,11 @@ public static function pluralizeProvider() ['album', 'albums'], ['alumnus', 'alumni'], ['analysis', 'analyses'], + ['ankle', 'ankles'], ['antenna', 'antennas'], // antennae ['appendix', ['appendicies', 'appendixes']], ['arch', 'arches'], + ['article', 'articles'], ['atlas', 'atlases'], ['axe', 'axes'], ['axis', 'axes'], From 37188300067dda3c2711b870e03a523d1b3e7db1 Mon Sep 17 00:00:00 2001 From: Thomas Durand Date: Mon, 29 Jul 2024 18:11:56 +0200 Subject: [PATCH 2/2] [String] Fixed Quorum plural, that was inflected to be only "Quora" and never "Quorums" --- Inflector/EnglishInflector.php | 6 ++++++ Tests/Inflector/EnglishInflectorTest.php | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Inflector/EnglishInflector.php b/Inflector/EnglishInflector.php index 77ebc13..dee05be 100644 --- a/Inflector/EnglishInflector.php +++ b/Inflector/EnglishInflector.php @@ -37,6 +37,9 @@ final class EnglishInflector implements InflectorInterface // curricula (curriculum) ['alucirruc', 9, true, true, 'curriculum'], + // quora (quorum) + ['arouq', 5, true, true, 'quorum'], + // genera (genus) ['areneg', 6, true, true, 'genus'], @@ -265,6 +268,9 @@ final class EnglishInflector implements InflectorInterface // albums (album) ['mubla', 5, true, true, 'albums'], + // quorums (quorum) + ['murouq', 6, true, true, ['quora', 'quorums']], + // bacteria (bacterium), curricula (curriculum), media (medium), memoranda (memorandum), phenomena (phenomenon), strata (stratum) ['mu', 2, true, true, 'a'], diff --git a/Tests/Inflector/EnglishInflectorTest.php b/Tests/Inflector/EnglishInflectorTest.php index fb5d043..cfe8d37 100644 --- a/Tests/Inflector/EnglishInflectorTest.php +++ b/Tests/Inflector/EnglishInflectorTest.php @@ -134,6 +134,8 @@ public static function singularizeProvider() ['poppies', 'poppy'], ['prices', ['prex', 'prix', 'price']], ['quizzes', 'quiz'], + ['quora', 'quorum'], + ['quorums', 'quorum'], ['radii', 'radius'], ['roofs', 'roof'], ['roses', ['ros', 'rose', 'rosis']], @@ -285,6 +287,7 @@ public static function pluralizeProvider() ['poppy', 'poppies'], ['price', 'prices'], ['quiz', 'quizzes'], + ['quorum', ['quora', 'quorums']], ['radius', 'radii'], ['roof', ['roofs', 'rooves']], ['rose', 'roses'],