fix(apps): "1 updates available" reads "1 update available", page strings pick their plural form

Merged
TE
5d ago
+417-65

The Apps page's update count read "1 updates available": its string is one catalog entry for every count, and page strings (Strings.format) had no way to pick a plural form, though the generated tables already carry them (key#<category>, gen-strings.mjs; the agent pane picks one in its own translate).

Fix: createStrings(...).format(key, count, ...) takes the form the language's plural rules pick for the first argument when the key is a plural string (its key#other is in the table); other keys format as before. store.updates.available becomes a plural catalog entry with every category each of the 21 locales' rules use (English "1 update available" / "N updates available"; Arabic, Bosnian, Polish, Russian and Ukrainian get their few and many forms; Romance languages their many). The existing translations stay as each locale's other; the new forms are marked needs_review like the rest of the entry.

Tests: src/pages/shared/i18n.test.ts (English picks one and other, Russian one, few, many and 21 as one, a non-plural key formats as before); the Apps page and the generated tables still build.

Not changed: other page strings that carry a count have none today (this is the only %@ things entry in this catalog).

Risk: low. Only a plural key's text changes; the new translations need a native-speaker pass, which needs_review records.

🤖 Generated with Claude Code

Agent session: agent session


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the Apps page so "1 updates available" reads "1 update available" and other counts use the correct plural form per locale.

  • createStrings(...).format() now picks the plural form the language's rules select for the count when the key is a plural entry (key#other exists in the table); non-plural keys format as before.
  • store.updates.available becomes a plural catalog entry with forms for all categories across the 21 locales; existing translations are kept as other, new forms are marked needs_review.
  • Adds tests covering one-vs-other selection, Russian one/few/many, and unchanged behavior for non-plural keys.