Skip to content
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

Move language_choose_code() into new LangChooser class #1081

Merged
merged 9 commits into from
Oct 14, 2024

Conversation

takaram
Copy link
Contributor

@takaram takaram commented Sep 23, 2024

This PR introduces a new class, LangChooser, replacing the language_choose_code() function.

The goal is to make /releases/8.3/index.php respect users' language preferences, similar to the manual pages. I initially considered reusing language_choose_code(), but its reliance on global variables made that challenging. As a result, I refactored the logic into a new class to simplify reuse in the /releases pages.

A follow-up PR to update /releases/8.3/index.php will be submitted once this PR is merged.

Copy link

🚀 Regression report for commit b585014 is at https://web-php-regression-report-pr-1081.preview.thephp.foundation

Copy link

🚀 Preview for commit b585014 can be found at https://web-php-pr-1081.preview.thephp.foundation

Copy link
Member

@saundefined saundefined left a comment

Choose a reason for hiding this comment

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

At first glance, looks good, thanks!
I'll take another closer look soon, and maybe someone else will have some comments to make.

Copy link
Member

@saundefined saundefined left a comment

Choose a reason for hiding this comment

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

Thanks!
If there's no objection, I'll merge it later today.

@saundefined saundefined merged commit 38ef33f into php:master Oct 14, 2024
5 checks passed
@takaram takaram deleted the langchooser_class branch October 14, 2024 14:04
@takaram
Copy link
Contributor Author

takaram commented Oct 14, 2024

Thank you!

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