Localise profile header.

This commit is contained in:
Lucas A 2021-07-17 15:18:45 +02:00
parent d9c7ea2026
commit 4d276b114b
8 changed files with 16 additions and 8 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterface;
using osu.Game.Resources.Localisation.Web;
using osuTK;
namespace osu.Game.Overlays.Profile.Header.Components
@ -18,7 +19,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
public readonly BindableBool DetailsVisible = new BindableBool();
public override LocalisableString TooltipText => DetailsVisible.Value ? "collapse" : "expand";
public override LocalisableString TooltipText => DetailsVisible.Value ? CommonStrings.ButtonsCollapse : CommonStrings.ButtonsExpand;
private SpriteIcon icon;
private Sample sampleOpen;

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
namespace osu.Game.Overlays.Profile.Header.Components
@ -13,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
public readonly Bindable<User> User = new Bindable<User>();
public override LocalisableString TooltipText => "followers";
public override LocalisableString TooltipText => FriendsStrings.ButtonsDisabled;
protected override IconUsage Icon => FontAwesome.Solid.User;

View File

@ -10,6 +10,7 @@ using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
using osuTK.Graphics;
@ -26,7 +27,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
public LevelProgressBar()
{
TooltipText = "progress to next level";
TooltipText = UsersStrings.ShowStatsLevelProgress;
}
[BackgroundDependencyLoader]

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
namespace osu.Game.Overlays.Profile.Header.Components
@ -13,7 +14,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
public readonly Bindable<User> User = new Bindable<User>();
public override LocalisableString TooltipText => "mapping subscribers";
public override LocalisableString TooltipText => FollowsStrings.MappingFollowers;
protected override IconUsage Icon => FontAwesome.Solid.Bell;

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Online.API;
using osu.Game.Online.Chat;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
using osuTK;
@ -17,7 +18,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
public readonly Bindable<User> User = new Bindable<User>();
public override LocalisableString TooltipText => "send message";
public override LocalisableString TooltipText => UsersStrings.CardSendMessage;
[Resolved(CanBeNull = true)]
private ChannelManager channelManager { get; set; }

View File

@ -4,6 +4,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Localisation;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osuTK.Graphics;
@ -16,7 +17,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
private readonly OsuSpriteText title;
private readonly OsuSpriteText content;
public string Title
public LocalisableString Title
{
set => title.Text = value;
}

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
namespace osu.Game.Overlays.Profile.Header.Components
@ -31,7 +32,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
InternalChild = info = new OverlinedInfoContainer
{
Title = "Total Play Time",
Title = UsersStrings.ShowStatsPlayTime,
LineColour = colourProvider.Highlight1,
};

View File

@ -12,6 +12,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Users;
using osuTK;
@ -68,7 +69,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Text = @"formerly known as",
Text = UsersStrings.ShowPreviousUsernames,
Font = OsuFont.GetFont(size: 10, italics: true)
}
},