// Package words says counts in English for what the server writes to people: // notifications, emails, the reasons a scan or a match gives. package words import "strconv" // Count says n with the noun that agrees with it: "1 track", "3 tracks". The // noun may carry its verb ("track went missing" / "tracks went missing"). // The web app's plural() is the same thing on the other side (M505). func Count[N ~int | ~int32 | ~int64](n N, one, many string) string { if n == 1 { return "1 " + one } return strconv.FormatInt(int64(n), 10) + " " + many }