mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 04:32:54 +08:00
Merge pull request #27015 from Loreos7/settings-remaining-strings-localisation
Localise remaining strings in settings section
This commit is contained in:
commit
aff7e1fb8c
@ -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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Rulesets.Taiko.Configuration;
|
using osu.Game.Rulesets.Taiko.Configuration;
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ namespace osu.Game.Rulesets.Taiko
|
|||||||
{
|
{
|
||||||
new SettingsEnumDropdown<TaikoTouchControlScheme>
|
new SettingsEnumDropdown<TaikoTouchControlScheme>
|
||||||
{
|
{
|
||||||
LabelText = "Touch control scheme",
|
LabelText = RulesetSettingsStrings.TouchControlScheme,
|
||||||
Current = config.GetBindable<TaikoTouchControlScheme>(TaikoRulesetSetting.TouchControlScheme)
|
Current = config.GetBindable<TaikoTouchControlScheme>(TaikoRulesetSetting.TouchControlScheme)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -64,6 +64,21 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString AudioOffset => new TranslatableString(getKey(@"audio_offset"), @"Audio offset");
|
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, LocalisableString 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>
|
/// <summary>
|
||||||
/// "Offset wizard"
|
/// "Offset wizard"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -29,6 +29,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString ImportFiles => new TranslatableString(getKey(@"import_files"), @"Import files");
|
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>
|
/// <summary>
|
||||||
/// "Memory"
|
/// "Memory"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -159,6 +159,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString MinimiseOnFocusLoss => new TranslatableString(getKey(@"minimise_on_focus_loss"), @"Minimise osu! when switching to another app");
|
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 ShrinkGameToSafeArea => new TranslatableString(getKey(@"shrink_game_to_safe_area"), @"Shrink game to avoid cameras and notches");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString ScrollSpeedTooltip(int scrollTime, int scrollSpeed) => new TranslatableString(getKey(@"ruleset"), @"{0}ms (speed {1})", scrollTime, scrollSpeed);
|
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}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ using System.Linq;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
|
using osu.Framework.Extensions.LocalisationExtensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
@ -91,7 +92,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
applySuggestion = new RoundedButton
|
applySuggestion = new RoundedButton
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Text = "Apply suggested offset",
|
Text = AudioSettingsStrings.ApplySuggestedOffset,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
if (SuggestedOffset.Value.HasValue)
|
if (SuggestedOffset.Value.HasValue)
|
||||||
@ -155,8 +156,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
|||||||
private void updateHintText()
|
private void updateHintText()
|
||||||
{
|
{
|
||||||
hintText.Text = SuggestedOffset.Value == null
|
hintText.Text = SuggestedOffset.Value == null
|
||||||
? @"Play a few beatmaps to receive a suggested offset!"
|
? AudioSettingsStrings.SuggestedOffsetNote
|
||||||
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {SuggestedOffset.Value:N0} ms.";
|
: AudioSettingsStrings.SuggestedOffsetValueReceived(averageHitErrorHistory.Count, SuggestedOffset.Value.ToLocalisableString(@"N0"));
|
||||||
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
|
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Settings.Sections.DebugSettings
|
|||||||
},
|
},
|
||||||
new SettingsButton
|
new SettingsButton
|
||||||
{
|
{
|
||||||
Text = @"Run latency certifier",
|
Text = DebugSettingsStrings.RunLatencyCertifier,
|
||||||
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen()))
|
Action = () => performer?.PerformFromScreen(menu => menu.Push(new LatencyCertifierScreen()))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
},
|
},
|
||||||
safeAreaConsiderationsCheckbox = new SettingsCheckbox
|
safeAreaConsiderationsCheckbox = new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Shrink game to avoid cameras and notches",
|
LabelText = GraphicsSettingsStrings.ShrinkGameToSafeArea,
|
||||||
Current = osuConfig.GetBindable<bool>(OsuSetting.SafeAreaConsiderations),
|
Current = osuConfig.GetBindable<bool>(OsuSetting.SafeAreaConsiderations),
|
||||||
},
|
},
|
||||||
new SettingsSlider<float, UIScaleSlider>
|
new SettingsSlider<float, UIScaleSlider>
|
||||||
|
Loading…
Reference in New Issue
Block a user