1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:17:27 +08:00

localise remaining parts of the game settings

This commit is contained in:
Loreos7 2024-02-03 00:08:36 +03:00
parent 7cdedfb6ca
commit 4d324a3057
8 changed files with 38 additions and 7 deletions

View File

@ -1,9 +1,10 @@
// 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Game.Overlays.Settings;
using osu.Game.Rulesets.Taiko.Configuration;
@ -27,7 +28,7 @@ namespace osu.Game.Rulesets.Taiko
{
new SettingsEnumDropdown<TaikoTouchControlScheme>
{
LabelText = "Touch control scheme",
LabelText = RulesetSettingsStrings.TouchControlScheme,
Current = config.GetBindable<TaikoTouchControlScheme>(TaikoRulesetSetting.TouchControlScheme)
}
};

View File

@ -64,6 +64,21 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString AudioOffset => new TranslatableString(getKey(@"audio_offset"), @"Audio offset");
/// <summary>
/// "Play a few beatmaps to receive a suggested offset!"
/// </summary>
public static LocalisableString SuggestedOffsetNote => new TranslatableString(getKey(@"suggested_offset_note"), @"Play a few beatmaps to receive a suggested offset!");
/// <summary>
/// "Based on the last {0} play(s), the suggested offset is {1} ms"
/// </summary>
public static LocalisableString SuggestedOffsetValueReceived(int plays, double? value) => new TranslatableString(getKey(@"suggested_offset_value_received"), @"Based on the last {0} play(s), the suggested offset is {1} ms", plays, value);
/// <summary>
/// "Apply suggested offset"
/// </summary>
public static LocalisableString ApplySuggestedOffset => new TranslatableString(getKey(@"apply_suggested_offset"), @"Apply suggested offset");
/// <summary>
/// "Offset wizard"
/// </summary>

View File

@ -29,6 +29,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString ImportFiles => new TranslatableString(getKey(@"import_files"), @"Import files");
/// <summary>
/// "Run latency certifier"
/// </summary>
public static LocalisableString RunLatencyCertifier => new TranslatableString(getKey(@"run_latency_certifier"), @"Run latency certifier");
/// <summary>
/// "Memory"
/// </summary>

View File

@ -159,6 +159,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString MinimiseOnFocusLoss => new TranslatableString(getKey(@"minimise_on_focus_loss"), @"Minimise osu! when switching to another app");
/// <summary>
/// "Shrink game to avoid cameras and notches"
/// </summary>
public static LocalisableString ShrinkGameOnMobile => new TranslatableString(getKey(@"shrink_game_on_mobile"), @"Shrink game to avoid cameras and notches");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -84,6 +84,11 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString ScrollSpeedTooltip(int scrollTime, int scrollSpeed) => new TranslatableString(getKey(@"ruleset"), @"{0}ms (speed {1})", scrollTime, scrollSpeed);
/// <summary>
/// "Touch control scheme"
/// </summary>
public static LocalisableString TouchControlScheme => new TranslatableString(getKey(@"touch_control_scheme"), @"Touch control scheme");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -91,7 +91,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
applySuggestion = new RoundedButton
{
RelativeSizeAxes = Axes.X,
Text = "Apply suggested offset",
Text = AudioSettingsStrings.ApplySuggestedOffset,
Action = () =>
{
if (SuggestedOffset.Value.HasValue)
@ -155,8 +155,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
private void updateHintText()
{
hintText.Text = SuggestedOffset.Value == null
? @"Play a few beatmaps to receive a suggested offset!"
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {SuggestedOffset.Value:N0} ms.";
? AudioSettingsStrings.SuggestedOffsetNote
: AudioSettingsStrings.SuggestedOffsetValueReceived(averageHitErrorHistory.Count, SuggestedOffset.Value);
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
}

View File

@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
},
new SettingsButton
{
Text = @"Run latency certifier",
Text = DebugSettingsStrings.RunLatencyCertifier,
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen()))
}
};

View File

@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
},
safeAreaConsiderationsCheckbox = new SettingsCheckbox
{
LabelText = "Shrink game to avoid cameras and notches",
LabelText = GraphicsSettingsStrings.ShrinkGameOnMobile,
Current = osuConfig.GetBindable<bool>(OsuSetting.SafeAreaConsiderations),
},
new SettingsSlider<float, UIScaleSlider>