1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Move strings

This commit is contained in:
kj415j45 2021-07-19 19:23:26 +08:00
parent 57eed88601
commit 765881d8b0
7 changed files with 30 additions and 8 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Localisation namespace osu.Game.Localisation
{ {
@ -9,31 +10,52 @@ namespace osu.Game.Localisation
{ {
private const string prefix = @"osu.Game.Resources.Localisation.NamedOverlayComponent"; private const string prefix = @"osu.Game.Resources.Localisation.NamedOverlayComponent";
/// <inheritdoc cref="PageTitleStrings.MainBeatmapsetsControllerIndex"/>
public static LocalisableString BeatmapListingTitle => PageTitleStrings.MainBeatmapsetsControllerIndex;
/// <summary> /// <summary>
/// "browse for new beatmaps" /// "browse for new beatmaps"
/// </summary> /// </summary>
public static LocalisableString BeatmapListingDescription => new TranslatableString(getKey(@"beatmap_listing"), @"browse for new beatmaps"); public static LocalisableString BeatmapListingDescription => new TranslatableString(getKey(@"beatmap_listing"), @"browse for new beatmaps");
/// <inheritdoc cref="PageTitleStrings.MainChangelogControllerDefault"/>
public static LocalisableString ChangelogTitle => PageTitleStrings.MainChangelogControllerDefault;
/// <summary> /// <summary>
/// "track recent dev updates in the osu! ecosystem" /// "track recent dev updates in the osu! ecosystem"
/// </summary> /// </summary>
public static LocalisableString ChangelogDescription => new TranslatableString(getKey(@"changelog"), @"track recent dev updates in the osu! ecosystem"); public static LocalisableString ChangelogDescription => new TranslatableString(getKey(@"changelog"), @"track recent dev updates in the osu! ecosystem");
/// <inheritdoc cref="PageTitleStrings.MainHomeControllerIndex"/>
public static LocalisableString DashboardTitle => PageTitleStrings.MainHomeControllerIndex;
/// <summary> /// <summary>
/// "view your friends and other information" /// "view your friends and other information"
/// </summary> /// </summary>
public static LocalisableString DashboardDescription => new TranslatableString(getKey(@"dashboard"), @"view your friends and other information"); public static LocalisableString DashboardDescription => new TranslatableString(getKey(@"dashboard"), @"view your friends and other information");
/// <inheritdoc cref="PageTitleStrings.MainRankingControllerDefault"/>
public static LocalisableString RankingsTitle => PageTitleStrings.MainRankingControllerDefault;
/// <summary> /// <summary>
/// "find out who's the best right now" /// "find out who's the best right now"
/// </summary> /// </summary>
public static LocalisableString RankingsDescription => new TranslatableString(getKey(@"rankings"), @"find out who's the best right now"); public static LocalisableString RankingsDescription => new TranslatableString(getKey(@"rankings"), @"find out who's the best right now");
/// <inheritdoc cref="PageTitleStrings.MainNewsControllerDefault"/>
public static LocalisableString NewsTitle => PageTitleStrings.MainNewsControllerDefault;
/// <summary> /// <summary>
/// "get up-to-date on community happenings" /// "get up-to-date on community happenings"
/// </summary> /// </summary>
public static LocalisableString NewsDescription => new TranslatableString(getKey(@"news"), @"get up-to-date on community happenings"); public static LocalisableString NewsDescription => new TranslatableString(getKey(@"news"), @"get up-to-date on community happenings");
/// <inheritdoc cref="LayoutStrings.MenuHelpGetWiki"/>
public static LocalisableString WikiTitle => LayoutStrings.MenuHelpGetWiki;
/// <inheritdoc cref="PageTitleStrings.MainWikiControllerDefault"/>
public static LocalisableString WikiDescription => PageTitleStrings.MainWikiControllerDefault;
private static string getKey(string key) => $"{prefix}:{key}"; private static string getKey(string key) => $"{prefix}:{key}";
} }
} }

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Game.Localisation; using osu.Game.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.BeatmapListing namespace osu.Game.Overlays.BeatmapListing
{ {
@ -14,7 +13,7 @@ namespace osu.Game.Overlays.BeatmapListing
{ {
public BeatmapListingTitle() public BeatmapListingTitle()
{ {
Title = PageTitleStrings.MainBeatmapsetsControllerIndex; Title = NamedOverlayComponentStrings.BeatmapListingTitle;
Description = NamedOverlayComponentStrings.BeatmapListingDescription; Description = NamedOverlayComponentStrings.BeatmapListingDescription;
IconTexture = "Icons/Hexacons/beatmap"; IconTexture = "Icons/Hexacons/beatmap";
} }

View File

@ -117,7 +117,7 @@ namespace osu.Game.Overlays.Changelog
{ {
public ChangelogHeaderTitle() public ChangelogHeaderTitle()
{ {
Title = LayoutStrings.MenuHomeChangelogIndex; Title = NamedOverlayComponentStrings.ChangelogTitle;
Description = NamedOverlayComponentStrings.ChangelogDescription; Description = NamedOverlayComponentStrings.ChangelogDescription;
IconTexture = "Icons/Hexacons/devtools"; IconTexture = "Icons/Hexacons/devtools";
} }

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Dashboard
{ {
public DashboardTitle() public DashboardTitle()
{ {
Title = HomeStrings.UserTitle; Title = NamedOverlayComponentStrings.DashboardTitle;
Description = NamedOverlayComponentStrings.DashboardDescription; Description = NamedOverlayComponentStrings.DashboardDescription;
IconTexture = "Icons/Hexacons/social"; IconTexture = "Icons/Hexacons/social";
} }

View File

@ -64,7 +64,7 @@ namespace osu.Game.Overlays.News
{ {
public NewsHeaderTitle() public NewsHeaderTitle()
{ {
Title = LayoutStrings.MenuHomeNewsIndex; Title = NamedOverlayComponentStrings.NewsTitle;
Description = NamedOverlayComponentStrings.NewsDescription; Description = NamedOverlayComponentStrings.NewsDescription;
IconTexture = "Icons/Hexacons/news"; IconTexture = "Icons/Hexacons/news";
} }

View File

@ -33,7 +33,7 @@ namespace osu.Game.Overlays.Rankings
{ {
public RankingsTitle() public RankingsTitle()
{ {
Title = LayoutStrings.MenuRankingsDefault; Title = NamedOverlayComponentStrings.RankingsTitle;
Description = NamedOverlayComponentStrings.RankingsDescription; Description = NamedOverlayComponentStrings.RankingsDescription;
IconTexture = "Icons/Hexacons/rankings"; IconTexture = "Icons/Hexacons/rankings";
} }

View File

@ -6,6 +6,7 @@ using System.Linq;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Game.Resources.Localisation.Web; using osu.Game.Resources.Localisation.Web;
@ -76,8 +77,8 @@ namespace osu.Game.Overlays.Wiki
{ {
public WikiHeaderTitle() public WikiHeaderTitle()
{ {
Title = LayoutStrings.MenuHelpGetWiki; Title = NamedOverlayComponentStrings.WikiTitle;
Description = PageTitleStrings.MainWikiControllerDefault; Description = NamedOverlayComponentStrings.WikiDescription;
IconTexture = "Icons/Hexacons/wiki"; IconTexture = "Icons/Hexacons/wiki";
} }
} }