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

Automatically use in-game language for wiki pages #29401

Merged
merged 4 commits into from
Aug 13, 2024

Conversation

CloneWith
Copy link
Contributor

@CloneWith CloneWith commented Aug 13, 2024

Changes

Just fetch the in-game language (using load()) from OsuGameBase.CurrentLanguage when loading wiki pages.

Since we detect the language code in values[0] first, it works for links already containing a language code (like https://osu.ppy.sh/wiki/zh/Client/Installation).

And chances are that we get:

Then we can use the in-game language as an argument of the request to get the language-specific page.

Known Issues

We cannot get the Sitemap page, even before this PR. This is an issue that should be fixed somehow in the future (on osu!web?).

@CloneWith CloneWith marked this pull request as draft August 13, 2024 04:01
@CloneWith CloneWith marked this pull request as ready for review August 13, 2024 04:07
osu.Game/Overlays/WikiOverlay.cs Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 13, 2024
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks!

@smoogipoo smoogipoo merged commit 513a666 into ppy:master Aug 13, 2024
5 of 13 checks passed
@CloneWith CloneWith deleted the patch/wiki-locale branch August 14, 2024 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants