This commit is contained in:
nexpid 2024-10-28 16:23:17 +01:00 committed by GitHub
parent cb654d2309
commit 6361c89112
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,12 +233,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
private static string? GetTranslatedText(string? text)
{
if (text != null) text = text.Replace("{Version}", App.Version);
if (text == null || !text.StartsWith('{') || !text.EndsWith('}'))
return text; // can't be translated (not in the correct format)
string resourceName = text[1..^1];
if (resourceName == "Version")
return App.Version;
return Strings.ResourceManager.GetStringSafe(resourceName);
}