1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

load notice box

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-05-21 16:08:30 +07:00
parent e23ea00197
commit 7a8a37f4a0
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -37,6 +37,27 @@ namespace osu.Game.Overlays.Wiki.Markdown
}
}
[BackgroundDependencyLoader]
private void load()
{
// Reference : https://github.com/ppy/osu-web/blob/master/resources/views/wiki/_notice.blade.php and https://github.com/ppy/osu-web/blob/master/resources/lang/en/wiki.php
// TODO : add notice box for fallback translation, legal translation and outdated translation after implement wiki locale in the future.
if (isOutdated)
{
Add(new NoticeBox
{
Text = "The content on this page is incomplete or outdated. If you are able to help out, please consider updating the article!",
});
}
else if (needsCleanup)
{
Add(new NoticeBox
{
Text = "This page does not meet the standards of the osu! wiki and needs to be cleaned up or rewritten. If you are able to help out, please consider updating the article!",
});
}
}
private class NoticeBox : Container
{
[Resolved]