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

@@ -51,13 +51,13 @@ namespace OpenRA.Mods.Cnc.Installer
Action<long> onProgress = null;
if (stream.Length < InstallFromSourceLogic.ShowPercentageThreshold)
updateMessage(TranslationProvider.GetString(
updateMessage(FluentProvider.GetString(
InstallFromSourceLogic.Extracing,
Translation.Arguments("filename", displayFilename)));
FluentBundle.Arguments("filename", displayFilename)));
else
onProgress = b => updateMessage(TranslationProvider.GetString(
onProgress = b => updateMessage(FluentProvider.GetString(
InstallFromSourceLogic.ExtractingProgress,
Translation.Arguments("filename", displayFilename, "progress", 100 * b / stream.Length)));
FluentBundle.Arguments("filename", displayFilename, "progress", 100 * b / stream.Length)));
using (var target = File.OpenWrite(targetPath))
{

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the victim will hear when they get robbed.")]
public readonly string InfiltratedNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the victim will see when they get robbed.")]
public readonly string InfiltratedTextNotification = null;
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the perpetrator will hear after successful infiltration.")]
public readonly string InfiltrationNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the perpetrator will see after successful infiltration.")]
public readonly string InfiltrationTextNotification = null;

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the victim will hear when they get sabotaged.")]
public readonly string InfiltratedNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the victim will see when they get sabotaged.")]
public readonly string InfiltratedTextNotification = null;
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the perpetrator will hear after successful infiltration.")]
public readonly string InfiltrationNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the perpetrator will see after successful infiltration.")]
public readonly string InfiltrationTextNotification = null;

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the victim will hear when they get sabotaged.")]
public readonly string InfiltratedNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the victim will see when they get sabotaged.")]
public readonly string InfiltratedTextNotification = null;
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the perpetrator will hear after successful infiltration.")]
public readonly string InfiltrationNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the perpetrator will see after successful infiltration.")]
public readonly string InfiltrationTextNotification = null;

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the victim will hear when technology gets stolen.")]
public readonly string InfiltratedNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the victim will see when technology gets stolen.")]
public readonly string InfiltratedTextNotification = null;
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the perpetrator will hear after successful infiltration.")]
public readonly string InfiltrationNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the perpetrator will see after successful infiltration.")]
public readonly string InfiltrationTextNotification = null;

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Experience to grant to the infiltrating player.")]
public readonly int PlayerExperience = 0;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the victim will see when they get sabotaged.")]
public readonly string InfiltratedTextNotification = null;
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Sound the perpetrator will hear after successful infiltration.")]
public readonly string InfiltrationNotification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification the perpetrator will see after successful infiltration.")]
public readonly string InfiltrationTextNotification = null;

View File

@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Cnc.Traits
[Desc("Notification to play when a target is infiltrated.")]
public readonly string Notification = null;
[TranslationReference(optional: true)]
[FluentReference(optional: true)]
[Desc("Text notification to display when a target is infiltrated.")]
public readonly string TextNotification = null;

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits
public readonly string Palette = TileSet.TerrainPaletteInternalName;
[FieldLoader.Require]
[TranslationReference]
[FluentReference]
[Desc("Resource name used by tooltips.")]
public readonly string Name = null;
@@ -371,7 +371,7 @@ namespace OpenRA.Mods.Cnc.Traits
string IResourceRenderer.GetRenderedResourceTooltip(CPos cell)
{
if (renderIndices[cell] != null || borders[cell] != Adjacency.None)
return TranslationProvider.GetString(info.Name);
return FluentProvider.GetString(info.Name);
return null;
}