Skip to content

Commit

Permalink
Merge pull request #189 from gquemener/al-exception-french
Browse files Browse the repository at this point in the history
Supports french pluralization of -al exceptions
  • Loading branch information
greg0ire committed Oct 14, 2021
2 parents 8e397a6 + a641660 commit 41260af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Doctrine/Inflector/Rules/French/Inflectible.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static function getPlural(): iterable
yield new Transformation(new Pattern('/(s|x|z)$/'), '\1');
yield new Transformation(new Pattern('/(b|cor|ém|gemm|soupir|trav|vant|vitr)ail$/'), '\1aux');
yield new Transformation(new Pattern('/ail$/'), 'ails');
yield new Transformation(new Pattern('/(chacal|carnaval|festival|récital)$/'), '\1s');
yield new Transformation(new Pattern('/al$/'), 'aux');
yield new Transformation(new Pattern('/(bleu|émeu|landau|pneu|sarrau)$/'), '\1s');
yield new Transformation(new Pattern('/(bijou|caillou|chou|genou|hibou|joujou|lieu|pou|au|eu|eau)$/'), '\1x');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function dataSampleWords(): array
['monsieur', 'messieurs'],
['madame', 'mesdames'],
['mademoiselle', 'mesdemoiselles'],
['chacal', 'chacals'],
['carnaval', 'carnavals'],
['festival', 'festivals'],
['récital', 'récitals'],
];
}

Expand Down

0 comments on commit 41260af

Please sign in to comment.