diff --git a/TwitchDownloaderWPF/PageChatRender.xaml.cs b/TwitchDownloaderWPF/PageChatRender.xaml.cs
index a189a3e8..21d5d19b 100644
--- a/TwitchDownloaderWPF/PageChatRender.xaml.cs
+++ b/TwitchDownloaderWPF/PageChatRender.xaml.cs
@@ -20,6 +20,7 @@
using TwitchDownloaderCore.TwitchObjects;
using TwitchDownloaderWPF.Models;
using TwitchDownloaderWPF.Properties;
+using TwitchDownloaderWPF.Translations;
using TwitchDownloaderWPF.Utils;
using WpfAnimatedGif;
using MessageBox = System.Windows.MessageBox;
@@ -146,7 +147,7 @@ public ChatRenderOptions GetOptions(string filename)
options.EmojiVendor = EmojiVendor.None;
foreach (var item in comboBadges.SelectedItems)
{
- options.ChatBadgeMask += (int)((ChatBadgeListItem)item).Type;
+ options.ChatBadgeMask += (int)((CheckComboBoxItem)item).Tag;
}
return options;
@@ -196,19 +197,22 @@ private void LoadSettings()
RadioEmojiNone.IsChecked = (EmojiVendor)Settings.Default.RenderEmojiVendor == EmojiVendor.None;
comboBadges.Items.Clear();
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.Broadcaster, Name = "Broadcaster" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.Moderator, Name = "Mods" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.VIP, Name = "VIPs" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.Subscriber, Name = "Subs" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.Predictions, Name = "Predictions" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.NoAudioVisual, Name = "No Audio/No Video" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.PrimeGaming, Name = "Prime" });
- comboBadges.Items.Add(new ChatBadgeListItem() { Type = ChatBadgeType.Other, Name = "Others" });
-
- foreach (ChatBadgeListItem item in comboBadges.Items)
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskBroadcaster, Tag = ChatBadgeType.Broadcaster });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskModerator, Tag = ChatBadgeType.Moderator });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskVIP, Tag = ChatBadgeType.VIP });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskSubscriber, Tag = ChatBadgeType.Subscriber });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskPredictions, Tag = ChatBadgeType.Predictions });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskNoAudioNoVideo, Tag = ChatBadgeType.NoAudioVisual });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskTwitchPrime, Tag = ChatBadgeType.PrimeGaming });
+ comboBadges.Items.Add(new CheckComboBoxItem { Content = Strings.BadgeMaskOthers, Tag = ChatBadgeType.Other });
+
+ var badgeMask = (ChatBadgeType)Settings.Default.ChatBadgeMask;
+ foreach (CheckComboBoxItem item in comboBadges.Items)
{
- if (((ChatBadgeType)Settings.Default.ChatBadgeMask).HasFlag(item.Type))
+ if (badgeMask.HasFlag((Enum)item.Tag))
+ {
comboBadges.SelectedItems.Add(item);
+ }
}
foreach (VideoContainer container in comboFormat.Items)
@@ -317,7 +321,7 @@ public void SaveSettings()
int newMask = 0;
foreach (var item in comboBadges.SelectedItems)
{
- newMask += (int)((ChatBadgeListItem)item).Type;
+ newMask += (int)((CheckComboBoxItem)item).Tag;
}
Settings.Default.ChatBadgeMask = newMask;
@@ -739,17 +743,6 @@ private void TextJson_TextChanged(object sender, TextChangedEventArgs e)
}
}
- public class ChatBadgeListItem
- {
- public ChatBadgeType Type { get; set; }
- public string Name { get; set; }
-
- public override string ToString()
- {
- return Name;
- }
- }
-
public class VideoContainer
{
public string Name;
diff --git a/TwitchDownloaderWPF/Translations/Strings.Designer.cs b/TwitchDownloaderWPF/Translations/Strings.Designer.cs
index 37c70ac4..a61b3835 100644
--- a/TwitchDownloaderWPF/Translations/Strings.Designer.cs
+++ b/TwitchDownloaderWPF/Translations/Strings.Designer.cs
@@ -167,6 +167,78 @@ public static string BackgroundColor {
}
}
+ ///
+ /// Looks up a localized string similar to Broadcaster.
+ ///
+ public static string BadgeMaskBroadcaster {
+ get {
+ return ResourceManager.GetString("BadgeMaskBroadcaster", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Mods.
+ ///
+ public static string BadgeMaskModerator {
+ get {
+ return ResourceManager.GetString("BadgeMaskModerator", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No Audio/No Video.
+ ///
+ public static string BadgeMaskNoAudioNoVideo {
+ get {
+ return ResourceManager.GetString("BadgeMaskNoAudioNoVideo", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Others.
+ ///
+ public static string BadgeMaskOthers {
+ get {
+ return ResourceManager.GetString("BadgeMaskOthers", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Predictions.
+ ///
+ public static string BadgeMaskPredictions {
+ get {
+ return ResourceManager.GetString("BadgeMaskPredictions", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Subs.
+ ///
+ public static string BadgeMaskSubscriber {
+ get {
+ return ResourceManager.GetString("BadgeMaskSubscriber", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Prime.
+ ///
+ public static string BadgeMaskTwitchPrime {
+ get {
+ return ResourceManager.GetString("BadgeMaskTwitchPrime", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to VIPs.
+ ///
+ public static string BadgeMaskVIP {
+ get {
+ return ResourceManager.GetString("BadgeMaskVIP", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Badge Scale:.
///
diff --git a/TwitchDownloaderWPF/Translations/Strings.es.resx b/TwitchDownloaderWPF/Translations/Strings.es.resx
index c7792dc6..61564b5f 100644
--- a/TwitchDownloaderWPF/Translations/Strings.es.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.es.resx
@@ -874,4 +874,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
diff --git a/TwitchDownloaderWPF/Translations/Strings.fr.resx b/TwitchDownloaderWPF/Translations/Strings.fr.resx
index a9a65206..8477fd56 100644
--- a/TwitchDownloaderWPF/Translations/Strings.fr.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.fr.resx
@@ -873,4 +873,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.it.resx b/TwitchDownloaderWPF/Translations/Strings.it.resx
index 54810a9c..6a8981aa 100644
--- a/TwitchDownloaderWPF/Translations/Strings.it.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.it.resx
@@ -874,4 +874,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
diff --git a/TwitchDownloaderWPF/Translations/Strings.ja.resx b/TwitchDownloaderWPF/Translations/Strings.ja.resx
index 457c007d..94d29be0 100644
--- a/TwitchDownloaderWPF/Translations/Strings.ja.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.ja.resx
@@ -872,7 +872,28 @@
ユーザー名の読みやすさを向上する:
-
- Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.pl.resx b/TwitchDownloaderWPF/Translations/Strings.pl.resx
index 8df5edfe..819bde7a 100644
--- a/TwitchDownloaderWPF/Translations/Strings.pl.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.pl.resx
@@ -873,4 +873,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.pt-br.resx b/TwitchDownloaderWPF/Translations/Strings.pt-br.resx
index ff3dcaff..33577e25 100644
--- a/TwitchDownloaderWPF/Translations/Strings.pt-br.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.pt-br.resx
@@ -872,4 +872,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.resx b/TwitchDownloaderWPF/Translations/Strings.resx
index 825e07a7..0db53f84 100644
--- a/TwitchDownloaderWPF/Translations/Strings.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.resx
@@ -872,4 +872,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.ru.resx b/TwitchDownloaderWPF/Translations/Strings.ru.resx
index 4e34e9bb..5b299529 100644
--- a/TwitchDownloaderWPF/Translations/Strings.ru.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.ru.resx
@@ -873,4 +873,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.tr.resx b/TwitchDownloaderWPF/Translations/Strings.tr.resx
index 2797f533..9476b7c7 100644
--- a/TwitchDownloaderWPF/Translations/Strings.tr.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.tr.resx
@@ -874,4 +874,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
\ No newline at end of file
diff --git a/TwitchDownloaderWPF/Translations/Strings.uk.resx b/TwitchDownloaderWPF/Translations/Strings.uk.resx
index de475c3b..9b16c853 100644
--- a/TwitchDownloaderWPF/Translations/Strings.uk.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.uk.resx
@@ -873,4 +873,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+
diff --git a/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx b/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx
index 6c92e24d..54313e1a 100644
--- a/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx
+++ b/TwitchDownloaderWPF/Translations/Strings.zh-cn.resx
@@ -875,4 +875,28 @@
Increase Username Readability:
+
+ Broadcaster
+
+
+ Mods
+
+
+ VIPs
+
+
+ Subs
+
+
+ Predictions
+
+
+ No Audio/No Video
+
+
+ Prime
+
+
+ Others
+