osu
osu copied to clipboard
Add a dropdown menu to switch wiki content language
~~now block because https://github.com/ppy/osu-localisation-analyser/issues/44~~
~~The wiki cannot be displayed when the game language is zh-hant
~~
resolved
todo:
- [x] zh-hant <=> zh-tw
There will now be a drop-down bar to display the languages supported by the current page. By default, the language the game is using will be used, and will switch synchronously when the game language is switched
But it will not show the prompt that there is no translation for the current language, and it cannot be added through existing methods, because he is not in markdown but to judge by available_locales
array (which include the list of supported language)
WikiNoticeContainer
and markdown are highly coupled, so it cannot be solved by directly adding after judgment.
But it shouldn't matter, because the language will automatically switch to English when it is not available by osu-web, and the drop-down bar will update
Finally, the language that use unicode characters will have a line break problem when displaying the main page, but it is not within the scope of this pr I think
I'm planning to add a selector for it and have localization issues (zh-tw <=> zh-hant) to work out, so going to draft for now
I'm not sure about just plopping a huge dropdown where it currently is. It feels way too present for something that's probably going to be used by 1 user ever.
you mean let this dropdown menu more like osu-web or we don't need it?
Yes, right now it's too large compared to the wiki overlay. Making it look like the osu-web variant would be slightly better, but altering it further to only display the flag in idle state would probably be even better (something similar to the language button next to the profile in osu-web).