Skip to content

Plural ranges #529

Closed
Closed
@karimshalapy

Description

@karimshalapy

Is your feature request related to a problem? Please describe.

In Arabic we have different forms of the plural word for different ranges of the number (for more information check here).

Usually the ranges are:

  • Singular (1),
  • Double (2)
  • Broken Plural (3:10)
  • Singular (>10)

Example using the word Book in Arabic:

  • كتاب
  • كتابان
  • 3 كتب
  • 11 كتاب

I tried to dig in the code and found nothing, and it wasn't mentioned in the docs, so I don't know if this feature exists, that's why I opened this ticket.

Describe the solution you'd like

So to decrease repetition, can we add a feature where we can define ranges of numbers not only single number while defining the different plural translations.

Proposed solutions:

  1. "{variable, plural, =1 {One Plural} =3:10 {# Plurals} other {# Other Plural Form}}" (best DX)
  2. "{variable, plural, =1 {One Plural} =3-10 {# Plurals} other {# Other Plural Form}}" (decent DX)
  3. "{variable, plural, =1 {One Plural} =3 =4 =5 =6 =7 =8 =9 =10 {# Plurals} other {# Other Plural Form}}" (not so good DX, but definitely better than nothing)

Describe alternatives you've considered

To be able to do this now it will require a ton of repetition:

"{variable, plural, =1 {One Plural} =3 {# Plurals} =4 {# Plurals} =5 {# Plurals} =6 {# Plurals} =7 {# Plurals} =8 {# Plurals} =9 {# Plurals} =10 {# Plurals} other {# Other Plural Form}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions