From 04d2ce150ad5ded53dcb67ee2654bd313829ffa8 Mon Sep 17 00:00:00 2001 From: Denis Titovets Date: Fri, 7 Nov 2025 14:46:40 +0300 Subject: [PATCH] Localise `WASAPI` setting --- osu.Game/Localisation/AudioSettingsStrings.cs | 15 +++++++++++++++ .../Sections/Audio/AudioDevicesSettings.cs | 9 +++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/osu.Game/Localisation/AudioSettingsStrings.cs b/osu.Game/Localisation/AudioSettingsStrings.cs index 58caea7dd4..37ebdd80e0 100644 --- a/osu.Game/Localisation/AudioSettingsStrings.cs +++ b/osu.Game/Localisation/AudioSettingsStrings.cs @@ -99,6 +99,21 @@ namespace osu.Game.Localisation /// public static LocalisableString AdjustBeatmapOffsetAutomaticallyTooltip => new TranslatableString(getKey(@"adjust_beatmap_offset_automatically_tooltip"), @"If enabled, the offset suggested from last play on a beatmap is automatically applied."); + /// + /// "Use experimental audio mode" + /// + public static LocalisableString WasapiLabel => new TranslatableString(getKey(@"wasapi_label"), @"Use experimental audio mode"); + + /// + /// "This will attempt to initialise the audio engine in a lower latency mode." + /// + public static LocalisableString WasapiTooltip => new TranslatableString(getKey(@"wasapi_tooltip"), @"This will attempt to initialise the audio engine in a lower latency mode."); + + /// + /// "Due to reduced latency, your audio offset will need to be adjusted when enabling this setting. Generally expect to subtract 20 - 60 ms from your known value." + /// + public static LocalisableString WasapiNotice => new TranslatableString(getKey(@"wasapi_notice"), @"Due to reduced latency, your audio offset will need to be adjusted when enabling this setting. Generally expect to subtract 20 - 60 ms from your known value."); + private static string getKey(string key) => $@"{prefix}:{key}"; } } diff --git a/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs b/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs index 5b5617bae0..811f6b606a 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs @@ -41,8 +41,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio { Add(wasapiExperimental = new SettingsCheckbox { - LabelText = "Use experimental audio mode", - TooltipText = "This will attempt to initialise the audio engine in a lower latency mode.", + LabelText = AudioSettingsStrings.WasapiLabel, + TooltipText = AudioSettingsStrings.WasapiTooltip, Current = audio.UseExperimentalWasapi, Keywords = new[] { "wasapi", "latency", "exclusive" } }); @@ -64,10 +64,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio if (wasapiExperimental != null) { if (wasapiExperimental.Current.Value) - { - wasapiExperimental.SetNoticeText( - "Due to reduced latency, your audio offset will need to be adjusted when enabling this setting. Generally expect to subtract 20 - 60 ms from your known value.", true); - } + wasapiExperimental.SetNoticeText(AudioSettingsStrings.WasapiNotice, true); else wasapiExperimental.ClearNoticeText(); }