mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +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")
|
||||
{
|
||||
notification.Close();
|
||||
PostNotification?.Invoke(new TooManyDownloadsNotification(importer.HumanisedModelName));
|
||||
PostNotification?.Invoke(new TooManyDownloadsNotification());
|
||||
}
|
||||
else
|
||||
Logger.Error(error, $"{importer.HumanisedModelName.Titleize()} download failed!");
|
||||
|
@ -5,14 +5,15 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
namespace osu.Game.Database
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user