Add option for using unsupported Roblox UI locales

This commit is contained in:
pizzaboxer 2024-06-25 17:00:22 +04:00
parent 6440e3158a
commit 4c1c7f61dc
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
4 changed files with 9 additions and 10 deletions

View File

@ -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}");
}
}

View File

@ -1634,7 +1634,7 @@ namespace Bloxstrap.Resources {
}
/// <summary>
/// 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..
/// </summary>
public static string Menu_Behaviour_ForceRobloxLanguage_Description {
get {
@ -1643,7 +1643,7 @@ namespace Bloxstrap.Resources {
}
/// <summary>
/// Looks up a localized string similar to Force Roblox language.
/// Looks up a localized string similar to Allow use of unsupported Roblox languages.
/// </summary>
public static string Menu_Behaviour_ForceRobloxLanguage_Title {
get {

View File

@ -1037,9 +1037,9 @@ Scroll for more languages.</value>
<value>Scroll to see more. A relaunch is required for changes to take effect.</value>
</data>
<data name="Menu.Behaviour.ForceRobloxLanguage.Title" xml:space="preserve">
<value>Force Roblox language</value>
<value>Allow use of unsupported Roblox languages</value>
</data>
<data name="Menu.Behaviour.ForceRobloxLanguage.Description" xml:space="preserve">
<value>Roblox will be forced to display the same language that Bloxstrap is presently using.</value>
<value>Only applies to games launched from the Roblox website.</value>
</data>
</root>

View File

@ -37,7 +37,8 @@
<controls:OptionControl
Header="{x:Static resources:Strings.Menu_Behaviour_ForceRobloxLanguage_Title}"
Description="{x:Static resources:Strings.Menu_Behaviour_ForceRobloxLanguage_Description}">
Description="{x:Static resources:Strings.Menu_Behaviour_ForceRobloxLanguage_Description}"
HelpLink="https://github.com/pizzaboxer/bloxstrap/wiki/Information-on-Roblox-app-localisation">
<ui:ToggleSwitch IsChecked="{Binding ForceRobloxLanguage, Mode=TwoWay}" />
</controls:OptionControl>