Code RoomNotification summary pluralization i18n
MediumPrep Room Coding #4451

Notification summary pluralization i18n

Vibe & agenticAlgorithms & data structuresMid–Senior~15 min

An AI agent wrote this notification-summary helper for a messaging app being localized into 12 languages. It passes the English tests. What's wrong with the approach for translation, and how should it be built?

Implement
select_plural_categories(locale: str, counts: list[int]) → list[str]
Examples
in["en",[0,1,2,5]]out["other","one","other","other"]
in["pl",[1,2,5,22,25]]out["one","few","many","few","many"]
in["ar",[0,1,2,3,11,100]]out["zero","one","two","few","many","other"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 15 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.