diff --git a/osu.Game/Graphics/UserInterface/BackButton.cs b/osu.Game/Graphics/UserInterface/BackButton.cs index a85a1fc926..eafd45c125 100644 --- a/osu.Game/Graphics/UserInterface/BackButton.cs +++ b/osu.Game/Graphics/UserInterface/BackButton.cs @@ -3,8 +3,10 @@ using System; using osu.Framework.Allocation; +using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Game.Localisation; using osu.Game.Screens.Footer; namespace osu.Game.Graphics.UserInterface @@ -24,7 +26,7 @@ namespace osu.Game.Graphics.UserInterface { Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, - Text = @"back", + Text = CommonStrings.Back.ToLower(), Icon = OsuIcon.LeftCircle, Action = () => Action?.Invoke() }; diff --git a/osu.Game/Graphics/UserInterface/DownloadButton.cs b/osu.Game/Graphics/UserInterface/DownloadButton.cs index 73783e718c..61769d805e 100644 --- a/osu.Game/Graphics/UserInterface/DownloadButton.cs +++ b/osu.Game/Graphics/UserInterface/DownloadButton.cs @@ -7,6 +7,7 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Game.Localisation; using osu.Game.Online; using osuTK; @@ -49,19 +50,19 @@ namespace osu.Game.Graphics.UserInterface Background.FadeColour(colours.Gray4, 500, Easing.InOutExpo); Icon.MoveToX(0, 500, Easing.InOutExpo); checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo); - TooltipText = "Download"; + TooltipText = CommonStrings.Download; break; case DownloadState.Downloading: Background.FadeColour(colours.Blue, 500, Easing.InOutExpo); Icon.MoveToX(0, 500, Easing.InOutExpo); checkmark.ScaleTo(Vector2.Zero, 500, Easing.InOutExpo); - TooltipText = "Downloading..."; + TooltipText = CommonStrings.Downloading; break; case DownloadState.Importing: Background.FadeColour(colours.Yellow, 500, Easing.InOutExpo); - TooltipText = "Importing"; + TooltipText = CommonStrings.Importing; break; case DownloadState.LocallyAvailable: diff --git a/osu.Game/Graphics/UserInterface/TwoLayerButton.cs b/osu.Game/Graphics/UserInterface/TwoLayerButton.cs index 3083abc393..e87e446ae3 100644 --- a/osu.Game/Graphics/UserInterface/TwoLayerButton.cs +++ b/osu.Game/Graphics/UserInterface/TwoLayerButton.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Input.Events; +using osu.Framework.Localisation; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; @@ -161,7 +162,7 @@ namespace osu.Game.Graphics.UserInterface set => bouncingIcon.Icon = value; } - public string Text + public LocalisableString Text { set => text.Text = value; } diff --git a/osu.Game/Localisation/CommonStrings.cs b/osu.Game/Localisation/CommonStrings.cs index d72257f438..6264f35029 100644 --- a/osu.Game/Localisation/CommonStrings.cs +++ b/osu.Game/Localisation/CommonStrings.cs @@ -59,6 +59,11 @@ namespace osu.Game.Localisation /// public static LocalisableString Height => new TranslatableString(getKey(@"height"), @"Height"); + /// + /// "Download" + /// + public static LocalisableString Download => new TranslatableString(getKey(@"download"), @"Download"); + /// /// "Downloading..." /// diff --git a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs index 85a87b0dff..8d52930740 100644 --- a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs +++ b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs @@ -605,7 +605,7 @@ namespace osu.Game.Screens.OnlinePlay List items = new List(); if (beatmapOverlay != null) - items.Add(new OsuMenuItem("Details...", MenuItemType.Standard, () => beatmapOverlay.FetchAndShowBeatmap(Item.Beatmap.OnlineID))); + items.Add(new OsuMenuItem(CommonStrings.Details, MenuItemType.Standard, () => beatmapOverlay.FetchAndShowBeatmap(Item.Beatmap.OnlineID))); if (beatmap != null) { @@ -617,9 +617,9 @@ namespace osu.Game.Screens.OnlinePlay .Select(c => new CollectionToggleMenuItem(c.ToLive(realm), beatmap)).Cast().ToList(); if (manageCollectionsDialog != null) - collectionItems.Add(new OsuMenuItem("Manage...", MenuItemType.Standard, manageCollectionsDialog.Show)); + collectionItems.Add(new OsuMenuItem(CommonStrings.Manage, MenuItemType.Standard, manageCollectionsDialog.Show)); - items.Add(new OsuMenuItem("Collections") { Items = collectionItems }); + items.Add(new OsuMenuItem(CommonStrings.Collections) { Items = collectionItems }); } } diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/HamburgerMenu.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/HamburgerMenu.cs index 2d422b5252..87e2e383ba 100644 --- a/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/HamburgerMenu.cs +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/RankedPlay/HamburgerMenu.cs @@ -13,6 +13,7 @@ using osu.Framework.Screens; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterfaceV2; +using osu.Game.Localisation; using osu.Game.Overlays; using osuTK; using osuTK.Graphics; @@ -49,7 +50,7 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.RankedPlay Spacing = new Vector2(3), }; - addButton(rankedPlayScreen?.ActiveSubScreen is not EndedScreen ? "Give up" : "Exit", FontAwesome.Solid.SignOutAlt, () => rankedPlayScreen?.Exit()); + addButton(rankedPlayScreen?.ActiveSubScreen is not EndedScreen ? "Give up" : CommonStrings.Exit, FontAwesome.Solid.SignOutAlt, () => rankedPlayScreen?.Exit()); } protected override void LoadComplete() diff --git a/osu.Game/Screens/Ranking/CollectionButton.cs b/osu.Game/Screens/Ranking/CollectionButton.cs index 869c6a7ff4..973e8090fa 100644 --- a/osu.Game/Screens/Ranking/CollectionButton.cs +++ b/osu.Game/Screens/Ranking/CollectionButton.cs @@ -6,6 +6,7 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Extensions; +using osu.Framework.Extensions.LocalisationExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Sprites; @@ -15,6 +16,7 @@ using osu.Game.Collections; using osu.Game.Database; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; +using osu.Game.Localisation; using osuTK; using Realms; @@ -41,7 +43,7 @@ namespace osu.Game.Screens.Ranking Size = new Vector2(75, 30); - TooltipText = "collections"; + TooltipText = CommonStrings.Collections.ToLower(); } [BackgroundDependencyLoader]