-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add a link to reload the error page on wiki overlay #31376
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
base: master
Are you sure you want to change the base?
Conversation
osu.Game/Overlays/WikiOverlay.cs
Outdated
$"{WikiOverlayStrings.PageErrorDescription(originalPath)}\n\n" | ||
+ $"{WikiOverlayStrings.ReloadPageLink(originalPath)}\n{WikiOverlayStrings.ReturnToMainPageLink(INDEX_PATH)}")); |
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.
You can't interpolate localisable strings like this. It defeats the entire point of localisable strings as they get ToString()
ed if you do it like this. Use LocaisableString.Format()
or LocalisableString.Interpolate()
instead.
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.
WikiArticlePage
doesn't support markdown input with LocalisableString
, making it unable to display localised error content.
An possible solution is to use a TextFlowContainer
or something like this, but I think it's going too far with this PR and needs some discussion. I'll complete the format part here.
Merge conflicts here |
Most of the errors encountered in the wiki overlay are about poor network and request timeout. So we may want to reload the current page when an error page is displayed.
At the same time I noticed that when changing the in-game language while we are on the error page, the overlay would stick to
error
page because of the set value ofpath
. In this PR I use a variable to store the path of the last available (request succeeded) page, with which we can bring users back.