-
Notifications
You must be signed in to change notification settings - Fork 134
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
Stay on current page when switching lang, improve button alignment & make text configurable #740
base: master
Are you sure you want to change the base?
Conversation
* exclude the currently used language to yield space in the navbar * improve button optics and alignment in menu bar and collapsed menu * use long language name as button text to make it more user friendly * update documentation
Congratulations 🎉. DeepCode analyzed your code in 1.236 seconds and we found no issues. Enjoy a moment of no bugs ☀️. 👉 View analysis in DeepCode’s Dashboard |
I updated this PR since I again altered the implementation - now we will be staying on the current page when switching languages. Buttons are only shown for languages which have translations present for the current page. |
194c5b3
to
28e7651
Compare
28e7651
to
68b3e89
Compare
@stp-ip somehow the tests are failing but i see no relation to my change:
What could be the cause for this? Is there something broken in the tests? I'd be glad if you could help... |
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.
Overall this seems like a good change. Thanks for taking the time to implement this.
Small action items to create issues for:
- track migration from i18n to languageName
- add multilingual "fragment" or docs showcasing the feature
- multilingual /dev/ section + crypress tests
Not sure yet why the test failed. Thoughts @mpourismaiel ?
title = "Mon blogue" | ||
weight = 2 | ||
|
||
[params] | ||
... | ||
``` | ||
|
||
The `languageName` parameter is used as text on the language switcher buttons |
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.
We are using i18n for this id being the language, but I think this is cleaner. We should open an issue tracking us to move from the i18n workaround to languageName globally in Syna.
@kaistierl Is there anything I can do to help finish this? |
What this PR does / why we need it:
This mainly aims at improving the optics of the language switching buttons in multi-lang mode.
The second commit changes the behaviour again:
Special notes for your reviewer:
Release note: