From cd34518c0820ae9240a1a028ab9e58b108d43338 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 18 Aug 2025 21:16:54 +0100 Subject: [PATCH] Colorify media info command. --- Aaru.Localization/Core.Designer.cs | 6 ---- Aaru.Localization/Core.es.resx | 48 ++++++++++++++-------------- Aaru.Localization/Core.resx | 51 ++++++++++++++---------------- Aaru.Localization/UI.es.resx | 12 +++---- Aaru.Localization/UI.resx | 12 +++---- Aaru/Commands/Media/Info.cs | 29 +++++++---------- 6 files changed, 72 insertions(+), 86 deletions(-) diff --git a/Aaru.Localization/Core.Designer.cs b/Aaru.Localization/Core.Designer.cs index 55245adf6..81ef094f2 100644 --- a/Aaru.Localization/Core.Designer.cs +++ b/Aaru.Localization/Core.Designer.cs @@ -747,12 +747,6 @@ namespace Aaru.Localization { } } - public static string Media_identified_as { - get { - return ResourceManager.GetString("Media_identified_as", resourceCulture); - } - } - public static string Track_calculations { get { return ResourceManager.GetString("Track_calculations", resourceCulture); diff --git a/Aaru.Localization/Core.es.resx b/Aaru.Localization/Core.es.resx index 666f0c6f0..f0bb74d86 100644 --- a/Aaru.Localization/Core.es.resx +++ b/Aaru.Localization/Core.es.resx @@ -365,11 +365,11 @@ Cerrando fichero de salida. - El desplazamiento combinado del disco y la unidad es de {0} bytes ({1} muestras). - + [slateblue1]El desplazamiento combinado del disco y la unidad es de [lime]{0}[/] bytes ([teal]{1}[/] muestras).[/] + - El desplazamiento combinado es de {0} bytes ({1} muestras). - + [slateblue1]El desplazamiento combinado es de [lime]{0}[/] bytes ([teal]{1}[/] muestras).[/] + Línea de comandos: {0} @@ -745,14 +745,14 @@ El disco tiene pistas de video y una única sesión, estableciendo su tipo como CD Video. - El desplazamiento del disco no pudo ser calculado. - + [red]El desplazamiento del disco no pudo ser calculado.[/] + - El desplazamiento del disco es de {0} bytes ({1} muestras) - + [slateblue1]El desplazamiento del disco es de [lime]{0}[/] bytes ([teal]{1}[/] muestras)[/] + - El desplazamiento de escritura del disco es desconocido. - + [olive]El desplazamiento de escritura del disco es desconocido.[/] + El desplazamiento de escritura del disco es desconocido, el volcado puede no ser correcto. @@ -844,11 +844,11 @@ La unidad no está en la partición 0. Rebobinando, por favor espere... - El desplazamiento de lectura de la unidad es de {0} bytes ({1} muestras). - + [slateblue1]El desplazamiento de lectura de la unidad es de [lime]{0}[/] bytes ([teal]{1}[/] muestras).[/] + - El desplazamiento de lectura de la unidad no se encontró en la base de datos. - + [red]El desplazamiento de lectura de la unidad no se encontró en la base de datos.[/] + La unidad reporta que el disco usa la protección anticopia {0}. Aún no está soportada y el volcado será incorrecto. @@ -1569,8 +1569,8 @@ Medio identificado como - Medio identificado como {0}. - + [slateblue1]Medio identificado como [fuchsia]{0}[/].[/] + [slateblue1]El medio es el número [teal]{0}[/] de un conjunto de [teal]{1}[/] @@ -1590,8 +1590,8 @@ El número de parte del medio es {0}. - Número de serie del medio - + [bold][blue]Número de serie del medio[/][/] + Número de serie del medio: {0} @@ -1686,8 +1686,8 @@ OCR obtenido correctamente... - Desplazamientos - + [bold][blue]Desplazamientos:[/][/] + Sistema operativo: {0} {1} @@ -2778,8 +2778,8 @@ No tiene sentido hacerlo y supondría demasiado esfuerzo para la cinta. El entorno actual no soporta el comando MEDIUM SCAN, el volcado tardará mucho más de lo normal. - ATENCIÓN: La unidad ha devuelto la posición de Q incorrecta calculando los huecos anteriores. Se ha hecho todo lo posible pero pueden ser incorrectos. - + [olive][bold]ATENCIÓN:[/] La unidad ha devuelto la posición de Q incorrecta calculando los huecos anteriores. Se ha hecho todo lo posible pero pueden ser incorrectos.[/] + La imagen seleccionada no soporta pistas. @@ -2960,8 +2960,8 @@ No tiene sentido hacerlo y supondría demasiado esfuerzo para la cinta. La pista {0} empieza en el LBA {1} y termina en el {2} - Cálculos de pista - + [bold][blue]Cálculos de pista[/][/] + Información de recursos de pista diff --git a/Aaru.Localization/Core.resx b/Aaru.Localization/Core.resx index 88ce1d105..04c3d650e 100644 --- a/Aaru.Localization/Core.resx +++ b/Aaru.Localization/Core.resx @@ -372,32 +372,29 @@ Real layer break - Media Serial Number - - - Media identified as - + [bold][blue]Media Serial Number:[/][/] + - Track calculations - + [bold][blue]Track calculations:[/][/] + - Offsets - + [bold][blue]Offsets:[/][/] + - Drive reading offset not found in database. - + [red]Drive reading offset not found in database.[/] + - Disc offset cannot be calculated. - + [red]Disc offset cannot be calculated.[/] + - Drive reading offset is {0} bytes ({1} samples). - + [slateblue1]Drive reading offset is [lime]{0}[/] bytes ([teal]{1}[/] samples).[/] + - Disc write offset is unknown. - + [olive]Disc write offset is unknown.[/] + - Combined offset is {0} bytes ({1} samples). - + [slateblue1]Combined offset is [lime]{0}[/] bytes ([teal]{1}[/] samples).[/] + [slateblue1]Took a total of [teal]{0}[/] ([teal]{1}[/] processing commands).[/] @@ -833,8 +830,8 @@ SCSI device type: {0}. - Media identified as {0}. - + [slateblue1]Media identified as [fuchsia]{0}[/].[/] + Error creating output image, not continuing. @@ -875,11 +872,11 @@ Disc write offset is unknown, dump may not be correct. - Combined disc and drive offsets are {0} bytes ({1} samples). - + [slateblue1]Combined disc and drive offsets are [lime]{0}[/] bytes ([teal]{1}[/] samples).[/] + - Disc offset is {0} bytes ({1} samples) - + [slateblue1]Disc offset is [lime]{0}[/] bytes ([teal]{1}[/] samples)[/] + Dumping CD-i Ready requires the output image format to support long sectors. @@ -3418,8 +3415,8 @@ It has no sense to do it, and it will put too much strain on the tape. Error: {0} - WARNING: The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect. - + [olive][bold]WARNING:[/] The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect.[/] + Output format does not support sessions, this will end in a loss of data, not continuing... diff --git a/Aaru.Localization/UI.es.resx b/Aaru.Localization/UI.es.resx index 686e20ed2..8df79ea2e 100644 --- a/Aaru.Localization/UI.es.resx +++ b/Aaru.Localization/UI.es.resx @@ -1190,8 +1190,8 @@ Número de serie del ensamblado de la cabeza - Pista oculta empieza en el LBA {0} y termina en el {1} - + [slateblue1]Pista oculta empieza en el LBA [lime]{0}[/] y termina en el [lime]{1}[/][/] + Cuando bytes deben mostrarse por línea. @@ -1683,8 +1683,8 @@ El número en la secuencia del medio representado por la imagen. - Abriendo dispositivo... - + [slateblue1]Abriendo dispositivo...[/] + [slateblue1]Abriendo 1ª imagen...[/] @@ -2700,8 +2700,8 @@ Probadores: [slateblue1]La pista [teal]{0}[/] tiene [teal]{1}[/] sectores únicos ([aqua]{2:P3}[/])[/] - La pista {0} empieza en el LBA {1}, termina en el {2}, tiene un hueco anterior de {3} sectores y es de tipo {4} - + [slateblue1]La pista [teal]{0}[/] empieza en el LBA [lime]{1}[/], termina en el [lime]{2}[/], tiene un hueco anterior de [green]{3}[/] sectores y es de tipo [darkorange]{4}[/][/] + [slateblue1]La pista [teal]{0}[/] empieza en el sector [lime]{1}[/] y termina en el [lime]{2}[/] diff --git a/Aaru.Localization/UI.resx b/Aaru.Localization/UI.resx index 4e5d44bb5..cd79db303 100644 --- a/Aaru.Localization/UI.resx +++ b/Aaru.Localization/UI.resx @@ -1505,8 +1505,8 @@ In you are unsure, please press N to not continue. Please insert media with title {0} and press any key to continue... - Opening device... - + [slateblue1]Opening device...[/] + Incorrect resume file, not continuing... @@ -1532,11 +1532,11 @@ In you are unsure, please press N to not continue. Medium types currently inserted in device - Hidden track starts at LBA {0}, ends at LBA {1} - + [slateblue1]Hidden track starts at LBA [lime]{0}[/], ends at LBA [lime]{1}[/][/] + - Track {0} starts at LBA {1}, ends at LBA {2}, has a pregap of {3} sectors and is of type {4} - + [slateblue1]Track [teal]{0}[/] starts at LBA [lime]{1}[/], ends at LBA [lime]{2}[/], has a pregap of [green]{3}[/] sectors and is of type [darkorange]{4}[/][/] + Write a log of the scan in the format used by MHDD. diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index a09793f97..acea6b9f0 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -784,15 +784,15 @@ sealed class MediaInfoCommand : Command "SCSI READ MEDIA SERIAL NUMBER", scsiInfo.MediaSerialNumber); - AaruLogging.Write($"[bold]{Localization.Core.Media_Serial_Number}:[/] "); + AaruLogging.Write(Localization.Core.Media_Serial_Number); for(int i = 4; i < scsiInfo.MediaSerialNumber.Length; i++) - AaruLogging.Write("{0:X2}", scsiInfo.MediaSerialNumber[i]); + AaruLogging.Write("[teal]{0:X2}[/]", scsiInfo.MediaSerialNumber[i]); - AaruLogging.WriteLine(); + AaruLogging.WriteLine(""); } - AaruLogging.WriteLine($"[bold]{Localization.Core.Media_identified_as} [italic]{scsiInfo.MediaType}[/][/]"); + AaruLogging.WriteLine(Localization.Core.Media_identified_as_0, scsiInfo.MediaType); Statistics.AddMedia(scsiInfo.MediaType, true); if(scsiInfo.Toc != null || scsiInfo.RawToc != null) @@ -831,14 +831,11 @@ sealed class MediaInfoCommand : Command tracks[^1].EndSector = (ulong)lastSector; AaruLogging.WriteLine(); - AaruLogging.WriteLine($"[bold]{Localization.Core.Track_calculations}:[/]"); + AaruLogging.WriteLine(Localization.Core.Track_calculations); if(inexactPositioning) - { - AaruLogging.WriteLine($"[yellow]{Localization.Core. - The_drive_has_returned_incorrect_Q_positioning_calculating_pregaps - }[/]"); - } + AaruLogging.WriteLine(Localization.Core + .The_drive_has_returned_incorrect_Q_positioning_calculating_pregaps); if(firstLba > 0) AaruLogging.WriteLine(UI.Hidden_track_starts_at_LBA_0_ends_at_LBA_1, 0, firstLba - 1); @@ -854,7 +851,7 @@ sealed class MediaInfoCommand : Command } AaruLogging.WriteLine(); - AaruLogging.WriteLine($"[bold]{Localization.Core.Offsets}:[/]"); + AaruLogging.WriteLine(Localization.Core.Offsets); // Search for read offset in main database CdOffset cdOffset = @@ -878,10 +875,9 @@ sealed class MediaInfoCommand : Command { if(driveOffset is null) { - AaruLogging.WriteLine($"[red]{Localization.Core.Drive_reading_offset_not_found_in_database - }[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_reading_offset_not_found_in_database); - AaruLogging.WriteLine($"[red]{Localization.Core.Disc_offset_cannot_be_calculated}[/]"); + AaruLogging.WriteLine(Localization.Core.Disc_offset_cannot_be_calculated); } else { @@ -889,7 +885,7 @@ sealed class MediaInfoCommand : Command driveOffset, driveOffset / 4)); - AaruLogging.WriteLine($"[red]{Localization.Core.Disc_write_offset_is_unknown}[/]"); + AaruLogging.WriteLine(Localization.Core.Disc_write_offset_is_unknown); } } else @@ -898,8 +894,7 @@ sealed class MediaInfoCommand : Command if(driveOffset is null) { - AaruLogging.WriteLine($"[red]{Localization.Core.Drive_reading_offset_not_found_in_database - }[/]"); + AaruLogging.WriteLine(Localization.Core.Drive_reading_offset_not_found_in_database); AaruLogging.WriteLine(string.Format(Localization.Core .Combined_disc_and_drive_offset_are_0_bytes_1_samples,