mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Add localisation support to overlay header title/description
This commit is contained in:
24
osu.Game/Localisation/ChatStrings.cs
Normal file
24
osu.Game/Localisation/ChatStrings.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// 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 ChatStrings
|
||||
{
|
||||
private const string prefix = "osu.Game.Localisation.Chat";
|
||||
|
||||
/// <summary>
|
||||
/// "chat"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderTitle => new TranslatableString(getKey("header_title"), "chat");
|
||||
|
||||
/// <summary>
|
||||
/// "join the real-time discussion"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderDescription => new TranslatableString(getKey("header_description"), "join the real-time discussion");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
24
osu.Game/Localisation/NotificationsStrings.cs
Normal file
24
osu.Game/Localisation/NotificationsStrings.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// 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 NotificationsStrings
|
||||
{
|
||||
private const string prefix = "osu.Game.Localisation.Notifications";
|
||||
|
||||
/// <summary>
|
||||
/// "notifications"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderTitle => new TranslatableString(getKey("header_title"), "notifications");
|
||||
|
||||
/// <summary>
|
||||
/// "waiting for 'ya"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderDescription => new TranslatableString(getKey("header_description"), "waiting for 'ya");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
24
osu.Game/Localisation/NowPlayingStrings.cs
Normal file
24
osu.Game/Localisation/NowPlayingStrings.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// 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 NowPlayingStrings
|
||||
{
|
||||
private const string prefix = "osu.Game.Localisation.NowPlaying";
|
||||
|
||||
/// <summary>
|
||||
/// "now playing"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderTitle => new TranslatableString(getKey("header_title"), "now playing");
|
||||
|
||||
/// <summary>
|
||||
/// "manage the currently playing track"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderDescription => new TranslatableString(getKey("header_description"), "manage the currently playing track");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
24
osu.Game/Localisation/SettingsStrings.cs
Normal file
24
osu.Game/Localisation/SettingsStrings.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// 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 SettingsStrings
|
||||
{
|
||||
private const string prefix = "osu.Game.Localisation.Settings";
|
||||
|
||||
/// <summary>
|
||||
/// "settings"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderTitle => new TranslatableString(getKey("header_title"), "settings");
|
||||
|
||||
/// <summary>
|
||||
/// "change the way osu! behaves"
|
||||
/// </summary>
|
||||
public static LocalisableString HeaderDescription => new TranslatableString(getKey("header_description"), "change the way osu! behaves");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user