mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Use existing localised error message
This commit is contained in:
parent
7354f9e6ba
commit
d3954fc583
@ -112,7 +112,7 @@ namespace osu.Game.Database
|
|||||||
if (error is WebException webException && webException.Message == @"TooManyRequests")
|
if (error is WebException webException && webException.Message == @"TooManyRequests")
|
||||||
{
|
{
|
||||||
notification.Close();
|
notification.Close();
|
||||||
PostNotification?.Invoke(new TooManyDownloadsNotification(importer.HumanisedModelName));
|
PostNotification?.Invoke(new TooManyDownloadsNotification());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Logger.Error(error, $"{importer.HumanisedModelName.Titleize()} download failed!");
|
Logger.Error(error, $"{importer.HumanisedModelName.Titleize()} download failed!");
|
||||||
|
@ -5,14 +5,15 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
|
using osu.Game.Resources.Localisation.Web;
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public class TooManyDownloadsNotification : SimpleNotification
|
public class TooManyDownloadsNotification : SimpleNotification
|
||||||
{
|
{
|
||||||
public TooManyDownloadsNotification(string humanisedModelName)
|
public TooManyDownloadsNotification()
|
||||||
{
|
{
|
||||||
Text = $"You have downloaded too many {humanisedModelName}s! Please try again later.";
|
Text = BeatmapsetsStrings.DownloadLimitExceeded;
|
||||||
Icon = FontAwesome.Solid.ExclamationCircle;
|
Icon = FontAwesome.Solid.ExclamationCircle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user