add support for {Version}

This commit is contained in:
nexpid 2024-10-27 23:06:26 +01:00 committed by GitHub
parent 281013f0e4
commit cb654d2309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using System.Windows.Data; using System.Windows.Data;
@ -237,6 +237,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
return text; // can't be translated (not in the correct format) return text; // can't be translated (not in the correct format)
string resourceName = text[1..^1]; string resourceName = text[1..^1];
if (resourceName == "Version")
return App.Version;
return Strings.ResourceManager.GetStringSafe(resourceName); return Strings.ResourceManager.GetStringSafe(resourceName);
} }