Currently, {chk} messages and errors cannot handle the plural for "class" correctly. It can handle "directory" properly:
> message_chk("There %r %n problem director%y%s.", n = 1)
[1] "There is 1 problem directory."
> message_chk("There %r %n problem director%y%s.", n = 2)
[1] "There are 2 problem directories."
to match this behaviour, we would have to allow the %s%ses or %%es syntax to work so that we can switch between "class" and "classes".
> message_chk("There %r %n problem clas%s%es.", n = 1)
[1] "There is 1 problem clas%es."
> message_chk("There %r %n problem clas%s%es.", n = 2)
[1] "There are 2 problem class%es."
> message_chk("There %r %n problem class%%es.", n = 1)
[1] "There is 1 problem class%%es."
> message_chk("There %r %n problem class%%es.", n = 2)
[1] "There are 2 problem class%%es."
Alternatively we could add something like what {cli} does with "director{?y/ies}" to add irregular plurals (e.g., "clas%{s/ses}") and avoid breaking existing functionality.
Currently,
{chk}messages and errors cannot handle the plural for "class" correctly. It can handle "directory" properly:to match this behaviour, we would have to allow the
%s%sesor%%essyntax to work so that we can switch between "class" and "classes".Alternatively we could add something like what
{cli}does with"director{?y/ies}"to add irregular plurals (e.g.,"clas%{s/ses}") and avoid breaking existing functionality.