Skip to content

[Translation] Improve the pluralization rule for French #16256

@ghost

Description

The current pluralization rule for French is not exactly right. Numbers like negatives (like -4) and decimals of 1 (like 1.78) should also be considered as singulars, not plurals. Correct me if I'm wrong, but the current rule sets only 0, decimals of 0, and 1, as singulars, and the rest as plurals.

Something like that is better:

return [
    if ($number >= 0 and $number < 2) {
        return 'singular';
    }
    else {
        return 'plural';
    }
]

(Sorry, I'm not a coder, so I can't really provide the appropriate patch myself)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions