mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +08:00
Optimize code style
Co-authored-by: frenzibyte <frenzibyte@gmail.com> Co-authored-by: bdach <dach.bartlomiej@gmail.com>
This commit is contained in:
parent
51742da89a
commit
1b4bff0d9f
@ -9,16 +9,6 @@ namespace osu.Game.Localisation
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.News";
|
||||
|
||||
/// <summary>
|
||||
/// "frontpage"
|
||||
/// </summary>
|
||||
public static LocalisableString FrontPageString => new TranslatableString(getKey(@"front_page"), @"frontpage");
|
||||
|
||||
/// <summary>
|
||||
/// "news"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderTitle => new TranslatableString(getKey(@"header_title"), @"news");
|
||||
|
||||
/// <summary>
|
||||
/// "join the real-time discussion"
|
||||
/// </summary>
|
||||
|
@ -1,29 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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 WikiStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.Wiki";
|
||||
|
||||
/// <summary>
|
||||
/// "index"
|
||||
/// </summary>
|
||||
public static LocalisableString IndexPageString => new TranslatableString(getKey(@"index_page"), @"index");
|
||||
|
||||
/// <summary>
|
||||
/// "wiki"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderTitle => new TranslatableString(getKey(@"header_title"), @"wiki");
|
||||
|
||||
/// <summary>
|
||||
/// "knowledge base"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderDescription => new TranslatableString(getKey(@"header_description"), @"knowledge base");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
@ -5,16 +5,13 @@ 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
|
||||
{
|
||||
public class NewsHeader : BreadcrumbControlOverlayHeader
|
||||
{
|
||||
public static LocalisableString FrontPageString => NewsStrings.FrontPageString;
|
||||
public static LocalisableString HeaderTitle => NewsStrings.HeaderTitle;
|
||||
public static LocalisableString HeaderDescription => NewsStrings.HeaderDescription;
|
||||
|
||||
public LocalisableString FrontPageString => osu.Game.Resources.Localisation.Web.NewsStrings.IndexTitleInfo;
|
||||
public Action ShowFrontPage;
|
||||
|
||||
private readonly Bindable<string> article = new Bindable<string>();
|
||||
@ -65,8 +62,8 @@ namespace osu.Game.Overlays.News
|
||||
{
|
||||
public NewsHeaderTitle()
|
||||
{
|
||||
Title = HeaderTitle;
|
||||
Description = HeaderDescription;
|
||||
Title = LayoutStrings.MenuHomeNewsIndex;
|
||||
Description = osu.Game.Localisation.NewsStrings.HeaderDescription;
|
||||
IconTexture = "Icons/Hexacons/news";
|
||||
}
|
||||
}
|
||||
|
@ -6,17 +6,15 @@ 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;
|
||||
|
||||
namespace osu.Game.Overlays.Wiki
|
||||
{
|
||||
public class WikiHeader : BreadcrumbControlOverlayHeader
|
||||
{
|
||||
private const string index_path = "Main_Page";
|
||||
public static LocalisableString IndexPageString => WikiStrings.IndexPageString;
|
||||
public static LocalisableString HeaderTitle => WikiStrings.HeaderTitle;
|
||||
public static LocalisableString HeaderDescription => WikiStrings.HeaderDescription;
|
||||
public LocalisableString IndexPageString => LayoutStrings.HeaderHelpIndex;
|
||||
|
||||
public readonly Bindable<APIWikiPage> WikiPageData = new Bindable<APIWikiPage>();
|
||||
|
||||
@ -77,8 +75,8 @@ namespace osu.Game.Overlays.Wiki
|
||||
{
|
||||
public WikiHeaderTitle()
|
||||
{
|
||||
Title = HeaderTitle;
|
||||
Description = HeaderDescription;
|
||||
Title = LayoutStrings.MenuHelpGetWiki;
|
||||
Description = PageTitleStrings.MainWikiControllerDefault;
|
||||
IconTexture = "Icons/Hexacons/wiki";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user