Skip to content

i18n - support defining plural counts dynamically #1848

Description

@Destroy666x

Feature Request

Let's say you got this:

popup:
  speed:
    affectedVideos:
      0: Żaden film nie miał zmienionej prędkości.
      1: 1 film miał zmienioną prędkość.
      n: $1 filmów miało zmienioną prędkość.

The 3rd n option is not gramatically valid for all cases in Polish. It'd need to be split into two cases:

  • 2-4 - "$1 filmy miały zmienioną prędkość."
  • 5-inf - "$1 filmów miało zmienioną prędkość."

I tried adding all 2, 3 and 4 separately as repeats, but WXT throws an error that the plural count is unknown, I suggest adding minimum the option to define translations for any counts. It'd be great if it also supported ranged like mentioned 2-4 - I don't know if that's what i18n libs do usually, I'm not expert at them, but I know bunch of them definitely support more cases than just 0/1/n.

Is your feature request related to a bug?

N/A

What are the alternatives?

You tell me. Well, one alternative is for sure to change the string to be different, e.g. "Liczba filmów ze zmienioną prędkością: $1." in this case, as I just did, but it's not always a possibility.

Additional context

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions