Rename Fluent *GetString methods to GetMessage.

This commit is contained in:
Paul Chote
2024-10-19 13:09:40 +01:00
committed by Gustas
parent 09063d23da
commit 67254e0b39
104 changed files with 396 additions and 396 deletions

View File

@@ -44,10 +44,10 @@ namespace OpenRA.Mods.Common.Installer
Action<long> onProgress = null;
if (length < InstallFromSourceLogic.ShowPercentageThreshold)
updateMessage(FluentProvider.GetString(InstallFromSourceLogic.CopyingFilename,
updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.CopyingFilename,
"filename", displayFilename));
else
onProgress = b => updateMessage(FluentProvider.GetString(InstallFromSourceLogic.CopyingFilenameProgress,
onProgress = b => updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.CopyingFilenameProgress,
"filename", displayFilename,
"progress", 100 * b / length));

View File

@@ -68,10 +68,10 @@ namespace OpenRA.Mods.Common.Installer
Action<long> onProgress = null;
if (length < InstallFromSourceLogic.ShowPercentageThreshold)
updateMessage(FluentProvider.GetString(InstallFromSourceLogic.Extracting,
updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.Extracting,
"filename", displayFilename));
else
onProgress = b => updateMessage(FluentProvider.GetString(InstallFromSourceLogic.ExtractingProgress,
onProgress = b => updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.ExtractingProgress,
"filename", displayFilename,
"progress", 100 * b / length));

View File

@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Installer
{
Log.Write("install", $"Extracting {sourcePath} -> {targetPath}");
var displayFilename = Path.GetFileName(Path.GetFileName(targetPath));
void OnProgress(int percent) => updateMessage(FluentProvider.GetString(
void OnProgress(int percent) => updateMessage(FluentProvider.GetMessage(
InstallFromSourceLogic.ExtractingProgress,
"filename", displayFilename, "progress", percent));
reader.ExtractFile(node.Value.Value, target, OnProgress);

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Installer
{
Log.Write("install", $"Extracting {sourcePath} -> {targetPath}");
var displayFilename = Path.GetFileName(Path.GetFileName(targetPath));
void OnProgress(int percent) => updateMessage(FluentProvider.GetString(InstallFromSourceLogic.ExtractingProgress,
void OnProgress(int percent) => updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.ExtractingProgress,
"filename", displayFilename,
"progress", percent));
reader.ExtractFile(node.Value.Value, target, OnProgress);

View File

@@ -61,10 +61,10 @@ namespace OpenRA.Mods.Common.Installer
Action<long> onProgress = null;
if (length < InstallFromSourceLogic.ShowPercentageThreshold)
updateMessage(FluentProvider.GetString(InstallFromSourceLogic.Extracting,
updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.Extracting,
"filename", displayFilename));
else
onProgress = b => updateMessage(FluentProvider.GetString(InstallFromSourceLogic.ExtractingProgress,
onProgress = b => updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.ExtractingProgress,
"filename", displayFilename,
"progress", 100 * b / length));

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Installer
using (var targetStream = File.OpenWrite(targetPath))
sourceStream.CopyTo(targetStream);
updateMessage(FluentProvider.GetString(InstallFromSourceLogic.ExtractingProgress,
updateMessage(FluentProvider.GetMessage(InstallFromSourceLogic.ExtractingProgress,
"filename", displayFilename,
"progress", 100));