From 4c1c7f61dc843afc8e69adaea7720ae201d490bb Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Tue, 25 Jun 2024 17:00:22 +0400 Subject: [PATCH] Add option for using unsupported Roblox UI locales --- Bloxstrap/Bootstrapper.cs | 8 +++----- Bloxstrap/Resources/Strings.Designer.cs | 4 ++-- Bloxstrap/Resources/Strings.resx | 4 ++-- Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml | 3 ++- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 0d54636..81af52c 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -305,12 +305,10 @@ namespace Bloxstrap if (App.Settings.Prop.ForceRobloxLanguage) { - if (_launchCommandLine.StartsWith("roblox-player:1")) - _launchCommandLine += "+robloxLocale:"; - else - _launchCommandLine += " -robloxLocale "; + var match = Regex.Match(_launchCommandLine, "gameLocale:([a-z_]+)"); - _launchCommandLine += App.CurrentCulture.Name.Replace('-', '_'); + if (match.Groups.Count == 2) + _launchCommandLine = _launchCommandLine.Replace("robloxLocale:en_us", $"robloxLocale:{match.Groups[1].Value}"); } } diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index 2e4f42c..1c6246e 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -1634,7 +1634,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Roblox will be forced to display the same language that Bloxstrap is presently using.. + /// Looks up a localized string similar to Only applies to games launched from the Roblox website.. /// public static string Menu_Behaviour_ForceRobloxLanguage_Description { get { @@ -1643,7 +1643,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Force Roblox language. + /// Looks up a localized string similar to Allow use of unsupported Roblox languages. /// public static string Menu_Behaviour_ForceRobloxLanguage_Title { get { diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index a8030a0..78268d0 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1037,9 +1037,9 @@ Scroll for more languages. Scroll to see more. A relaunch is required for changes to take effect. - Force Roblox language + Allow use of unsupported Roblox languages - Roblox will be forced to display the same language that Bloxstrap is presently using. + Only applies to games launched from the Roblox website. \ No newline at end of file diff --git a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml index a5aca39..49d0c39 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml @@ -37,7 +37,8 @@ + Description="{x:Static resources:Strings.Menu_Behaviour_ForceRobloxLanguage_Description}" + HelpLink="https://github.com/pizzaboxer/bloxstrap/wiki/Information-on-Roblox-app-localisation">