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

@@ -23,16 +23,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
[ChromeLogicArgsHotkeys("OpenTeamChat", "OpenGeneralChat")]
public class IngameChatLogic : ChromeLogic, INotificationHandler<TextNotification>
{
[TranslationReference]
[FluentReference]
const string TeamChat = "button-team-chat";
[TranslationReference]
[FluentReference]
const string GeneralChat = "button-general-chat";
[TranslationReference("seconds")]
[FluentReference("seconds")]
const string ChatAvailability = "label-chat-availability";
[TranslationReference]
[FluentReference]
const string ChatDisabled = "label-chat-disabled";
readonly Ruleset modRules;
@@ -70,10 +70,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var disableTeamChat = alwaysDisabled || (world.LocalPlayer != null && !players.Any(p => p.IsAlliedWith(world.LocalPlayer)));
var teamChat = !disableTeamChat;
var teamMessage = TranslationProvider.GetString(TeamChat);
var allMessage = TranslationProvider.GetString(GeneralChat);
var teamMessage = FluentProvider.GetString(TeamChat);
var allMessage = FluentProvider.GetString(GeneralChat);
chatDisabled = TranslationProvider.GetString(ChatDisabled);
chatDisabled = FluentProvider.GetString(ChatDisabled);
// Only execute this once, the first time this widget is loaded
if (TextNotificationsManager.MutedPlayers.Count == 0)
@@ -194,7 +194,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return true;
};
chatAvailableIn = new CachedTransform<int, string>(x => TranslationProvider.GetString(ChatAvailability, Translation.Arguments("seconds", x)));
chatAvailableIn = new CachedTransform<int, string>(x => FluentProvider.GetString(ChatAvailability, FluentBundle.Arguments("seconds", x)));
if (!isMenuChat)
{