Rename Fluent-related code to be more precise.
This commit is contained in:
@@ -44,13 +44,13 @@ namespace OpenRA.Mods.Common.Installer
|
||||
|
||||
Action<long> onProgress = null;
|
||||
if (length < InstallFromSourceLogic.ShowPercentageThreshold)
|
||||
updateMessage(TranslationProvider.GetString(
|
||||
updateMessage(FluentProvider.GetString(
|
||||
InstallFromSourceLogic.CopyingFilename,
|
||||
Translation.Arguments("filename", displayFilename)));
|
||||
FluentBundle.Arguments("filename", displayFilename)));
|
||||
else
|
||||
onProgress = b => updateMessage(TranslationProvider.GetString(
|
||||
onProgress = b => updateMessage(FluentProvider.GetString(
|
||||
InstallFromSourceLogic.CopyingFilenameProgress,
|
||||
Translation.Arguments("filename", displayFilename, "progress", 100 * b / length)));
|
||||
FluentBundle.Arguments("filename", displayFilename, "progress", 100 * b / length)));
|
||||
|
||||
InstallerUtils.CopyStream(source, target, length, onProgress);
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ namespace OpenRA.Mods.Common.Installer
|
||||
|
||||
Action<long> onProgress = null;
|
||||
if (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 / length)));
|
||||
FluentBundle.Arguments("filename", displayFilename, "progress", 100 * b / length)));
|
||||
|
||||
using (var target = File.OpenWrite(targetPath))
|
||||
{
|
||||
|
||||
@@ -64,9 +64,9 @@ namespace OpenRA.Mods.Common.Installer
|
||||
{
|
||||
Log.Write("install", $"Extracting {sourcePath} -> {targetPath}");
|
||||
var displayFilename = Path.GetFileName(Path.GetFileName(targetPath));
|
||||
void OnProgress(int percent) => updateMessage(TranslationProvider.GetString(
|
||||
void OnProgress(int percent) => updateMessage(FluentProvider.GetString(
|
||||
InstallFromSourceLogic.ExtractingProgress,
|
||||
Translation.Arguments("filename", displayFilename, "progress", percent)));
|
||||
FluentBundle.Arguments("filename", displayFilename, "progress", percent)));
|
||||
reader.ExtractFile(node.Value.Value, target, OnProgress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ namespace OpenRA.Mods.Common.Installer
|
||||
{
|
||||
Log.Write("install", $"Extracting {sourcePath} -> {targetPath}");
|
||||
var displayFilename = Path.GetFileName(Path.GetFileName(targetPath));
|
||||
void OnProgress(int percent) => updateMessage(TranslationProvider.GetString(
|
||||
void OnProgress(int percent) => updateMessage(FluentProvider.GetString(
|
||||
InstallFromSourceLogic.ExtractingProgress,
|
||||
Translation.Arguments("filename", displayFilename, "progress", percent)));
|
||||
FluentBundle.Arguments("filename", displayFilename, "progress", percent)));
|
||||
reader.ExtractFile(node.Value.Value, target, OnProgress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,11 +61,11 @@ namespace OpenRA.Mods.Common.Installer
|
||||
|
||||
Action<long> onProgress = null;
|
||||
if (length < InstallFromSourceLogic.ShowPercentageThreshold)
|
||||
updateMessage(TranslationProvider.GetString(InstallFromSourceLogic.Extracing, Translation.Arguments("filename", displayFilename)));
|
||||
updateMessage(FluentProvider.GetString(InstallFromSourceLogic.Extracing, FluentBundle.Arguments("filename", displayFilename)));
|
||||
else
|
||||
onProgress = b => updateMessage(TranslationProvider.GetString(
|
||||
onProgress = b => updateMessage(FluentProvider.GetString(
|
||||
InstallFromSourceLogic.ExtractingProgress,
|
||||
Translation.Arguments("filename", displayFilename, "progress", 100 * b / length)));
|
||||
FluentBundle.Arguments("filename", displayFilename, "progress", 100 * b / length)));
|
||||
|
||||
using (var target = File.OpenWrite(targetPath))
|
||||
{
|
||||
|
||||
@@ -49,9 +49,9 @@ namespace OpenRA.Mods.Common.Installer
|
||||
using (var targetStream = File.OpenWrite(targetPath))
|
||||
sourceStream.CopyTo(targetStream);
|
||||
|
||||
updateMessage(TranslationProvider.GetString(
|
||||
updateMessage(FluentProvider.GetString(
|
||||
InstallFromSourceLogic.ExtractingProgress,
|
||||
Translation.Arguments("filename", displayFilename, "progress", 100)));
|
||||
FluentBundle.Arguments("filename", displayFilename, "progress", 100)));
|
||||
|
||||
extracted.Add(targetPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user