From f93ee425c289fe7c829d5baf7694fe93aa83c1ef Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Sun, 15 Oct 2023 15:46:45 +0100 Subject: [PATCH] add emoji types to locale --- Bloxstrap/Extensions/EmojiTypeEx.cs | 12 ++--- Bloxstrap/Resources/Strings.Designer.cs | 45 +++++++++++++++++++ Bloxstrap/Resources/Strings.resx | 15 +++++++ .../UI/Elements/Menu/Pages/ModsPage.xaml | 8 +++- Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs | 8 ++-- 5 files changed, 77 insertions(+), 11 deletions(-) diff --git a/Bloxstrap/Extensions/EmojiTypeEx.cs b/Bloxstrap/Extensions/EmojiTypeEx.cs index 4313fab..5cf694f 100644 --- a/Bloxstrap/Extensions/EmojiTypeEx.cs +++ b/Bloxstrap/Extensions/EmojiTypeEx.cs @@ -2,13 +2,13 @@ { static class EmojiTypeEx { - public static IReadOnlyDictionary Selections => new Dictionary + public static IReadOnlyCollection Selections => new EmojiType[] { - { "Default (Twemoji)", EmojiType.Default }, - { "Catmoji", EmojiType.Catmoji }, - { "Windows 11", EmojiType.Windows11 }, - { "Windows 10", EmojiType.Windows10 }, - { "Windows 8", EmojiType.Windows8 }, + EmojiType.Default, + EmojiType.Catmoji, + EmojiType.Windows11, + EmojiType.Windows10, + EmojiType.Windows8 }; public static IReadOnlyDictionary Filenames => new Dictionary diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index 63c7161..93fec38 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -864,6 +864,51 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Catmoji. + /// + public static string Enums_EmojiType_Catmoji { + get { + return ResourceManager.GetString("Enums.EmojiType.Catmoji", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Default (Twemoji). + /// + public static string Enums_EmojiType_Default { + get { + return ResourceManager.GetString("Enums.EmojiType.Default", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows 10. + /// + public static string Enums_EmojiType_Windows10 { + get { + return ResourceManager.GetString("Enums.EmojiType.Windows10", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows 11. + /// + public static string Enums_EmojiType_Windows11 { + get { + return ResourceManager.GetString("Enums.EmojiType.Windows11", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows 8. + /// + public static string Enums_EmojiType_Windows8 { + get { + return ResourceManager.GetString("Enums.EmojiType.Windows8", resourceCulture); + } + } + /// /// Looks up a localized string similar to Default. /// diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index f638aa7..edd4dc0 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -387,6 +387,21 @@ Your ReShade configuration files will still be saved, and you can locate them by Always prompt + + Catmoji + + + Default (Twemoji) + + + Windows 10 + + + Windows 11 + + + Windows 8 + Default diff --git a/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml index 41ddb47..3728dd6 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml @@ -120,7 +120,13 @@ - + + + + + + + diff --git a/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs index 9e4f8b1..268522d 100644 --- a/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs @@ -82,12 +82,12 @@ namespace Bloxstrap.UI.ViewModels.Menu set => App.Settings.Prop.UseDisableAppPatch = value; } - public IReadOnlyDictionary EmojiTypes => EmojiTypeEx.Selections; + public IReadOnlyCollection EmojiTypes => EmojiTypeEx.Selections; - public string SelectedEmojiType + public EmojiType SelectedEmojiType { - get => EmojiTypes.FirstOrDefault(x => x.Value == App.Settings.Prop.EmojiType).Key; - set => App.Settings.Prop.EmojiType = EmojiTypes[value]; + get => App.Settings.Prop.EmojiType; + set => App.Settings.Prop.EmojiType = value; } public Visibility ChooseCustomFontVisibility => _usingCustomFont ? Visibility.Collapsed : Visibility.Visible;