Cog-Creators / Cog-Creators/Red-DiscordBot

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

Open
#3,271 1 comment 0 reactions 0 assignees View on GitHub
Category: Core - i18n Status: Needs Discussion Type: Bug
Dominant language
Python
Stars
5.7k
Forks
2.5k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

As an example, I saw this code:
https://github.com/Cog-Creators/Red-DiscordBot/blob/f7e2617911e9a5d0f075e042b72bedc77a35616b/redbot/core/utils/chat_formatting.py#L438-L445

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.