mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:59:16 +08:00
Add localisation of all beatmap offset strings
This commit is contained in:
parent
4d9efe771b
commit
4aee57c9c1
34
osu.Game/Localisation/BeatmapOffsetControlStrings.cs
Normal file
34
osu.Game/Localisation/BeatmapOffsetControlStrings.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// 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 BeatmapOffsetControlStrings
|
||||||
|
{
|
||||||
|
private const string prefix = @"osu.Game.Resources.Localisation.BeatmapOffsetControl";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Beatmap offset"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString BeatmapOffset => new TranslatableString(getKey(@"beatmap_offset"), @"Beatmap offset");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Previous play:"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString PreviousPlay => new TranslatableString(getKey(@"previous_play"), @"Previous play:");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Previous play too short to use for calibration"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString PreviousPlayTooShortToUseForCalibration => new TranslatableString(getKey(@"previous_play_too_short_to_use_for_calibration"), @"Previous play too short to use for calibration");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Calibrate using last play"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString CalibrateUsingLastPlay => new TranslatableString(getKey(@"calibrate_using_last_play"), @"Calibrate using last play");
|
||||||
|
|
||||||
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
|
}
|
||||||
|
}
|
@ -19,6 +19,7 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Ranking.Statistics;
|
using osu.Game.Screens.Ranking.Statistics;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.PlayerSettings
|
namespace osu.Game.Screens.Play.PlayerSettings
|
||||||
{
|
{
|
||||||
@ -57,7 +58,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
new PlayerSliderBar<double>
|
new PlayerSliderBar<double>
|
||||||
{
|
{
|
||||||
KeyboardStep = 5,
|
KeyboardStep = 5,
|
||||||
LabelText = "Beatmap offset",
|
LabelText = BeatmapOffsetControlStrings.BeatmapOffset,
|
||||||
Current = Current,
|
Current = Current,
|
||||||
},
|
},
|
||||||
referenceScoreContainer = new FillFlowContainer
|
referenceScoreContainer = new FillFlowContainer
|
||||||
@ -156,7 +157,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = "Previous play:"
|
Text = BeatmapOffsetControlStrings.PreviousPlay
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -169,7 +170,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Colour = colours.Red1,
|
Colour = colours.Red1,
|
||||||
Text = "Previous play too short to use for calibration"
|
Text = BeatmapOffsetControlStrings.PreviousPlayTooShortToUseForCalibration
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -188,7 +189,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
new AverageHitError(hitEvents),
|
new AverageHitError(hitEvents),
|
||||||
useAverageButton = new SettingsButton
|
useAverageButton = new SettingsButton
|
||||||
{
|
{
|
||||||
Text = "Calibrate using last play",
|
Text = BeatmapOffsetControlStrings.CalibrateUsingLastPlay,
|
||||||
Action = () => Current.Value = lastPlayAverage
|
Action = () => Current.Value = lastPlayAverage
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user