mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Closes #3093
This commit is contained in:
parent
2f56b6dc3a
commit
e7ad69be26
3 changed files with 39 additions and 1 deletions
|
@ -712,7 +712,7 @@
|
|||
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||
|
|
||||
Copyright 2015-$CURRENT_YEAR$ Łukasz "JustArchi" Domeradzki
|
||||
Copyright 2015-${CurrentDate.Year} Łukasz "JustArchi" Domeradzki
|
||||
Contact: JustArchi@JustArchi.net
|
||||
|
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -787,6 +787,7 @@ limitations under the License.</s:String>
|
|||
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=VCS/@EntryIndexedValue"></s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=VCS/@EntryIndexRemoved">True</s:Boolean>
|
||||
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=VsBulb/@EntryIndexedValue">NOTIFY</s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002EDaemon_002EInlayHints_002EParameterHints_002ECppParameterNameHintsOptionsOptionsMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECpp_002EDaemon_002EParameterHints_002ECppParameterNameHintsOptionsOptionsMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002EParameterNameHints_002ECSharpParameterNameHintsOptionsMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
|
|
|
@ -2705,6 +2705,7 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
|
|||
SteamUser.LogOnDetails logOnDetails = new() {
|
||||
AccessToken = RefreshToken,
|
||||
CellID = ASF.GlobalDatabase?.CellID,
|
||||
ClientLanguage = CultureInfo.CurrentCulture.ToSteamClientLanguage(),
|
||||
LoginID = LoginID,
|
||||
ShouldRememberPassword = BotConfig.UseLoginKeys,
|
||||
Username = username
|
||||
|
|
|
@ -67,4 +67,40 @@ internal static class SteamUtilities {
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string ToSteamClientLanguage(this CultureInfo cultureInfo) {
|
||||
ArgumentNullException.ThrowIfNull(cultureInfo);
|
||||
|
||||
// We're doing our best here to map provided CultureInfo to language supported by Steam
|
||||
return cultureInfo.TwoLetterISOLanguageName switch {
|
||||
"bg" => "bulgarian",
|
||||
"cs" => "czech",
|
||||
"da" => "danish",
|
||||
"de" => "german",
|
||||
"es" when cultureInfo.Name is "es-419" or "es-AR" or "es-BO" or "es-BR" or "es-BZ" or "es-CL" or "es-CO" or "es-CR" or "es-CU" or "es-DO" or "es-EC" or "es-GQ" or "es-GT" or "es-HN" or "es-MX" or "es-NI" or "es-PA" or "es-PE" or "es-PH" or "es-PR" or "es-PY" or "es-SV" or "es-US" or "es-UY" or "es-VE" => "latam",
|
||||
"es" => "spanish",
|
||||
"el" => "greek",
|
||||
"fr" => "french",
|
||||
"fi" => "finnish",
|
||||
"hu" => "hungarian",
|
||||
"id" => "indonesian",
|
||||
"it" => "italian",
|
||||
"ko" => "koreana",
|
||||
"nl" => "dutch",
|
||||
"no" => "norwegian",
|
||||
"pl" => "polish",
|
||||
"pt" when cultureInfo.Name == "pt-BR" => "brazilian",
|
||||
"pt" => "portuguese",
|
||||
"ro" => "romanian",
|
||||
"ru" => "russian",
|
||||
"sv" => "swedish",
|
||||
"th" => "thai",
|
||||
"tr" => "turkish",
|
||||
"uk" => "ukrainian",
|
||||
"vi" => "vietnamese",
|
||||
"zh" when cultureInfo.Name is "zh-Hant" or "zh-HK" or "zh-MO" or "zh-TW" => "tchinese",
|
||||
"zh" => "schinese",
|
||||
_ => "english"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue