1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +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.
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Localisation
{
@ -9,31 +10,52 @@ namespace osu.Game.Localisation
{
private const string prefix = @"osu.Game.Resources.Localisation.NamedOverlayComponent";
/// <inheritdoc cref="PageTitleStrings.MainBeatmapsetsControllerIndex"/>
public static LocalisableString BeatmapListingTitle => PageTitleStrings.MainBeatmapsetsControllerIndex;
/// <summary>
/// "browse for new beatmaps"
/// </summary>
public static LocalisableString BeatmapListingDescription => new TranslatableString(getKey(@"beatmap_listing"), @"browse for new beatmaps");
/// <inheritdoc cref="PageTitleStrings.MainChangelogControllerDefault"/>
public static LocalisableString ChangelogTitle => PageTitleStrings.MainChangelogControllerDefault;
/// <summary>
/// "track recent dev updates in the osu! ecosystem"
/// </summary>
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>
/// "view your friends and other information"
/// </summary>
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>
/// "find out who's the best right now"
/// </summary>
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>
/// "get up-to-date on community happenings"
/// </summary>
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}";
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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