From fb5672814d6e558881d0101fb5a68799aa047fd1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 22 May 2021 13:55:15 +0900 Subject: [PATCH] Add remaining strings for `ButtonSystem` --- osu.Game/Localisation/ButtonSystem.ja.resx | 6 ++++++ osu.Game/Localisation/ButtonSystem.resx | 9 +++++++++ osu.Game/Localisation/ButtonSystemStrings.cs | 17 ++++++++++++++++- osu.Game/Screens/Menu/ButtonSystem.cs | 6 +++--- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/osu.Game/Localisation/ButtonSystem.ja.resx b/osu.Game/Localisation/ButtonSystem.ja.resx index 54c956758c..02f3e7ce2f 100644 --- a/osu.Game/Localisation/ButtonSystem.ja.resx +++ b/osu.Game/Localisation/ButtonSystem.ja.resx @@ -29,4 +29,10 @@ ブラウズ + + 閉じる + + + 設定 + diff --git a/osu.Game/Localisation/ButtonSystem.resx b/osu.Game/Localisation/ButtonSystem.resx index 1c6f614c46..e8f555b6c3 100644 --- a/osu.Game/Localisation/ButtonSystem.resx +++ b/osu.Game/Localisation/ButtonSystem.resx @@ -76,4 +76,13 @@ browse + + settings + + + back + + + exit + \ No newline at end of file diff --git a/osu.Game/Localisation/ButtonSystemStrings.cs b/osu.Game/Localisation/ButtonSystemStrings.cs index 1d26a73360..8083f80782 100644 --- a/osu.Game/Localisation/ButtonSystemStrings.cs +++ b/osu.Game/Localisation/ButtonSystemStrings.cs @@ -39,6 +39,21 @@ namespace osu.Game.Localisation /// public static LocalisableString Browse => new TranslatableString(getKey(@"browse"), @"browse"); + /// + /// "settings" + /// + public static LocalisableString Settings => new TranslatableString(getKey(@"settings"), @"settings"); + + /// + /// "back" + /// + public static LocalisableString Back => new TranslatableString(getKey(@"back"), @"back"); + + /// + /// "exit" + /// + public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"exit"); + private static string getKey(string key) => $@"{prefix}:{key}"; } -} +} \ No newline at end of file diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index c60d1bd4e0..a836f7bf09 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -99,8 +99,8 @@ namespace osu.Game.Screens.Menu buttonArea.AddRange(new Drawable[] { - new Button(@"settings", string.Empty, FontAwesome.Solid.Cog, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O), - backButton = new Button(@"back", @"button-back-select", OsuIcon.LeftCircle, new Color4(51, 58, 94, 255), () => State = ButtonSystemState.TopLevel, -WEDGE_WIDTH) + new Button(ButtonSystemStrings.Settings, string.Empty, FontAwesome.Solid.Cog, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O), + backButton = new Button(ButtonSystemStrings.Back, @"button-back-select", OsuIcon.LeftCircle, new Color4(51, 58, 94, 255), () => State = ButtonSystemState.TopLevel, -WEDGE_WIDTH) { VisibleState = ButtonSystemState.Play, }, @@ -135,7 +135,7 @@ namespace osu.Game.Screens.Menu buttonsTopLevel.Add(new Button(ButtonSystemStrings.Browse, @"button-direct-select", OsuIcon.ChevronDownCircle, new Color4(165, 204, 0, 255), () => OnBeatmapListing?.Invoke(), 0, Key.D)); if (host.CanExit) - buttonsTopLevel.Add(new Button("exit", string.Empty, OsuIcon.CrossCircle, new Color4(238, 51, 153, 255), () => OnExit?.Invoke(), 0, Key.Q)); + buttonsTopLevel.Add(new Button(ButtonSystemStrings.Exit, string.Empty, OsuIcon.CrossCircle, new Color4(238, 51, 153, 255), () => OnExit?.Invoke(), 0, Key.Q)); buttonArea.AddRange(buttonsPlay); buttonArea.AddRange(buttonsTopLevel);