diff --git a/src/PrintHelper.jl b/src/PrintHelper.jl index 96d7277b03..5dc3daf9d8 100644 --- a/src/PrintHelper.jl +++ b/src/PrintHelper.jl @@ -35,6 +35,9 @@ function pluralize(noun::String) # maximum -> maxima endswith(noun, "um") && return noun[1:end-2] * "a" + # patch -> patches + endswith(noun, "tch") && return noun * "es" + # family -> families # variety -> varieties endswith(noun, "y") && !(noun[end-1] in "aeiouy") && return noun[1:end-1] * "ies" diff --git a/test/PrintHelper-test.jl b/test/PrintHelper-test.jl index a95111db8d..d3ea885806 100644 --- a/test/PrintHelper-test.jl +++ b/test/PrintHelper-test.jl @@ -5,6 +5,7 @@ @test pluralize("indeterminate") == "indeterminates" @test pluralize("matrix") == "matrices" @test pluralize("maximum") == "maxima" + @test pluralize("patch") == "patches" @test pluralize("polyhedron") == "polyhedra" @test pluralize("tetrahedron") == "tetrahedra" @test pluralize("variable") == "variables"