mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Localise chat related notifications
This commit is contained in:
parent
1d4380cfd0
commit
ea87000539
@ -88,6 +88,16 @@ Please try changing your audio device to a working setting.");
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString LinkTypeNotSupported => new TranslatableString(getKey(@"unsupported_link_type"), @"This link type is not yet supported!");
|
public static LocalisableString LinkTypeNotSupported => new TranslatableString(getKey(@"unsupported_link_type"), @"This link type is not yet supported!");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "You received a private message from '{0}'. Click to read it!"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString PrivateMessageReceived(string username) => new TranslatableString(getKey(@"private_message_received"), @"You received a private message from '{0}'. Click to read it!", username);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Your name was mentioned in chat by '{0}'. Click to find out why!"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString YourNameWasMentioned(string username) => new TranslatableString(getKey(@"your_name_was_mentioned"), @"Your name was mentioned in chat by '{0}'. Click to find out why!", username);
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
@ -154,7 +155,7 @@ namespace osu.Game.Online.Chat
|
|||||||
: base(message, channel)
|
: base(message, channel)
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Solid.Envelope;
|
Icon = FontAwesome.Solid.Envelope;
|
||||||
Text = $"You received a private message from '{message.Sender.Username}'. Click to read it!";
|
Text = NotificationsStrings.PrivateMessageReceived(message.Sender.Username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +165,7 @@ namespace osu.Game.Online.Chat
|
|||||||
: base(message, channel)
|
: base(message, channel)
|
||||||
{
|
{
|
||||||
Icon = FontAwesome.Solid.At;
|
Icon = FontAwesome.Solid.At;
|
||||||
Text = $"Your name was mentioned in chat by '{message.Sender.Username}'. Click to find out why!";
|
Text = NotificationsStrings.YourNameWasMentioned(message.Sender.Username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user