Stay on current page when switching lang, improve button alignment & make text configurable#740
Stay on current page when switching lang, improve button alignment & make text configurable#740kaistierl wants to merge 2 commits intookkur:masterfrom
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
|
👉 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... |
stp-ip
left a comment
There was a problem hiding this comment.
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 ?
| ... | ||
| ``` | ||
|
|
||
| The `languageName` parameter is used as text on the language switcher buttons |
There was a problem hiding this comment.
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: