(38d8117f7) Added: More routing of TextManager.Get().Replace -> TextManager.GetWithVariable(s), missing workshop-related localization tags to englishvanilla

This commit is contained in:
Joonas Rikkonen
2019-06-04 15:38:12 +03:00
parent 822322e669
commit f797235bfd
66 changed files with 332 additions and 302 deletions
@@ -203,23 +203,20 @@ namespace Barotrauma.Networking
if (ContentPackage.List.Any(cp => cp.MD5hash.Hash == ContentPackageHashes[i]))
{
packageText.TextColor = Color.Orange;
packageText.ToolTip = TextManager.Get("ServerListContentPackageNotEnabled")
.Replace("[contentpackage]", ContentPackageNames[i]);
packageText.ToolTip = TextManager.GetWithVariable("ServerListContentPackageNotEnabled", "[contentpackage]", ContentPackageNames[i]);
}
//workshop download link found
else if (i < ContentPackageWorkshopUrls.Count && !string.IsNullOrEmpty(ContentPackageWorkshopUrls[i]))
{
availableWorkshopUrls.Add(ContentPackageWorkshopUrls[i]);
packageText.TextColor = Color.Yellow;
packageText.ToolTip = TextManager.Get("ServerListIncompatibleContentPackageWorkshopAvailable")
.Replace("[contentpackage]", ContentPackageNames[i]);
packageText.ToolTip = TextManager.GetWithVariable("ServerListIncompatibleContentPackageWorkshopAvailable", "[contentpackage]", ContentPackageNames[i]);
}
else //no package or workshop download link found, tough luck
{
packageText.TextColor = Color.Red;
packageText.ToolTip = TextManager.Get("ServerListIncompatibleContentPackage")
.Replace("[contentpackage]", ContentPackageNames[i])
.Replace("[hash]", ContentPackageHashes[i]);
packageText.ToolTip = TextManager.GetWithVariables("ServerListIncompatibleContentPackage",
new string[2] { "[contentpackage]", "[hash]" }, new string[2] { ContentPackageNames[i], ContentPackageHashes[i] });
}
}
}