Move markup to resources in image info command.

This commit is contained in:
2025-08-18 14:36:12 +01:00
parent 1a0fbf8fdb
commit b004936192
2 changed files with 9 additions and 11 deletions

View File

@@ -402,7 +402,7 @@ In you are unsure, please press N to not continue.</value>
<value>Command not supported for this image type.</value> <value>Command not supported for this image type.</value>
</data> </data>
<data name="Image_format_identified_by_0_1" xml:space="preserve"> <data name="Image_format_identified_by_0_1" xml:space="preserve">
<value>Image format identified by {0} ({1}).</value> <value>[slateblue1]Image format identified by [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
</data> </data>
<data name="Image_format_identified_by_0" xml:space="preserve"> <data name="Image_format_identified_by_0" xml:space="preserve">
<value>Image format identified by {0}.</value> <value>Image format identified by {0}.</value>
@@ -719,19 +719,19 @@ In you are unsure, please press N to not continue.</value>
<value>Input file 1 format not identified, not proceeding with comparison.</value> <value>Input file 1 format not identified, not proceeding with comparison.</value>
</data> </data>
<data name="First_input_file_format_identified_by_0_1" xml:space="preserve"> <data name="First_input_file_format_identified_by_0_1" xml:space="preserve">
<value>[slateblue1]Input file 1 format identified by [fuchsia]{0}[/] ([rosybrown]{1}[/]).[/]</value> <value>[slateblue1]Input file 1 format identified by [green]{0}[/] ([red]{1}[/][/]).[/]</value>
</data> </data>
<data name="First_input_file_format_identified_by_0" xml:space="preserve"> <data name="First_input_file_format_identified_by_0" xml:space="preserve">
<value>[slateblue1]Input file 1 format identified by [fuchsia]{0}[/].[/]</value> <value>[slateblue1]Input file 1 format identified by [green]{0}[/].[/]</value>
</data> </data>
<data name="Second_input_file_format_not_identified" xml:space="preserve"> <data name="Second_input_file_format_not_identified" xml:space="preserve">
<value>Input file 2 format not identified, not proceeding with comparison.</value> <value>Input file 2 format not identified, not proceeding with comparison.</value>
</data> </data>
<data name="Second_input_file_format_identified_by_0_1" xml:space="preserve"> <data name="Second_input_file_format_identified_by_0_1" xml:space="preserve">
<value>[slateblue1]Input file 2 format identified by [fuchsia]{0}[/] ([rosybrown]{1}[/]).[/]</value> <value>[slateblue1]Input file 2 format identified by [green]{0}[/] ([italic][red]{1}[/][/]).[/]</value>
</data> </data>
<data name="Second_input_file_format_identified_by_0" xml:space="preserve"> <data name="Second_input_file_format_identified_by_0" xml:space="preserve">
<value>[slateblue1]Input file 2 format identified by [fuchsia]{0}[/].[/]</value> <value>[slateblue1]Input file 2 format identified by [green]{0}[/].[/]</value>
</data> </data>
<data name="Opening_first_image_file" xml:space="preserve"> <data name="Opening_first_image_file" xml:space="preserve">
<value>[slateblue1]Opening image 1 file...[/]</value> <value>[slateblue1]Opening image 1 file...[/]</value>

View File

@@ -61,7 +61,7 @@ sealed class ImageInfoCommand : Command<ImageInfoCommand.Settings>
Core.Spectre.ProgressSingleSpinner(ctx => Core.Spectre.ProgressSingleSpinner(ctx =>
{ {
ctx.AddTask($"[slateblue1]{UI.Identifying_file_filter}[/]").IsIndeterminate(); ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate();
inputFilter = PluginRegister.Singleton.GetFilter(settings.ImagePath); inputFilter = PluginRegister.Singleton.GetFilter(settings.ImagePath);
}); });
@@ -78,7 +78,7 @@ sealed class ImageInfoCommand : Command<ImageInfoCommand.Settings>
Core.Spectre.ProgressSingleSpinner(ctx => Core.Spectre.ProgressSingleSpinner(ctx =>
{ {
ctx.AddTask($"[slateblue1]{UI.Identifying_image_format}[/]").IsIndeterminate(); ctx.AddTask(UI.Identifying_image_format).IsIndeterminate();
imageFormat = ImageFormat.Detect(inputFilter); imageFormat = ImageFormat.Detect(inputFilter);
}); });
@@ -89,9 +89,7 @@ sealed class ImageInfoCommand : Command<ImageInfoCommand.Settings>
return (int)ErrorNumber.UnrecognizedFormat; return (int)ErrorNumber.UnrecognizedFormat;
} }
AaruLogging.WriteLine($"[slateblue1]{UI.Image_format_identified_by_0_1}[/]", AaruLogging.WriteLine(UI.Image_format_identified_by_0_1, imageFormat.Name, imageFormat.Id);
$"[green]{imageFormat.Name}[/]",
$"[italic][red]{imageFormat.Id}[/][/]");
AaruLogging.WriteLine(); AaruLogging.WriteLine();
@@ -101,7 +99,7 @@ sealed class ImageInfoCommand : Command<ImageInfoCommand.Settings>
Core.Spectre.ProgressSingleSpinner(ctx => Core.Spectre.ProgressSingleSpinner(ctx =>
{ {
ctx.AddTask($"[slateblue1]{UI.Invoke_Opening_image_file}[/]").IsIndeterminate(); ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate();
opened = imageFormat.Open(inputFilter); opened = imageFormat.Open(inputFilter);
}); });