mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 04:32:57 +08:00
GameplayMenuOverlay.cs: add translatable strings for Retry count:
and Song progress:
This makes the assumption that languages will prefer having the number on the right
This commit is contained in:
parent
a01577cba5
commit
cfa1280028
@ -1,4 +1,4 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// 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;
|
||||
@ -34,6 +34,16 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString PausedHeader => new TranslatableString(getKey(@"paused_header"), @"paused");
|
||||
|
||||
/// <summary>
|
||||
/// "Retry count: "
|
||||
/// </summary>
|
||||
public static LocalisableString RetryCount => new TranslatableString(getKey(@"retry_count"), @"Retry count: ");
|
||||
|
||||
/// <summary>
|
||||
/// "Song progress: "
|
||||
/// </summary>
|
||||
public static LocalisableString SongProgress => new TranslatableString(getKey(@"song_progress"), @"Song progress: ");
|
||||
|
||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||
}
|
||||
}
|
||||
}
|
@ -21,6 +21,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -210,13 +211,13 @@ namespace osu.Game.Screens.Play
|
||||
private void updateInfoText()
|
||||
{
|
||||
playInfoText.Clear();
|
||||
playInfoText.AddText("Retry count: ");
|
||||
playInfoText.AddText(GameplayMenuOverlayStrings.RetryCount);
|
||||
playInfoText.AddText(retries.ToString(), cp => cp.Font = cp.Font.With(weight: FontWeight.Bold));
|
||||
|
||||
if (getSongProgress() is int progress)
|
||||
{
|
||||
playInfoText.NewLine();
|
||||
playInfoText.AddText("Song progress: ");
|
||||
playInfoText.AddText(GameplayMenuOverlayStrings.SongProgress);
|
||||
playInfoText.AddText($"{progress}%", cp => cp.Font = cp.Font.With(weight: FontWeight.Bold));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user