1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 22:35:23 +08:00

Localise caps lock warning

This commit is contained in:
ansel 2023-01-16 23:08:29 +03:00
parent bb3668c769
commit ad32d99daa
2 changed files with 8 additions and 2 deletions

View File

@ -16,6 +16,7 @@ using osu.Framework.Input;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game.Localisation;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -112,7 +113,7 @@ namespace osu.Game.Graphics.UserInterface
private partial class CapsWarning : SpriteIcon, IHasTooltip private partial class CapsWarning : SpriteIcon, IHasTooltip
{ {
public LocalisableString TooltipText => "caps lock is active"; public LocalisableString TooltipText => CommonStrings.CapsLockIsActive;
public CapsWarning() public CapsWarning()
{ {

View File

@ -154,6 +154,11 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"Exit"); public static LocalisableString Exit => new TranslatableString(getKey(@"exit"), @"Exit");
/// <summary>
/// "caps lock is active"
/// </summary>
public static LocalisableString CapsLockIsActive => new TranslatableString(getKey(@"caps_lock_is_active"), @"caps lock is active");
private static string getKey(string key) => $@"{prefix}:{key}"; private static string getKey(string key) => $@"{prefix}:{key}";
} }
} }