Repository navigation
Fix Slovenian plural forms for counts such as 11, 12, 13, 21, and 22 - #248
Merged
Merged
Conversation
EvanHahn
requested changes
Nov 25, 2026
EvanHahn
left a comment
Owner
There was a problem hiding this comment.
Could you:
- Rebase off the latest
main. - Update the tests: the changed outputs ("11 tednov", "12 tednov", "22 tednov") and the string
tednovare never asserted.
Other than that, this PR looks good to me!
Slovenian picks the form from the last two digits (1 and 101 are singular, 2 and 102 dual, 3, 4, 103, and 104 plural, the rest genitive plural), but most units checked the last digit only. That gave "21 leto" instead of "21 let", "12 minuti" instead of "12 minut", and "13 ure" instead of "13 ur". Days already used the last two digits. Fractional counts are unchanged.
zzoraemon043
force-pushed
the
fix/slovenian-plural-forms
branch
from
November 25, 2026 15:12
37ca5e4 to
7b73a8a
Compare
Contributor
Author
|
Rebased on main. Weeks never get past 4 in the |
Contributor
Author
|
Moved it into |
Owner
|
This has been deployed in |
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.
Slovenian picks the plural form from the last two digits: 1, 101 singular; 2, 102 dual; 3, 4, 103, 104 plural; everything else (including 11-14 and 21-24) genitive plural. Most
slunits checked only the last digit, so:humanizeDuration(21, { language: "sl" })21 milisekunda21 milisekundhumanizeDuration(11000, { language: "sl" })11 sekunda11 sekundhumanizeDuration(720000, { language: "sl" })12 minuti12 minuthumanizeDuration(780000, { language: "sl" })13 minute13 minuthumanizeDuration(82800000, { language: "sl" })23 ure23 urhumanizeDuration(28927800000, { language: "sl" })11 mesec11 mesecevhumanizeDuration(662709600000, { language: "sl" })21 leto21 letunits: ["w"])12 tedna12 tednovDays already used
c % 100 === 1; this makes the other units do the same (c % 10 ===toc % 100 ===in theslblock only). The fractional branches are untouched.Checks:
Intl.PluralRules("sl")category to one word.test/definitions/sl.tsvfail onmain(101, 102 and 103 years already passed) and all pass with the fix.npm testpasses (prettier, eslint, tsc, 34 tests). Changelog and credits updated per CONTRIBUTING.md.