Skip to content

Correct Polish plural for submission counts - #303

Merged
Musiker15 merged 2 commits into
mainfrom
fix/polish-submission-plural
Oct 29, 2026
Merged

Musiker15 merged 2 commits into
mainfrom
fix/polish-submission-plural

Conversation

@Musiker15

Copy link
Copy Markdown
Member

Problem

The submission list header ("3 zgłoszeń") and the screen-reader count of each board column chose between countSubmission and countSubmissions with n === 1. Polish needs a third form for 2 to 4, 22 to 24 and so on: "3 zgłoszenia".

Fix

  • lib/plural.ts: countForm(count, locale, { one, few, other }) picks the form through Intl.PluralRules.
  • New key countSubmissionsFew in all dictionaries: "zgłoszenia" in Polish, the regular plural in the other six.
  • Submission list header and KanbanBoard use countForm. The board gets the locale and the three forms through its labels.
  • Side effect: French and Portuguese treat 0 as singular, as CLDR says ("0 soumission").

Tests

  • plural.test.ts: Polish 1, 2 to 4, 22, 34, 5, 11 to 14, 25, 100, English 1 and 3.
  • Counter-check: without the few branch, the Polish test fails.
  • pnpm --filter @msk-forms/web typecheck, eslint and prettier on the changed files.

Note: #296 changes the same header line (count from total). Whichever merges second needs a small rebase.

The submission list header and the board columns picked the noun with
count === 1, which covers English but not Polish: 2 to 4 (and 22 to 24 and
so on) need "zgłoszenia", not "zgłoszeń".

countForm() in lib/plural.ts picks the form by Intl.PluralRules, and each
dictionary gets a countSubmissionsFew entry ("zgłoszenia" in Polish, the
plural everywhere else). As a side effect French and Portuguese now follow
CLDR for zero as well.
…-plural

# Conflicts:
#	apps/web/src/app/dashboard/[guildId]/submissions/page.tsx
@Musiker15
Musiker15 merged commit 3e803a7 into main Oct 29, 2026
4 checks passed
@Musiker15
Musiker15 deleted the fix/polish-submission-plural branch October 29, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant