mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Use existing web localisation for most hardcoded strings
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Localisation;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
@ -15,7 +16,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
}
|
||||
|
||||
public OsuMenuItem(string text, MenuItemType type, Action action)
|
||||
public OsuMenuItem(LocalisableString text, MenuItemType type, Action action)
|
||||
: base(text, action)
|
||||
{
|
||||
Type = type;
|
||||
|
@ -5,6 +5,7 @@ using System;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface.PageSelector
|
||||
{
|
||||
@ -29,7 +30,7 @@ namespace osu.Game.Graphics.UserInterface.PageSelector
|
||||
Direction = FillDirection.Horizontal,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
previousPageButton = new PageSelectorPrevNextButton(false, "prev")
|
||||
previousPageButton = new PageSelectorPrevNextButton(false, CommonStrings.PaginationPrevious)
|
||||
{
|
||||
Action = () => CurrentPage.Value -= 1,
|
||||
},
|
||||
@ -38,7 +39,7 @@ namespace osu.Game.Graphics.UserInterface.PageSelector
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
},
|
||||
nextPageButton = new PageSelectorPrevNextButton(true, "next")
|
||||
nextPageButton = new PageSelectorPrevNextButton(true, CommonStrings.PaginationNext)
|
||||
{
|
||||
Action = () => CurrentPage.Value += 1
|
||||
}
|
||||
|
@ -2,9 +2,11 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
|
||||
@ -13,12 +15,12 @@ namespace osu.Game.Graphics.UserInterface.PageSelector
|
||||
public class PageSelectorPrevNextButton : PageSelectorButton
|
||||
{
|
||||
private readonly bool rightAligned;
|
||||
private readonly string text;
|
||||
private readonly LocalisableString text;
|
||||
|
||||
private SpriteIcon icon;
|
||||
private OsuSpriteText name;
|
||||
|
||||
public PageSelectorPrevNextButton(bool rightAligned, string text)
|
||||
public PageSelectorPrevNextButton(bool rightAligned, LocalisableString text)
|
||||
{
|
||||
this.rightAligned = rightAligned;
|
||||
this.text = text;
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
|
||||
@ -27,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
});
|
||||
|
||||
TextFlow.Padding = new MarginPadding { Right = 35 };
|
||||
PlaceholderText = "type to search";
|
||||
PlaceholderText = HomeStrings.SearchPlaceholder;
|
||||
}
|
||||
|
||||
public override bool OnPressed(KeyBindingPressEvent<PlatformAction> e)
|
||||
|
@ -11,7 +11,9 @@ using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
@ -80,7 +82,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.GetFont(size: 12, weight: FontWeight.SemiBold),
|
||||
Text = "show more".ToUpper(),
|
||||
Text = CommonStrings.ButtonsShowMore.ToUpper(),
|
||||
},
|
||||
rightIcon = new ChevronIcon
|
||||
{
|
||||
|
Reference in New Issue
Block a user