From 93e79d122fe04e0ab5080eb8e042c313ac27c17d Mon Sep 17 00:00:00 2001 From: kj415j45 Date: Sun, 18 Jul 2021 02:23:12 +0800 Subject: [PATCH] Move strings together --- ...Strings.cs => HeaderDescriptionStrings.cs} | 11 ++++++++--- osu.Game/Localisation/NewsStrings.cs | 19 ------------------- .../Overlays/Changelog/ChangelogHeader.cs | 3 ++- osu.Game/Overlays/News/NewsHeader.cs | 3 ++- 4 files changed, 12 insertions(+), 24 deletions(-) rename osu.Game/Localisation/{ChangelogStrings.cs => HeaderDescriptionStrings.cs} (50%) delete mode 100644 osu.Game/Localisation/NewsStrings.cs diff --git a/osu.Game/Localisation/ChangelogStrings.cs b/osu.Game/Localisation/HeaderDescriptionStrings.cs similarity index 50% rename from osu.Game/Localisation/ChangelogStrings.cs rename to osu.Game/Localisation/HeaderDescriptionStrings.cs index b720670ded..6dbc28a619 100644 --- a/osu.Game/Localisation/ChangelogStrings.cs +++ b/osu.Game/Localisation/HeaderDescriptionStrings.cs @@ -5,14 +5,19 @@ using osu.Framework.Localisation; namespace osu.Game.Localisation { - public static class ChangelogStrings + public static class HeaderDescriptionStrings { - private const string prefix = @"osu.Game.Resources.Localisation.Changelog"; + private const string prefix = @"osu.Game.Resources.Localisation.HeaderDescription"; /// /// "track recent dev updates in the osu! ecosystem" /// - public static LocalisableString HeaderDescription => new TranslatableString(getKey(@"header_description"), @"track recent dev updates in the osu! ecosystem"); + public static LocalisableString Changelog => new TranslatableString(getKey(@"changelog"), @"track recent dev updates in the osu! ecosystem"); + + /// + /// "get up-to-date on community happenings" + /// + public static LocalisableString News => new TranslatableString(getKey(@"news"), @"get up-to-date on community happenings"); private static string getKey(string key) => $"{prefix}:{key}"; } diff --git a/osu.Game/Localisation/NewsStrings.cs b/osu.Game/Localisation/NewsStrings.cs deleted file mode 100644 index 4f1fe6e776..0000000000 --- a/osu.Game/Localisation/NewsStrings.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Localisation; - -namespace osu.Game.Localisation -{ - public static class NewsStrings - { - private const string prefix = @"osu.Game.Resources.Localisation.News"; - - /// - /// "join the real-time discussion" - /// - public static LocalisableString HeaderDescription => new TranslatableString(getKey(@"header_description"), @"get up-to-date on community happenings"); - - private static string getKey(string key) => $"{prefix}:{key}"; - } -} diff --git a/osu.Game/Overlays/Changelog/ChangelogHeader.cs b/osu.Game/Overlays/Changelog/ChangelogHeader.cs index c1c81046ed..a282c77bd6 100644 --- a/osu.Game/Overlays/Changelog/ChangelogHeader.cs +++ b/osu.Game/Overlays/Changelog/ChangelogHeader.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Localisation; +using osu.Game.Localisation; using osu.Game.Online.API.Requests.Responses; using osu.Game.Resources.Localisation.Web; @@ -117,7 +118,7 @@ namespace osu.Game.Overlays.Changelog public ChangelogHeaderTitle() { Title = LayoutStrings.MenuHomeChangelogIndex; - Description = osu.Game.Localisation.ChangelogStrings.HeaderDescription; + Description = HeaderDescriptionStrings.Changelog; IconTexture = "Icons/Hexacons/devtools"; } } diff --git a/osu.Game/Overlays/News/NewsHeader.cs b/osu.Game/Overlays/News/NewsHeader.cs index 7f08300912..b6e49811ad 100644 --- a/osu.Game/Overlays/News/NewsHeader.cs +++ b/osu.Game/Overlays/News/NewsHeader.cs @@ -5,6 +5,7 @@ using System; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Localisation; +using osu.Game.Localisation; using osu.Game.Resources.Localisation.Web; namespace osu.Game.Overlays.News @@ -63,7 +64,7 @@ namespace osu.Game.Overlays.News public NewsHeaderTitle() { Title = LayoutStrings.MenuHomeNewsIndex; - Description = osu.Game.Localisation.NewsStrings.HeaderDescription; + Description = HeaderDescriptionStrings.News; IconTexture = "Icons/Hexacons/news"; } }