I like how LinkedIn is a company with 20 billion in revenue, over 18 thousand employees, owned by the mega-giant Microsoft, and yet they still send me emails like "You appeared in 1 searches this week"
correction:
NONE OF THOSE 18,500 EMPLOYEE KNOW HOW TO WRITE PLURALIZATION CODE, EH?
@foone They probably fired the one employee(s) who pointed out the problem for being too (in)efficient and (ir)relevant.
@foone You made me check. Perl has had this stuff since 1998: https://metacpan.org/release/DCONWAY/Lingua-EN-Inflect-1.02/view/lib/Lingua/EN/Inflect.pm
@barubary and gettext has has ngettext() since... approximately forever. I'm not actually sure. I think as far back as 1993?
In any case, this is a very solved problem, especially in the modern era: You're gonna localize your code, right? and the localization platform is gonna handle plurals, that's just how it works
@foone I fix this shit on Wikipedia regularly lol. LinkedIn should be able to figure this shit out.
@foone Imma be honest with you, I write my localisations in Tcl and the plurilisation code is... not elegant... I have been in the business for more than a decade and I teach people now and I still feel I am doing this wrong
@foone it could be worse, for a long time the electronic bay website used to send me emails for my saved searches with ”1 new matche” in the body (the subject just said “1 NEW:”)
@foone or even just use some fuckin parenthesis
@foone it's simple, you put the s in parentheses. Then the reader pluralizes it as needed.
NONE OF THOSE 18,500 EMPLOYEES KNOW HOW TO WRITE PLURALIZATION CODE, EH?