Skip to content

trans_choice with negative range does not work anymore #58446

@hmazter

Description

@hmazter

Laravel Version

v12.48.1

PHP Version

8.4.14

Database Driver & Version

No response

Description

trans_choice no longer matches ranges that starts with *, for example [*,-1]
This worked in the previous versions; it is not specifically mentioned in the docs, but it has been working for around 5 years

I guess that it is this change: #58367

Steps To Reproduce

  1. Have the following translation string: '[*,-1] :diff less than last week|{0} the same|[1,*] :diff more than last week'
  2. Use the translation with a negative value in trans_choice for example -3
  3. You will see the 0-case being used ("the same") and not the case that should include all negative values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions