Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Translator] fix handling plural for floating numbers#39887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:4.4fromkylekatarnls:fix/float-plural
Jan 26, 2021

Conversation

@kylekatarnls
Copy link
Contributor

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#30215
LicenseMIT

@carsonbot
Copy link

Hey!

I did a quick review of this PR, I think most things looks good.

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@kylekatarnlskylekatarnls changed the titleAdd test to show #30215 issue[Translator] Add test to show #30215 issueJan 18, 2021
@kylekatarnlskylekatarnls changed the title[Translator] Add test to show #30215 issue[Translator] Fix #30215 handle plural for floating numbersJan 18, 2021
@kylekatarnlskylekatarnls marked this pull request as ready for reviewJanuary 18, 2021 22:55
@carsonbotcarsonbot added this to the4.4 milestoneJan 18, 2021
@carsonbotcarsonbot changed the title[Translator] Fix #30215 handle plural for floating numbers[Translator] Fix #30215 handle plural for floating numbersJan 18, 2021
nicolas-grekas
nicolas-grekas previously approved these changesJan 19, 2021
@kylekatarnls
Copy link
ContributorAuthor

kylekatarnls commentedJan 19, 2021
edited
Loading

If I have time this week, I'll also check negative numbers and add tests for them.

✔️ done

@nicolas-grekasnicolas-grekas changed the title[Translator] Fix #30215 handle plural for floating numbers[Translator] handle plural for floating numbersJan 19, 2021
@nicolas-grekasnicolas-grekas changed the title[Translator] handle plural for floating numbers[Translator] fix plural for floating numbersJan 19, 2021
@nicolas-grekasnicolas-grekas changed the title[Translator] fix plural for floating numbers[Translator] fix handling plural for floating numbersJan 19, 2021
@nicolas-grekasnicolas-grekas dismissed theirstale reviewJanuary 19, 2021 13:46

(tests are failing)

@kylekatarnls
Copy link
ContributorAuthor

Hum, as a first sight, I can't tell how the test output could be different from PHP 7.1 and 8 while 7.4 succeed in between.

@jderusse
Copy link
Member

Hum, as a first sight, I can't tell how the test output could be different from PHP 7.1 and 8 while 7.4 succeed in between.

The Symfony test suites are very complexe and does not perform the same thing. ie. One of the tests suite tries each component with the minimal requirements version. Another tries the previous version of the component with dependencies patched with your PR.
That's why some passed and other failed. You have to make all of theme green ;-)

@kylekatarnls
Copy link
ContributorAuthor

Depending on the version we either fall intoPluralizationRules.php or intoTranslatorTrait.php, I hope we can soon get rid of this duplicated code 😸 Now both are fixed.

@kylekatarnls
Copy link
ContributorAuthor

AppVeyor failure is clearly unrelated:

Fatal error: Interface 'Symfony\Contracts\Service\ResetInterface' not found

@kylekatarnls
Copy link
ContributorAuthor

kylekatarnls commentedJan 21, 2021
edited
Loading

👋@nicolas-grekas would you mind to review the new changes$number = abs($number) to also handle negative numbers properly.

@nicolas-grekas
Copy link
Member

Thank you@kylekatarnls.

@nicolas-grekasnicolas-grekas merged commit4b8983a intosymfony:4.4Jan 26, 2021
This was referencedJan 27, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@welcoMatticwelcoMatticwelcoMattic approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

6 participants

@kylekatarnls@carsonbot@jderusse@nicolas-grekas@welcoMattic@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp