From abf9b60ba18e1576e5374d05b0be5d91febaf313 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 18 Aug 2025 13:40:04 +0100 Subject: [PATCH] Move markup to resources in dev info command. --- Aaru.Localization/Core.resx | 102 ++++++++-------- Aaru.Localization/UI.resx | 40 +++--- Aaru/Commands/Device/Info.cs | 231 ++++++++++++++++------------------- 3 files changed, 177 insertions(+), 196 deletions(-) diff --git a/Aaru.Localization/Core.resx b/Aaru.Localization/Core.resx index 7a1abc516..fbbb6e8f8 100644 --- a/Aaru.Localization/Core.resx +++ b/Aaru.Localization/Core.resx @@ -114,28 +114,28 @@ Device identified as {0} - ASCII Page {0:X2}h: {1} + [bold][blue]ASCII Page[/bold][/] [italic][teal]{0:X2}h[/][/]: [slateblue1]{1}[/] - Unit Serial Number: {0} + [bold][blue]Unit Serial Number:[/][/] [italic][teal]{0}[/][/] - ASCII implemented operating definitions: {0} + [bold][blue]ASCII implemented operating definitions:[/][/] [slateblue1]{0}[/] - Manufacturer-assigned Serial Number: {0} + [bold][blue]Manufacturer-assigned Serial Number:[/][/] [italic][teal]{0}[/][/] - TapeAlert Supported Flags Bitmap: 0x{0:X16} + [bold][blue]TapeAlert Supported Flags Bitmap:[/][/] [italic][teal]0x{0:X16}[/][/] - Automation Device Serial Number: {0} + [bold][blue]Automation Device Serial Number:[/][/] [italic][teal]{0}[/][/] - Data Transfer Device Element Address: 0x{0} + [bold][blue]Data Transfer Device Element Address:[/][/] [italic][teal]0x{0}[/][/] - Found undecoded SCSI VPD page 0x{0:X2} + [bold][blue]Found undecoded SCSI VPD page[/][/] [italic][teal]0x{0:X2}[/][/] GET CONFIGURATION length is {0} bytes @@ -153,127 +153,127 @@ GET CONFIGURATION returned no feature descriptors - Drive has loaded a total of {0} discs + [slateblue1]Drive has loaded a total of [teal]{0}[/] discs[/] - Drive has spent {0} reading CDs + [slateblue1]Drive has spent [aqua]{0}[/] reading CDs[/] - Drive has spent {0} writing CDs + [slateblue1]Drive has spent [aqua]{0}[/] writing CDs[/] - Drive has spent {0} reading DVDs + [slateblue1]Drive has spent [aqua]{0}[/] reading DVDs[/] - Drive has spent {0} writing DVDs + [slateblue1]Drive has spent [aqua]{0}[/] writing DVDs[/] - Drive supports PoweRec, is enabled and recommends {0} Kb/sec. + [slateblue1]Drive supports PoweRec, is enabled and recommends [lime]{0}[/] Kb/sec.[/] - Drive supports PoweRec and has it enabled. + [slateblue1]Drive supports PoweRec and has it enabled.[/] - Selected PoweRec speed for currently inserted media is {0} Kb/sec ({1}x) + [slateblue1]Selected PoweRec speed for currently inserted media is [lime]{0}[/] Kb/sec ([teal]{1}x[/])[/] - Maximum PoweRec speed for currently inserted media is {0} Kb/sec ({1}x) + [slateblue1]Maximum PoweRec speed for currently inserted media is [lime]{0}[/] Kb/sec ([teal]{1}x[/])[/] - Last used PoweRec was {0} Kb/sec ({1}x) + [slateblue1]Last used PoweRec was [lime]{0}[/] Kb/sec ([teal]{1}x[/])[/] - Drive supports PoweRec and has it disabled. + [slateblue1]Drive supports PoweRec and has it disabled.[/] - Drive supports Plextor SilentMode + [slateblue1]Drive supports Plextor SilentMode[/] - Plextor SilentMode is enabled: + [slateblue1]Plextor SilentMode is enabled:[/] - Access time is slow + [slateblue1]Access time is slow[/] - Access time is fast + [slateblue1]Access time is fast[/] - CD read speed limited to {0}x + [slateblue1]CD read speed limited to [teal]{0}x[/][/] - DVD read speed limited to {0}x + [slateblue1]DVD read speed limited to [teal]{0}x[/][/] - CD write speed limited to {0}x + [slateblue1]CD write speed limited to [teal]{0}x[/][/] - Drive supports Plextor GigaRec + [slateblue1]Drive supports Plextor GigaRec[/] - Drive supports Plextor SecuRec + [slateblue1]Drive supports Plextor SecuRec[/] - Drive supports Plextor SpeedRead + [slateblue1]Drive supports Plextor SpeedRead[/] - Drive supports Plextor SpeedRead and has it enabled + [green]Drive supports Plextor SpeedRead and has it enabled[/] - Drive supports hiding CD-Rs and forcing single session + [slateblue1]Drive supports hiding CD-Rs and forcing single session[/] - Drive currently hides CD-Rs + [green]Drive currently hides CD-Rs[/] - Drive currently forces single session + [green]Drive currently forces single session[/] - Drive supports Plextor VariRec + [slateblue1]Drive supports Plextor VariRec[/] - Drive supports Plextor VariRec for DVDs + [slateblue1]Drive supports Plextor VariRec for DVDs[/] - Drive supports bitsetting DVD+R book type + [slateblue1]Drive supports bitsetting DVD+R book type[/] - Drive supports bitsetting DVD+R DL book type + [slateblue1]Drive supports bitsetting DVD+R DL book type[/] - Drive supports test writing DVD+ + [slateblue1]Drive supports test writing DVD+[/] - Can do challenge/response with Xbox discs + [slateblue1]Can do challenge/response with Xbox discs[/] - Can read and decrypt SS from Xbox discs + [slateblue1]Can read and decrypt SS from Xbox discs[/] - Can set xtreme unlock state with Xbox discs + [slateblue1]Can set xtreme unlock state with Xbox discs[/] - Can set wxripper unlock state with Xbox discs + [slateblue1]Can set wxripper unlock state with Xbox discs[/] - Can do challenge/response with Xbox 360 discs + [slateblue1]Can do challenge/response with Xbox 360 discs[/] - Can read and decrypt SS from Xbox 360 discs + [slateblue1]Can read and decrypt SS from Xbox 360 discs[/] - Can set xtreme unlock state with Xbox 360 discs + [slateblue1]Can set xtreme unlock state with Xbox 360 discs[/] - Can set wxripper unlock state with Xbox 360 discs + [slateblue1]Can set wxripper unlock state with Xbox 360 discs[/] - Can set locked state + [slateblue1]Can set locked state[/] - Can skip read errors + [slateblue1]Can skip read errors[/] - Block limits for device: + [bold][blue]Block limits for device:[/][/] Generating subchannels... @@ -1387,10 +1387,10 @@ Unable to communicate with ATA device. - Device not in database, please create a device report and attach it to a Github issue. + [red]Device not in database, please create a device report and attach it to a Github issue.[/] - Device in database since {0}. + [slateblue1]Device in database since [yellow3]{0}[/].[/] Could not detect image format. diff --git a/Aaru.Localization/UI.resx b/Aaru.Localization/UI.resx index 57170b184..f1835322f 100644 --- a/Aaru.Localization/UI.resx +++ b/Aaru.Localization/UI.resx @@ -299,49 +299,49 @@ In you are unsure, please press N to not continue. Prefix for saving binary information from device. - USB device + [bold][blue]USB device[/][/] - FireWire device + [bold][blue]FireWire device[/][/] - PCMCIA device + [bold][blue]PCMCIA device[/][/] - SCSI device + [bold][blue]SCSI device[/][/] - SCSI MMC GET CONFIGURATION Features: + [bold][blue]SCSI MMC GET CONFIGURATION Features:[/][/] - Drive has kreon firmware: + [bold][blue]Drive has kreon firmware:[/][/] - Descriptor size + [bold][slateblue1]Descriptor size[/][/] - Vendor ID + [bold][slateblue1]Vendor ID[/][/] - Product ID + [bold][slateblue1]Product ID[/][/] - Product + [bold][slateblue1]Product[/][/] - Serial number + [bold][slateblue1]Serial number[/][/] - Model ID + [bold][slateblue1]Model ID[/][/] - Vendor + [bold][slateblue1]Vendor[/][/] - GUID + [bold][slateblue1]GUID[/][/] - PCMCIA CIS is {0} bytes + [slateblue]PCMCIA CIS is [teal]{0}[/] bytes[/] aaruremote host @@ -2044,10 +2044,10 @@ Testers: Kreon - Densities supported by device: + [bold][blue]Densities supported by device:[/][/] - Medium types supported by device: + [bold][blue]Medium types supported by device:[/][/] CID @@ -3115,16 +3115,16 @@ Do you want to continue? List devices - CD reading offset not found in database. + [slateblue1]CD reading offset not found in database.[/] - CD reading offset is {0} samples ({1} bytes). + [slateblue1]CD reading offset is [teal]{0}[/] samples ([lime]{1}[/] bytes).[/] Could not get any kind of information from the device !!! - Optimal multiple read is {0} sectors. + [slateblue1]Optimal multiple read is [aqua]{0}[/] sectors.[/] Unable to get separate tracks, not checksumming them diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index ba281bf39..1015b1307 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -115,7 +115,7 @@ sealed class DeviceInfoCommand : Command { table = new Table { - Title = new TableTitle($"[bold][blue]{UI.Title_USB_device}[/][/]") + Title = new TableTitle(UI.Title_USB_device) }; AaruLogging.Information(UI.Title_USB_device); @@ -129,21 +129,19 @@ sealed class DeviceInfoCommand : Command if(dev.UsbDescriptors != null) { - table.AddRow($"[bold][slateblue1]{UI.Title_Descriptor_size}[/][/]", - $"[lime]{dev.UsbDescriptors.Length}[/]"); + table.AddRow(UI.Title_Descriptor_size, $"[lime]{dev.UsbDescriptors.Length}[/]"); + + AaruLogging.Information($"{UI.Title_Descriptor_size}: {dev.UsbDescriptors.Length}"); } - table.AddRow($"[bold][slateblue1]{UI.Title_Vendor_ID}[/][/]", $"[lime]{dev.UsbVendorId:X4}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Product_ID}[/][/]", $"[lime]{dev.UsbProductId:X4}[/]"); + table.AddRow(UI.Title_Vendor_ID, $"[lime]{dev.UsbVendorId:X4}[/]"); + table.AddRow(UI.Title_Product_ID, $"[lime]{dev.UsbProductId:X4}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Manufacturer}[/][/]", - $"[purple]{Markup.Escape(dev.UsbManufacturerString ?? "")}[/]"); + table.AddRow(UI.Title_Manufacturer, $"[purple]{Markup.Escape(dev.UsbManufacturerString ?? "")}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Product}[/][/]", - $"[purple]{Markup.Escape(dev.UsbProductString ?? "")}[/]"); + table.AddRow(UI.Title_Product, $"[purple]{Markup.Escape(dev.UsbProductString ?? "")}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Serial_number}[/][/]", - $"[aqua]{Markup.Escape(dev.UsbSerialString ?? "")}[/]"); + table.AddRow(UI.Title_Serial_number, $"[aqua]{Markup.Escape(dev.UsbSerialString ?? "")}[/]"); AaruLogging.Information($"{UI.Title_Vendor_ID}: {dev.UsbVendorId:X4}"); AaruLogging.Information($"{UI.Title_Product_ID}: {dev.UsbProductId:X4}"); @@ -159,7 +157,7 @@ sealed class DeviceInfoCommand : Command { table = new Table { - Title = new TableTitle($"[bold]{UI.Title_FireWire_device}[/]") + Title = new TableTitle(UI.Title_FireWire_device) }; AaruLogging.Information(UI.Title_FireWire_device); @@ -171,16 +169,14 @@ sealed class DeviceInfoCommand : Command table.Border(TableBorder.Rounded); table.BorderColor(Color.Yellow); - table.AddRow($"[bold][slateblue1]{UI.Title_Vendor_ID}[/][/]", $"[lime]{dev.FireWireVendor:X6}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Model_ID}[/][/]", $"[lime]{dev.FireWireModel:X6}[/]"); + table.AddRow(UI.Title_Vendor_ID, $"[lime]{dev.FireWireVendor:X6}[/]"); + table.AddRow(UI.Title_Model_ID, $"[lime]{dev.FireWireModel:X6}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Vendor}[/][/]", - $"[purple]{Markup.Escape(dev.FireWireVendorName ?? "")}[/]"); + table.AddRow(UI.Title_Vendor, $"[purple]{Markup.Escape(dev.FireWireVendorName ?? "")}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_Model}[/][/]", - $"[purple]{Markup.Escape(dev.FireWireModelName ?? "")}[/]"); + table.AddRow(UI.Title_Model, $"[purple]{Markup.Escape(dev.FireWireModelName ?? "")}[/]"); - table.AddRow($"[bold][slateblue1]{UI.Title_GUID}[/][/]", $"[lime]{dev.FireWireGuid:X16}[/]"); + table.AddRow(UI.Title_GUID, $"[lime]{dev.FireWireGuid:X16}[/]"); AaruLogging.Information($"{UI.Title_Vendor_ID}: {dev.FireWireVendor:X6}"); AaruLogging.Information($"{UI.Title_Model_ID}: {dev.FireWireModel:X6}"); @@ -194,7 +190,7 @@ sealed class DeviceInfoCommand : Command if(dev.IsPcmcia) { - AaruLogging.WriteLine($"[bold]{UI.Title_PCMCIA_device}[/]"); + AaruLogging.WriteLine(UI.Title_PCMCIA_device); AaruLogging.WriteLine(UI.PCMCIA_CIS_is_0_bytes, dev.Cis.Length); Tuple[] tuples = CIS.GetTuples(dev.Cis); @@ -377,7 +373,7 @@ sealed class DeviceInfoCommand : Command if(devInfo.ScsiInquiry != null) { - if(dev.Type != DeviceType.ATAPI) AaruLogging.WriteLine($"[bold]{UI.Title_SCSI_device}[/]"); + if(dev.Type != DeviceType.ATAPI) AaruLogging.WriteLine(UI.Title_SCSI_device); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, @@ -394,8 +390,8 @@ sealed class DeviceInfoCommand : Command switch(page.Key) { case >= 0x01 and <= 0x7F: - AaruLogging.WriteLine($"[bold][blue]{Localization.Core.ASCII_Page_0_1}[/][/]", - $"[italic][teal]{page.Key}[/][/]", + AaruLogging.WriteLine(Localization.Core.ASCII_Page_0_1, + page.Key, Markup.Escape(EVPD.DecodeASCIIPage(page.Value))); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, page.Value); @@ -406,8 +402,8 @@ sealed class DeviceInfoCommand : Command if(decoded != null) { - AaruLogging.WriteLine($"[bold][blue]{Localization.Core.Unit_Serial_Number_0}[/][/]", - $"[italic][teal]{Markup.Escape(EVPD.DecodePage80(page.Value))}[/][/]"); + AaruLogging.WriteLine(Localization.Core.Unit_Serial_Number_0, + Markup.Escape(EVPD.DecodePage80(page.Value))); } DataFile.WriteTo(MODULE_NAME, @@ -428,9 +424,8 @@ sealed class DeviceInfoCommand : Command break; case 0x82: - AaruLogging - .WriteLine($"[bold][blue]{Localization.Core.ASCII_implemented_operating_definitions_0}[/][/]", - EVPD.DecodePage82(page.Value)); + AaruLogging.WriteLine(Localization.Core.ASCII_implemented_operating_definitions_0, + EVPD.DecodePage82(page.Value)); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, @@ -500,9 +495,8 @@ sealed class DeviceInfoCommand : Command break; case 0xB1: - AaruLogging - .WriteLine($"[bold][blue]{Localization.Core.Manufacturer_assigned_Serial_Number_0}[/][/]", - Markup.Escape(EVPD.DecodePageB1(page.Value))); + AaruLogging.WriteLine(Localization.Core.Manufacturer_assigned_Serial_Number_0, + Markup.Escape(EVPD.DecodePageB1(page.Value))); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, @@ -512,9 +506,8 @@ sealed class DeviceInfoCommand : Command break; case 0xB2: - AaruLogging - .WriteLine($"[bold][blue]{Localization.Core.TapeAlert_Supported_Flags_Bitmap_0}[/][/]", - EVPD.DecodePageB2(page.Value)); + AaruLogging.WriteLine(Localization.Core.TapeAlert_Supported_Flags_Bitmap_0, + EVPD.DecodePageB2(page.Value)); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, @@ -524,9 +517,8 @@ sealed class DeviceInfoCommand : Command break; case 0xB3: - AaruLogging - .WriteLine($"[bold][blue]{Localization.Core.Automation_Device_Serial_Number_0}[/][/]", - Markup.Escape(EVPD.DecodePageB3(page.Value))); + AaruLogging.WriteLine(Localization.Core.Automation_Device_Serial_Number_0, + Markup.Escape(EVPD.DecodePageB3(page.Value))); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, @@ -536,9 +528,8 @@ sealed class DeviceInfoCommand : Command break; case 0xB4: - AaruLogging - .WriteLine($"[bold][blue]{Localization.Core.Data_Transfer_Device_Element_Address_0}[/][/]", - Markup.Escape(EVPD.DecodePageB4(page.Value))); + AaruLogging.WriteLine(Localization.Core.Data_Transfer_Device_Element_Address_0, + Markup.Escape(EVPD.DecodePageB4(page.Value))); DataFile.WriteTo(MODULE_NAME, settings.OutputPrefix, @@ -976,24 +967,24 @@ sealed class DeviceInfoCommand : Command "PLEXTOR READ EEPROM", devInfo.PlextorFeatures.Eeprom); - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_has_loaded_a_total_of_0_discs}[/]", - $"[teal]{devInfo.PlextorFeatures.Discs}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_has_loaded_a_total_of_0_discs, + devInfo.PlextorFeatures.Discs); - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_has_spent_0_reading_CDs}[/]", - $"[aqua]{devInfo.PlextorFeatures.CdReadTime.Seconds().Humanize(minUnit: TimeUnit.Second)}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_has_spent_0_reading_CDs, + devInfo.PlextorFeatures.CdReadTime.Seconds().Humanize(minUnit: TimeUnit.Second)); - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_has_spent_0_writing_CDs}[/]", - $"[aqua]{devInfo.PlextorFeatures.CdWriteTime.Seconds().Humanize(minUnit: TimeUnit.Second)}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_has_spent_0_writing_CDs, + devInfo.PlextorFeatures.CdWriteTime.Seconds().Humanize(minUnit: TimeUnit.Second)); if(devInfo.PlextorFeatures.IsDvd) { - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_has_spent_0_reading_DVDs}[/]", - $"[aqua]{devInfo.PlextorFeatures.DvdReadTime.Seconds() - .Humanize(minUnit: TimeUnit.Second)}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_has_spent_0_reading_DVDs, + devInfo.PlextorFeatures.DvdReadTime.Seconds() + .Humanize(minUnit: TimeUnit.Second)); - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_has_spent_0_writing_DVDs}[/]", - $"[aqua]{devInfo.PlextorFeatures.DvdWriteTime.Seconds() - .Humanize(minUnit: TimeUnit.Second)}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_has_spent_0_writing_DVDs, + devInfo.PlextorFeatures.DvdWriteTime.Seconds() + .Humanize(minUnit: TimeUnit.Second)); } } @@ -1003,162 +994,150 @@ sealed class DeviceInfoCommand : Command { if(devInfo.PlextorFeatures.PoweRecRecommendedSpeed > 0) { - AaruLogging - .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_PoweRec_is_enabled_and_recommends_0}[/]", - $"[lime]{devInfo.PlextorFeatures.PoweRecRecommendedSpeed}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_PoweRec_is_enabled_and_recommends_0, + devInfo.PlextorFeatures.PoweRecRecommendedSpeed); } else + { AaruLogging .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_PoweRec_and_has_it_enabled}[/]"); + } if(devInfo.PlextorFeatures.PoweRecSelected > 0) { - AaruLogging.WriteLine($"[slateblue1]{Localization.Core - .Selected_PoweRec_speed_for_currently_inserted_media_is_0_1}[/]", - $"[lime]{devInfo.PlextorFeatures.PoweRecSelected}[/]", - $"[teal]{devInfo.PlextorFeatures.PoweRecSelected / 177}[/]"); + AaruLogging.WriteLine(Localization.Core + .Selected_PoweRec_speed_for_currently_inserted_media_is_0_1, + devInfo.PlextorFeatures.PoweRecSelected, + devInfo.PlextorFeatures.PoweRecSelected / 177); } if(devInfo.PlextorFeatures.PoweRecMax > 0) { - AaruLogging.WriteLine($"[slateblue1]{Localization.Core - .Maximum_PoweRec_speed_for_currently_inserted_media_is_0_1}[/]", - $"[lime]{devInfo.PlextorFeatures.PoweRecMax}[/]", - $"[teal]{devInfo.PlextorFeatures.PoweRecMax / 177}[/]"); + AaruLogging.WriteLine(Localization.Core + .Maximum_PoweRec_speed_for_currently_inserted_media_is_0_1, + devInfo.PlextorFeatures.PoweRecMax, + devInfo.PlextorFeatures.PoweRecMax / 177); } if(devInfo.PlextorFeatures.PoweRecLast > 0) { - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Last_used_PoweRec_was_0_1}[/]", - $"[lime]{devInfo.PlextorFeatures.PoweRecLast}[/]", - $"[teal]{devInfo.PlextorFeatures.PoweRecLast / 177}[/]"); + AaruLogging.WriteLine(Localization.Core.Last_used_PoweRec_was_0_1, + devInfo.PlextorFeatures.PoweRecLast, + devInfo.PlextorFeatures.PoweRecLast / 177); } } else - AaruLogging - .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_PoweRec_and_has_it_disabled}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_PoweRec_and_has_it_disabled); } if(devInfo.PlextorFeatures?.SilentMode == true) { - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_supports_Plextor_SilentMode}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_Plextor_SilentMode); if(devInfo.PlextorFeatures.SilentModeEnabled) { - AaruLogging.WriteLine($"[green]{Localization.Core.Plextor_SilentMode_is_enabled}[/]"); + AaruLogging.WriteLine(Localization.Core.Plextor_SilentMode_is_enabled); AaruLogging.WriteLine("\t" + (devInfo.PlextorFeatures.AccessTimeLimit == 2 - ? $"[slateblue1]{Localization.Core.Access_time_is_slow}[/]" - : $"[slateblue1]{Localization.Core.Access_time_is_fast}[/]")); + ? Localization.Core.Access_time_is_slow + : Localization.Core.Access_time_is_fast)); if(devInfo.PlextorFeatures.CdReadSpeedLimit > 0) { - AaruLogging.WriteLine("\t" + $"[slateblue1]{Localization.Core.CD_read_speed_limited_to_0}[/]", - $"[teal]{devInfo.PlextorFeatures.CdReadSpeedLimit}[/]"); + AaruLogging.WriteLine("\t" + Localization.Core.CD_read_speed_limited_to_0, + devInfo.PlextorFeatures.CdReadSpeedLimit); } if(devInfo.PlextorFeatures.DvdReadSpeedLimit > 0 && devInfo.PlextorFeatures.IsDvd) { - AaruLogging.WriteLine("\t" + $"[slateblue1]{Localization.Core.DVD_read_speed_limited_to_0}[/]", - $"[teal]{devInfo.PlextorFeatures.DvdReadSpeedLimit}[/]"); + AaruLogging.WriteLine("\t" + Localization.Core.DVD_read_speed_limited_to_0, + devInfo.PlextorFeatures.DvdReadSpeedLimit); } if(devInfo.PlextorFeatures.CdWriteSpeedLimit > 0) { - AaruLogging.WriteLine("\t" + $"[slateblue1]{Localization.Core.CD_write_speed_limited_to_0}[/]", - $"[teal]{devInfo.PlextorFeatures.CdWriteSpeedLimit}[/]"); + AaruLogging.WriteLine("\t" + Localization.Core.CD_write_speed_limited_to_0, + devInfo.PlextorFeatures.CdWriteSpeedLimit); } } } if(devInfo.PlextorFeatures?.GigaRec == true) - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_supports_Plextor_GigaRec}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_Plextor_GigaRec); if(devInfo.PlextorFeatures?.SecuRec == true) - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_supports_Plextor_SecuRec}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_Plextor_SecuRec); if(devInfo.PlextorFeatures?.SpeedRead == true) { AaruLogging.WriteLine(devInfo.PlextorFeatures.SpeedReadEnabled - ? $"[green]{Localization.Core.Drive_supports_Plextor_SpeedRead_and_has_it_enabled}[/]" - : $"[slateblue1]{Localization.Core.Drive_supports_Plextor_SpeedRead}[/]"); + ? Localization.Core.Drive_supports_Plextor_SpeedRead_and_has_it_enabled + : Localization.Core.Drive_supports_Plextor_SpeedRead); } if(devInfo.PlextorFeatures?.Hiding == true) { - AaruLogging - .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_hiding_CDRs_and_forcing_single_session}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_hiding_CDRs_and_forcing_single_session); if(devInfo.PlextorFeatures.HidesRecordables) - AaruLogging.WriteLine($"[green]{Localization.Core.Drive_currently_hides_CDRs}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_currently_hides_CDRs); if(devInfo.PlextorFeatures.HidesSessions) - AaruLogging.WriteLine($"[green]{Localization.Core.Drive_currently_forces_single_session}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_currently_forces_single_session); } if(devInfo.PlextorFeatures?.VariRec == true) - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_supports_Plextor_VariRec}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_Plextor_VariRec); if(devInfo.PlextorFeatures?.IsDvd == true) { if(devInfo.PlextorFeatures.VariRecDvd) - AaruLogging - .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_Plextor_VariRec_for_DVDs}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_Plextor_VariRec_for_DVDs); if(devInfo.PlextorFeatures.BitSetting) - AaruLogging - .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_bitsetting_DVD_R_book_type}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_bitsetting_DVD_R_book_type); if(devInfo.PlextorFeatures.BitSettingDl) - AaruLogging - .WriteLine($"[slateblue1]{Localization.Core.Drive_supports_bitsetting_DVD_R_DL_book_type}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_bitsetting_DVD_R_DL_book_type); if(devInfo.PlextorFeatures.DvdPlusWriteTest) - AaruLogging.WriteLine($"[slateblue1]{Localization.Core.Drive_supports_test_writing_DVD_Plus}[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_supports_test_writing_DVD_Plus); } if(devInfo.ScsiInquiry.Value.KreonPresent) { - AaruLogging.WriteLine($"[bold][blue]{UI.Title_Drive_has_kreon_firmware}[/][/]"); + AaruLogging.WriteLine(UI.Title_Drive_has_kreon_firmware); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ChallengeResponse)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_do_challenge_response_with_Xbox_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_do_challenge_response_with_Xbox_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.DecryptSs)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_read_and_decrypt_SS_from_Xbox_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_read_and_decrypt_SS_from_Xbox_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.XtremeUnlock)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_set_xtreme_unlock_state_with_Xbox_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_set_xtreme_unlock_state_with_Xbox_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.WxripperUnlock)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_set_wxripper_unlock_state_with_Xbox_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_set_wxripper_unlock_state_with_Xbox_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ChallengeResponse360)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_do_challenge_response_with_Xbox_360_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_do_challenge_response_with_Xbox_360_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.DecryptSs360)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_read_and_decrypt_SS_from_Xbox_360_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_read_and_decrypt_SS_from_Xbox_360_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.XtremeUnlock360)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_set_xtreme_unlock_state_with_Xbox_360_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_set_xtreme_unlock_state_with_Xbox_360_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.WxripperUnlock360)) - AaruLogging - .WriteLine($"\t[slateblue1]{Localization.Core.Can_set_wxripper_unlock_state_with_Xbox_360_discs}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_set_wxripper_unlock_state_with_Xbox_360_discs}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.Lock)) - AaruLogging.WriteLine($"\t[slateblue1]{Localization.Core.Can_set_Kreon_locked_state}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Can_set_Kreon_locked_state}"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ErrorSkipping)) - AaruLogging.WriteLine($"\t[slateblue1]{Localization.Core.Kreon_Can_skip_read_errors}[/]"); + AaruLogging.WriteLine($"\t{Localization.Core.Kreon_Can_skip_read_errors}"); } if(devInfo.BlockLimits != null) @@ -1169,7 +1148,7 @@ sealed class DeviceInfoCommand : Command "SSC READ BLOCK LIMITS", devInfo.BlockLimits); - AaruLogging.WriteLine($"[bold][blue]{Localization.Core.Block_limits_for_device}[/][/]"); + AaruLogging.WriteLine(Localization.Core.Block_limits_for_device); AaruLogging.WriteLine(BlockLimits.Prettify(devInfo.BlockLimits)); } @@ -1183,7 +1162,7 @@ sealed class DeviceInfoCommand : Command if(devInfo.DensitySupportHeader.HasValue) { - AaruLogging.WriteLine($"[bold][blue]{UI.Densities_supported_by_device}[/][/]"); + AaruLogging.WriteLine(UI.Densities_supported_by_device); AaruLogging.WriteLine(DensitySupport.PrettifyDensity(devInfo.DensitySupportHeader)); } } @@ -1198,7 +1177,7 @@ sealed class DeviceInfoCommand : Command if(devInfo.MediaTypeSupportHeader.HasValue) { - AaruLogging.WriteLine($"[bold][blue]{UI.Medium_types_supported_by_device}[/][/]"); + AaruLogging.WriteLine(UI.Medium_types_supported_by_device); AaruLogging.WriteLine(DensitySupport.PrettifyMediumType(devInfo.MediaTypeSupportHeader)); } @@ -1326,15 +1305,17 @@ sealed class DeviceInfoCommand : Command d.Revision == dev.FirmwareRevision); if(dbDev is null) - AaruLogging.WriteLine($"[red]{Localization.Core.Device_not_in_database}[/]"); + AaruLogging.WriteLine(Localization.Core.Device_not_in_database); else { - AaruLogging.WriteLine(string.Format($"[slateblue1]{Localization.Core.Device_in_database_since_0}[/]", - $"[yellow3]{dbDev.LastSynchronized:d}[/]")); + AaruLogging.WriteLine(string.Format(Localization.Core.Device_in_database_since_0, + $"{dbDev.LastSynchronized:d}")); if(dbDev.OptimalMultipleSectorsRead > 0) - AaruLogging.WriteLine(string.Format($"[slateblue1]{UI.Optimal_multiple_read_is_0_sectors}[/]", - $"[aqua]{dbDev.OptimalMultipleSectorsRead}[/]")); + { + AaruLogging.WriteLine(string.Format(UI.Optimal_multiple_read_is_0_sectors, + dbDev.OptimalMultipleSectorsRead)); + } } if(dev.ScsiType != PeripheralDeviceTypes.MultiMediaDevice) return (int)ErrorNumber.NoError; @@ -1346,10 +1327,10 @@ sealed class DeviceInfoCommand : Command (d.Model == dev.Model || d.Model == dev.Model.Replace('/', '-'))); AaruLogging.WriteLine(cdOffset is null - ? $"[slateblue1]{UI.CD_reading_offset_not_found_in_database}[/]" - : string.Format($"[slateblue1]{UI.CD_reading_offset_is_0_samples_1_bytes}[/]", - $"[lime]{cdOffset.Offset}[/]", - $"[lime]{cdOffset.Offset * 4}[/]")); + ? UI.CD_reading_offset_not_found_in_database + : string.Format(UI.CD_reading_offset_is_0_samples_1_bytes, + cdOffset.Offset, + cdOffset.Offset * 4)); return (int)ErrorNumber.NoError; }