Rename Fluent-related code to be more precise.

This commit is contained in:
Paul Chote
2024-10-01 19:34:12 +01:00
committed by Gustas
parent 771b9ddfda
commit b29b685058
176 changed files with 1349 additions and 1369 deletions

View File

@@ -116,7 +116,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var label = item.Get<LabelWithTooltipWidget>("TITLE");
var name = actor.TraitInfos<TooltipInfo>().FirstOrDefault(info => info.EnabledByDefault)?.Name;
if (!string.IsNullOrEmpty(name))
WidgetUtils.TruncateLabelToTooltip(label, TranslationProvider.GetString(name));
WidgetUtils.TruncateLabelToTooltip(label, FluentProvider.GetString(name));
if (firstItem == null)
{
@@ -159,7 +159,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var info = actor.TraitInfoOrDefault<EncyclopediaInfo>();
if (info != null && !string.IsNullOrEmpty(info.Description))
text += WidgetUtils.WrapText(TranslationProvider.GetString(info.Description) + "\n\n", descriptionLabel.Bounds.Width, descriptionFont);
text += WidgetUtils.WrapText(FluentProvider.GetString(info.Description) + "\n\n", descriptionLabel.Bounds.Width, descriptionFont);
var height = descriptionFont.Measure(text).Y;
descriptionLabel.GetText = () => text;
@@ -175,7 +175,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var actorTooltip = actor.TraitInfos<TooltipInfo>().FirstOrDefault(info => info.EnabledByDefault);
if (actorTooltip != null)
return TranslationProvider.GetString(actorTooltip.Name);
return FluentProvider.GetString(actorTooltip.Name);
}
return name;