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
[i18n] Language switcher for anon users #3104
Conversation
@ghislaineguerin @kgodey assigned you for a product related review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -192,5 +199,18 @@ | |||
<div class="login-card align-center"> | |||
<h1>{% block h1 %} {% endblock %}</h1> | |||
{% block box_content %} {% endblock %} | |||
<form action="{% url 'set_language' %}" method="post">{% csrf_token %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add comments where the set_language
url coming from
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks mostly good. I've requested one minor change. Also, we'll need a way to hide this UI if we merge this before the Japanese translation is complete.
Looks good to me. |
…mathesar into i18n-select-lang-anon-user
Commented out the UI element to hide it until complete i18n work is merged. de03c76 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now 👍🏻
I'm holding off merge since this is stacked on top of #3103. @rajatvijay feel free to merge this yourself once that PR is merged. |
Related #2927
Technical details
This PR does the following things -
Notice:
preferred_language
saved in the DB always takes the preference to translated pages once the user has logged in.preferred_language
user's model attribute isen
so that attribute will always have a value. The ideal way would have been to give cookies lang preference for the users who are logging in for the first time. But this needs some discussion.Screenshots
Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin