From 44fe75544c5fb317963517c55a1509c5c4bea67d Mon Sep 17 00:00:00 2001
From: L1Q <0xL1Q@ex.ua>
Date: Wed, 8 Sep 2021 09:33:44 +0300
Subject: [PATCH] Make Image History Title summary localizable
---
ShareX.HistoryLib/Forms/ImageHistoryForm.cs | 2 +-
.../Properties/Resources.Designer.cs | 18 ++++++++++++++++++
ShareX.HistoryLib/Properties/Resources.resx | 6 ++++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/ShareX.HistoryLib/Forms/ImageHistoryForm.cs b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs
index be047f70e..89e590399 100644
--- a/ShareX.HistoryLib/Forms/ImageHistoryForm.cs
+++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs
@@ -91,7 +91,7 @@ public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Actio
private void UpdateTitle(int total, int filtered)
{
- Text = $"{defaultTitle} (Total: {total:N0} - Filtered: {filtered:N0})";
+ Text = $"{defaultTitle} ({Resources.Total}: {total:N0} - {Resources.Filtered}: {filtered:N0})";
}
private void RefreshHistoryItems(bool mockData = false)
diff --git a/ShareX.HistoryLib/Properties/Resources.Designer.cs b/ShareX.HistoryLib/Properties/Resources.Designer.cs
index b54ade41e..544e82519 100644
--- a/ShareX.HistoryLib/Properties/Resources.Designer.cs
+++ b/ShareX.HistoryLib/Properties/Resources.Designer.cs
@@ -89,6 +89,15 @@ internal static string ErrorOccuredWhileReadingHistoryFile {
}
}
+ ///
+ /// Looks up a localized string similar to Filtered.
+ ///
+ internal static string Filtered {
+ get {
+ return ResourceManager.GetString("Filtered", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -473,5 +482,14 @@ internal static System.Drawing.Bitmap notebook {
return ((System.Drawing.Bitmap)(obj));
}
}
+
+ ///
+ /// Looks up a localized string similar to Total.
+ ///
+ internal static string Total {
+ get {
+ return ResourceManager.GetString("Total", resourceCulture);
+ }
+ }
}
}
diff --git a/ShareX.HistoryLib/Properties/Resources.resx b/ShareX.HistoryLib/Properties/Resources.resx
index 51baa83ce..07f6b9d8f 100644
--- a/ShareX.HistoryLib/Properties/Resources.resx
+++ b/ShareX.HistoryLib/Properties/Resources.resx
@@ -253,4 +253,10 @@
File name, window title, process name, etc.
+
+ Total
+
+
+ Filtered
+
\ No newline at end of file