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

added localize parameters to url #1119

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

OlegPhenomenon
Copy link
Contributor

@OlegPhenomenon OlegPhenomenon commented Sep 6, 2023

What's the problem?
In the current functionality of the auction, there's no direct link to the localized part of the service. To change localization, a link with a PATCH action is used, which either assigns the user's localization value in the database or sets it in the cookies. However, due to the need for marketing purposes to have a direct link to localization, a solution needs to be found.

How did you solve it?
It's very simple, I added a callback in the controller that tracks the "localize" parameter in the URL. Based on this parameter, the user's localization is set in their cookies. The direct link to localization looks like this:
https://auction.test/?localize=en

How do we verify that you didn't break anything?
You need to make sure that this functionality does not break the main localization features. The auction should still open for users with the localization that they have set. Websockets should also come with the correct localization.

Is there anything else we should know?
Yes, this feature does not work with browsers in incognito mode, as there are no cookies there.

@viezly
Copy link

viezly bot commented Sep 6, 2023

Changes preview:

Legend:

👀 Review pull request on Viezly

@OlegPhenomenon OlegPhenomenon force-pushed the possibility-to-directly-change-localize branch from ea2f397 to faeba6a Compare September 6, 2023 11:33
@vohmar vohmar added the enhancement New feature or request label Sep 6, 2023
@vohmar vohmar merged commit 09565cd into master Sep 6, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants