mirror of
https://github.com/aaru-dps/Aaru.git
synced 2026-07-08 18:16:24 +00:00
Add coloring and localization.
This commit is contained in:
@@ -50,6 +50,7 @@ using Aaru.Database.Models;
|
||||
using Aaru.Decoders.CD;
|
||||
using Aaru.Devices;
|
||||
using Aaru.Images;
|
||||
using Aaru.Localization;
|
||||
using Aaru.Logging;
|
||||
using Humanizer;
|
||||
using Spectre.Console;
|
||||
@@ -675,9 +676,8 @@ sealed partial class Dump
|
||||
foreach(int sub in _resume.BadSubchannels) subchannelExtents.Add(sub);
|
||||
|
||||
if(_resume.NextBlock < blocks)
|
||||
{
|
||||
for(ulong i = _resume.NextBlock; i < blocks; i++) subchannelExtents.Add((int)i);
|
||||
}
|
||||
for(ulong i = _resume.NextBlock; i < blocks; i++)
|
||||
subchannelExtents.Add((int)i);
|
||||
}
|
||||
|
||||
if(_resume.NextBlock > 0)
|
||||
@@ -1168,9 +1168,8 @@ sealed partial class Dump
|
||||
supportsLongSectors);
|
||||
|
||||
foreach(Tuple<ulong, ulong> leadoutExtent in leadOutExtents.ToArray())
|
||||
{
|
||||
for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++) subchannelExtents.Remove((int)e);
|
||||
}
|
||||
for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++)
|
||||
subchannelExtents.Remove((int)e);
|
||||
|
||||
if(subchannelExtents.Count > 0 && _retryPasses > 0 && _retrySubchannel)
|
||||
{
|
||||
@@ -1349,8 +1348,8 @@ sealed partial class Dump
|
||||
|
||||
if(_omnidrive)
|
||||
{
|
||||
UpdateStatus?.Invoke($"{_correctSectors} sectors were correct when read.");
|
||||
UpdateStatus?.Invoke($"{_fixedSectors} sectors had to be fixed.");
|
||||
UpdateStatus?.Invoke(string.Format(UI._0_sectors_were_correct_when_read, _correctSectors));
|
||||
UpdateStatus?.Invoke(string.Format(UI._0_sectors_had_to_be_fixed, _fixedSectors));
|
||||
}
|
||||
|
||||
UpdateStatus?.Invoke(string.Format(Localization.Core._0_sectors_could_not_be_read, _resume.BadBlocks.Count));
|
||||
|
||||
@@ -45,6 +45,7 @@ using Aaru.Decoders.SCSI.MMC;
|
||||
using Aaru.Decryption;
|
||||
using Aaru.Decryption.DVD;
|
||||
using Aaru.Devices;
|
||||
using Aaru.Localization;
|
||||
using Aaru.Logging;
|
||||
using DDS = Aaru.Decoders.DVD.DDS;
|
||||
using DMI = Aaru.Decoders.Xbox.DMI;
|
||||
@@ -300,8 +301,7 @@ partial class Dump
|
||||
|
||||
_omnidrive = _dev.IsOmniDriveFirmware(out byte odMajor, out byte odMinor, out byte odRevision);
|
||||
|
||||
if(_omnidrive)
|
||||
AaruLogging.WriteLine($"[slateblue1]Detected [/][#FFFFFF]O[/][#FFAFC8]m[/][#74D7EE]n[/][#E40303]i[/][#FF8C00]D[/][#FFED00]r[/][#008026]i[/][#004DFF]v[/][#750787]e[/][#613915]![/][000000]![/] [slateblue1]version[/] [purple]{odMajor}.{odMinor}.{odRevision}[/]");
|
||||
if(_omnidrive) AaruLogging.WriteLine(string.Format(UI.Detected_Omnidrive, odMajor, odMinor, odRevision));
|
||||
|
||||
if(compactDisc)
|
||||
{
|
||||
|
||||
74
Aaru.Localization/Core.Designer.cs
generated
74
Aaru.Localization/Core.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
@@ -1022,7 +1022,7 @@ namespace Aaru.Localization {
|
||||
return ResourceManager.GetString("Contains_a_media_of_0_sectors_with_a_maximum_sector_size_of_1_bytes_etc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Image_has_0_leadin_and_1_leadout_sectors_WithMarkup {
|
||||
get {
|
||||
return ResourceManager.GetString("Image_has_0_leadin_and_1_leadout_sectors_WithMarkup", resourceCulture);
|
||||
@@ -2221,6 +2221,12 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Cannot_write_retried_sector_0_no_writable_output_image {
|
||||
get {
|
||||
return ResourceManager.GetString("Cannot_write_retried_sector_0_no_writable_output_image", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Could_not_detect_capacity {
|
||||
get {
|
||||
return ResourceManager.GetString("Could_not_detect_capacity", resourceCulture);
|
||||
@@ -2758,6 +2764,30 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Nintendo_OmniDrive_dump_requires_Aaru_format {
|
||||
get {
|
||||
return ResourceManager.GetString("Nintendo_OmniDrive_dump_requires_Aaru_format", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Ngcw_dump_parsing_partition_table {
|
||||
get {
|
||||
return ResourceManager.GetString("Ngcw_dump_parsing_partition_table", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Ngcw_dump_wrote_partition_key_map {
|
||||
get {
|
||||
return ResourceManager.GetString("Ngcw_dump_wrote_partition_key_map", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Ngcw_dump_wrote_junk_map_0_entries {
|
||||
get {
|
||||
return ResourceManager.GetString("Ngcw_dump_wrote_junk_map_0_entries", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Reading_Disc_Manufacturing_Information {
|
||||
get {
|
||||
return ResourceManager.GetString("Reading_Disc_Manufacturing_Information", resourceCulture);
|
||||
@@ -3113,12 +3143,6 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Cannot_write_retried_sector_0_no_writable_output_image {
|
||||
get {
|
||||
return ResourceManager.GetString("Cannot_write_retried_sector_0_no_writable_output_image", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Cannot_write_SCR_to_output_image {
|
||||
get {
|
||||
return ResourceManager.GetString("Cannot_write_SCR_to_output_image", resourceCulture);
|
||||
@@ -6934,103 +6958,103 @@ namespace Aaru.Localization {
|
||||
return ResourceManager.GetString("Media_tag_0_present_in_primary_image_will_be_lost", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Reading_lead_in_sectors {
|
||||
get {
|
||||
return ResourceManager.GetString("Reading_lead_in_sectors", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Reading_lead_out_sectors {
|
||||
get {
|
||||
return ResourceManager.GetString("Reading_lead_out_sectors", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Reading_data_sectors {
|
||||
get {
|
||||
return ResourceManager.GetString("Reading_data_sectors", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Output_format_not_initialized {
|
||||
get {
|
||||
return ResourceManager.GetString("Output_format_not_initialized", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_missing_volume_unique_key {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_missing_volume_unique_key", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_missing_unit_keys {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_missing_unit_keys", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_unit_key_inf_invalid {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_unit_key_inf_invalid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_encrypted_unit_key_invalid_length {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_encrypted_unit_key_invalid_length", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs2_unit_keys_not_supported {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs2_unit_keys_not_supported", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_hddvd_not_supported {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_hddvd_not_supported", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_incomplete_cps_unit_at_track_end {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_incomplete_cps_unit_at_track_end", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_incomplete_cps_unit_at_track_end_continuing {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_incomplete_cps_unit_at_track_end_continuing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_incomplete_cps_unit_pending_before_read_error {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_incomplete_cps_unit_pending_before_read_error", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_incomplete_cps_unit_after_read_error_continuing {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_incomplete_cps_unit_after_read_error_continuing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_could_not_decrypt_cps_unit_starting_at_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_could_not_decrypt_cps_unit_starting_at_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_could_not_decrypt_cps_unit_starting_at_0_continuing {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_could_not_decrypt_cps_unit_starting_at_0_continuing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Aacs_bd_decrypt_requires_0_byte_sectors {
|
||||
get {
|
||||
return ResourceManager.GetString("Aacs_bd_decrypt_requires_0_byte_sectors", resourceCulture);
|
||||
|
||||
@@ -2199,7 +2199,7 @@
|
||||
<value>Leyendo LBA 0...</value>
|
||||
</data>
|
||||
<data name="Reading_lead_outs" xml:space="preserve">
|
||||
<value>Leyendo Lead-Outs</value>
|
||||
<value>[slateblue1]Leyendo Lead-Outs[/]</value>
|
||||
</data>
|
||||
<data name="Reading_PCMCIA_CIS" xml:space="preserve">
|
||||
<value>[slateblue1]Leyendo CIS de PCMCIA.[/]</value>
|
||||
@@ -2211,7 +2211,7 @@
|
||||
<value>[slateblue1]Leyendo directorio raíz en el sector [lime]{0}[/]...[/]</value>
|
||||
</data>
|
||||
<data name="Reading_sector_0_at_lead_out_1" xml:space="preserve">
|
||||
<value>Leyendo sector {0} en el Lead-Out ({1})</value>
|
||||
<value>[slateblue1]Leyendo sector [lime]{0}[/] en el Lead-Out ([aqua]{1}[/])[/]</value>
|
||||
</data>
|
||||
<data name="Reading_sector_0_of_1_2" xml:space="preserve">
|
||||
<value>[slateblue1]Leyendo sector [lime]{0}[/] de [violet]{1}[/] ([aqua]{2}[/])[/]</value>
|
||||
|
||||
@@ -972,10 +972,10 @@
|
||||
<value>[slateblue1]Correctly retried sector [lime]{0}[/] subchannel in pass [teal]{1}[/].[/]</value>
|
||||
</data>
|
||||
<data name="Reading_lead_outs" xml:space="preserve">
|
||||
<value>Reading lead-outs</value>
|
||||
<value>[slateblue1]Reading lead-outs[/]</value>
|
||||
</data>
|
||||
<data name="Reading_sector_0_at_lead_out_1" xml:space="preserve">
|
||||
<value>Reading sector {0} at lead-out ({1})</value>
|
||||
<value>[slateblue1]Reading sector [lime]{0}[/] at lead-out ([aqua]{1}[/])[/]</value>
|
||||
</data>
|
||||
<data name="Reading_first_track_pregap" xml:space="preserve">
|
||||
<value>[slateblue1]Reading first track pregap[/]</value>
|
||||
|
||||
36
Aaru.Localization/UI.Designer.cs
generated
36
Aaru.Localization/UI.Designer.cs
generated
@@ -11351,5 +11351,41 @@ namespace Aaru.Localization {
|
||||
return ResourceManager.GetString("Filesystem_contents_cannot_be_extracted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string _0_sectors_were_correct_when_read {
|
||||
get {
|
||||
return ResourceManager.GetString("_0_sectors_were_correct_when_read", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string _0_sectors_had_to_be_fixed {
|
||||
get {
|
||||
return ResourceManager.GetString("_0_sectors_had_to_be_fixed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Help_hyperspeed {
|
||||
get {
|
||||
return ResourceManager.GetString("Help_hyperspeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Help_absurdspeed {
|
||||
get {
|
||||
return ResourceManager.GetString("Help_absurdspeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Help_Leadout {
|
||||
get {
|
||||
return ResourceManager.GetString("Help_Leadout", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Detected_Omnidrive {
|
||||
get {
|
||||
return ResourceManager.GetString("Detected_Omnidrive", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5671,4 +5671,22 @@ Probadores:
|
||||
<data name="Filesystem_contents_cannot_be_extracted" xml:space="preserve">
|
||||
<value>[slateblue1]El contenido del sistema de ficheros no puede ser extraído.[/]</value>
|
||||
</data>
|
||||
<data name="_0_sectors_were_correct_when_read" xml:space="preserve">
|
||||
<value>[maroon][teal]{0}[/] sectores eran correctos al leerlos.[/]</value>
|
||||
</data>
|
||||
<data name="_0_sectors_had_to_be_fixed" xml:space="preserve">
|
||||
<value>[maroon][teal]{0}[/] sectores tuvieron que ser corregidos.[/]</value>
|
||||
</data>
|
||||
<data name="Help_hyperspeed" xml:space="preserve">
|
||||
<value>(Sólo OmniDrive) Permite mayores velocidades cuando sabemos que la pista es de datos</value>
|
||||
</data>
|
||||
<data name="Help_absurdspeed" xml:space="preserve">
|
||||
<value>(Sólo OmniDrive) Usar siempre la máxima velocidad</value>
|
||||
</data>
|
||||
<data name="Help_Leadout" xml:space="preserve">
|
||||
<value>Volcar sectores de Lead-Out si la unidad y la imagen los soportan.</value>
|
||||
</data>
|
||||
<data name="Detected_Omnidrive" xml:space="preserve">
|
||||
<value>[slateblue1]Detectada [/][#FFFFFF]O[/][#FFAFC8]m[/][#74D7EE]n[/][#E40303]i[/][#FF8C00]D[/][#FFED00]r[/][#008026]i[/][#004DFF]v[/][#750787]e[/][#613915]![/][000000]![/] [slateblue1]versión[/] [purple]{0}.{1}.{2}[/]</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -5755,4 +5755,22 @@ Do you want to continue?</value>
|
||||
<data name="Filesystem_contents_cannot_be_extracted" xml:space="preserve">
|
||||
<value>[slateblue1]Filesystem contents cannot be extracted.[/]</value>
|
||||
</data>
|
||||
<data name="_0_sectors_were_correct_when_read" xml:space="preserve">
|
||||
<value>[maroon][teal]{0}[/] sectors were correct when read.[/]</value>
|
||||
</data>
|
||||
<data name="_0_sectors_had_to_be_fixed" xml:space="preserve">
|
||||
<value>[maroon][teal]{0}[/] sectors had to be fixed.[/]</value>
|
||||
</data>
|
||||
<data name="Help_hyperspeed" xml:space="preserve">
|
||||
<value>(OmniDrive only) Allows higher speed when we know the underlying track is data</value>
|
||||
</data>
|
||||
<data name="Help_absurdspeed" xml:space="preserve">
|
||||
<value>(OmniDrive only) Use maximum speed always</value>
|
||||
</data>
|
||||
<data name="Help_Leadout" xml:space="preserve">
|
||||
<value>Dump Lead-Out sectors if drive and image supports it.</value>
|
||||
</data>
|
||||
<data name="Detected_Omnidrive" xml:space="preserve">
|
||||
<value>[slateblue1]Detected [/][#FFFFFF]O[/][#FFAFC8]m[/][#74D7EE]n[/][#E40303]i[/][#FF8C00]D[/][#FFED00]r[/][#008026]i[/][#004DFF]v[/][#750787]e[/][#613915]![/][000000]![/] [slateblue1]version[/] [purple]{0}.{1}.{2}[/]</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -836,15 +836,15 @@ sealed class DumpMediaCommand : Command<DumpMediaCommand.Settings>
|
||||
[DefaultValue(0)]
|
||||
[CommandOption("--error-recovery")]
|
||||
public int ErrorRecovery { get; set; }
|
||||
[Description("(OmniDrive only) Allows higher speed when we know the underlying track is data")]
|
||||
[LocalizedDescription(nameof(UI.Help_hyperspeed))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--hyper-speed")]
|
||||
public bool HyperSpeed { get; set; }
|
||||
[Description("(OmniDrive only) Use maximum speed always")]
|
||||
[LocalizedDescription(nameof(UI.Help_absurdspeed))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--absurd-speed")]
|
||||
public bool AbsurdSpeed { get; set; }
|
||||
[Description("Dump Lead-Out sectors if drive and image supports it.")]
|
||||
[LocalizedDescription(nameof(UI.Help_Leadout))]
|
||||
[DefaultValue(false)]
|
||||
[CommandOption("--lead-out")]
|
||||
public bool LeadOut { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user