mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Add localisation support
This commit is contained in:
parent
4e2098adb8
commit
49a087f7fc
48
osu.Game/Localisation/PlayerLoaderStrings.cs
Normal file
48
osu.Game/Localisation/PlayerLoaderStrings.cs
Normal file
@ -0,0 +1,48 @@
|
||||
// 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 PlayerLoaderStrings
|
||||
{
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.PlayerLoader";
|
||||
|
||||
/// <summary>
|
||||
/// "This beatmap contains scenes with rapidly flashing colours"
|
||||
/// </summary>
|
||||
public static LocalisableString EpilepsyWarningTitle => new TranslatableString(getKey(@"epilepsy_warning_title"), @"This beatmap contains scenes with rapidly flashing colours");
|
||||
|
||||
/// <summary>
|
||||
/// "Please take caution if you are affected by epilepsy."
|
||||
/// </summary>
|
||||
public static LocalisableString EpilepsyWarningContent => new TranslatableString(getKey(@"epilepsy_warning_content"), @"Please take caution if you are affected by epilepsy.");
|
||||
|
||||
/// <summary>
|
||||
/// "This beatmap is loved"
|
||||
/// </summary>
|
||||
public static LocalisableString LovedBeatmapDisclaimerTitle => new TranslatableString(getKey(@"loved_beatmap_disclaimer_title"), @"This beatmap is loved");
|
||||
|
||||
/// <summary>
|
||||
/// "No performance points will be awarded.
|
||||
/// Leaderboards may be reset by the beatmap creator."
|
||||
/// </summary>
|
||||
public static LocalisableString LovedBeatmapDisclaimerContent => new TranslatableString(getKey(@"loved_beatmap_disclaimer_content"), @"No performance points will be awarded.
|
||||
Leaderboards may be reset by the beatmap creator.");
|
||||
|
||||
/// <summary>
|
||||
/// "This beatmap is qualified"
|
||||
/// </summary>
|
||||
public static LocalisableString QualifiedBeatmapDisclaimerTitle => new TranslatableString(getKey(@"qualified_beatmap_disclaimer_title"), @"This beatmap is qualified");
|
||||
|
||||
/// <summary>
|
||||
/// "No performance points will be awarded.
|
||||
/// Leaderboards will be reset when the beatmap is ranked."
|
||||
/// </summary>
|
||||
public static LocalisableString QualifiedBeatmapDisclaimerContent => new TranslatableString(getKey(@"qualified_beatmap_disclaimer_content"), @"No performance points will be awarded.
|
||||
Leaderboards will be reset when the beatmap is ranked.");
|
||||
|
||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||
}
|
||||
}
|
@ -228,17 +228,17 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
if (Beatmap.Value.BeatmapInfo.EpilepsyWarning)
|
||||
{
|
||||
disclaimers.Add(epilepsyWarning = new PlayerLoaderDisclaimer("This beatmap contains scenes with rapidly flashing colours", "Please take caution if you are affected by epilepsy."));
|
||||
disclaimers.Add(epilepsyWarning = new PlayerLoaderDisclaimer(PlayerLoaderStrings.EpilepsyWarningTitle, PlayerLoaderStrings.EpilepsyWarningContent));
|
||||
}
|
||||
|
||||
switch (Beatmap.Value.BeatmapInfo.Status)
|
||||
{
|
||||
case BeatmapOnlineStatus.Loved:
|
||||
disclaimers.Add(new PlayerLoaderDisclaimer("This beatmap is loved", "No performance points will be awarded.\nLeaderboards may be reset by the beatmap creator."));
|
||||
disclaimers.Add(new PlayerLoaderDisclaimer(PlayerLoaderStrings.LovedBeatmapDisclaimerTitle, PlayerLoaderStrings.LovedBeatmapDisclaimerContent));
|
||||
break;
|
||||
|
||||
case BeatmapOnlineStatus.Qualified:
|
||||
disclaimers.Add(new PlayerLoaderDisclaimer("This beatmap is qualified", "No performance points will be awarded.\nLeaderboards will be reset when the beatmap is ranked."));
|
||||
disclaimers.Add(new PlayerLoaderDisclaimer(PlayerLoaderStrings.QualifiedBeatmapDisclaimerTitle, PlayerLoaderStrings.QualifiedBeatmapDisclaimerContent));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user