From 5d8bd1de288efacf2481aa5f30f2bb2abdddedc4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 9 Aug 2022 15:57:16 +0900 Subject: [PATCH] Share localised strings with expanded display message --- osu.Game/Localisation/ToolbarStrings.cs | 2 +- osu.Game/Overlays/Login/LoginPanel.cs | 3 ++- osu.Game/Overlays/Toolbar/ToolbarUserButton.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Localisation/ToolbarStrings.cs b/osu.Game/Localisation/ToolbarStrings.cs index 21476f6d6f..6dc8a1e50c 100644 --- a/osu.Game/Localisation/ToolbarStrings.cs +++ b/osu.Game/Localisation/ToolbarStrings.cs @@ -12,7 +12,7 @@ public static class ToolbarStrings /// /// "Connection interrupted, will try to reconnect..." /// - public static LocalisableString ConnectionInterruptedWillTryTo => new TranslatableString(getKey(@"connection_interrupted_will_try_to"), @"Connection interrupted, will try to reconnect..."); + public static LocalisableString AttemptingToReconnect => new TranslatableString(getKey(@"attempting_to_reconnect"), @"Connection interrupted, will try to reconnect..."); /// /// "Connecting..." diff --git a/osu.Game/Overlays/Login/LoginPanel.cs b/osu.Game/Overlays/Login/LoginPanel.cs index 1d8926b991..32a7fca1a6 100644 --- a/osu.Game/Overlays/Login/LoginPanel.cs +++ b/osu.Game/Overlays/Login/LoginPanel.cs @@ -13,6 +13,7 @@ using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; +using osu.Game.Localisation; using osu.Game.Online.API; using osu.Game.Users; using osuTK; @@ -109,7 +110,7 @@ private void onlineStateChanged(ValueChangedEvent state) => Schedule(( Origin = Anchor.TopCentre, TextAnchor = Anchor.TopCentre, AutoSizeAxes = Axes.Both, - Text = state.NewValue == APIState.Failing ? "Connection is failing, will attempt to reconnect... " : "Attempting to connect... ", + Text = state.NewValue == APIState.Failing ? ToolbarStrings.AttemptingToReconnect : ToolbarStrings.Connecting, Margin = new MarginPadding { Top = 10, Bottom = 10 }, }, }; diff --git a/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs b/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs index a787bde508..02d3059ba4 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs @@ -107,7 +107,7 @@ private void onlineStateChanged(ValueChangedEvent state) => Schedule(( break; case APIState.Failing: - TooltipText = ToolbarStrings.ConnectionInterruptedWillTryTo; + TooltipText = ToolbarStrings.AttemptingToReconnect; spinner.Show(); break;