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] Collect locale details earlier in the process#31815

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.3frompierredup:locale-collector
Jun 3, 2019

Conversation

@pierredup
Copy link
Contributor

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#31600
LicenseMIT
Doc PRN/A

TheLocaleAwareListener class reverts the locale back to the default locale when the request has finished. But theTranslationDataCollector only collects the locale inlateCollect, which only happens when the kernel terminates. This means the locale is reverted back to the default by the time the collector runs.

The PR moves thelocale andfallback_locales fromlateCollect tocollect, so that the information can be captured earlier, before theLocaleAwareListener is run.

@nicolas-grekas
Copy link
Member

Thank you@pierredup.

althaus reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commit5c394ee intosymfony:4.3Jun 3, 2019
nicolas-grekas added a commit that referenced this pull requestJun 3, 2019
… (pierredup)This PR was merged into the 4.3 branch.Discussion----------[Translator] Collect locale details earlier in the process| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31600| License       | MIT| Doc PR        | N/AThe [LocaleAwareListener](https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php) class reverts the locale back to the default locale when the request has finished. But the `TranslationDataCollector` only collects the locale in `lateCollect`, which only happens when the kernel terminates. This means the locale is reverted back to the default by the time the collector runs.The PR moves the `locale` and `fallback_locales` from `lateCollect` to `collect`, so that the information can be captured earlier, before the `LocaleAwareListener` is run.Commits-------5c394ee Collect locale details earlier in the process in TranslationDataCollector
@fabpotfabpot mentioned this pull requestJun 6, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

3 participants

@pierredup@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp