Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[i18n] Languages with multiple plurals aren't properly supported #3271

Open
Jackenmen opened this issue Jan 4, 2020 · 1 comment
Open

[i18n] Languages with multiple plurals aren't properly supported #3271

Jackenmen opened this issue Jan 4, 2020 · 1 comment
Labels
Category: Core - i18n This is related to the i18n core API or locale files. Status: Needs Discussion Needs more discussion. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.

Comments

@Jackenmen
Copy link
Member

Jackenmen commented Jan 4, 2020

As an example, I saw this code:

periods = [
(_("year"), _("years"), 60 * 60 * 24 * 365),
(_("month"), _("months"), 60 * 60 * 24 * 30),
(_("day"), _("days"), 60 * 60 * 24),
(_("hour"), _("hours"), 60 * 60),
(_("minute"), _("minutes"), 60),
(_("second"), _("seconds"), 1),
]

For example, in Polish we have 2 plural forms beside the singular:
1 month -> 1 miesiąc (1)
2 months -> 2 miesiące (2-4, 22-24, 32-34, ...)
5 months -> 5 miesięcy (5-21, 25-31, 35-39, ...)

We might need some sort of i18n library eventually, but I think an equivalent of ngettext would be enough for now.

@Jackenmen
Copy link
Member Author

Made an update, cause I totally screwed up the example 😄

@Flame442 Flame442 added Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. Category: Core - i18n This is related to the i18n core API or locale files. Status: Needs Triage This has not been labeled or discussed for handling yet. labels Jan 8, 2020
@Jackenmen Jackenmen added Status: Needs Discussion Needs more discussion. and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - i18n This is related to the i18n core API or locale files. Status: Needs Discussion Needs more discussion. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

No branches or pull requests

2 participants