From 7c1c346067f4500c30ad20356dfbd911ba5bfb59 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 11 Oct 2022 16:51:00 -0700 Subject: [PATCH] remove culture info thing (i am putting this in vanillafix) --- QSB/Localization/QSBLocalization.cs | 25 ------------------------- QSB/RespawnSync/RespawnHUDMarker.cs | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/QSB/Localization/QSBLocalization.cs b/QSB/Localization/QSBLocalization.cs index ea94b74c..a81af601 100644 --- a/QSB/Localization/QSBLocalization.cs +++ b/QSB/Localization/QSBLocalization.cs @@ -2,7 +2,6 @@ using QSB.Utility; using System; using System.Collections.Generic; -using System.Globalization; using System.IO; using System.Linq; using System.Reflection; @@ -82,28 +81,4 @@ public static class QSBLocalization Current = newTranslation; LanguageChanged?.Invoke(); } - - public static CultureInfo CultureInfo - => Current.Language switch - { - /* - * Language tags from BCP-47 standard, implemented by windows - * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c - * I have no fucking idea if this will work on linux. ¯\_(ツ)_/¯ - */ - - TextTranslation.Language.ENGLISH => new CultureInfo("en"), - TextTranslation.Language.SPANISH_LA => new CultureInfo("es-419"), - TextTranslation.Language.GERMAN => new CultureInfo("de"), - TextTranslation.Language.FRENCH => new CultureInfo("fr"), - TextTranslation.Language.ITALIAN => new CultureInfo("it"), - TextTranslation.Language.POLISH => new CultureInfo("pl"), - TextTranslation.Language.PORTUGUESE_BR => new CultureInfo("pt-BR"), - TextTranslation.Language.JAPANESE => new CultureInfo("ja"), - TextTranslation.Language.RUSSIAN => new CultureInfo("ru"), - TextTranslation.Language.CHINESE_SIMPLE => new CultureInfo("zh-Hans"), - TextTranslation.Language.KOREAN => new CultureInfo("ko"), - TextTranslation.Language.TURKISH => new CultureInfo("tr"), - _ => new CultureInfo("en") // what - }; } diff --git a/QSB/RespawnSync/RespawnHUDMarker.cs b/QSB/RespawnSync/RespawnHUDMarker.cs index f9653a5a..f135d114 100644 --- a/QSB/RespawnSync/RespawnHUDMarker.cs +++ b/QSB/RespawnSync/RespawnHUDMarker.cs @@ -12,7 +12,7 @@ public class RespawnHUDMarker : HUDDistanceMarker { _markerRadius = 0.2f; _markerTarget = transform; - _markerLabel = QSBLocalization.Current.RespawnPlayer.ToUpper(QSBLocalization.CultureInfo); + _markerLabel = QSBLocalization.Current.RespawnPlayer.ToUpper(); _isReady = true; base.InitCanvasMarker();