Skip to content

Conversation

@wied03
Copy link
Contributor

@wied03 wied03 commented Dec 23, 2025

Not a framework problem per se, but a lot of tests in applications that use PMVC expect this header to be set on test requests using RequestBuilder.

if (locales.isEmpty()) {
// request.getLocale() returns a default locale if none are set by httpRequestConsumer but
// we still want to set to the system's default, if none were explicitly set.
locales = List.of(Locale.getDefault());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't do it the old way, because now with multiple header support working correctly, that breaks LocaleActionTest

Comment on lines 849 to 854
List<Locale> locales = request.getLocales();
if (locales.isEmpty()) {
// request.getLocale() returns a default locale if none are set by httpRequestConsumer but
// we still want to set to the system's default, if none were explicitly set.
locales = List.of(Locale.getDefault());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should move these lines down to line 890 where locales is used.
Then we won't need the if clause, if (!locales.isEmpty()) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good idea. Pushed.

@wied03 wied03 requested a review from bhalsey December 23, 2025 20:19
@wied03 wied03 merged commit a75b201 into main Dec 23, 2025
1 check passed
@wied03 wied03 deleted the wied03/locales branch December 23, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants