mirror of
https://github.com/ppy/osu
synced 2025-01-28 00:32:59 +00:00
Use existing localisation for "view profile"
This commit is contained in:
parent
d674856e29
commit
40dbf098d2
@ -15,6 +15,7 @@ using osu.Framework.Localisation;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Online;
|
||||
using osu.Game.Users;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
@ -74,7 +75,7 @@ namespace osu.Game.Graphics.Containers
|
||||
}
|
||||
|
||||
public void AddUserLink(IUser user, Action<SpriteText> creationParameters = null)
|
||||
=> createLink(CreateChunkFor(user.Username, true, CreateSpriteText, creationParameters), new LinkDetails(LinkAction.OpenUserProfile, user), "view profile");
|
||||
=> createLink(CreateChunkFor(user.Username, true, CreateSpriteText, creationParameters), new LinkDetails(LinkAction.OpenUserProfile, user), ContextMenuStrings.ViewProfile);
|
||||
|
||||
private void createLink(ITextPart textPart, LinkDetails link, LocalisableString tooltipText, Action action = null)
|
||||
{
|
||||
|
@ -6,14 +6,13 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
|
||||
namespace osu.Game.Users.Drawables
|
||||
{
|
||||
public partial class ClickableAvatar : OsuClickableContainer
|
||||
{
|
||||
private const string default_tooltip_text = "view profile";
|
||||
|
||||
public override LocalisableString TooltipText
|
||||
{
|
||||
get
|
||||
@ -21,7 +20,7 @@ namespace osu.Game.Users.Drawables
|
||||
if (!Enabled.Value)
|
||||
return string.Empty;
|
||||
|
||||
return ShowUsernameTooltip ? (user?.Username ?? string.Empty) : default_tooltip_text;
|
||||
return ShowUsernameTooltip ? (user?.Username ?? string.Empty) : ContextMenuStrings.ViewProfile;
|
||||
}
|
||||
set => throw new NotSupportedException();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user