Rename Fluent *GetString methods to GetMessage.
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user