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

Lang is a url parameter now. #316

Open
wants to merge 4 commits into
base: beta
Choose a base branch
from
Open

Lang is a url parameter now. #316

wants to merge 4 commits into from

Conversation

makmanalp
Copy link
Contributor

@sibamohanty says:

Changes made

queryActivated is true all the time.
lang is updated in updateURLQueryParameters 3 .explore view has translation activated.

@@ -1063,6 +1063,8 @@ <h4 style="border-bottom: solid 1px #999; font-family:'PT Sans Narrow',Helvetica
$(".language_select select").on("change", function(){
// set session data to new language
var language = $(this).val();
lang = language;
updateURLQueryParameters();
window.location = "/set_language/"+language+"/";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Over here, the point of redirecting to /set_language/ is that the set language page sets the language cookie and redirects back to the current page. Since we're not relying on the cookie anymore, I think you can do window.location.reload() here and that should work. See if that's true - I could be wrong. You can then also remove the set_language view and get rid of it from the URLs if that's the case.

Copy link
Contributor

Choose a reason for hiding this comment

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

You are correct. Have removed the /set_language/ from here and from urls.py Just takinging my time to clean it up from views.py, once am absolutely sure it's not being used anywhere.

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.

2 participants