Repository navigation
Correct Polish plural for submission counts - #303
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The submission list header ("3 zgłoszeń") and the screen-reader count of each board column chose between
countSubmissionandcountSubmissionswithn === 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 throughIntl.PluralRules.countSubmissionsFewin all dictionaries: "zgłoszenia" in Polish, the regular plural in the other six.KanbanBoardusecountForm. The board gets the locale and the three forms through its labels.Tests
plural.test.ts: Polish 1, 2 to 4, 22, 34, 5, 11 to 14, 25, 100, English 1 and 3.fewbranch, 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.