Skip to content

[FrameworkBundle] Add support for --sort option for --force option with translation:extract command #52337

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

mboultoureau
Copy link
Contributor

@mboultoureau mboultoureau commented Oct 27, 2023

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #49250, #37918
License MIT

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "6.4" but it seems your PR description refers to branch "6.4 for features / 5.4 or 6.3 for bug fixes".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@mboultoureau
Copy link
Contributor Author

mboultoureau commented Oct 28, 2023

In the implementation, I used the --sort option also used for --dump-messages. However, this option defaults to "asc". So now, even without this option, all files will be sorted. Is this considered a regression?

@OskarStark OskarStark changed the title [FrameworkBundle] Add support for --sort option for --force optio… [FrameworkBundle] Add support for --sort option for --force option with translation:extract command Oct 30, 2023
@OskarStark OskarStark modified the milestones: 6.4, 7.1 Nov 1, 2023
@OskarStark
Copy link
Contributor

As we are in feature freeze period, this must target 7.1 after the branch is created. 👍🏻

@mboultoureau
Copy link
Contributor Author

As we are in feature freeze period, this must target 7.1 after the branch is created. 👍🏻

I've just rebased the pull request on the 7.1 branch 👍.

@asispts
Copy link
Contributor

asispts commented Dec 18, 2023

Probably related to #37918 as well

@mboultoureau
Copy link
Contributor Author

Probably related to #37918 as well

Good point, I'll add it to the description, thanks!

@marien-probesys
Copy link
Contributor

Oops, I didn't see you PR and I did my own (#52938) 😅 At least we have two ways to solve the problem, so we can expect it to be solved soon! :)

Just a note on your solution: the translations will be sorted with asc by default. It means that the translation files will contain a lot of changes when upgrading to a future version of Symfony… which might be fine, but I wasn't able to know if it was fine from core maintainers (so I kept the original behaviour when --sort isn't passed in my solution).

@mboultoureau
Copy link
Contributor Author

Oops, I didn't see you PR and I did my own (#52938) 😅 At least we have two ways to solve the problem, so we can expect it to be solved soon! :)

Just a note on your solution: the translations will be sorted with asc by default. It means that the translation files will contain a lot of changes when upgrading to a future version of Symfony… which might be fine, but I wasn't able to know if it was fine from core maintainers (so I kept the original behaviour when --sort isn't passed in my solution).

Thanks for your comment!
Good point, I asked the question on 28 October and depending on the answer I may or may not modify the pull request

@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
@nicolas-grekas
Copy link
Member

IIUC, this has been fixed in #58408
closing therefor, thanks for the PR.

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

Successfully merging this pull request may close these issues.

Sort flag in translation:extract command doesn't seem to work
7 participants