diff --git a/Aaru.Localization/Aaru.Localization.csproj b/Aaru.Localization/Aaru.Localization.csproj new file mode 100644 index 000000000..4947e4864 --- /dev/null +++ b/Aaru.Localization/Aaru.Localization.csproj @@ -0,0 +1,57 @@ + + + + net7.0 + enable + enable + Library + Aaru.Localization + Aaru.Localization + $(Version) + true + 6.0.0-alpha8 + Claunia.com + Copyright © 2011-2022 Natalia Portillo + Aaru Data Preservation Suite + Aaru.Localization + $(Version) + 11 + Language resources for the Aaru Data Preservation Suite. + https://github.com/aaru-dps/ + LGPL-2.1-only + https://github.com/aaru-dps/Aaru + true + en-US + true + true + snupkg + Natalia Portillo <claunia@claunia.com> + true + CS1591 + + + + + PublicResXFileCodeGenerator + UI.Designer.cs + + + PublicResXFileCodeGenerator + Core.Designer.cs + + + + + + True + True + UI.resx + + + True + True + Core.resx + + + + diff --git a/Aaru.Localization/Core.Designer.cs b/Aaru.Localization/Core.Designer.cs new file mode 100644 index 000000000..6c018d835 --- /dev/null +++ b/Aaru.Localization/Core.Designer.cs @@ -0,0 +1,954 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Aaru.Localization { + using System; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Core { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Core() { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Aaru.Localization.Core", typeof(Core).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + public static string Querying_ATA_IDENTIFY { + get { + return ResourceManager.GetString("Querying_ATA_IDENTIFY", resourceCulture); + } + } + + public static string Querying_USB_information { + get { + return ResourceManager.GetString("Querying_USB_information", resourceCulture); + } + } + + public static string Querying_PCMCIA_information { + get { + return ResourceManager.GetString("Querying_PCMCIA_information", resourceCulture); + } + } + + public static string NVMe_devices_not_yet_supported { + get { + return ResourceManager.GetString("NVMe_devices_not_yet_supported", resourceCulture); + } + } + + public static string Querying_ATAPI_IDENTIFY { + get { + return ResourceManager.GetString("Querying_ATAPI_IDENTIFY", resourceCulture); + } + } + + public static string Waiting_for_drive_to_become_ready { + get { + return ResourceManager.GetString("Waiting_for_drive_to_become_ready", resourceCulture); + } + } + + public static string Device_not_ready_Sense { + get { + return ResourceManager.GetString("Device_not_ready_Sense", resourceCulture); + } + } + + public static string Got_sense_status_but_no_sense_buffer { + get { + return ResourceManager.GetString("Got_sense_status_but_no_sense_buffer", resourceCulture); + } + } + + public static string Try_to_find_SCSI_READ_LONG_size { + get { + return ResourceManager.GetString("Try_to_find_SCSI_READ_LONG_size", resourceCulture); + } + } + + public static string Trying_to_READ_LONG { + get { + return ResourceManager.GetString("Trying_to_READ_LONG", resourceCulture); + } + } + + public static string Trying_READ_LONG_with_size_0 { + get { + return ResourceManager.GetString("Trying_READ_LONG_with_size_0", resourceCulture); + } + } + + public static string Trying_SCSI_READ_LONG_10 { + get { + return ResourceManager.GetString("Trying_SCSI_READ_LONG_10", resourceCulture); + } + } + + public static string Trying_SCSI_READ_LONG_16 { + get { + return ResourceManager.GetString("Trying_SCSI_READ_LONG_16", resourceCulture); + } + } + + public static string Please_write_media_manufacturer { + get { + return ResourceManager.GetString("Please_write_media_manufacturer", resourceCulture); + } + } + + public static string Media_Type_Name_MMD_140A { + get { + return ResourceManager.GetString("Media_Type_Name_MMD_140A", resourceCulture); + } + } + + public static string Media_Type_Name_MDW_60 { + get { + return ResourceManager.GetString("Media_Type_Name_MDW_60", resourceCulture); + } + } + + public static string Media_Type_Name_MDW_74 { + get { + return ResourceManager.GetString("Media_Type_Name_MDW_74", resourceCulture); + } + } + + public static string Media_Type_Name_MDW_80 { + get { + return ResourceManager.GetString("Media_Type_Name_MDW_80", resourceCulture); + } + } + + public static string Media_Type_Name_MiniDisc { + get { + return ResourceManager.GetString("Media_Type_Name_MiniDisc", resourceCulture); + } + } + + public static string Unknown_device_type { + get { + return ResourceManager.GetString("Unknown_device_type", resourceCulture); + } + } + + public static string Device_supports_MCPT_Command_Set { + get { + return ResourceManager.GetString("Device_supports_MCPT_Command_Set", resourceCulture); + } + } + + public static string Device_reports_incorrect_media_card_type { + get { + return ResourceManager.GetString("Device_reports_incorrect_media_card_type", resourceCulture); + } + } + + public static string Device_contains_SD_card { + get { + return ResourceManager.GetString("Device_contains_SD_card", resourceCulture); + } + } + + public static string Device_contains_MMC { + get { + return ResourceManager.GetString("Device_contains_MMC", resourceCulture); + } + } + + public static string Device_contains_SDIO_card { + get { + return ResourceManager.GetString("Device_contains_SDIO_card", resourceCulture); + } + } + + public static string Device_contains_SM_card { + get { + return ResourceManager.GetString("Device_contains_SM_card", resourceCulture); + } + } + + public static string Device_contains_unknown_media_card_type_0 { + get { + return ResourceManager.GetString("Device_contains_unknown_media_card_type_0", resourceCulture); + } + } + + public static string Media_card_is_write_protected { + get { + return ResourceManager.GetString("Media_card_is_write_protected", resourceCulture); + } + } + + public static string Card_specific_data_0 { + get { + return ResourceManager.GetString("Card_specific_data_0", resourceCulture); + } + } + + public static string Media_identified_as_0 { + get { + return ResourceManager.GetString("Media_identified_as_0", resourceCulture); + } + } + + public static string Device_identified_as_0 { + get { + return ResourceManager.GetString("Device_identified_as_0", resourceCulture); + } + } + + public static string ASCII_Page_0_1 { + get { + return ResourceManager.GetString("ASCII_Page_0_1", resourceCulture); + } + } + + public static string Unit_Serial_Number_0 { + get { + return ResourceManager.GetString("Unit_Serial_Number_0", resourceCulture); + } + } + + public static string ASCII_implemented_operating_definitions_0 { + get { + return ResourceManager.GetString("ASCII_implemented_operating_definitions_0", resourceCulture); + } + } + + public static string Manufacturer_assigned_Serial_Number_0 { + get { + return ResourceManager.GetString("Manufacturer_assigned_Serial_Number_0", resourceCulture); + } + } + + public static string TapeAlert_Supported_Flags_Bitmap_0 { + get { + return ResourceManager.GetString("TapeAlert_Supported_Flags_Bitmap_0", resourceCulture); + } + } + + public static string Automation_Device_Serial_Number_0 { + get { + return ResourceManager.GetString("Automation_Device_Serial_Number_0", resourceCulture); + } + } + + public static string Data_Transfer_Device_Element_Address_0 { + get { + return ResourceManager.GetString("Data_Transfer_Device_Element_Address_0", resourceCulture); + } + } + + public static string Found_undecoded_SCSI_VPD_page_0 { + get { + return ResourceManager.GetString("Found_undecoded_SCSI_VPD_page_0", resourceCulture); + } + } + + public static string GET_CONFIGURATION_length_is_0 { + get { + return ResourceManager.GetString("GET_CONFIGURATION_length_is_0", resourceCulture); + } + } + + public static string GET_CONFIGURATION_current_profile_is_0 { + get { + return ResourceManager.GetString("GET_CONFIGURATION_current_profile_is_0", resourceCulture); + } + } + + public static string Feature_0 { + get { + return ResourceManager.GetString("Feature_0", resourceCulture); + } + } + + public static string Found_unknown_feature_code_0 { + get { + return ResourceManager.GetString("Found_unknown_feature_code_0", resourceCulture); + } + } + + public static string GET_CONFIGURATION_returned_no_feature_descriptors { + get { + return ResourceManager.GetString("GET_CONFIGURATION_returned_no_feature_descriptors", resourceCulture); + } + } + + public static string Drive_has_loaded_a_total_of_0_discs { + get { + return ResourceManager.GetString("Drive_has_loaded_a_total_of_0_discs", resourceCulture); + } + } + + public static string Drive_has_spent_0_hours_1_minutes_and_2_seconds_reading_CDs { + get { + return ResourceManager.GetString("Drive_has_spent_0_hours_1_minutes_and_2_seconds_reading_CDs", resourceCulture); + } + } + + public static string Drive_has_spent_0_hours_1_minutes_and_2_seconds_writing_CDs { + get { + return ResourceManager.GetString("Drive_has_spent_0_hours_1_minutes_and_2_seconds_writing_CDs", resourceCulture); + } + } + + public static string Drive_has_spent_0_hours_1_minutes_and_2_seconds_reading_DVDs { + get { + return ResourceManager.GetString("Drive_has_spent_0_hours_1_minutes_and_2_seconds_reading_DVDs", resourceCulture); + } + } + + public static string Drive_has_spent_0_hours_1_minutes_and_2_seconds_writing_DVDs { + get { + return ResourceManager.GetString("Drive_has_spent_0_hours_1_minutes_and_2_seconds_writing_DVDs", resourceCulture); + } + } + + public static string Drive_supports_PoweRec_is_enabled_and_recommends_0 { + get { + return ResourceManager.GetString("Drive_supports_PoweRec_is_enabled_and_recommends_0", resourceCulture); + } + } + + public static string Drive_supports_PoweRec_and_has_it_enabled { + get { + return ResourceManager.GetString("Drive_supports_PoweRec_and_has_it_enabled", resourceCulture); + } + } + + public static string Selected_PoweRec_speed_for_currently_inserted_media_is_0_1 { + get { + return ResourceManager.GetString("Selected_PoweRec_speed_for_currently_inserted_media_is_0_1", resourceCulture); + } + } + + public static string Maximum_PoweRec_speed_for_currently_inserted_media_is_0_1 { + get { + return ResourceManager.GetString("Maximum_PoweRec_speed_for_currently_inserted_media_is_0_1", resourceCulture); + } + } + + public static string Last_used_PoweRec_was_0_1 { + get { + return ResourceManager.GetString("Last_used_PoweRec_was_0_1", resourceCulture); + } + } + + public static string Drive_supports_PoweRec_and_has_it_disabled { + get { + return ResourceManager.GetString("Drive_supports_PoweRec_and_has_it_disabled", resourceCulture); + } + } + + public static string Drive_supports_Plextor_SilentMode { + get { + return ResourceManager.GetString("Drive_supports_Plextor_SilentMode", resourceCulture); + } + } + + public static string Plextor_SilentMode_is_enabled { + get { + return ResourceManager.GetString("Plextor_SilentMode_is_enabled", resourceCulture); + } + } + + public static string Access_time_is_slow { + get { + return ResourceManager.GetString("Access_time_is_slow", resourceCulture); + } + } + + public static string Access_time_is_fast { + get { + return ResourceManager.GetString("Access_time_is_fast", resourceCulture); + } + } + + public static string CD_read_speed_limited_to_0 { + get { + return ResourceManager.GetString("CD_read_speed_limited_to_0", resourceCulture); + } + } + + public static string DVD_read_speed_limited_to_0 { + get { + return ResourceManager.GetString("DVD_read_speed_limited_to_0", resourceCulture); + } + } + + public static string CD_write_speed_limited_to_0 { + get { + return ResourceManager.GetString("CD_write_speed_limited_to_0", resourceCulture); + } + } + + public static string Drive_supports_Plextor_GigaRec { + get { + return ResourceManager.GetString("Drive_supports_Plextor_GigaRec", resourceCulture); + } + } + + public static string Drive_supports_Plextor_SecuRec { + get { + return ResourceManager.GetString("Drive_supports_Plextor_SecuRec", resourceCulture); + } + } + + public static string Drive_supports_Plextor_SpeedRead { + get { + return ResourceManager.GetString("Drive_supports_Plextor_SpeedRead", resourceCulture); + } + } + + public static string Drive_supports_Plextor_SpeedRead_and_has_it_enabled { + get { + return ResourceManager.GetString("Drive_supports_Plextor_SpeedRead_and_has_it_enabled", resourceCulture); + } + } + + public static string Drive_supports_hiding_CDRs_and_forcing_single_session { + get { + return ResourceManager.GetString("Drive_supports_hiding_CDRs_and_forcing_single_session", resourceCulture); + } + } + + public static string Drive_currently_hides_CDRs { + get { + return ResourceManager.GetString("Drive_currently_hides_CDRs", resourceCulture); + } + } + + public static string Drive_currently_forces_single_session { + get { + return ResourceManager.GetString("Drive_currently_forces_single_session", resourceCulture); + } + } + + public static string Drive_supports_Plextor_VariRec { + get { + return ResourceManager.GetString("Drive_supports_Plextor_VariRec", resourceCulture); + } + } + + public static string Drive_supports_Plextor_VariRec_for_DVDs { + get { + return ResourceManager.GetString("Drive_supports_Plextor_VariRec_for_DVDs", resourceCulture); + } + } + + public static string Drive_supports_bitsetting_DVD_R_book_type { + get { + return ResourceManager.GetString("Drive_supports_bitsetting_DVD_R_book_type", resourceCulture); + } + } + + public static string Drive_supports_bitsetting_DVD_R_DL_book_type { + get { + return ResourceManager.GetString("Drive_supports_bitsetting_DVD_R_DL_book_type", resourceCulture); + } + } + + public static string Drive_supports_test_writing_DVD_Plus { + get { + return ResourceManager.GetString("Drive_supports_test_writing_DVD_Plus", resourceCulture); + } + } + + public static string Can_do_challenge_response_with_Xbox_discs { + get { + return ResourceManager.GetString("Can_do_challenge_response_with_Xbox_discs", resourceCulture); + } + } + + public static string Can_read_and_decrypt_SS_from_Xbox_discs { + get { + return ResourceManager.GetString("Can_read_and_decrypt_SS_from_Xbox_discs", resourceCulture); + } + } + + public static string Can_set_xtreme_unlock_state_with_Xbox_discs { + get { + return ResourceManager.GetString("Can_set_xtreme_unlock_state_with_Xbox_discs", resourceCulture); + } + } + + public static string Can_set_wxripper_unlock_state_with_Xbox_discs { + get { + return ResourceManager.GetString("Can_set_wxripper_unlock_state_with_Xbox_discs", resourceCulture); + } + } + + public static string Can_do_challenge_response_with_Xbox_360_discs { + get { + return ResourceManager.GetString("Can_do_challenge_response_with_Xbox_360_discs", resourceCulture); + } + } + + public static string Can_read_and_decrypt_SS_from_Xbox_360_discs { + get { + return ResourceManager.GetString("Can_read_and_decrypt_SS_from_Xbox_360_discs", resourceCulture); + } + } + + public static string Can_set_xtreme_unlock_state_with_Xbox_360_discs { + get { + return ResourceManager.GetString("Can_set_xtreme_unlock_state_with_Xbox_360_discs", resourceCulture); + } + } + + public static string Can_set_wxripper_unlock_state_with_Xbox_360_discs { + get { + return ResourceManager.GetString("Can_set_wxripper_unlock_state_with_Xbox_360_discs", resourceCulture); + } + } + + public static string Can_set_Kreon_locked_state { + get { + return ResourceManager.GetString("Can_set_Kreon_locked_state", resourceCulture); + } + } + + public static string Kreon_Can_skip_read_errors { + get { + return ResourceManager.GetString("Kreon_Can_skip_read_errors", resourceCulture); + } + } + + public static string Block_limits_for_device { + get { + return ResourceManager.GetString("Block_limits_for_device", resourceCulture); + } + } + + public static string Generating_subchannels { + get { + return ResourceManager.GetString("Generating_subchannels", resourceCulture); + } + } + + public static string Writing_metadata_sidecar { + get { + return ResourceManager.GetString("Writing_metadata_sidecar", resourceCulture); + } + } + + public static string Cannot_create_a_sidecar_from_a_directory { + get { + return ResourceManager.GetString("Cannot_create_a_sidecar_from_a_directory", resourceCulture); + } + } + + public static string Stack_trace_0 { + get { + return ResourceManager.GetString("Stack_trace_0", resourceCulture); + } + } + + public static string Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_TiB { + get { + return ResourceManager.GetString("Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_TiB", resourceCulture); + } + } + + public static string Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_GiB { + get { + return ResourceManager.GetString("Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_GiB", resourceCulture); + } + } + + public static string Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_MiB { + get { + return ResourceManager.GetString("Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_MiB", resourceCulture); + } + } + + public static string Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_KiB { + get { + return ResourceManager.GetString("Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_KiB", resourceCulture); + } + } + + public static string Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_bytes { + get { + return ResourceManager.GetString("Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_bytes", resourceCulture); + } + } + + public static string Xbox_DMI { + get { + return ResourceManager.GetString("Xbox_DMI", resourceCulture); + } + } + + public static string Xbox_360_DMI { + get { + return ResourceManager.GetString("Xbox_360_DMI", resourceCulture); + } + } + + public static string Lead_In_CMI { + get { + return ResourceManager.GetString("Lead_In_CMI", resourceCulture); + } + } + + public static string Disc_Definition_Structure { + get { + return ResourceManager.GetString("Disc_Definition_Structure", resourceCulture); + } + } + + public static string Medium_Status { + get { + return ResourceManager.GetString("Medium_Status", resourceCulture); + } + } + + public static string Spare_Area_Information { + get { + return ResourceManager.GetString("Spare_Area_Information", resourceCulture); + } + } + + public static string DVD_RW_Pre_Recorded_Information { + get { + return ResourceManager.GetString("DVD_RW_Pre_Recorded_Information", resourceCulture); + } + } + + public static string DVD_RW_PFI { + get { + return ResourceManager.GetString("DVD_RW_PFI", resourceCulture); + } + } + + public static string Bluray_Disc_Information { + get { + return ResourceManager.GetString("Bluray_Disc_Information", resourceCulture); + } + } + + public static string Bluray_Burst_Cutting_Area { + get { + return ResourceManager.GetString("Bluray_Burst_Cutting_Area", resourceCulture); + } + } + + public static string Bluray_Disc_Definition_Structure { + get { + return ResourceManager.GetString("Bluray_Disc_Definition_Structure", resourceCulture); + } + } + + public static string Bluray_Cartridge_Status { + get { + return ResourceManager.GetString("Bluray_Cartridge_Status", resourceCulture); + } + } + + public static string Bluray_Spare_Area_Information { + get { + return ResourceManager.GetString("Bluray_Spare_Area_Information", resourceCulture); + } + } + + public static string Track_Resources_Information { + get { + return ResourceManager.GetString("Track_Resources_Information", resourceCulture); + } + } + + public static string POW_Resources_Information { + get { + return ResourceManager.GetString("POW_Resources_Information", resourceCulture); + } + } + + public static string TOC { + get { + return ResourceManager.GetString("TOC", resourceCulture); + } + } + + public static string ATIP { + get { + return ResourceManager.GetString("ATIP", resourceCulture); + } + } + + public static string Standard_Disc_Information { + get { + return ResourceManager.GetString("Standard_Disc_Information", resourceCulture); + } + } + + public static string Session_information { + get { + return ResourceManager.GetString("Session_information", resourceCulture); + } + } + + public static string Raw_TOC { + get { + return ResourceManager.GetString("Raw_TOC", resourceCulture); + } + } + + public static string PMA { + get { + return ResourceManager.GetString("PMA", resourceCulture); + } + } + + public static string CD_TEXT_on_Lead_In { + get { + return ResourceManager.GetString("CD_TEXT_on_Lead_In", resourceCulture); + } + } + + public static string MCN { + get { + return ResourceManager.GetString("MCN", resourceCulture); + } + } + + public static string Tracks_0_ISRC { + get { + return ResourceManager.GetString("Tracks_0_ISRC", resourceCulture); + } + } + + public static string Xbox_Security_Sector { + get { + return ResourceManager.GetString("Xbox_Security_Sector", resourceCulture); + } + } + + public static string Video_layer_zero_size { + get { + return ResourceManager.GetString("Video_layer_zero_size", resourceCulture); + } + } + + public static string Video_layer_one_size { + get { + return ResourceManager.GetString("Video_layer_one_size", resourceCulture); + } + } + + public static string Middle_zone_size { + get { + return ResourceManager.GetString("Middle_zone_size", resourceCulture); + } + } + + public static string Game_data_size { + get { + return ResourceManager.GetString("Game_data_size", resourceCulture); + } + } + + public static string Total_size { + get { + return ResourceManager.GetString("Total_size", resourceCulture); + } + } + + public static string Real_layer_break { + get { + return ResourceManager.GetString("Real_layer_break", resourceCulture); + } + } + + public static string Media_Serial_Number { + get { + return ResourceManager.GetString("Media_Serial_Number", resourceCulture); + } + } + + 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); + } + } + + public static string Offsets { + get { + return ResourceManager.GetString("Offsets", resourceCulture); + } + } + + public static string Drive_reading_offset_not_found_in_database { + get { + return ResourceManager.GetString("Drive_reading_offset_not_found_in_database", resourceCulture); + } + } + + public static string Disc_offset_cannot_be_calculated { + get { + return ResourceManager.GetString("Disc_offset_cannot_be_calculated", resourceCulture); + } + } + + public static string Drive_reading_offset_is_0_bytes_1_samples { + get { + return ResourceManager.GetString("Drive_reading_offset_is_0_bytes_1_samples", resourceCulture); + } + } + + public static string Disc_write_offset_is_unknown { + get { + return ResourceManager.GetString("Disc_write_offset_is_unknown", resourceCulture); + } + } + + public static string Combined_disc_and_drive_offset_are_0_bytes_1_samples { + get { + return ResourceManager.GetString("Combined_disc_and_drive_offset_are_0_bytes_1_samples", resourceCulture); + } + } + + public static string Combined_offset_is_0_bytes_1_samples { + get { + return ResourceManager.GetString("Combined_offset_is_0_bytes_1_samples", resourceCulture); + } + } + + public static string Disc_offset_is_0_bytes_1_samples { + get { + return ResourceManager.GetString("Disc_offset_is_0_bytes_1_samples", resourceCulture); + } + } + + public static string Took_a_total_of_0_seconds_1_processing_commands { + get { + return ResourceManager.GetString("Took_a_total_of_0_seconds_1_processing_commands", resourceCulture); + } + } + + public static string Average_speed_0_MiB_sec { + get { + return ResourceManager.GetString("Average_speed_0_MiB_sec", resourceCulture); + } + } + + public static string Fastest_speed_burst_0_MiB_sec { + get { + return ResourceManager.GetString("Fastest_speed_burst_0_MiB_sec", resourceCulture); + } + } + + public static string Slowest_speed_burst_0_MiB_sec { + get { + return ResourceManager.GetString("Slowest_speed_burst_0_MiB_sec", resourceCulture); + } + } + + public static string Summary { + get { + return ResourceManager.GetString("Summary", resourceCulture); + } + } + + public static string _0_sectors_took_less_than_3_ms { + get { + return ResourceManager.GetString("_0_sectors_took_less_than_3_ms", resourceCulture); + } + } + + public static string _0_sectors_took_less_than_10_ms_but_more_than_3_ms { + get { + return ResourceManager.GetString("_0_sectors_took_less_than_10_ms_but_more_than_3_ms", resourceCulture); + } + } + + public static string _0_sectors_took_less_than_50_ms_but_more_than_10_ms { + get { + return ResourceManager.GetString("_0_sectors_took_less_than_50_ms_but_more_than_10_ms", resourceCulture); + } + } + + public static string _0_sectors_took_less_than_150_ms_but_more_than_50_ms { + get { + return ResourceManager.GetString("_0_sectors_took_less_than_150_ms_but_more_than_50_ms", resourceCulture); + } + } + + public static string _0_sectors_took_less_than_500_ms_but_more_than_150_ms { + get { + return ResourceManager.GetString("_0_sectors_took_less_than_500_ms_but_more_than_150_ms", resourceCulture); + } + } + + public static string _0_sectors_took_more_than_500_ms { + get { + return ResourceManager.GetString("_0_sectors_took_more_than_500_ms", resourceCulture); + } + } + + public static string _0_sectors_could_not_be_read { + get { + return ResourceManager.GetString("_0_sectors_could_not_be_read", resourceCulture); + } + } + + public static string Sector_0_could_not_be_read { + get { + return ResourceManager.GetString("Sector_0_could_not_be_read", resourceCulture); + } + } + + public static string Testing_0_seeks_longest_seek_took_1_ms_fastest_one_took_2_ms_3_ms_average { + get { + return ResourceManager.GetString("Testing_0_seeks_longest_seek_took_1_ms_fastest_one_took_2_ms_3_ms_average", resourceCulture); + } + } + + public static string Whole_device { + get { + return ResourceManager.GetString("Whole_device", resourceCulture); + } + } + } +} diff --git a/Aaru.Localization/Core.resx b/Aaru.Localization/Core.resx new file mode 100644 index 000000000..ef388ed24 --- /dev/null +++ b/Aaru.Localization/Core.resx @@ -0,0 +1,481 @@ + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + Querying ATA IDENTIFY... + + + Querying USB information... + + + Querying PCMCIA information... + + + NVMe devices not yet supported. + + + Querying ATAPI IDENTIFY... + + + Waiting for drive to become ready + + + Device not ready. Sense {0} ASC {1:X2}h ASCQ {2:X2}h + + + Got sense status but no sense buffer + + + Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) + + + Trying to READ LONG... + + + Trying to READ LONG with a size of {0} bytes... + + + Trying SCSI READ LONG (10)... + + + Trying SCSI READ LONG (16)... + + + Please write the media manufacturer and press enter: + + + MD DATA (140Mb data MiniDisc) + + + 60 minutes rewritable MiniDisc + + + 74 minutes rewritable MiniDisc + + + 80 minutes rewritable MiniDisc + + + Embossed Audio MiniDisc + + + Unknown device type. + + + Device supports the Media Card Pass Through Command Set + + + Device reports incorrect media card type + + + Device contains a Secure Digital card + + + Device contains a MultiMediaCard + + + Device contains a Secure Digital I/O card + + + Device contains a Smart Media card + + + Device contains unknown media card type {0} + + + Media card is write protected + + + Card specific data: 0x{0:X4} + + + Media identified as {0}. + + + Device identified as {0} + + + ASCII Page {0:X2}h: {1} + + + Unit Serial Number: {0} + + + ASCII implemented operating definitions: {0} + + + Manufacturer-assigned Serial Number: {0} + + + TapeAlert Supported Flags Bitmap: 0x{0:X16} + + + Automation Device Serial Number: {0} + + + Data Transfer Device Element Address: 0x{0} + + + Found undecoded SCSI VPD page 0x{0:X2} + + + GET CONFIGURATION length is {0} bytes + + + GET CONFIGURATION current profile is {0:X4}h + + + Feature {0:X4}h + + + Found unknown feature code {0:X4}h + + + GET CONFIGURATION returned no feature descriptors + + + Drive has loaded a total of {0} discs + + + Drive has spent {0} hours, {1} minutes and {2} seconds reading CDs + + + Drive has spent {0} hours, {1} minutes and {2} seconds writing CDs + + + Drive has spent {0} hours, {1} minutes and {2} seconds reading DVDs + + + Drive has spent {0} hours, {1} minutes and {2} seconds writing DVDs + + + Drive supports PoweRec, is enabled and recommends {0} Kb/sec. + + + Drive supports PoweRec and has it enabled. + + + Selected PoweRec speed for currently inserted media is {0} Kb/sec ({1}x) + + + Maximum PoweRec speed for currently inserted media is {0} Kb/sec ({1}x) + + + Last used PoweRec was {0} Kb/sec ({1}x) + + + Drive supports PoweRec and has it disabled. + + + Drive supports Plextor SilentMode + + + Plextor SilentMode is enabled: + + + Access time is slow + + + Access time is fast + + + CD read speed limited to {0}x + + + DVD read speed limited to {0}x + + + CD write speed limited to {0}x + + + Drive supports Plextor GigaRec + + + Drive supports Plextor SecuRec + + + Drive supports Plextor SpeedRead + + + Drive supports Plextor SpeedRead and has it enabled + + + Drive supports hiding CD-Rs and forcing single session + + + Drive currently hides CD-Rs + + + Drive currently forces single session + + + Drive supports Plextor VariRec + + + Drive supports Plextor VariRec for DVDs + + + Drive supports bitsetting DVD+R book type + + + Drive supports bitsetting DVD+R DL book type + + + Drive supports test writing DVD+ + + + Can do challenge/response with Xbox discs + + + Can read and decrypt SS from Xbox discs + + + Can set xtreme unlock state with Xbox discs + + + Can set wxripper unlock state with Xbox discs + + + Can do challenge/response with Xbox 360 discs + + + Can read and decrypt SS from Xbox 360 discs + + + Can set xtreme unlock state with Xbox 360 discs + + + Can set wxripper unlock state with Xbox 360 discs + + + Can set locked state + + + Can skip read errors + + + Block limits for device: + + + Generating subchannels... + + + Writing metadata sidecar + + + Cannot create a sidecar from a directory. + + + Stack trace: {0} + + + Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} TiB) + TiB = tebibyte + + + Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} GiB) + GiB = gibibyte + + + Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} MiB) + MiB = mebibyte + + + Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} KiB) + KiB = kibibyte + + + Media has {0} blocks of {1} bytes/each. (for a total of {2} bytes) + + + Xbox DMI + + + Xbox 360 DMI + + + Lead-In CMI + + + Disc Definition Structure + + + Medium Status + + + Spare Area Information + + + DVD-R(W) Pre-Recorded Information + + + DVD-R(W) PFI + + + Blu-ray Disc Information + + + Blu-ray Burst Cutting Area + + + Blu-ray Disc Definition Structure + + + Blu-ray Cartridge Status + + + Blu-ray Spare Area Information + + + Track Resources Information + + + POW Resources Information + + + TOC + + + ATIP + + + Standard Disc Information + + + Session information + + + Raw TOC + + + PMA + + + CD-TEXT on Lead-In + + + MCN + + + Track's {0} ISRC + + + Xbox Security Sector + + + Video layer 0 size + + + Video layer 1 size + + + Middle zone size + + + Game data size + + + Total size + + + Real layer break + + + Media Serial Number + + + Media identified as + + + Track calculations + + + Offsets + + + Drive reading offset not found in database. + + + Disc offset cannot be calculated. + + + Drive reading offset is {0} bytes ({1} samples). + + + Disc write offset is unknown. + + + Combined disc and drive offset are {0} bytes ({1} samples). + + + Combined offset is {0} bytes ({1} samples). + + + Disc offset is {0} bytes ({1} samples). + + + Took a total of {0} seconds ({1} processing commands). + + + Average speed: {0:F3} MiB/sec. + + + Fastest speed burst: {0:F3} MiB/sec. + + + Slowest speed burst: {0:F3} MiB/sec. + + + Summary + + + {0} sectors took less than 3 ms. + + + {0} sectors took less than 10 ms but more than 3 ms. + + + {0} sectors took less than 50 ms but more than 10 ms. + + + {0} sectors took less than 150 ms but more than 50 ms. + + + {0} sectors took less than 500 ms but more than 150 ms. + + + {0} sectors took more than 500 ms. + + + {0} sectors could not be read. + + + Sector {0} could not be read + + + Testing {0} seeks, longest seek took {1:F3} ms, fastest one took {2:F3} ms. ({3:F3} ms average) + + + Whole device + + \ No newline at end of file diff --git a/Aaru.Localization/UI.Designer.cs b/Aaru.Localization/UI.Designer.cs new file mode 100644 index 000000000..e001e2ebb --- /dev/null +++ b/Aaru.Localization/UI.Designer.cs @@ -0,0 +1,3361 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Aaru.Localization { + using System; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class UI { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal UI() { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Aaru.Localization.UI", typeof(UI).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + public static string New_database_version_updating { + get { + return ResourceManager.GetString("New_database_version_updating", resourceCulture); + } + } + + public static string Exception_trying_to_remove_old_database_version { + get { + return ResourceManager.GetString("Exception_trying_to_remove_old_database_version", resourceCulture); + } + } + + public static string Please_manually_remove_file_at_0 { + get { + return ResourceManager.GetString("Please_manually_remove_file_at_0", resourceCulture); + } + } + + public static string Shows_verbose_output { + get { + return ResourceManager.GetString("Shows_verbose_output", resourceCulture); + } + } + + public static string Shows_debug_output_from_plugins { + get { + return ResourceManager.GetString("Shows_debug_output_from_plugins", resourceCulture); + } + } + + public static string Pauses_before_exiting { + get { + return ResourceManager.GetString("Pauses_before_exiting", resourceCulture); + } + } + + public static string Press_any_key_to_exit { + get { + return ResourceManager.GetString("Press_any_key_to_exit", resourceCulture); + } + } + + public static string Archive_Command_Family_Description { + get { + return ResourceManager.GetString("Archive_Command_Family_Description", resourceCulture); + } + } + + public static string Archive_Info_Command_Description { + get { + return ResourceManager.GetString("Archive_Info_Command_Description", resourceCulture); + } + } + + public static string Database_Command_Family_Description { + get { + return ResourceManager.GetString("Database_Command_Family_Description", resourceCulture); + } + } + + public static string Device_Command_Family_Description { + get { + return ResourceManager.GetString("Device_Command_Family_Description", resourceCulture); + } + } + + public static string Filesystem_Command_Family_Description { + get { + return ResourceManager.GetString("Filesystem_Command_Family_Description", resourceCulture); + } + } + + public static string Image_Command_Family_Description { + get { + return ResourceManager.GetString("Image_Command_Family_Description", resourceCulture); + } + } + + public static string Media_Command_Family_Description { + get { + return ResourceManager.GetString("Media_Command_Family_Description", resourceCulture); + } + } + + public static string Database_Stats_Command_Description { + get { + return ResourceManager.GetString("Database_Stats_Command_Description", resourceCulture); + } + } + + public static string Database_Update_Command_Description { + get { + return ResourceManager.GetString("Database_Update_Command_Description", resourceCulture); + } + } + + public static string Device_Report_Command_Description { + get { + return ResourceManager.GetString("Device_Report_Command_Description", resourceCulture); + } + } + + public static string Device_Info_Command_Description { + get { + return ResourceManager.GetString("Device_Info_Command_Description", resourceCulture); + } + } + + public static string Device_List_Command_Description { + get { + return ResourceManager.GetString("Device_List_Command_Description", resourceCulture); + } + } + + public static string Filesystem_Extract_Command_Description { + get { + return ResourceManager.GetString("Filesystem_Extract_Command_Description", resourceCulture); + } + } + + public static string Filesystem_Info_Command_Description { + get { + return ResourceManager.GetString("Filesystem_Info_Command_Description", resourceCulture); + } + } + + public static string Filesystem_List_Command_Description { + get { + return ResourceManager.GetString("Filesystem_List_Command_Description", resourceCulture); + } + } + + public static string Filesystem_Options_Command_Description { + get { + return ResourceManager.GetString("Filesystem_Options_Command_Description", resourceCulture); + } + } + + public static string Image_Checksum_Command_Description { + get { + return ResourceManager.GetString("Image_Checksum_Command_Description", resourceCulture); + } + } + + public static string Image_Compare_Command_Description { + get { + return ResourceManager.GetString("Image_Compare_Command_Description", resourceCulture); + } + } + + public static string Image_Convert_Command_Description { + get { + return ResourceManager.GetString("Image_Convert_Command_Description", resourceCulture); + } + } + + public static string Image_Create_Sidecar_Command_Description { + get { + return ResourceManager.GetString("Image_Create_Sidecar_Command_Description", resourceCulture); + } + } + + public static string Image_Decode_Command_Description { + get { + return ResourceManager.GetString("Image_Decode_Command_Description", resourceCulture); + } + } + + public static string Image_Entropy_Command_Description { + get { + return ResourceManager.GetString("Image_Entropy_Command_Description", resourceCulture); + } + } + + public static string Image_Info_Command_Description { + get { + return ResourceManager.GetString("Image_Info_Command_Description", resourceCulture); + } + } + + public static string Image_Options_Command_Description { + get { + return ResourceManager.GetString("Image_Options_Command_Description", resourceCulture); + } + } + + public static string Image_Print_Command_Description { + get { + return ResourceManager.GetString("Image_Print_Command_Description", resourceCulture); + } + } + + public static string Image_Verify_Command_Description { + get { + return ResourceManager.GetString("Image_Verify_Command_Description", resourceCulture); + } + } + + public static string Media_Dump_Command_Description { + get { + return ResourceManager.GetString("Media_Dump_Command_Description", resourceCulture); + } + } + + public static string Media_Info_Command_Description { + get { + return ResourceManager.GetString("Media_Info_Command_Description", resourceCulture); + } + } + + public static string Media_Scan_Command_Description { + get { + return ResourceManager.GetString("Media_Scan_Command_Description", resourceCulture); + } + } + + public static string Configure_Command_Description { + get { + return ResourceManager.GetString("Configure_Command_Description", resourceCulture); + } + } + + public static string List_Formats_Command_Description { + get { + return ResourceManager.GetString("List_Formats_Command_Description", resourceCulture); + } + } + + public static string List_Encodings_Command_Description { + get { + return ResourceManager.GetString("List_Encodings_Command_Description", resourceCulture); + } + } + + public static string List_Namespaces_Command_Description { + get { + return ResourceManager.GetString("List_Namespaces_Command_Description", resourceCulture); + } + } + + public static string Remote_Command_Description { + get { + return ResourceManager.GetString("Remote_Command_Description", resourceCulture); + } + } + + public static string There_are_no_statistics { + get { + return ResourceManager.GetString("There_are_no_statistics", resourceCulture); + } + } + + public static string Commands_statistics { + get { + return ResourceManager.GetString("Commands_statistics", resourceCulture); + } + } + + public static string Title_Command { + get { + return ResourceManager.GetString("Title_Command", resourceCulture); + } + } + + public static string Title_Times_used { + get { + return ResourceManager.GetString("Title_Times_used", resourceCulture); + } + } + + public static string Title_Filter { + get { + return ResourceManager.GetString("Title_Filter", resourceCulture); + } + } + + public static string Filters_statistics { + get { + return ResourceManager.GetString("Filters_statistics", resourceCulture); + } + } + + public static string Media_image_format_statistics { + get { + return ResourceManager.GetString("Media_image_format_statistics", resourceCulture); + } + } + + public static string Title_Format { + get { + return ResourceManager.GetString("Title_Format", resourceCulture); + } + } + + public static string Partitioning_scheme_statistics { + get { + return ResourceManager.GetString("Partitioning_scheme_statistics", resourceCulture); + } + } + + public static string Title_Scheme { + get { + return ResourceManager.GetString("Title_Scheme", resourceCulture); + } + } + + public static string Filesystem_statistics { + get { + return ResourceManager.GetString("Filesystem_statistics", resourceCulture); + } + } + + public static string Title_Filesystem { + get { + return ResourceManager.GetString("Title_Filesystem", resourceCulture); + } + } + + public static string Device_statistics { + get { + return ResourceManager.GetString("Device_statistics", resourceCulture); + } + } + + public static string Title_Manufacturer { + get { + return ResourceManager.GetString("Title_Manufacturer", resourceCulture); + } + } + + public static string Title_Model { + get { + return ResourceManager.GetString("Title_Model", resourceCulture); + } + } + + public static string Title_Revision { + get { + return ResourceManager.GetString("Title_Revision", resourceCulture); + } + } + + public static string Title_Bus { + get { + return ResourceManager.GetString("Title_Bus", resourceCulture); + } + } + + public static string Media_found_in_real_device_statistics { + get { + return ResourceManager.GetString("Media_found_in_real_device_statistics", resourceCulture); + } + } + + public static string Title_Type_for_media { + get { + return ResourceManager.GetString("Title_Type_for_media", resourceCulture); + } + } + + public static string Media_found_in_images_statistics { + get { + return ResourceManager.GetString("Media_found_in_images_statistics", resourceCulture); + } + } + + public static string Clear_existing_main_database { + get { + return ResourceManager.GetString("Clear_existing_main_database", resourceCulture); + } + } + + public static string Clear_existing_main_and_local_database { + get { + return ResourceManager.GetString("Clear_existing_main_and_local_database", resourceCulture); + } + } + + public static string Could_not_remove_local_database { + get { + return ResourceManager.GetString("Could_not_remove_local_database", resourceCulture); + } + } + + public static string Could_not_remove_main_database { + get { + return ResourceManager.GetString("Could_not_remove_main_database", resourceCulture); + } + } + + public static string Device_path { + get { + return ResourceManager.GetString("Device_path", resourceCulture); + } + } + + public static string Device_report_using_trap_disc { + get { + return ResourceManager.GetString("Device_report_using_trap_disc", resourceCulture); + } + } + + public static string Could_not_open_device_error_0 { + get { + return ResourceManager.GetString("Could_not_open_device_error_0", resourceCulture); + } + } + + public static string Device_report_must_be_run_as_admin { + get { + return ResourceManager.GetString("Device_report_must_be_run_as_admin", resourceCulture); + } + } + + public static string Not_continuing { + get { + return ResourceManager.GetString("Not_continuing", resourceCulture); + } + } + + public static string Device_does_not_report_with_trap_discs { + get { + return ResourceManager.GetString("Device_does_not_report_with_trap_discs", resourceCulture); + } + } + + public static string Is_the_device_natively_USB { + get { + return ResourceManager.GetString("Is_the_device_natively_USB", resourceCulture); + } + } + + public static string Is_the_media_removable { + get { + return ResourceManager.GetString("Is_the_media_removable", resourceCulture); + } + } + + public static string Is_the_device_natively_FireWire { + get { + return ResourceManager.GetString("Is_the_device_natively_FireWire", resourceCulture); + } + } + + public static string Please_remove_any_media { + get { + return ResourceManager.GetString("Please_remove_any_media", resourceCulture); + } + } + + public static string Do_you_have_media_you_can_insert { + get { + return ResourceManager.GetString("Do_you_have_media_you_can_insert", resourceCulture); + } + } + + public static string Please_insert_it_in_the_drive { + get { + return ResourceManager.GetString("Please_insert_it_in_the_drive", resourceCulture); + } + } + + public static string Please_write_description_of_media_type { + get { + return ResourceManager.GetString("Please_write_description_of_media_type", resourceCulture); + } + } + + public static string Please_write_media_model { + get { + return ResourceManager.GetString("Please_write_media_model", resourceCulture); + } + } + + public static string Unsupported_device_type_for_report { + get { + return ResourceManager.GetString("Unsupported_device_type_for_report", resourceCulture); + } + } + + public static string Is_the_media_removable_flash_is_not { + get { + return ResourceManager.GetString("Is_the_media_removable_flash_is_not", resourceCulture); + } + } + + public static string Asking_drive_to_unload_tape { + get { + return ResourceManager.GetString("Asking_drive_to_unload_tape", resourceCulture); + } + } + + public static string Sure_report_trap_disc { + get { + return ResourceManager.GetString("Sure_report_trap_disc", resourceCulture); + } + } + + public static string Do_you_have_audio_trap_disc { + get { + return ResourceManager.GetString("Do_you_have_audio_trap_disc", resourceCulture); + } + } + + public static string Please_burn_audio_trap_disc { + get { + return ResourceManager.GetString("Please_burn_audio_trap_disc", resourceCulture); + } + } + + public static string Do_you_have_GD_ROM_disc { + get { + return ResourceManager.GetString("Do_you_have_GD_ROM_disc", resourceCulture); + } + } + + public static string Do_you_want_to_try_Plextor_commands { + get { + return ResourceManager.GetString("Do_you_want_to_try_Plextor_commands", resourceCulture); + } + } + + public static string Do_you_want_to_try_NEC_commands { + get { + return ResourceManager.GetString("Do_you_want_to_try_NEC_commands", resourceCulture); + } + } + + public static string Do_you_want_to_try_Pioneer_commands { + get { + return ResourceManager.GetString("Do_you_want_to_try_Pioneer_commands", resourceCulture); + } + } + + public static string Do_you_want_to_try_HLDTST_commands { + get { + return ResourceManager.GetString("Do_you_want_to_try_HLDTST_commands", resourceCulture); + } + } + + public static string Do_you_want_to_try_MediaTek_commands { + get { + return ResourceManager.GetString("Do_you_want_to_try_MediaTek_commands", resourceCulture); + } + } + + public static string This_is_dangerous { + get { + return ResourceManager.GetString("This_is_dangerous", resourceCulture); + } + } + + public static string Do_you_have_a_0_disc { + get { + return ResourceManager.GetString("Do_you_have_a_0_disc", resourceCulture); + } + } + + public static string Prefix_for_saving_binary_information { + get { + return ResourceManager.GetString("Prefix_for_saving_binary_information", resourceCulture); + } + } + + public static string Title_USB_device { + get { + return ResourceManager.GetString("Title_USB_device", resourceCulture); + } + } + + public static string Title_FireWire_device { + get { + return ResourceManager.GetString("Title_FireWire_device", resourceCulture); + } + } + + public static string Title_PCMCIA_device { + get { + return ResourceManager.GetString("Title_PCMCIA_device", resourceCulture); + } + } + + public static string Title_SCSI_device { + get { + return ResourceManager.GetString("Title_SCSI_device", resourceCulture); + } + } + + public static string Title_SCSI_MMC_GET_CONFIGURATION_Features { + get { + return ResourceManager.GetString("Title_SCSI_MMC_GET_CONFIGURATION_Features", resourceCulture); + } + } + + public static string Title_Drive_has_kreon_firmware { + get { + return ResourceManager.GetString("Title_Drive_has_kreon_firmware", resourceCulture); + } + } + + public static string Title_Descriptor_size { + get { + return ResourceManager.GetString("Title_Descriptor_size", resourceCulture); + } + } + + public static string Title_Vendor_ID { + get { + return ResourceManager.GetString("Title_Vendor_ID", resourceCulture); + } + } + + public static string Title_Product_ID { + get { + return ResourceManager.GetString("Title_Product_ID", resourceCulture); + } + } + + public static string Title_Product { + get { + return ResourceManager.GetString("Title_Product", resourceCulture); + } + } + + public static string Title_Serial_number { + get { + return ResourceManager.GetString("Title_Serial_number", resourceCulture); + } + } + + public static string Title_Model_ID { + get { + return ResourceManager.GetString("Title_Model_ID", resourceCulture); + } + } + + public static string Title_Vendor { + get { + return ResourceManager.GetString("Title_Vendor", resourceCulture); + } + } + + public static string Title_GUID { + get { + return ResourceManager.GetString("Title_GUID", resourceCulture); + } + } + + public static string PCMCIA_CIS_is_0_bytes { + get { + return ResourceManager.GetString("PCMCIA_CIS_is_0_bytes", resourceCulture); + } + } + + public static string Invoke_Found_undecoded_tuple_ID_0 { + get { + return ResourceManager.GetString("Invoke_Found_undecoded_tuple_ID_0", resourceCulture); + } + } + + public static string Found_unknown_tuple_ID_0 { + get { + return ResourceManager.GetString("Found_unknown_tuple_ID_0", resourceCulture); + } + } + + public static string Could_not_get_tuples { + get { + return ResourceManager.GetString("Could_not_get_tuples", resourceCulture); + } + } + + public static string aaruremote_host { + get { + return ResourceManager.GetString("aaruremote_host", resourceCulture); + } + } + + public static string No_known_devices_attached { + get { + return ResourceManager.GetString("No_known_devices_attached", resourceCulture); + } + } + + public static string Path { + get { + return ResourceManager.GetString("Path", resourceCulture); + } + } + + public static string Serial { + get { + return ResourceManager.GetString("Serial", resourceCulture); + } + } + + public static string Supported_Question { + get { + return ResourceManager.GetString("Supported_Question", resourceCulture); + } + } + + public static string Name_of_character_encoding_to_use { + get { + return ResourceManager.GetString("Name_of_character_encoding_to_use", resourceCulture); + } + } + + public static string Comma_separated_name_value_pairs_of_filesystem_options { + get { + return ResourceManager.GetString("Comma_separated_name_value_pairs_of_filesystem_options", resourceCulture); + } + } + + public static string Extract_extended_attributes_if_present { + get { + return ResourceManager.GetString("Extract_extended_attributes_if_present", resourceCulture); + } + } + + public static string Namespace_to_use_for_filenames { + get { + return ResourceManager.GetString("Namespace_to_use_for_filenames", resourceCulture); + } + } + + public static string Disc_image_path { + get { + return ResourceManager.GetString("Disc_image_path", resourceCulture); + } + } + + public static string Directory_where_extracted_files_will_be_created { + get { + return ResourceManager.GetString("Directory_where_extracted_files_will_be_created", resourceCulture); + } + } + + public static string Identifying_file_filter { + get { + return ResourceManager.GetString("Identifying_file_filter", resourceCulture); + } + } + + public static string Parsed_options { + get { + return ResourceManager.GetString("Parsed_options", resourceCulture); + } + } + + public static string Cannot_open_specified_file { + get { + return ResourceManager.GetString("Cannot_open_specified_file", resourceCulture); + } + } + + public static string encoding_for_0 { + get { + return ResourceManager.GetString("encoding_for_0", resourceCulture); + } + } + + public static string Specified_encoding_is_not_supported { + get { + return ResourceManager.GetString("Specified_encoding_is_not_supported", resourceCulture); + } + } + + public static string Identifying_image_format { + get { + return ResourceManager.GetString("Identifying_image_format", resourceCulture); + } + } + + public static string Image_format_not_identified_not_proceeding_with_file_extraction { + get { + return ResourceManager.GetString("Image_format_not_identified_not_proceeding_with_file_extraction", resourceCulture); + } + } + + public static string Command_not_supported_for_this_image_type { + get { + return ResourceManager.GetString("Command_not_supported_for_this_image_type", resourceCulture); + } + } + + public static string Image_format_identified_by_0_1 { + get { + return ResourceManager.GetString("Image_format_identified_by_0_1", resourceCulture); + } + } + + public static string Image_format_identified_by_0 { + get { + return ResourceManager.GetString("Image_format_identified_by_0", resourceCulture); + } + } + + public static string Output_directory_missing { + get { + return ResourceManager.GetString("Output_directory_missing", resourceCulture); + } + } + + public static string Destination_exists_aborting { + get { + return ResourceManager.GetString("Destination_exists_aborting", resourceCulture); + } + } + + public static string Invoke_Opening_image_file { + get { + return ResourceManager.GetString("Invoke_Opening_image_file", resourceCulture); + } + } + + public static string Unable_to_open_image_format { + get { + return ResourceManager.GetString("Unable_to_open_image_format", resourceCulture); + } + } + + public static string Error_0 { + get { + return ResourceManager.GetString("Error_0", resourceCulture); + } + } + + public static string Correctly_opened_image_file { + get { + return ResourceManager.GetString("Correctly_opened_image_file", resourceCulture); + } + } + + public static string Image_without_headers_is_0_bytes { + get { + return ResourceManager.GetString("Image_without_headers_is_0_bytes", resourceCulture); + } + } + + public static string Image_has_0_sectors { + get { + return ResourceManager.GetString("Image_has_0_sectors", resourceCulture); + } + } + + public static string Image_identifies_disk_type_as_0 { + get { + return ResourceManager.GetString("Image_identifies_disk_type_as_0", resourceCulture); + } + } + + public static string Enumerating_partitions { + get { + return ResourceManager.GetString("Enumerating_partitions", resourceCulture); + } + } + + public static string No_partitions_found { + get { + return ResourceManager.GetString("No_partitions_found", resourceCulture); + } + } + + public static string _0_partitions_found { + get { + return ResourceManager.GetString("_0_partitions_found", resourceCulture); + } + } + + public static string Partition_0 { + get { + return ResourceManager.GetString("Partition_0", resourceCulture); + } + } + + public static string Identifying_filesystems_on_partition { + get { + return ResourceManager.GetString("Identifying_filesystems_on_partition", resourceCulture); + } + } + + public static string Filesystem_not_identified { + get { + return ResourceManager.GetString("Filesystem_not_identified", resourceCulture); + } + } + + public static string Identified_by_0_plugins { + get { + return ResourceManager.GetString("Identified_by_0_plugins", resourceCulture); + } + } + + public static string As_identified_by_0 { + get { + return ResourceManager.GetString("As_identified_by_0", resourceCulture); + } + } + + public static string Mounting_filesystem { + get { + return ResourceManager.GetString("Mounting_filesystem", resourceCulture); + } + } + + public static string Unable_to_mount_volume_error_0 { + get { + return ResourceManager.GetString("Unable_to_mount_volume_error_0", resourceCulture); + } + } + + public static string Identified_by_0 { + get { + return ResourceManager.GetString("Identified_by_0", resourceCulture); + } + } + + public static string Error_reading_file_0 { + get { + return ResourceManager.GetString("Error_reading_file_0", resourceCulture); + } + } + + public static string Error_0_reading_root_directory { + get { + return ResourceManager.GetString("Error_0_reading_root_directory", resourceCulture); + } + } + + public static string Retrieving_file_information { + get { + return ResourceManager.GetString("Retrieving_file_information", resourceCulture); + } + } + + public static string Created_subdirectory_at_0 { + get { + return ResourceManager.GetString("Created_subdirectory_at_0", resourceCulture); + } + } + + public static string Listing_extended_attributes { + get { + return ResourceManager.GetString("Listing_extended_attributes", resourceCulture); + } + } + + public static string Reading_extended_attribute { + get { + return ResourceManager.GetString("Reading_extended_attribute", resourceCulture); + } + } + + public static string Writing_extended_attribute { + get { + return ResourceManager.GetString("Writing_extended_attribute", resourceCulture); + } + } + + public static string Written_0_bytes_of_xattr_1_from_file_2_to_3 { + get { + return ResourceManager.GetString("Written_0_bytes_of_xattr_1_from_file_2_to_3", resourceCulture); + } + } + + public static string Cannot_write_xattr_0_for_1_output_exists { + get { + return ResourceManager.GetString("Cannot_write_xattr_0_for_1_output_exists", resourceCulture); + } + } + + public static string Reading_file_0 { + get { + return ResourceManager.GetString("Reading_file_0", resourceCulture); + } + } + + public static string Error_0_reading_file_1 { + get { + return ResourceManager.GetString("Error_0_reading_file_1", resourceCulture); + } + } + + public static string Written_0_bytes_of_file_1_to_2 { + get { + return ResourceManager.GetString("Written_0_bytes_of_file_1_to_2", resourceCulture); + } + } + + public static string Cannot_write_file_0_output_exists { + get { + return ResourceManager.GetString("Cannot_write_file_0_output_exists", resourceCulture); + } + } + + public static string Searches_and_prints_information_about_filesystems { + get { + return ResourceManager.GetString("Searches_and_prints_information_about_filesystems", resourceCulture); + } + } + + public static string Searches_and_interprets_partitions { + get { + return ResourceManager.GetString("Searches_and_interprets_partitions", resourceCulture); + } + } + + public static string Media_image_path { + get { + return ResourceManager.GetString("Media_image_path", resourceCulture); + } + } + + public static string Image_format_not_identified_not_proceeding_with_analysis { + get { + return ResourceManager.GetString("Image_format_not_identified_not_proceeding_with_analysis", resourceCulture); + } + } + + public static string No_partitions_founds_not_searching_for_filesystems { + get { + return ResourceManager.GetString("No_partitions_founds_not_searching_for_filesystems", resourceCulture); + } + } + + public static string Title_Name { + get { + return ResourceManager.GetString("Title_Name", resourceCulture); + } + } + + public static string Title_Type { + get { + return ResourceManager.GetString("Title_Type", resourceCulture); + } + } + + public static string Title_Start { + get { + return ResourceManager.GetString("Title_Start", resourceCulture); + } + } + + public static string Title_Length { + get { + return ResourceManager.GetString("Title_Length", resourceCulture); + } + } + + public static string sector_0_byte_1 { + get { + return ResourceManager.GetString("sector_0_byte_1", resourceCulture); + } + } + + public static string _0_sectors_1_bytes { + get { + return ResourceManager.GetString("_0_sectors_1_bytes", resourceCulture); + } + } + + public static string Title_Description { + get { + return ResourceManager.GetString("Title_Description", resourceCulture); + } + } + + public static string Identifying_filesystems { + get { + return ResourceManager.GetString("Identifying_filesystems", resourceCulture); + } + } + + public static string Use_long_format { + get { + return ResourceManager.GetString("Use_long_format", resourceCulture); + } + } + + public static string Image_format_not_identified_not_proceeding_with_listing { + get { + return ResourceManager.GetString("Image_format_not_identified_not_proceeding_with_listing", resourceCulture); + } + } + + public static string Root_directory { + get { + return ResourceManager.GetString("Root_directory", resourceCulture); + } + } + + public static string Directory_0 { + get { + return ResourceManager.GetString("Directory_0", resourceCulture); + } + } + + public static string Reading_directory { + get { + return ResourceManager.GetString("Reading_directory", resourceCulture); + } + } + + public static string Error_0_reading_directory_1 { + get { + return ResourceManager.GetString("Error_0_reading_directory_1", resourceCulture); + } + } + + public static string Directory_abbreviation { + get { + return ResourceManager.GetString("Directory_abbreviation", resourceCulture); + } + } + + public static string Read_only_filesystems_options { + get { + return ResourceManager.GetString("Read_only_filesystems_options", resourceCulture); + } + } + + public static string Options_for_0 { + get { + return ResourceManager.GetString("Options_for_0", resourceCulture); + } + } + + public static string TypeToString_boolean { + get { + return ResourceManager.GetString("TypeToString_boolean", resourceCulture); + } + } + + public static string TypeToString_signed_number { + get { + return ResourceManager.GetString("TypeToString_signed_number", resourceCulture); + } + } + + public static string TypeToString_number { + get { + return ResourceManager.GetString("TypeToString_number", resourceCulture); + } + } + + public static string TypeToString_float_number { + get { + return ResourceManager.GetString("TypeToString_float_number", resourceCulture); + } + } + + public static string TypeToString_uuid { + get { + return ResourceManager.GetString("TypeToString_uuid", resourceCulture); + } + } + + public static string TypeToString_string { + get { + return ResourceManager.GetString("TypeToString_string", resourceCulture); + } + } + + public static string Calculates_Adler_32 { + get { + return ResourceManager.GetString("Calculates_Adler_32", resourceCulture); + } + } + + public static string Calculates_CRC16 { + get { + return ResourceManager.GetString("Calculates_CRC16", resourceCulture); + } + } + + public static string Calculates_CRC32 { + get { + return ResourceManager.GetString("Calculates_CRC32", resourceCulture); + } + } + + public static string Calculates_CRC64_ECMA { + get { + return ResourceManager.GetString("Calculates_CRC64_ECMA", resourceCulture); + } + } + + public static string Calculates_Fletcher_16 { + get { + return ResourceManager.GetString("Calculates_Fletcher_16", resourceCulture); + } + } + + public static string Calculates_Fletcher_32 { + get { + return ResourceManager.GetString("Calculates_Fletcher_32", resourceCulture); + } + } + + public static string Calculates_MD5 { + get { + return ResourceManager.GetString("Calculates_MD5", resourceCulture); + } + } + + public static string Checksums_each_track_separately { + get { + return ResourceManager.GetString("Checksums_each_track_separately", resourceCulture); + } + } + + public static string Calculates_SHA1 { + get { + return ResourceManager.GetString("Calculates_SHA1", resourceCulture); + } + } + + public static string Calculates_SHA256 { + get { + return ResourceManager.GetString("Calculates_SHA256", resourceCulture); + } + } + + public static string Calculates_SHA384 { + get { + return ResourceManager.GetString("Calculates_SHA384", resourceCulture); + } + } + + public static string Calculates_SHA512 { + get { + return ResourceManager.GetString("Calculates_SHA512", resourceCulture); + } + } + + public static string Calculates_SpamSum_fuzzy_hash { + get { + return ResourceManager.GetString("Calculates_SpamSum_fuzzy_hash", resourceCulture); + } + } + + public static string Checksums_the_whole_disc { + get { + return ResourceManager.GetString("Checksums_the_whole_disc", resourceCulture); + } + } + + public static string Unable_to_recognize_image_format_not_checksumming { + get { + return ResourceManager.GetString("Unable_to_recognize_image_format_not_checksumming", resourceCulture); + } + } + + public static string Hashing_tracks { + get { + return ResourceManager.GetString("Hashing_tracks", resourceCulture); + } + } + + public static string Hashing_track_0_of_1 { + get { + return ResourceManager.GetString("Hashing_track_0_of_1", resourceCulture); + } + } + + public static string Hashing_sector { + get { + return ResourceManager.GetString("Hashing_sector", resourceCulture); + } + } + + public static string Track_0_starts_at_sector_1_and_ends_at_sector_2 { + get { + return ResourceManager.GetString("Track_0_starts_at_sector_1_and_ends_at_sector_2", resourceCulture); + } + } + + public static string Hashing_sectors_0_to_2_of_track_1 { + get { + return ResourceManager.GetString("Hashing_sectors_0_to_2_of_track_1", resourceCulture); + } + } + + public static string Error_0_while_reading_1_sectors_from_sector_2 { + get { + return ResourceManager.GetString("Error_0_while_reading_1_sectors_from_sector_2", resourceCulture); + } + } + + public static string Checksums_Track_0_has_1 { + get { + return ResourceManager.GetString("Checksums_Track_0_has_1", resourceCulture); + } + } + + public static string Checksums_Disc_has_0 { + get { + return ResourceManager.GetString("Checksums_Disc_has_0", resourceCulture); + } + } + + public static string Could_not_get_tracks_because_0 { + get { + return ResourceManager.GetString("Could_not_get_tracks_because_0", resourceCulture); + } + } + + public static string Hashing_files { + get { + return ResourceManager.GetString("Hashing_files", resourceCulture); + } + } + + public static string Hashing_file_0_of_1 { + get { + return ResourceManager.GetString("Hashing_file_0_of_1", resourceCulture); + } + } + + public static string Hashing_file_less_block_0 { + get { + return ResourceManager.GetString("Hashing_file_less_block_0", resourceCulture); + } + } + + public static string Error_0_while_reading_block_1 { + get { + return ResourceManager.GetString("Error_0_while_reading_block_1", resourceCulture); + } + } + + public static string File_0_starts_at_block_1_and_ends_at_block_2 { + get { + return ResourceManager.GetString("File_0_starts_at_block_1_and_ends_at_block_2", resourceCulture); + } + } + + public static string Hashing_blocks_0_to_2_of_file_1 { + get { + return ResourceManager.GetString("Hashing_blocks_0_to_2_of_file_1", resourceCulture); + } + } + + public static string Checksums_File_0_has_1 { + get { + return ResourceManager.GetString("Checksums_File_0_has_1", resourceCulture); + } + } + + public static string Checksums_Tape_has_0 { + get { + return ResourceManager.GetString("Checksums_Tape_has_0", resourceCulture); + } + } + + public static string Hashing_image { + get { + return ResourceManager.GetString("Hashing_image", resourceCulture); + } + } + + public static string Error_0_while_reading_1_bytes_from_2 { + get { + return ResourceManager.GetString("Error_0_while_reading_1_bytes_from_2", resourceCulture); + } + } + + public static string Hashing_bytes_0_to_1 { + get { + return ResourceManager.GetString("Hashing_bytes_0_to_1", resourceCulture); + } + } + + public static string Checksums_Media_has_0 { + get { + return ResourceManager.GetString("Checksums_Media_has_0", resourceCulture); + } + } + + public static string Hashing_sectors { + get { + return ResourceManager.GetString("Hashing_sectors", resourceCulture); + } + } + + public static string Hashing_sectors_0_to_1 { + get { + return ResourceManager.GetString("Hashing_sectors_0_to_1", resourceCulture); + } + } + + public static string Checksums_Disk_has_0 { + get { + return ResourceManager.GetString("Checksums_Disk_has_0", resourceCulture); + } + } + + public static string First_media_image_path { + get { + return ResourceManager.GetString("First_media_image_path", resourceCulture); + } + } + + public static string Second_media_image_path { + get { + return ResourceManager.GetString("Second_media_image_path", resourceCulture); + } + } + + public static string Identifying_first_file_filter { + get { + return ResourceManager.GetString("Identifying_first_file_filter", resourceCulture); + } + } + + public static string Identifying_second_file_filter { + get { + return ResourceManager.GetString("Identifying_second_file_filter", resourceCulture); + } + } + + public static string Cannot_open_first_input_file { + get { + return ResourceManager.GetString("Cannot_open_first_input_file", resourceCulture); + } + } + + public static string Cannot_open_second_input_file { + get { + return ResourceManager.GetString("Cannot_open_second_input_file", resourceCulture); + } + } + + public static string Identifying_first_image_format { + get { + return ResourceManager.GetString("Identifying_first_image_format", resourceCulture); + } + } + + public static string Identifying_second_image_format { + get { + return ResourceManager.GetString("Identifying_second_image_format", resourceCulture); + } + } + + public static string First_input_file_format_not_identified { + get { + return ResourceManager.GetString("First_input_file_format_not_identified", resourceCulture); + } + } + + public static string First_input_file_format_identified_by_0_1 { + get { + return ResourceManager.GetString("First_input_file_format_identified_by_0_1", resourceCulture); + } + } + + public static string First_input_file_format_identified_by_0 { + get { + return ResourceManager.GetString("First_input_file_format_identified_by_0", resourceCulture); + } + } + + public static string Second_input_file_format_not_identified { + get { + return ResourceManager.GetString("Second_input_file_format_not_identified", resourceCulture); + } + } + + public static string Second_input_file_format_identified_by_0_1 { + get { + return ResourceManager.GetString("Second_input_file_format_identified_by_0_1", resourceCulture); + } + } + + public static string Second_input_file_format_identified_by_0 { + get { + return ResourceManager.GetString("Second_input_file_format_identified_by_0", resourceCulture); + } + } + + public static string Opening_first_image_file { + get { + return ResourceManager.GetString("Opening_first_image_file", resourceCulture); + } + } + + public static string Unable_to_open_first_image_format { + get { + return ResourceManager.GetString("Unable_to_open_first_image_format", resourceCulture); + } + } + + public static string Opening_second_image_file { + get { + return ResourceManager.GetString("Opening_second_image_file", resourceCulture); + } + } + + public static string Unable_to_open_second_image_format { + get { + return ResourceManager.GetString("Unable_to_open_second_image_format", resourceCulture); + } + } + + public static string Title_First_Media_image { + get { + return ResourceManager.GetString("Title_First_Media_image", resourceCulture); + } + } + + public static string Title_Second_Media_image { + get { + return ResourceManager.GetString("Title_Second_Media_image", resourceCulture); + } + } + + public static string Title_File { + get { + return ResourceManager.GetString("Title_File", resourceCulture); + } + } + + public static string Title_Media_image_format { + get { + return ResourceManager.GetString("Title_Media_image_format", resourceCulture); + } + } + + public static string Has_partitions_Question { + get { + return ResourceManager.GetString("Has_partitions_Question", resourceCulture); + } + } + + public static string Has_sessions_Question { + get { + return ResourceManager.GetString("Has_sessions_Question", resourceCulture); + } + } + + public static string Title_Image_size { + get { + return ResourceManager.GetString("Title_Image_size", resourceCulture); + } + } + + public static string Title_Sectors { + get { + return ResourceManager.GetString("Title_Sectors", resourceCulture); + } + } + + public static string Title_Sector_size { + get { + return ResourceManager.GetString("Title_Sector_size", resourceCulture); + } + } + + public static string Title_Creation_time { + get { + return ResourceManager.GetString("Title_Creation_time", resourceCulture); + } + } + + public static string Title_Last_modification_time { + get { + return ResourceManager.GetString("Title_Last_modification_time", resourceCulture); + } + } + + public static string Title_Media_type { + get { + return ResourceManager.GetString("Title_Media_type", resourceCulture); + } + } + + public static string Title_Image_version { + get { + return ResourceManager.GetString("Title_Image_version", resourceCulture); + } + } + + public static string Title_Image_application { + get { + return ResourceManager.GetString("Title_Image_application", resourceCulture); + } + } + + public static string Title_Image_application_version { + get { + return ResourceManager.GetString("Title_Image_application_version", resourceCulture); + } + } + + public static string Title_Image_creator { + get { + return ResourceManager.GetString("Title_Image_creator", resourceCulture); + } + } + + public static string Title_Image_name { + get { + return ResourceManager.GetString("Title_Image_name", resourceCulture); + } + } + + public static string Title_Image_comments { + get { + return ResourceManager.GetString("Title_Image_comments", resourceCulture); + } + } + + public static string Title_Media_manufacturer { + get { + return ResourceManager.GetString("Title_Media_manufacturer", resourceCulture); + } + } + + public static string Title_Media_model { + get { + return ResourceManager.GetString("Title_Media_model", resourceCulture); + } + } + + public static string Title_Media_serial_number { + get { + return ResourceManager.GetString("Title_Media_serial_number", resourceCulture); + } + } + + public static string Title_Media_barcode { + get { + return ResourceManager.GetString("Title_Media_barcode", resourceCulture); + } + } + + public static string Title_Media_part_number { + get { + return ResourceManager.GetString("Title_Media_part_number", resourceCulture); + } + } + + public static string Title_Media_sequence { + get { + return ResourceManager.GetString("Title_Media_sequence", resourceCulture); + } + } + + public static string Title_Last_media_on_sequence { + get { + return ResourceManager.GetString("Title_Last_media_on_sequence", resourceCulture); + } + } + + public static string Title_Drive_manufacturer { + get { + return ResourceManager.GetString("Title_Drive_manufacturer", resourceCulture); + } + } + + public static string Title_Drive_firmware_revision { + get { + return ResourceManager.GetString("Title_Drive_firmware_revision", resourceCulture); + } + } + + public static string Title_Drive_model { + get { + return ResourceManager.GetString("Title_Drive_model", resourceCulture); + } + } + + public static string Title_Drive_serial_number { + get { + return ResourceManager.GetString("Title_Drive_serial_number", resourceCulture); + } + } + + public static string Has_tag_0_Question { + get { + return ResourceManager.GetString("Has_tag_0_Question", resourceCulture); + } + } + + public static string Comparing_media_image_characteristics { + get { + return ResourceManager.GetString("Comparing_media_image_characteristics", resourceCulture); + } + } + + public static string Image_partitioned_status_differ { + get { + return ResourceManager.GetString("Image_partitioned_status_differ", resourceCulture); + } + } + + public static string Image_session_status_differ { + get { + return ResourceManager.GetString("Image_session_status_differ", resourceCulture); + } + } + + public static string Image_sectors_differ { + get { + return ResourceManager.GetString("Image_sectors_differ", resourceCulture); + } + } + + public static string Image_sector_size_differ { + get { + return ResourceManager.GetString("Image_sector_size_differ", resourceCulture); + } + } + + public static string Media_type_differs { + get { + return ResourceManager.GetString("Media_type_differs", resourceCulture); + } + } + + public static string Second_image_has_more_sectors { + get { + return ResourceManager.GetString("Second_image_has_more_sectors", resourceCulture); + } + } + + public static string First_image_has_more_sectors { + get { + return ResourceManager.GetString("First_image_has_more_sectors", resourceCulture); + } + } + + public static string Comparing_sectors { + get { + return ResourceManager.GetString("Comparing_sectors", resourceCulture); + } + } + + public static string Comparing_sector_0_of_1 { + get { + return ResourceManager.GetString("Comparing_sector_0_of_1", resourceCulture); + } + } + + public static string Error_0_reading_sector_1_from_first_image { + get { + return ResourceManager.GetString("Error_0_reading_sector_1_from_first_image", resourceCulture); + } + } + + public static string Error_0_reading_sector_1_from_second_image { + get { + return ResourceManager.GetString("Error_0_reading_sector_1_from_second_image", resourceCulture); + } + } + + public static string Comparing_images { + get { + return ResourceManager.GetString("Comparing_images", resourceCulture); + } + } + + public static string Images_differ { + get { + return ResourceManager.GetString("Images_differ", resourceCulture); + } + } + + public static string Images_do_not_differ { + get { + return ResourceManager.GetString("Images_do_not_differ", resourceCulture); + } + } + + public static string Take_metadata_from_existing_CICM_XML_sidecar { + get { + return ResourceManager.GetString("Take_metadata_from_existing_CICM_XML_sidecar", resourceCulture); + } + } + + public static string Image_comments { + get { + return ResourceManager.GetString("Image_comments", resourceCulture); + } + } + + public static string How_many_sectors_to_convert_at_once { + get { + return ResourceManager.GetString("How_many_sectors_to_convert_at_once", resourceCulture); + } + } + + public static string Who_person_created_the_image { + get { + return ResourceManager.GetString("Who_person_created_the_image", resourceCulture); + } + } + + public static string Manufacturer_of_drive_read_the_media_by_image { + get { + return ResourceManager.GetString("Manufacturer_of_drive_read_the_media_by_image", resourceCulture); + } + } + + public static string Model_of_drive_read_the_media_by_image { + get { + return ResourceManager.GetString("Model_of_drive_read_the_media_by_image", resourceCulture); + } + } + + public static string Firmware_revision_of_drive_read_the_media_by_image { + get { + return ResourceManager.GetString("Firmware_revision_of_drive_read_the_media_by_image", resourceCulture); + } + } + + public static string Serial_number_of_drive_read_the_media_by_image { + get { + return ResourceManager.GetString("Serial_number_of_drive_read_the_media_by_image", resourceCulture); + } + } + + public static string Continue_conversion_even_if_data_lost { + get { + return ResourceManager.GetString("Continue_conversion_even_if_data_lost", resourceCulture); + } + } + + public static string Format_of_the_output_image_as_plugin_name_or_plugin_id { + get { + return ResourceManager.GetString("Format_of_the_output_image_as_plugin_name_or_plugin_id", resourceCulture); + } + } + + public static string Barcode_of_the_media_by_image { + get { + return ResourceManager.GetString("Barcode_of_the_media_by_image", resourceCulture); + } + } + + public static string Last_media_of_sequence_by_image { + get { + return ResourceManager.GetString("Last_media_of_sequence_by_image", resourceCulture); + } + } + + public static string Manufacturer_of_media_by_image { + get { + return ResourceManager.GetString("Manufacturer_of_media_by_image", resourceCulture); + } + } + + public static string Model_of_media_by_image { + get { + return ResourceManager.GetString("Model_of_media_by_image", resourceCulture); + } + } + + public static string Part_number_of_media_by_image { + get { + return ResourceManager.GetString("Part_number_of_media_by_image", resourceCulture); + } + } + + public static string Number_in_sequence_for_media_by_image { + get { + return ResourceManager.GetString("Number_in_sequence_for_media_by_image", resourceCulture); + } + } + + public static string Serial_number_of_media_by_image { + get { + return ResourceManager.GetString("Serial_number_of_media_by_image", resourceCulture); + } + } + + public static string Title_of_media_represented_by_image { + get { + return ResourceManager.GetString("Title_of_media_represented_by_image", resourceCulture); + } + } + + public static string Comma_separated_name_value_pairs_of_image_options { + get { + return ResourceManager.GetString("Comma_separated_name_value_pairs_of_image_options", resourceCulture); + } + } + + public static string Take_dump_hardware_from_existing_resume { + get { + return ResourceManager.GetString("Take_dump_hardware_from_existing_resume", resourceCulture); + } + } + + public static string Force_geometry_help { + get { + return ResourceManager.GetString("Force_geometry_help", resourceCulture); + } + } + + public static string Fix_subchannel_position_help { + get { + return ResourceManager.GetString("Fix_subchannel_position_help", resourceCulture); + } + } + + public static string Fix_subchannel_help { + get { + return ResourceManager.GetString("Fix_subchannel_help", resourceCulture); + } + } + + public static string Fix_subchannel_crc_help { + get { + return ResourceManager.GetString("Fix_subchannel_crc_help", resourceCulture); + } + } + + public static string Generates_subchannels_help { + get { + return ResourceManager.GetString("Generates_subchannels_help", resourceCulture); + } + } + + public static string Input_image_path { + get { + return ResourceManager.GetString("Input_image_path", resourceCulture); + } + } + + public static string Output_image_path { + get { + return ResourceManager.GetString("Output_image_path", resourceCulture); + } + } + + public static string Need_to_specify_more_than_zero_sectors_to_copy_at_once { + get { + return ResourceManager.GetString("Need_to_specify_more_than_zero_sectors_to_copy_at_once", resourceCulture); + } + } + + public static string Invalid_geometry_specified { + get { + return ResourceManager.GetString("Invalid_geometry_specified", resourceCulture); + } + } + + public static string Invalid_number_of_cylinders_specified { + get { + return ResourceManager.GetString("Invalid_number_of_cylinders_specified", resourceCulture); + } + } + + public static string Invalid_number_of_heads_specified { + get { + return ResourceManager.GetString("Invalid_number_of_heads_specified", resourceCulture); + } + } + + public static string Invalid_sectors_per_track_specified { + get { + return ResourceManager.GetString("Invalid_sectors_per_track_specified", resourceCulture); + } + } + + public static string Incorrect_metadata_sidecar_file { + get { + return ResourceManager.GetString("Incorrect_metadata_sidecar_file", resourceCulture); + } + } + + public static string Could_not_find_metadata_sidecar { + get { + return ResourceManager.GetString("Could_not_find_metadata_sidecar", resourceCulture); + } + } + + public static string Incorrect_resume_file { + get { + return ResourceManager.GetString("Incorrect_resume_file", resourceCulture); + } + } + + public static string Could_not_find_resume_file { + get { + return ResourceManager.GetString("Could_not_find_resume_file", resourceCulture); + } + } + + public static string Output_file_already_exists { + get { + return ResourceManager.GetString("Output_file_already_exists", resourceCulture); + } + } + + public static string Input_image_format_not_identified { + get { + return ResourceManager.GetString("Input_image_format_not_identified", resourceCulture); + } + } + + public static string Command_not_yet_supported_for_this_image_type { + get { + return ResourceManager.GetString("Command_not_yet_supported_for_this_image_type", resourceCulture); + } + } + + public static string Input_image_format_identified_by_0_1 { + get { + return ResourceManager.GetString("Input_image_format_identified_by_0_1", resourceCulture); + } + } + + public static string Input_image_format_identified_by_0 { + get { + return ResourceManager.GetString("Input_image_format_identified_by_0", resourceCulture); + } + } + + public static string Image_identifies_media_type_as_0 { + get { + return ResourceManager.GetString("Image_identifies_media_type_as_0", resourceCulture); + } + } + + public static string No_plugin_supports_requested_extension { + get { + return ResourceManager.GetString("No_plugin_supports_requested_extension", resourceCulture); + } + } + + public static string More_than_one_plugin_supports_requested_extension { + get { + return ResourceManager.GetString("More_than_one_plugin_supports_requested_extension", resourceCulture); + } + } + + public static string Output_image_format_0_1 { + get { + return ResourceManager.GetString("Output_image_format_0_1", resourceCulture); + } + } + + public static string Output_image_format_0 { + get { + return ResourceManager.GetString("Output_image_format_0", resourceCulture); + } + } + + public static string Output_format_does_not_support_media_type { + get { + return ResourceManager.GetString("Output_format_does_not_support_media_type", resourceCulture); + } + } + + public static string Converting_image_will_lose_media_tag_0 { + get { + return ResourceManager.GetString("Converting_image_will_lose_media_tag_0", resourceCulture); + } + } + + public static string If_you_dont_care_use_force_option { + get { + return ResourceManager.GetString("If_you_dont_care_use_force_option", resourceCulture); + } + } + + public static string Converting_image_will_lose_sector_tag_0 { + get { + return ResourceManager.GetString("Converting_image_will_lose_sector_tag_0", resourceCulture); + } + } + + public static string If_you_dont_care_use_force_option_This_will_skip_all_sector_tags_converting_only_user_data { + get { + return ResourceManager.GetString("If_you_dont_care_use_force_option_This_will_skip_all_sector_tags_converting_only_" + + "user_data", resourceCulture); + } + } + + public static string Input_format_contains_a_tape_image_and_is_not_supported_by_output_format { + get { + return ResourceManager.GetString("Input_format_contains_a_tape_image_and_is_not_supported_by_output_format", resourceCulture); + } + } + + public static string Error_setting_output_image_in_tape_mode { + get { + return ResourceManager.GetString("Error_setting_output_image_in_tape_mode", resourceCulture); + } + } + + public static string Output_format_does_not_support_sessions { + get { + return ResourceManager.GetString("Output_format_does_not_support_sessions", resourceCulture); + } + } + + public static string Error_0_creating_output_image { + get { + return ResourceManager.GetString("Error_0_creating_output_image", resourceCulture); + } + } + + public static string Error_0_setting_metadata_not_continuing { + get { + return ResourceManager.GetString("Error_0_setting_metadata_not_continuing", resourceCulture); + } + } + + public static string Error_0_setting_metadata { + get { + return ResourceManager.GetString("Error_0_setting_metadata", resourceCulture); + } + } + + public static string Converting_media_tag_0 { + get { + return ResourceManager.GetString("Converting_media_tag_0", resourceCulture); + } + } + + public static string Error_0_reading_media_tag { + get { + return ResourceManager.GetString("Error_0_reading_media_tag", resourceCulture); + } + } + + public static string Error_0_writing_media_tag_not_continuing { + get { + return ResourceManager.GetString("Error_0_writing_media_tag_not_continuing", resourceCulture); + } + } + + public static string Error_0_reading_media_tag_not_continuing { + get { + return ResourceManager.GetString("Error_0_reading_media_tag_not_continuing", resourceCulture); + } + } + + public static string Error_0_writing_media_tag { + get { + return ResourceManager.GetString("Error_0_writing_media_tag", resourceCulture); + } + } + + public static string _0_sectors_to_convert { + get { + return ResourceManager.GetString("_0_sectors_to_convert", resourceCulture); + } + } + + public static string Error_0_sending_tracks_list_to_output_image { + get { + return ResourceManager.GetString("Error_0_sending_tracks_list_to_output_image", resourceCulture); + } + } + + public static string Converting_disc { + get { + return ResourceManager.GetString("Converting_disc", resourceCulture); + } + } + + public static string Converting_sectors_in_track_0_of_1 { + get { + return ResourceManager.GetString("Converting_sectors_in_track_0_of_1", resourceCulture); + } + } + + public static string Converting_track { + get { + return ResourceManager.GetString("Converting_track", resourceCulture); + } + } + + public static string Converting_sectors_0_to_1_in_track_2 { + get { + return ResourceManager.GetString("Converting_sectors_0_to_1_in_track_2", resourceCulture); + } + } + + public static string Error_0_reading_sector_1_continuing { + get { + return ResourceManager.GetString("Error_0_reading_sector_1_continuing", resourceCulture); + } + } + + public static string Error_0_reading_sector_1_not_continuing { + get { + return ResourceManager.GetString("Error_0_reading_sector_1_not_continuing", resourceCulture); + } + } + + public static string Input_image_is_not_returning_raw_sectors_use_force_if_you_want_to_continue { + get { + return ResourceManager.GetString("Input_image_is_not_returning_raw_sectors_use_force_if_you_want_to_continue", resourceCulture); + } + } + + public static string Error_0_writing_sector_1_continuing { + get { + return ResourceManager.GetString("Error_0_writing_sector_1_continuing", resourceCulture); + } + } + + public static string Error_0_writing_sector_1_not_continuing { + get { + return ResourceManager.GetString("Error_0_writing_sector_1_not_continuing", resourceCulture); + } + } + + public static string Converting_tags_in_track_0_of_1 { + get { + return ResourceManager.GetString("Converting_tags_in_track_0_of_1", resourceCulture); + } + } + + public static string Error_0_writing_tag_continuing { + get { + return ResourceManager.GetString("Error_0_writing_tag_continuing", resourceCulture); + } + } + + public static string Error_0_writing_tag_not_continuing { + get { + return ResourceManager.GetString("Error_0_writing_tag_not_continuing", resourceCulture); + } + } + + public static string Converting_tag_3_for_sectors_0_to_1_in_track_2 { + get { + return ResourceManager.GetString("Converting_tag_3_for_sectors_0_to_1_in_track_2", resourceCulture); + } + } + + public static string Error_0_reading_tag_for_sector_1_continuing { + get { + return ResourceManager.GetString("Error_0_reading_tag_for_sector_1_continuing", resourceCulture); + } + } + + public static string Error_0_reading_tag_for_sector_1_not_continuing { + get { + return ResourceManager.GetString("Error_0_reading_tag_for_sector_1_not_continuing", resourceCulture); + } + } + + public static string Error_0_writing_tag_for_sector_1_continuing { + get { + return ResourceManager.GetString("Error_0_writing_tag_for_sector_1_continuing", resourceCulture); + } + } + + public static string Error_0_writing_tag_for_sector_1_not_continuing { + get { + return ResourceManager.GetString("Error_0_writing_tag_for_sector_1_not_continuing", resourceCulture); + } + } + + public static string Setting_geometry_to_0_cylinders_1_heads_and_2_sectors_per_track { + get { + return ResourceManager.GetString("Setting_geometry_to_0_cylinders_1_heads_and_2_sectors_per_track", resourceCulture); + } + } + + public static string Error_0_setting_geometry_image_may_be_incorrect_continuing { + get { + return ResourceManager.GetString("Error_0_setting_geometry_image_may_be_incorrect_continuing", resourceCulture); + } + } + + public static string Converting_media { + get { + return ResourceManager.GetString("Converting_media", resourceCulture); + } + } + + public static string Converting_sectors_0_to_1 { + get { + return ResourceManager.GetString("Converting_sectors_0_to_1", resourceCulture); + } + } + + public static string Converting_tags { + get { + return ResourceManager.GetString("Converting_tags", resourceCulture); + } + } + + public static string Converting_tag_2_for_sectors_0_to_1 { + get { + return ResourceManager.GetString("Converting_tag_2_for_sectors_0_to_1", resourceCulture); + } + } + + public static string Converting_files { + get { + return ResourceManager.GetString("Converting_files", resourceCulture); + } + } + + public static string Converting_file_0_of_partition_1 { + get { + return ResourceManager.GetString("Converting_file_0_of_partition_1", resourceCulture); + } + } + + public static string Converting_tape_partition_0 { + get { + return ResourceManager.GetString("Converting_tape_partition_0", resourceCulture); + } + } + + public static string Writing_dump_hardware_list { + get { + return ResourceManager.GetString("Writing_dump_hardware_list", resourceCulture); + } + } + + public static string Written_dump_hardware_list_to_output_image { + get { + return ResourceManager.GetString("Written_dump_hardware_list_to_output_image", resourceCulture); + } + } + + public static string Writing_metadata { + get { + return ResourceManager.GetString("Writing_metadata", resourceCulture); + } + } + + public static string Written_CICM_XML_metadata_to_output_image { + get { + return ResourceManager.GetString("Written_CICM_XML_metadata_to_output_image", resourceCulture); + } + } + + public static string Closing_output_image { + get { + return ResourceManager.GetString("Closing_output_image", resourceCulture); + } + } + + public static string Error_0_closing_output_image_Contents_are_not_correct { + get { + return ResourceManager.GetString("Error_0_closing_output_image_Contents_are_not_correct", resourceCulture); + } + } + + public static string Conversion_done { + get { + return ResourceManager.GetString("Conversion_done", resourceCulture); + } + } + + public static string Tape_block_size_argument_help { + get { + return ResourceManager.GetString("Tape_block_size_argument_help", resourceCulture); + } + } + + public static string Tape_argument_input_help { + get { + return ResourceManager.GetString("Tape_argument_input_help", resourceCulture); + } + } + + public static string You_cannot_use_tape_option_when_input_is_a_file { + get { + return ResourceManager.GetString("You_cannot_use_tape_option_when_input_is_a_file", resourceCulture); + } + } + + public static string Image_format_not_identified_not_proceeding_with_sidecar_creation { + get { + return ResourceManager.GetString("Image_format_not_identified_not_proceeding_with_sidecar_creation", resourceCulture); + } + } + + public static string The_specified_input_file_cannot_be_found { + get { + return ResourceManager.GetString("The_specified_input_file_cannot_be_found", resourceCulture); + } + } + + public static string Decode_disk_tags { + get { + return ResourceManager.GetString("Decode_disk_tags", resourceCulture); + } + } + + public static string Parameter_response_all_sectors { + get { + return ResourceManager.GetString("Parameter_response_all_sectors", resourceCulture); + } + } + + public static string How_many_sectors_to_decode_or_all { + get { + return ResourceManager.GetString("How_many_sectors_to_decode_or_all", resourceCulture); + } + } + + public static string Decode_sector_tags { + get { + return ResourceManager.GetString("Decode_sector_tags", resourceCulture); + } + } + + public static string Sector_to_start_decoding_from { + get { + return ResourceManager.GetString("Sector_to_start_decoding_from", resourceCulture); + } + } + + public static string Unable_to_recognize_image_format_not_decoding { + get { + return ResourceManager.GetString("Unable_to_recognize_image_format_not_decoding", resourceCulture); + } + } + + public static string There_are_no_disk_tags_in_chosen_disc_image { + get { + return ResourceManager.GetString("There_are_no_disk_tags_in_chosen_disc_image", resourceCulture); + } + } + + public static string Error_0_reading_SCSI_INQUIRY_response_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_SCSI_INQUIRY_response_from_disc_image", resourceCulture); + } + } + + public static string SCSI_INQUIRY_command_response { + get { + return ResourceManager.GetString("SCSI_INQUIRY_command_response", resourceCulture); + } + } + + public static string Error_0_reading_ATA_IDENTIFY_DEVICE_response_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_ATA_IDENTIFY_DEVICE_response_from_disc_image", resourceCulture); + } + } + + public static string ATA_IDENTIFY_DEVICE_command_response { + get { + return ResourceManager.GetString("ATA_IDENTIFY_DEVICE_command_response", resourceCulture); + } + } + + public static string Error_0_reading_ATA_IDENTIFY_PACKET_DEVICE_response_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_ATA_IDENTIFY_PACKET_DEVICE_response_from_disc_image", resourceCulture); + } + } + + public static string ATA_IDENTIFY_PACKET_DEVICE_command_response { + get { + return ResourceManager.GetString("ATA_IDENTIFY_PACKET_DEVICE_command_response", resourceCulture); + } + } + + public static string Error_0_reading_CD_ATIP_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_CD_ATIP_from_disc_image", resourceCulture); + } + } + + public static string CD_ATIP { + get { + return ResourceManager.GetString("CD_ATIP", resourceCulture); + } + } + + public static string Error_0_reading_CD_full_TOC_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_CD_full_TOC_from_disc_image", resourceCulture); + } + } + + public static string CD_full_TOC { + get { + return ResourceManager.GetString("CD_full_TOC", resourceCulture); + } + } + + public static string Error_0_reading_CD_PMA_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_CD_PMA_from_disc_image", resourceCulture); + } + } + + public static string Error_0_reading_CD_session_information_from_disc_image { + get { + return ResourceManager.GetString("Error_0_reading_CD_session_information_from_disc_image", resourceCulture); + } + } + + public static string CD_session_information { + get { + return ResourceManager.GetString("CD_session_information", resourceCulture); + } + } + + public static string Error_reading_CD_TEXT_from_disc_image { + get { + return ResourceManager.GetString("Error_reading_CD_TEXT_from_disc_image", resourceCulture); + } + } + + public static string CD_TEXT { + get { + return ResourceManager.GetString("CD_TEXT", resourceCulture); + } + } + + public static string Error_reading_CD_TOC_from_disc_image { + get { + return ResourceManager.GetString("Error_reading_CD_TOC_from_disc_image", resourceCulture); + } + } + + public static string CD_TOC { + get { + return ResourceManager.GetString("CD_TOC", resourceCulture); + } + } + + public static string Decoder_for_disk_tag_type_0_not_yet_implemented_sorry { + get { + return ResourceManager.GetString("Decoder_for_disk_tag_type_0_not_yet_implemented_sorry", resourceCulture); + } + } + + public static string Value_0_is_not_a_valid_number_for_length { + get { + return ResourceManager.GetString("Value_0_is_not_a_valid_number_for_length", resourceCulture); + } + } + + public static string Not_decoding_sectors_tags { + get { + return ResourceManager.GetString("Not_decoding_sectors_tags", resourceCulture); + } + } + + public static string There_are_no_sector_tags_in_chosen_disc_image { + get { + return ResourceManager.GetString("There_are_no_sector_tags_in_chosen_disc_image", resourceCulture); + } + } + + public static string Decoder_for_sector_tag_type_0_not_yet_implemented_sorry { + get { + return ResourceManager.GetString("Decoder_for_sector_tag_type_0_not_yet_implemented_sorry", resourceCulture); + } + } + + public static string Calculates_how_many_sectors_are_duplicated { + get { + return ResourceManager.GetString("Calculates_how_many_sectors_are_duplicated", resourceCulture); + } + } + + public static string Calculates_entropy_for_each_track_separately { + get { + return ResourceManager.GetString("Calculates_entropy_for_each_track_separately", resourceCulture); + } + } + + public static string Calculates_entropy_for_the_whole_disc { + get { + return ResourceManager.GetString("Calculates_entropy_for_the_whole_disc", resourceCulture); + } + } + + public static string Calculating_disc_entropy_of_multisession_images_is_not_yet_implemented { + get { + return ResourceManager.GetString("Calculating_disc_entropy_of_multisession_images_is_not_yet_implemented", resourceCulture); + } + } + + public static string Entropy_for_track_0_is_1 { + get { + return ResourceManager.GetString("Entropy_for_track_0_is_1", resourceCulture); + } + } + + public static string Track_0_has_1_unique_sectors_2 { + get { + return ResourceManager.GetString("Track_0_has_1_unique_sectors_2", resourceCulture); + } + } + + public static string Entropy_for_disk_is_0 { + get { + return ResourceManager.GetString("Entropy_for_disk_is_0", resourceCulture); + } + } + + public static string Disk_has_0_unique_sectors_1 { + get { + return ResourceManager.GetString("Disk_has_0_unique_sectors_1", resourceCulture); + } + } + + public static string Image_format_not_identified { + get { + return ResourceManager.GetString("Image_format_not_identified", resourceCulture); + } + } + + public static string Read_Write_media_images_options { + get { + return ResourceManager.GetString("Read_Write_media_images_options", resourceCulture); + } + } + + public static string Default { + get { + return ResourceManager.GetString("Default", resourceCulture); + } + } + + public static string How_many_sectors_to_print { + get { + return ResourceManager.GetString("How_many_sectors_to_print", resourceCulture); + } + } + + public static string Print_sectors_with_tags_included { + get { + return ResourceManager.GetString("Print_sectors_with_tags_included", resourceCulture); + } + } + + public static string Starting_sector { + get { + return ResourceManager.GetString("Starting_sector", resourceCulture); + } + } + + public static string How_many_bytes_to_print_per_line { + get { + return ResourceManager.GetString("How_many_bytes_to_print_per_line", resourceCulture); + } + } + + public static string Unable_to_recognize_image_format_not_printing { + get { + return ResourceManager.GetString("Unable_to_recognize_image_format_not_printing", resourceCulture); + } + } + + public static string Start_0_as_in_sector_start { + get { + return ResourceManager.GetString("Start_0_as_in_sector_start", resourceCulture); + } + } + + public static string Reading_data { + get { + return ResourceManager.GetString("Reading_data", resourceCulture); + } + } + + public static string Error_0_reading_data_from_1 { + get { + return ResourceManager.GetString("Error_0_reading_data_from_1", resourceCulture); + } + } + + public static string Cannot_open_image_file_aborting { + get { + return ResourceManager.GetString("Cannot_open_image_file_aborting", resourceCulture); + } + } + + public static string Sector_0_as_in_sector_number { + get { + return ResourceManager.GetString("Sector_0_as_in_sector_number", resourceCulture); + } + } + + public static string Requested_sectors_tags_unsupported_by_image_format_printing_user_data { + get { + return ResourceManager.GetString("Requested_sectors_tags_unsupported_by_image_format_printing_user_data", resourceCulture); + } + } + + public static string Reading_sector { + get { + return ResourceManager.GetString("Reading_sector", resourceCulture); + } + } + + public static string Error_0_reading_sector_1 { + get { + return ResourceManager.GetString("Error_0_reading_sector_1", resourceCulture); + } + } + + public static string Verify_disc_image_if_supported { + get { + return ResourceManager.GetString("Verify_disc_image_if_supported", resourceCulture); + } + } + + public static string Verify_all_sectors_if_supported { + get { + return ResourceManager.GetString("Verify_all_sectors_if_supported", resourceCulture); + } + } + + public static string Unable_to_recognize_image_format_not_verifying { + get { + return ResourceManager.GetString("Unable_to_recognize_image_format_not_verifying", resourceCulture); + } + } + + public static string The_specified_image_does_not_support_any_kind_of_verification { + get { + return ResourceManager.GetString("The_specified_image_does_not_support_any_kind_of_verification", resourceCulture); + } + } + + public static string Verifying_image_checksums { + get { + return ResourceManager.GetString("Verifying_image_checksums", resourceCulture); + } + } + + public static string Disc_image_checksums_are_correct { + get { + return ResourceManager.GetString("Disc_image_checksums_are_correct", resourceCulture); + } + } + + public static string Disc_image_checksums_are_incorrect { + get { + return ResourceManager.GetString("Disc_image_checksums_are_incorrect", resourceCulture); + } + } + + public static string Disc_image_does_not_contain_checksums { + get { + return ResourceManager.GetString("Disc_image_does_not_contain_checksums", resourceCulture); + } + } + + public static string Checking_disc_image_checksums_took_0_seconds { + get { + return ResourceManager.GetString("Checking_disc_image_checksums_took_0_seconds", resourceCulture); + } + } + + public static string Checking_tracks { + get { + return ResourceManager.GetString("Checking_tracks", resourceCulture); + } + } + + public static string Checking_track_0_of_1 { + get { + return ResourceManager.GetString("Checking_track_0_of_1", resourceCulture); + } + } + + public static string Checking_sector { + get { + return ResourceManager.GetString("Checking_sector", resourceCulture); + } + } + + public static string Checking_sector_0_of_1_on_track_2 { + get { + return ResourceManager.GetString("Checking_sector_0_of_1_on_track_2", resourceCulture); + } + } + + public static string Checking_sectors { + get { + return ResourceManager.GetString("Checking_sectors", resourceCulture); + } + } + + public static string Checking_sector_0_of_1 { + get { + return ResourceManager.GetString("Checking_sector_0_of_1", resourceCulture); + } + } + + public static string There_is_at_least_one_sector_that_does_not_contain_a_checksum { + get { + return ResourceManager.GetString("There_is_at_least_one_sector_that_does_not_contain_a_checksum", resourceCulture); + } + } + + public static string There_is_at_least_one_sector_with_incorrect_checksum_or_errors { + get { + return ResourceManager.GetString("There_is_at_least_one_sector_with_incorrect_checksum_or_errors", resourceCulture); + } + } + + public static string All_sector_checksums_are_correct { + get { + return ResourceManager.GetString("All_sector_checksums_are_correct", resourceCulture); + } + } + + public static string Checking_sector_checksums_took_0_seconds { + get { + return ResourceManager.GetString("Checking_sector_checksums_took_0_seconds", resourceCulture); + } + } + + public static string LBAs_with_error { + get { + return ResourceManager.GetString("LBAs_with_error", resourceCulture); + } + } + + public static string all_sectors { + get { + return ResourceManager.GetString("all_sectors", resourceCulture); + } + } + + public static string LBAs_without_checksum { + get { + return ResourceManager.GetString("LBAs_without_checksum", resourceCulture); + } + } + + public static string Total_sectors { + get { + return ResourceManager.GetString("Total_sectors", resourceCulture); + } + } + + public static string Total_errors { + get { + return ResourceManager.GetString("Total_errors", resourceCulture); + } + } + + public static string Total_unknowns { + get { + return ResourceManager.GetString("Total_unknowns", resourceCulture); + } + } + + public static string Total_errors_plus_unknowns { + get { + return ResourceManager.GetString("Total_errors_plus_unknowns", resourceCulture); + } + } + + public static string Try_to_read_first_track_pregap { + get { + return ResourceManager.GetString("Try_to_read_first_track_pregap", resourceCulture); + } + } + + public static string Fix_audio_tracks_offset { + get { + return ResourceManager.GetString("Fix_audio_tracks_offset", resourceCulture); + } + } + + public static string Continue_dump_whatever_happens { + get { + return ResourceManager.GetString("Continue_dump_whatever_happens", resourceCulture); + } + } + + public static string Enables_creating_CICM_XML_sidecar { + get { + return ResourceManager.GetString("Enables_creating_CICM_XML_sidecar", resourceCulture); + } + } + + public static string Enables_trimming_errored_from_skipped_sectors { + get { + return ResourceManager.GetString("Enables_trimming_errored_from_skipped_sectors", resourceCulture); + } + } + + public static string Try_to_recover_partial_or_incorrect_data { + get { + return ResourceManager.GetString("Try_to_recover_partial_or_incorrect_data", resourceCulture); + } + } + + public static string Create_or_use_resume_mapfile { + get { + return ResourceManager.GetString("Create_or_use_resume_mapfile", resourceCulture); + } + } + + public static string How_many_retry_passes_to_do { + get { + return ResourceManager.GetString("How_many_retry_passes_to_do", resourceCulture); + } + } + + public static string When_an_unreadable_sector_is_found_skip_this_many_sectors { + get { + return ResourceManager.GetString("When_an_unreadable_sector_is_found_skip_this_many_sectors", resourceCulture); + } + } + + public static string Stop_media_dump_on_first_error { + get { + return ResourceManager.GetString("Stop_media_dump_on_first_error", resourceCulture); + } + } + + public static string Subchannel_name_any { + get { + return ResourceManager.GetString("Subchannel_name_any", resourceCulture); + } + } + + public static string Subchannel_to_dump_help { + get { + return ResourceManager.GetString("Subchannel_to_dump_help", resourceCulture); + } + } + + public static string Speed_to_dump { + get { + return ResourceManager.GetString("Speed_to_dump", resourceCulture); + } + } + + public static string Output_image_path_Dump_help { + get { + return ResourceManager.GetString("Output_image_path_Dump_help", resourceCulture); + } + } + + public static string Do_not_store_paths_and_serial_numbers_in_log_or_metadata { + get { + return ResourceManager.GetString("Do_not_store_paths_and_serial_numbers_in_log_or_metadata", resourceCulture); + } + } + + public static string Retry_subchannel_help { + get { + return ResourceManager.GetString("Retry_subchannel_help", resourceCulture); + } + } + + public static string Generate_subchannels_dump_help { + get { + return ResourceManager.GetString("Generate_subchannels_dump_help", resourceCulture); + } + } + + public static string Skip_CDi_Ready_hole_help { + get { + return ResourceManager.GetString("Skip_CDi_Ready_hole_help", resourceCulture); + } + } + + public static string Eject_media_after_dump_finishes { + get { + return ResourceManager.GetString("Eject_media_after_dump_finishes", resourceCulture); + } + } + + public static string Maximum_number_of_blocks_to_read_at_once { + get { + return ResourceManager.GetString("Maximum_number_of_blocks_to_read_at_once", resourceCulture); + } + } + + public static string OS_buffered_reads_help { + get { + return ResourceManager.GetString("OS_buffered_reads_help", resourceCulture); + } + } + + public static string Store_encrypted_data_as_is { + get { + return ResourceManager.GetString("Store_encrypted_data_as_is", resourceCulture); + } + } + + public static string Try_to_read_the_title_keys_from_CSS_DVDs { + get { + return ResourceManager.GetString("Try_to_read_the_title_keys_from_CSS_DVDs", resourceCulture); + } + } + + public static string How_many_CDRW_run_out_sectors_to_ignore_and_regenerate { + get { + return ResourceManager.GetString("How_many_CDRW_run_out_sectors_to_ignore_and_regenerate", resourceCulture); + } + } + + public static string Subchannel_name_rw { + get { + return ResourceManager.GetString("Subchannel_name_rw", resourceCulture); + } + } + + public static string Subchannel_name_rw_or_pq { + get { + return ResourceManager.GetString("Subchannel_name_rw_or_pq", resourceCulture); + } + } + + public static string Subchannel_name_pq { + get { + return ResourceManager.GetString("Subchannel_name_pq", resourceCulture); + } + } + + public static string Subchannel_name_none { + get { + return ResourceManager.GetString("Subchannel_name_none", resourceCulture); + } + } + + public static string Incorrect_subchannel_type_0_requested { + get { + return ResourceManager.GetString("Incorrect_subchannel_type_0_requested", resourceCulture); + } + } + + public static string Invalid_characters_found_in_list_of_files { + get { + return ResourceManager.GetString("Invalid_characters_found_in_list_of_files", resourceCulture); + } + } + + public static string Please_insert_media_with_title_0_and_press_any_key_to_continue_ { + get { + return ResourceManager.GetString("Please_insert_media_with_title_0_and_press_any_key_to_continue_", resourceCulture); + } + } + + public static string Opening_device { + get { + return ResourceManager.GetString("Opening_device", resourceCulture); + } + } + + public static string Incorrect_resume_file_not_continuing { + get { + return ResourceManager.GetString("Incorrect_resume_file_not_continuing", resourceCulture); + } + } + + public static string Media_already_dumped_correctly_not_continuing { + get { + return ResourceManager.GetString("Media_already_dumped_correctly_not_continuing", resourceCulture); + } + } + + public static string Ejecting_media { + get { + return ResourceManager.GetString("Ejecting_media", resourceCulture); + } + } + + public static string Please_use_device_info_command_for_ATA_devices { + get { + return ResourceManager.GetString("Please_use_device_info_command_for_ATA_devices", resourceCulture); + } + } + + public static string Please_use_device_info_command_for_MMC_SD_devices { + get { + return ResourceManager.GetString("Please_use_device_info_command_for_MMC_SD_devices", resourceCulture); + } + } + + public static string Retrieving_SCSI_information { + get { + return ResourceManager.GetString("Retrieving_SCSI_information", resourceCulture); + } + } + + public static string Densities_supported_by_currently_inserted_media { + get { + return ResourceManager.GetString("Densities_supported_by_currently_inserted_media", resourceCulture); + } + } + + public static string Medium_types_currently_inserted_in_device { + get { + return ResourceManager.GetString("Medium_types_currently_inserted_in_device", resourceCulture); + } + } + + public static string The_drive_has_returned_incorrect_Q_positioning_calculating_pregaps { + get { + return ResourceManager.GetString("The_drive_has_returned_incorrect_Q_positioning_calculating_pregaps", resourceCulture); + } + } + + public static string Hidden_track_starts_at_LBA_0_ends_at_LBA_1 { + get { + return ResourceManager.GetString("Hidden_track_starts_at_LBA_0_ends_at_LBA_1", resourceCulture); + } + } + + public static string Track_0_starts_at_LBA_1_ends_at_LBA_2_has_a_pregap_of_3_sectors_and_is_of_type_4 { + get { + return ResourceManager.GetString("Track_0_starts_at_LBA_1_ends_at_LBA_2_has_a_pregap_of_3_sectors_and_is_of_type_4", resourceCulture); + } + } + + public static string Write_a_log_of_the_scan_in_the_format_used_by_MHDD { + get { + return ResourceManager.GetString("Write_a_log_of_the_scan_in_the_format_used_by_MHDD", resourceCulture); + } + } + + public static string Write_a_log_of_the_scan_in_the_format_used_by_ImgBurn { + get { + return ResourceManager.GetString("Write_a_log_of_the_scan_in_the_format_used_by_ImgBurn", resourceCulture); + } + } + + public static string GDPR_Compliance { + get { + return ResourceManager.GetString("GDPR_Compliance", resourceCulture); + } + } + + public static string GDPR_Open_Source_Disclaimer { + get { + return ResourceManager.GetString("GDPR_Open_Source_Disclaimer", resourceCulture); + } + } + + public static string GDPR_Information_sharing { + get { + return ResourceManager.GetString("GDPR_Information_sharing", resourceCulture); + } + } + + public static string Configure_enable_decryption_disclaimer { + get { + return ResourceManager.GetString("Configure_enable_decryption_disclaimer", resourceCulture); + } + } + + public static string Do_you_want_to_enable_decryption_of_copy_protected_media_Q { + get { + return ResourceManager.GetString("Do_you_want_to_enable_decryption_of_copy_protected_media_Q", resourceCulture); + } + } + + public static string Configure_Device_Report_information_disclaimer { + get { + return ResourceManager.GetString("Configure_Device_Report_information_disclaimer", resourceCulture); + } + } + + public static string Configure_Do_you_want_to_save_device_reports_in_shared_folder_of_your_computer_Q { + get { + return ResourceManager.GetString("Configure_Do_you_want_to_save_device_reports_in_shared_folder_of_your_computer_Q", resourceCulture); + } + } + + public static string Configure_share_report_disclaimer { + get { + return ResourceManager.GetString("Configure_share_report_disclaimer", resourceCulture); + } + } + + public static string Do_you_want_to_share_your_device_reports_with_us_Q { + get { + return ResourceManager.GetString("Do_you_want_to_share_your_device_reports_with_us_Q", resourceCulture); + } + } + + public static string Statistics_disclaimer { + get { + return ResourceManager.GetString("Statistics_disclaimer", resourceCulture); + } + } + + public static string Do_you_want_to_save_stats_about_your_Aaru_usage_Q { + get { + return ResourceManager.GetString("Do_you_want_to_save_stats_about_your_Aaru_usage_Q", resourceCulture); + } + } + + public static string Do_you_want_to_share_your_stats__anonymously_Q { + get { + return ResourceManager.GetString("Do_you_want_to_share_your_stats__anonymously_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_command_usage_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_command_usage_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_found_devices_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_found_devices_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_found_filesystems_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_found_filesystems_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_found_file_filters_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_found_file_filters_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_found_media_image_formats_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_found_media_image_formats_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_scanned_media_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_scanned_media_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_found_partitioning_schemes_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_found_partitioning_schemes_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_media_types_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_media_types_Q", resourceCulture); + } + } + + public static string Do_you_want_to_gather_statistics_about_media_image_verifications_Q { + get { + return ResourceManager.GetString("Do_you_want_to_gather_statistics_about_media_image_verifications_Q", resourceCulture); + } + } + + public static string Supported_filters_0 { + get { + return ResourceManager.GetString("Supported_filters_0", resourceCulture); + } + } + + public static string Read_only_media_image_formats_0 { + get { + return ResourceManager.GetString("Read_only_media_image_formats_0", resourceCulture); + } + } + + public static string Read_write_media_image_formats_0 { + get { + return ResourceManager.GetString("Read_write_media_image_formats_0", resourceCulture); + } + } + + public static string Supported_filesystems_for_identification_and_information_only_0 { + get { + return ResourceManager.GetString("Supported_filesystems_for_identification_and_information_only_0", resourceCulture); + } + } + + public static string Supported_filesystems_that_can_read_their_contents_0 { + get { + return ResourceManager.GetString("Supported_filesystems_that_can_read_their_contents_0", resourceCulture); + } + } + + public static string Supported_partitioning_schemes_0 { + get { + return ResourceManager.GetString("Supported_partitioning_schemes_0", resourceCulture); + } + } + + public static string Supported_archive_formats_0 { + get { + return ResourceManager.GetString("Supported_archive_formats_0", resourceCulture); + } + } + + public static string Namespaces_for_0 { + get { + return ResourceManager.GetString("Namespaces_for_0", resourceCulture); + } + } + + public static string Title_Namespace { + get { + return ResourceManager.GetString("Title_Namespace", resourceCulture); + } + } + } +} diff --git a/Aaru.Localization/UI.resx b/Aaru.Localization/UI.resx new file mode 100644 index 000000000..95d49be31 --- /dev/null +++ b/Aaru.Localization/UI.resx @@ -0,0 +1,1728 @@ + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + New database version, updating... + + + Exception trying to remove old database version, cannot continue... + + + Please manually remove file at {0} + + + Shows verbose output. + + + Shows debug output from plugins. + + + Pauses before exiting. + + + Press any key to exit. + + + Commands to manage archive files + + + Identifies an archive file and shows information about it. + + + Commands to manage the device and statistics database + + + Commands that talk to devices + + + Commands to manage filesystems + + + Commands to manage images + + + Commands to manage media inserted in devices + + + Shows statistics. + + + Updates the database. + + + Tests the device capabilities and creates an JSON report of them. + + + Gets information about a device. + + + Lists all connected devices. + + + Extracts all files in disc image. + + + Opens a disc image and prints info on the found partitions and/or filesystems. + + + Lists files in disc image. + + + Lists all options supported by read-only filesystems. + + + Checksums an image. + + + Compares two disc images. + + + Converts one image to another format. + + + Creates CICM Metadata XML sidecar. + + + Decodes and pretty prints disk and/or sector tags. + + + Calculates entropy and/or duplicated sectors of an image. + + + Identifies a media image and shows information about the media it represents and metadata. + + + Lists all options supported by writable media images. + + + Prints a sector, in hexadecimal values, to the console. + + + Verifies a disc image integrity, and if supported, sector integrity. + + + Dumps the media inserted on a device to a media image. + + + Gets information about the media inserted on a device. + + + Scans the media inserted on a device. + + + Configures user settings and statistics. + + + Lists all supported disc images, partition schemes and file systems. + + + Lists all supported text encodings and code pages. + + + Lists all namespaces supported by read-only filesystems. + + + Tests connection to a Aaru Remote Server. + + + There are no statistics. + + + Commands statistics + + + Command + + + Times used + + + Filter + + + Filters statistics + + + Media image format statistics + + + Format + + + Partitioning scheme statistics + + + Scheme + + + Filesystem statistics + + + Filesystem + + + Device statistics + + + Manufacturer + + + Model + + + Revision + + + Bus + + + Media found in real device statistics + + + Type + + + Media found in images statistics + + + Clear existing main database. + + + Clear existing main and local database. + + + Could not remove local database. + + + Could not remove main database. + + + Device path + + + Does a device report using a trap disc. + + + Could not open device, error {0}. + + + Because of the commands sent to a device, device report must be run with administrative privileges. + + + Not continuing. + + + This device type does not support doing reports with trap discs. + + + Is the device natively USB (in case of doubt, press Y)? + + + Is the media removable from the reading/writing elements? + + + Is the device natively FireWire (in case of doubt, press Y)? + + + Please remove any media from the device and press any key when it is out. + + + Do you have media that you can insert in the drive? + + + Please insert it in the drive and press any key when it is ready. + + + Please write a description of the media type and press enter: + + + Please write the media model and press enter: + + + Unsupported device type, report cannot be created + + + Is the media removable from the reading/writing elements (flash memories ARE NOT removable)? + + + Asking drive to unload tape (can take a few minutes)... + + + Are you sure you want to do a report using a trap disc and the swapping method? +This method can damage the drive, or the disc, and requires some ability. +In you are unsure, please press N to not continue. + + + Do you have an audio trap disc (if unsure press N)? + + + Please burn an audio trap disc before continuing... + + + Do you have a GD-ROM disc (if unsure press N)? + + + Do you have want to try Plextor vendor commands? + + + Do you have want to try NEC vendor commands? + + + Do you have want to try Pioneer vendor commands? + + + Do you have want to try HL-DT-ST (aka LG) vendor commands? + + + Do you have want to try MediaTek vendor command F1h subcommand 06h? + + + THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') + + + Do you have a {0} disc that you can insert in the drive? + + + Prefix for saving binary information from device. + + + USB device + + + FireWire device + + + PCMCIA device + + + SCSI device + + + SCSI MMC GET CONFIGURATION Features: + + + Drive has kreon firmware: + + + Descriptor size + + + Vendor ID + + + Product ID + + + Product + + + Serial number + + + Model ID + + + Vendor + + + GUID + + + PCMCIA CIS is {0} bytes + + + Found undecoded tuple ID {0} + + + Found unknown tuple ID 0x{0:X2} + + + Could not get tuples + + + aaruremote host + + + No known devices attached. + + + Path + + + Serial + From "Serial number" + + + Supported? + + + Name of character encoding to use. + + + Comma separated name=value pairs of options to pass to filesystem plugin. + + + Extract extended attributes if present. + + + Namespace to use for filenames. + + + Disc image path + + + Directory where extracted files will be created. Will abort if it exists + + + Identifying file filter... + + + Parsed options: + + + Cannot open specified file. + + + Using encoding for {0}. + + + Specified encoding is not supported. + + + Identifying image format... + + + Image format not identified, not proceeding with file extraction. + + + Command not supported for this image type. + + + Image format identified by {0} ({1}). + + + Image format identified by {0}. + + + Output directory missing. + + + Destination exists, aborting. + + + Opening image file... + + + Unable to open image format + + + Error: {0} + + + Correctly opened image file. + + + Image without headers is {0} bytes. + + + Image has {0} sectors. + + + Image identifies disk type as {0}. + + + Enumerating partitions... + + + No partitions found + + + {0} partitions found. + + + Partition {0}: + + + Identifying filesystems on partition... + + + Filesystem not identified + + + Identified by {0} plugins + + + As identified by {0}. + + + Mounting filesystem... + + + Unable to mount volume, error {0} + + + Identified by {0}. + + + Error reading file: {0} + + + Error {0} reading root directory. + + + Retrieving file information... + + + Created subdirectory at {0} + + + Listing extended attributes... + + + Reading extended attribute... + + + Writing extended attribute... + + + Written {0} bytes of xattr {1} from file {2} to {3} + + + Cannot write xattr {0} for {1}, output exists + + + Reading file {0}... + + + Error {0} reading file {1} + + + Written {0} bytes of file {1} to {2} + + + Cannot write file {0}, output exists + + + Searches and prints information about filesystems. + + + Searches and interprets partitions. + + + Media image path + + + Image format not identified, not proceeding with analysis. + + + No partitions founds, not searching for filesystems + + + Name + + + Type + + + Start + + + Length + + + sector {0}, byte {1} + + + {0} sectors, {1} bytes + + + Description + + + Identifying filesystems... + + + Use long format. + + + Image format not identified, not proceeding with listing. + + + Root directory + + + Directory: {0} + + + Reading directory... + + + Error {0} reading directory {1} + + + <DIR> + Directory abbreviation as shown in CLI filesystem listing, like old DOS showed + + + Read-only filesystems options: + + + Options for {0}: + 0 is plugin name + + + boolean + + + signed number + + + number + + + float number + + + uuid + + + string + + + Calculates Adler-32. + + + Calculates CRC16. + + + Calculates CRC32. + + + Calculates CRC64 (ECMA). + + + Calculates Fletcher-16. + + + Calculates Fletcher-32. + + + Calculates MD5. + + + Checksums each track separately. + + + Calculates SHA1. + + + Calculates SHA256. + + + Calculates SHA384. + + + Calculates SHA512. + + + Calculates SpamSum fuzzy hash. + + + Checksums the whole disc. + + + Unable to recognize image format, not checksumming + + + Hashing tracks... + + + Hashing track {0} of {1} + + + Hashing sector + + + Track {0} starts at sector {1} and ends at sector {2} + + + Hashing sectors {0} to {2} of track {1} + + + Error {0} while reading {1} sectors from sector {2}, not continuing... + + + Track {0}'s {1}: + {0} is track number, {1} is checksum name + + + Disc's {0} + {0} is checksum name + + + Could not get tracks because {0} + {0} is exception message + + + Hashing files... + + + Hashing file {0} of {1} + + + Hashing file-less block {0} + + + Error {0} while reading block {1}, not continuing... + + + File {0} starts at block {1} and ends at block {2} + + + Hashing blocks {0} to {2} of file {1} + + + File {0}'s {1} + {0} is file's number, {1} is checksum name + + + Tape's {0}: + {0} is checksum name + + + Hashing image... + + + Error {0} while reading {1} bytes from {2}, not continuing... + + + Hashing bytes {0} to {1} + + + Media's {0}: + {0} is checksum name + + + Hashing sectors... + + + Hashing sectors {0} to {1} + + + Disk's {0}: + {0} is checksum name + + + First media image path + + + Second media image path + + + Identifying file 1 filter... + + + Identifying file 2 filter... + + + Cannot open input file 1 + + + Cannot open input file 2 + + + Identifying image 1 format... + + + Identifying image 2 format... + + + Input file 1 format not identified, not proceeding with comparison. + + + Input file 1 format identified by {0} ({1}). + + + Input file 1 format identified by {0}. + + + Input file 2 format not identified, not proceeding with comparison. + + + Input file 2 format identified by {0} ({1}). + + + Input file 2 format identified by {0}. + + + Opening image 1 file... + + + Unable to open image 1 format + + + Opening image 2 file... + + + Unable to open image 2 format + + + Media image 1 + + + Media image 2 + + + File + + + Media image format + + + Has partitions? + + + Has sessions? + + + Image size + + + Sectors + + + Sector size + + + Creation time + + + Last modification time + + + Media type + + + Image version + + + Image application + + + Image application version + + + Image creator + + + Image name + + + Image comments + + + Media manufacturer + + + Media model + + + Media serial number + + + Media barcode + + + Media part no. + + + Media sequence + + + Last media on sequence + + + Drive manufacturer + + + Drive firmware revision + + + Drive model + + + Drive serial number + + + Has {0}? + + + Comparing media image characteristics + + + Image partitioned status differ + + + Image session status differ + + + Image sectors differ + + + Image sector size differ + + + Media type differs + + + Image 2 has more sectors + + + Image 1 has more sectors + + + Comparing sectors... + + + Comparing sector {0} of {1}... + + + Error {0} reading sector {1} from image 1. + + + Error {0} reading sector {1} from image 2. + + + Comparing images... + + + Images differ + + + Images do not differ + + + Take metadata from existing CICM XML sidecar. + + + Image comments. + + + How many sectors to convert at once. + + + Who (person) created the image?. + + + Manufacturer of the drive used to read the media represented by the image. + + + Model of the drive used to read the media represented by the image. + + + Firmware revision of the drive used to read the media represented by the image. + + + Serial number of the drive used to read the media represented by the image. + + + Continue conversion even if sector or media tags will be lost in the process. + + + Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension. + + + Barcode of the media represented by the image. + + + Last media of the sequence the media represented by the image corresponds to. + + + Manufacturer of the media represented by the image. + + + Model of the media represented by the image. + + + Part number of the media represented by the image. + + + Number in sequence for the media represented by the image. + + + Serial number of the media represented by the image. + + + Title of the media represented by the image. + + + Comma separated name=value pairs of options to pass to output image plugin. + + + Take list of dump hardware from existing resume file. + + + Force geometry, only supported in not tape block media. Specify as C/H/S. + + + Store subchannel according to the sector they describe. + + + Try to fix subchannel. Implies fixing subchannel position. + + + If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel. + + + Generates missing subchannels. + + + Input image path + + + Output image path + + + Need to specify more than 0 sectors to copy at once + + + Invalid geometry specified + + + Invalid number of cylinders specified + + + Invalid number of heads specified + + + Invalid sectors per track specified + + + Incorrect metadata sidecar file, not continuing... + + + Could not find metadata sidecar, not continuing... + + + Incorrect resume file, not continuing... + + + Could not find resume file, not continuing... + + + Output file already exists, not continuing. + + + Input image format not identified, not proceeding with conversion. + + + Command not yet supported for this image type. + + + Input image format identified by {0} ({1}). + + + Input image format identified by {0}. + + + Image identifies media type as {0}. + + + No plugin supports requested extension. + + + More than one plugin supports requested extension. + + + Output image format: {0} ({1}). + + + Output image format: {0}. + + + Output format does not support media type, cannot continue... + + + Converting image will lose media tag {0}, not continuing... + + + If you don't care, use force option. + + + Converting image will lose sector tag {0}, not continuing... + + + If you don't care, use force option. This will skip all sector tags converting only user data. + + + Input format contains a tape image and is not supported by output format, not continuing... + + + Error setting output image in tape mode, not continuing... + + + Output format does not support sessions, this will end in a loss of data, not continuing... + + + Error {0} creating output image. + + + Error {0} setting metadata, not continuing... + + + Error {0} setting metadata, continuing... + + + Converting media tag {0} + + + Error {0} reading media tag, continuing... + + + Error {0} writing media tag, not continuing... + + + Error {0} reading media tag, not continuing... + + + Error {0} writing media tag, continuing... + + + {0} sectors to convert + + + Error {0} sending tracks list to output image. + + + Converting disc... + + + Converting sectors in track {0} of {1} + + + Converting track + + + Converting sectors {0} to {1} in track {2} + + + Error {0} reading sector {1}, continuing... + + + Error {0} reading sector {1}, not continuing... + + + Input image is not returning raw sectors, use force if you want to continue... + + + Error {0} writing sector {1}, continuing... + + + Error {0} writing sector {1}, not continuing... + + + Converting tags in track {0} of {1} + + + Error {0} writing tag, continuing... + + + Error {0} writing tag, not continuing... + + + Converting tag {3} for sectors {0} to {1} in track {2} + + + Error {0} reading tag for sector {1}, continuing... + + + Error {0} reading tag for sector {1}, not continuing... + + + Error {0} writing tag for sector {1}, continuing... + + + Error {0} writing tag for sector {1}, not continuing... + + + Setting geometry to {0} cylinders, {1} heads and {2} sectors per track + + + Error {0} setting geometry, image may be incorrect, continuing... + + + Converting media + + + Converting sectors {0} to {1} + + + Converting tags + + + Converting tag {2} for sectors {0} to {1} + + + Converting files + + + Converting file {0} of partition {1}... + + + Converting tape partition {0}... + + + Writing dump hardware list... + + + Written dump hardware list to output image. + + + Writing metadata... + + + Written CICM XML metadata to output image. + + + Closing output image... + + + Error {0} closing output image... Contents are not correct. + + + Conversion done. + + + Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored. + + + When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device). + + + You cannot use --tape option when input is a file. + + + Image format not identified, not proceeding with sidecar creation. + + + The specified input file cannot be found. + + + Decode disk tags. + + + all + As in "all sectors" + + + How many sectors to decode, or "all". + + + Decode sector tags. + + + Sector to start decoding from. + + + Unable to recognize image format, not decoding + + + There are no disk tags in chosen disc image. + + + Error {0} reading SCSI INQUIRY response from disc image + + + SCSI INQUIRY command response: + + + Error {0} reading ATA IDENTIFY DEVICE response from disc image + + + ATA IDENTIFY DEVICE command response: + + + Error {0} reading ATA IDENTIFY PACKET DEVICE response from disc image + + + ATA IDENTIFY PACKET DEVICE command response: + + + Error {0} reading CD ATIP from disc image + + + CD ATIP: + + + Error {0} reading CD full TOC from disc image + + + CD full TOC: + + + Error {0} reading CD PMA from disc image + + + Error {0} reading CD session information from disc image + + + CD session information: + + + Error reading CD-TEXT from disc image + + + CD-TEXT: + + + Error reading CD TOC from disc image + + + CD TOC: + + + Decoder for disk tag type "{0}" not yet implemented, sorry. + + + Value "{0}" is not a valid number for length. + + + Not decoding sectors tags + + + There are no sector tags in chosen disc image. + + + Decoder for sector tag type "{0}" not yet implemented, sorry. + + + Calculates how many sectors are duplicated (have same exact data in user area). + + + Calculates entropy for each track separately. + + + Calculates entropy for the whole disc. + + + Calculating disc entropy of multisession images is not yet implemented. + + + Entropy for track {0} is {1:F4}. + + + Track {0} has {1} unique sectors ({2:P3}) + {0} is the track number, {1} how many sectors are unique, {2:P3} the percentage of total sectors that are unique (percent symbol included) + + + Entropy for disk is {0:F4}. + + + Disk has {0} unique sectors ({1:P3}) + {0} is how many sectors are unique, {1:P3} the percentage of total sectors that are unique (percent symbol included) + + + Image format not identified. + + + Read/Write media images options: + + + Default + + + How many sectors to print. + + + Print sectors with tags included. + + + Starting sector. + + + How many bytes to print per line. + + + Unable to recognize image format, not printing + + + Start {0} + + + Reading data... + + + Error {0} reading data from {1}. + {0} is error name and {1} is starting sector number + + + Cannot open image file, aborting... + + + Sector {0} + + + Requested sectors with tags, unsupported by underlying image format, printing only user data. + + + Reading sector... + + + Error {0} reading sector {1}. + {0} is error name and {1} is sector number + + + Verify disc image if supported. + + + Verify all sectors if supported. + + + Unable to recognize image format, not verifying + + + The specified image does not support any kind of verification + + + Verifying image checksums... + + + Disc image checksums are correct + + + Disc image checksums are incorrect + + + Disc image does not contain checksums + + + Checking disc image checksums took {0} seconds + + + Checking tracks... + + + Checking track {0} of {1} + + + Checking sector + + + Checking sector {0} of {1}, on track {2} + + + Checking sectors... + + + Checking sector {0} of {1} + + + There is at least one sector that does not contain a checksum + + + There is at least one sector with incorrect checksum or errors + + + All sector checksums are correct + + + Checking sector checksums took {0} seconds + + + LBAs with error: + + + all sectors. + + + LBAs without checksum: + + + Total sectors........... + + + Total errors............ + + + Total unknowns.......... + + + Total errors+unknowns... + + + Try to read first track pregap. Only applicable to CD/DDCD/GD. + + + Fix audio tracks offset. Only applicable to CD/GD. + + + Continue dump whatever happens. + + + Enables creating CICM XML sidecar. + + + Enables trimming errored from skipped sectors. + + + Try to recover partial or incorrect data. + + + Create/use resume mapfile. + + + How many retry passes to do. + + + When an unreadable sector is found skip this many sectors. + + + Stop media dump on first error. + + + any + + + Subchannel to dump. Only applicable to CD/GD. Values: any, rw, rw-or-pq, pq, none. + + + Speed to dump. Only applicable to optical drives, 0 for maximum. + + + Output image path. If filename starts with # and exists, it will be read as a list of output images, its extension will be used to detect the image output format, each media will be ejected and confirmation for the next one will be asked. + + + Do not store paths and serial numbers in log or metadata. + + + Retry subchannel. Implies fixing subchannel position. + + + Generates missing subchannels (they don't count as dumped in resume file). + + + Skip the hole between data and audio in a CD-i Ready disc. + + + Eject media after dump finishes. + + + Maximum number of blocks to read at once. + + + For MMC/SD, use OS buffered reads if CMD23 is not supported. + + + Store encrypted data as is. + + + Try to read the title keys from CSS encrypted DVDs (very slow). + + + How many CD-R(W) run-out sectors to ignore and regenerate (0 for none). + + + rw + + + rw-or-pq + + + pq + + + none + + + Incorrect subchannel type "{0}" requested. + + + Invalid characters found in list of files, exiting... + + + Please insert media with title {0} and press any key to continue... + + + Opening device... + + + Incorrect resume file, not continuing... + + + Media already dumped correctly, not continuing... + + + Ejecting media... + + + Please use device-info command for ATA devices. + + + Please use device-info command for MMC/SD devices. + + + Retrieving SCSI information... + + + Densities supported by currently inserted media + + + Medium types currently inserted in device + + + WARNING: The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect. + + + Hidden track starts at LBA {0}, ends at LBA {1} + + + Track {0} starts at LBA {1}, ends at LBA {2}, has a pregap of {3} sectors and is of type {4} + + + Write a log of the scan in the format used by MHDD. + + + Write a log of the scan in the format used by ImgBurn. + + + In compliance with the European Union General Data Protection Regulation 2016/679 (GDPR), +we must give you the following information about Aaru and ask if you want to opt-in +in some information sharing. + + + Disclaimer: Because Aaru is an open source software this information, and therefore, +compliance with GDPR only holds true if you obtained a certificated copy from its original +authors. In case of doubt, close Aaru now and ask in our IRC support channel. + + + For any information sharing your IP address may be stored in our server, in a way that is not +possible for any person, manual, or automated process, to link with your identity, unless +specified otherwise. + + + Do you want to enable the decryption of copy protected media (also known as DRM), +like for example DVD Video CSS encryption. +Consult your local laws before enabling it, as this is illegal in some countries, or +only legal under some circumstances. + + + Do you want to enable decryption of copy protected media? + + + With the 'device-report' command, Aaru creates a report of a device, that includes its +manufacturer, model, firmware revision and/or version, attached bus, size, and supported commands. +The serial number of the device is not stored in the report. If used with the debug parameter, +extra information about the device will be stored in the report. This information is known to contain +the device serial number in non-standard places that prevent the automatic removal of it on a handful +of devices. A human-readable copy of the report in XML format is always created in the same directory +where Aaru is being run from. + + + Do you want to save device reports in shared folder of your computer? + + + Sharing a report with us will send it to our server, that's in the european union territory, where it +will be manually analyzed by an european union citizen to remove any trace of personal identification +from it. Once that is done, it will be shared in our stats website, https://www.aaru.app +These report will be used to improve Aaru support, and in some cases, to provide emulation of the +devices to other open-source projects. In any case, no information linking the report to you will be stored. + + + Do you want to share your device reports with us? + + + Aaru can store some usage statistics. These statistics are limited to the number of times a +command is executed, a filesystem, partition, or device is used, the operating system version, and other. +In no case, any information besides pure statistical usage numbers is stored, and they're just joint to the +pool with no way of using them to identify you. + + + Do you want to save stats about your Aaru usage? + + + Do you want to share your stats (anonymously)? + + + Do you want to gather statistics about command usage? + + + Do you want to gather statistics about found devices? + + + Do you want to gather statistics about found filesystems? + + + Do you want to gather statistics about found file filters? + + + Do you want to gather statistics about found media image formats? + + + Do you want to gather statistics about scanned media? + + + Do you want to gather statistics about found partitioning schemes? + + + Do you want to gather statistics about media types? + + + Do you want to gather statistics about media image verifications? + + + Supported filters ({0}): + {0} is the number of supported filters + + + Read-only media image formats ({0}): + {0} is the number of read only media image formats + + + Read/write media image formats ({0}): + {0} is the number of read/write media image formats + + + Supported filesystems for identification and information only ({0}): + {0} is the number of supported filesystems only for identification + + + Supported filesystems that can read their contents ({0}): + {0} is the number of supported filesystem that can read their contents + + + Supported partitioning schemes ({0}): + {0} is the number of supported partitioning schemes + + + Supported archive formats ({0}): + {0} is the number of supported archive formats + + + Namespaces for {0}: + {0} is the filesystem plugin name + + + Namespace + + \ No newline at end of file diff --git a/Aaru.sln b/Aaru.sln index 7097a34de..33c371a9e 100644 --- a/Aaru.sln +++ b/Aaru.sln @@ -44,6 +44,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Decryption", "Aaru.Dec EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Archives", "Aaru.Archives\Aaru.Archives.csproj", "{282271D0-CCC2-4ED7-BA38-EC06A84BB974}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Localization", "Aaru.Localization\Aaru.Localization.csproj", "{90B96C70-F449-4B83-9DC7-F69150806F9B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -220,6 +222,14 @@ Global {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|Any CPU.Build.0 = Release|Any CPU {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|x86.ActiveCfg = Release|Any CPU {282271D0-CCC2-4ED7-BA38-EC06A84BB974}.Release|x86.Build.0 = Release|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Debug|x86.ActiveCfg = Debug|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Debug|x86.Build.0 = Debug|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Release|Any CPU.Build.0 = Release|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Release|x86.ActiveCfg = Release|Any CPU + {90B96C70-F449-4B83-9DC7-F69150806F9B}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Aaru/Aaru.csproj b/Aaru/Aaru.csproj index 4edecce26..6bac01eec 100644 --- a/Aaru/Aaru.csproj +++ b/Aaru/Aaru.csproj @@ -104,6 +104,7 @@ + diff --git a/Aaru/Commands/Archive/ArchiveFamily.cs b/Aaru/Commands/Archive/ArchiveFamily.cs index 46b861aaf..6ac71fb10 100644 --- a/Aaru/Commands/Archive/ArchiveFamily.cs +++ b/Aaru/Commands/Archive/ArchiveFamily.cs @@ -32,12 +32,13 @@ // ****************************************************************************/ using System.CommandLine; +using Aaru.Localization; namespace Aaru.Commands.Archive; sealed class ArchiveFamily : Command { - internal ArchiveFamily() : base("archive", "Commands to manage archive files") + internal ArchiveFamily() : base("archive", UI.Archive_Command_Family_Description) { AddAlias("arc"); diff --git a/Aaru/Commands/Archive/Info.cs b/Aaru/Commands/Archive/Info.cs index 6c45c025e..ad36a6b42 100644 --- a/Aaru/Commands/Archive/Info.cs +++ b/Aaru/Commands/Archive/Info.cs @@ -36,13 +36,14 @@ using System.CommandLine.NamingConventionBinder; using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Archive; sealed class ArchiveInfoCommand : Command { - public ArchiveInfoCommand() : base("info", "Identifies an archive file and shows information about it.") + public ArchiveInfoCommand() : base("info", UI.Archive_Info_Command_Description) { AddArgument(new Argument { diff --git a/Aaru/Commands/Configure.cs b/Aaru/Commands/Configure.cs index a24434646..bd868d58b 100644 --- a/Aaru/Commands/Configure.cs +++ b/Aaru/Commands/Configure.cs @@ -35,6 +35,7 @@ using System.CommandLine; using System.CommandLine.NamingConventionBinder; using Aaru.CommonTypes.Enums; using Aaru.Console; +using Aaru.Localization; using Aaru.Settings; using Spectre.Console; @@ -42,7 +43,7 @@ namespace Aaru.Commands; sealed class ConfigureCommand : Command { - public ConfigureCommand() : base("configure", "Configures user settings and statistics.") => + public ConfigureCommand() : base("configure", UI.Configure_Command_Description) => Handler = CommandHandler.Create((Func)Invoke); int Invoke(bool debug, bool verbose) @@ -81,112 +82,72 @@ sealed class ConfigureCommand : Command { if(gdprChange) { - AaruConsole. - WriteLine("In compliance with the [bold]European Union General Data Protection Regulation 2016/679 ([italic]GDPR[/])[/],\n" + - "we must give you the following information about [italic]Aaru[/] and ask if you want to opt-in\n" + - "in some information sharing."); + AaruConsole.WriteLine(UI.GDPR_Compliance); AaruConsole.WriteLine(); - AaruConsole. - WriteLine("Disclaimer: Because [italic]Aaru[/] is an open source software this information, and therefore,\n" + - "compliance with [bold]GDPR[/] only holds true if you obtained a certificated copy from its original\n" + - "authors. In case of doubt, close [italic]Aaru[/] now and ask in our IRC support channel."); + AaruConsole.WriteLine(UI.GDPR_Open_Source_Disclaimer); AaruConsole.WriteLine(); - AaruConsole. - WriteLine("For any information sharing your IP address may be stored in our server, in a way that is not\n" + - "possible for any person, manual, or automated process, to link with your identity, unless\n" + - "specified otherwise."); + AaruConsole.WriteLine(UI.GDPR_Information_sharing); } - var pressedKey = new ConsoleKeyInfo(); - AaruConsole.WriteLine(); - AaruConsole. - WriteLine("Do you want to enable the decryption of copy protected media (also known as [italic]DRM[/]),\n" + - "like for example [italic]DVD Video CSS[/] encryption.\n" + - "[bold]Consult your local laws before enabling it, as this is illegal in some countries, or\n" + - "only legal under some circumstances[/]."); + AaruConsole.WriteLine(UI.Configure_enable_decryption_disclaimer); - while(pressedKey.Key != ConsoleKey.Y && - pressedKey.Key != ConsoleKey.N) - { - AaruConsole. - Write("[italic]Do you want to enable decryption of copy protected media?[/] [bold]([green]Y[/]/[red]N[/]):[/] "); - - Settings.Settings.Current.EnableDecryption = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to enable decryption of copy protected media?")); + Settings.Settings.Current.EnableDecryption = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_enable_decryption_of_copy_protected_media_Q}[/]"); #region Device reports AaruConsole.WriteLine(); - AaruConsole. - WriteLine( - "With the 'device-report' command, [italic]Aaru[/] creates a report of a device, that includes its\n" + - "manufacturer, model, firmware revision and/or version, attached bus, size, and supported commands.\n" + - "The serial number of the device is not stored in the report. If used with the debug parameter,\n" + - "extra information about the device will be stored in the report. This information is known to contain\n" + - "the device serial number in non-standard places that prevent the automatic removal of it on a handful\n" + - "of devices. A human-readable copy of the report in XML format is always created in the same directory\n" + - "where [italic]Aaru[/] is being run from."); + AaruConsole.WriteLine(UI.Configure_Device_Report_information_disclaimer); - while(pressedKey.Key != ConsoleKey.Y && - pressedKey.Key != ConsoleKey.N) - { - AaruConsole. - Write("[italic]Do you want to save device reports in shared folder of your computer? [bold]([green]Y[/]/[red]N[/]):[/] "); + Settings.Settings.Current.SaveReportsGlobally = AnsiConsole.Confirm($"[italic]{UI. + Configure_Do_you_want_to_save_device_reports_in_shared_folder_of_your_computer_Q}[/]"); - Settings.Settings.Current.SaveReportsGlobally = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to save device reports in shared folder of your computer?")); - - Settings.Settings.Current.SaveReportsGlobally = pressedKey.Key == ConsoleKey.Y; - - pressedKey = new ConsoleKeyInfo(); AaruConsole.WriteLine(); - AaruConsole. - WriteLine("Sharing a report with us will send it to our server, that's in the european union territory, where it\n" + - "will be manually analyzed by an european union citizen to remove any trace of personal identification\n" + - "from it. Once that is done, it will be shared in our stats website, [italic][blue]https://www.aaru.app[/][/]\n" + - "These report will be used to improve [italic]Aaru[/] support, and in some cases, to provide emulation of the\n" + - "devices to other open-source projects. In any case, no information linking the report to you will be stored."); + AaruConsole.WriteLine(UI.Configure_share_report_disclaimer); - Settings.Settings.Current.ShareReports = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to share your device reports with us?")); + Settings.Settings.Current.ShareReports = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_share_your_device_reports_with_us_Q}[/]"); #endregion Device reports #region Statistics AaruConsole.WriteLine(); - AaruConsole. - WriteLine("[italic]Aaru[/] can store some usage statistics. These statistics are limited to the number of times a\n" + - "command is executed, a filesystem, partition, or device is used, the operating system version, and other.\n" + - "In no case, any information besides pure statistical usage numbers is stored, and they're just joint to the\n" + - "pool with no way of using them to identify you."); + AaruConsole.WriteLine(UI.Statistics_disclaimer); - if(AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to save stats about your Aaru usage?"))) + if(AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_save_stats_about_your_Aaru_usage_Q}[/]")) { - Settings.Settings.Current.Stats = new StatsSettings(); - - Settings.Settings.Current.Stats.ShareStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to share your stats (anonymously)?")); - - Settings.Settings.Current.Stats.CommandStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about command usage?")); - - Settings.Settings.Current.Stats.DeviceStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about found devices?")); - - Settings.Settings.Current.Stats.FilesystemStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about found filesystems?")); - - Settings.Settings.Current.Stats.FilterStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about found file filters?")); - - Settings.Settings.Current.Stats.MediaImageStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about found media image formats?")); - - Settings.Settings.Current.Stats.MediaScanStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about scanned media?")); - - Settings.Settings.Current.Stats.PartitionStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about found partitioning schemes?")); - - Settings.Settings.Current.Stats.MediaStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about media types?")); - - Settings.Settings.Current.Stats.VerifyStats = AnsiConsole.Confirm(string.Format("[italic]{0}[/]", "Do you want to gather statistics about media image verifications?")); + Settings.Settings.Current.Stats = new StatsSettings + { + ShareStats = AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_share_your_stats__anonymously_Q}[/]"), + CommandStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_command_usage_Q}[/]"), + DeviceStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_found_devices_Q}[/]"), + FilesystemStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_found_filesystems_Q}[/]"), + FilterStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_found_file_filters_Q}[/]"), + MediaImageStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_found_media_image_formats_Q + }[/]"), + MediaScanStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_scanned_media_Q}[/]"), + PartitionStats = + AnsiConsole.Confirm($"[italic]{UI. + Do_you_want_to_gather_statistics_about_found_partitioning_schemes_Q}[/]"), + MediaStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_media_types_Q}[/]"), + VerifyStats = + AnsiConsole.Confirm($"[italic]{UI.Do_you_want_to_gather_statistics_about_media_image_verifications_Q + }[/]") + }; } else Settings.Settings.Current.Stats = null; diff --git a/Aaru/Commands/Database/DatabaseFamily.cs b/Aaru/Commands/Database/DatabaseFamily.cs index 6c6048057..d71aaa8d4 100644 --- a/Aaru/Commands/Database/DatabaseFamily.cs +++ b/Aaru/Commands/Database/DatabaseFamily.cs @@ -31,13 +31,13 @@ // ****************************************************************************/ using System.CommandLine; +using Aaru.Localization; namespace Aaru.Commands.Database; sealed class DatabaseFamily : Command { - internal DatabaseFamily(bool mainDbUpdate) : base("database", - "Commands to manage the device and statistics database") + internal DatabaseFamily(bool mainDbUpdate) : base("database", UI.Database_Command_Family_Description) { AddAlias("db"); diff --git a/Aaru/Commands/Database/Statistics.cs b/Aaru/Commands/Database/Statistics.cs index f0b322496..4088e0aea 100644 --- a/Aaru/Commands/Database/Statistics.cs +++ b/Aaru/Commands/Database/Statistics.cs @@ -36,6 +36,7 @@ using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Database; using Aaru.Database.Models; +using Aaru.Localization; using Spectre.Console; using Command = System.CommandLine.Command; @@ -43,7 +44,7 @@ namespace Aaru.Commands.Database; sealed class StatisticsCommand : Command { - public StatisticsCommand() : base("stats", "Shows statistics.") => + public StatisticsCommand() : base("stats", UI.Database_Stats_Command_Description) => Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); public static int Invoke(bool debug, bool verbose) @@ -85,7 +86,7 @@ sealed class StatisticsCommand : Command !ctx.Partitions.Any() && !ctx.SeenDevices.Any()) { - AaruConsole.WriteLine("There are no statistics."); + AaruConsole.WriteLine(UI.There_are_no_statistics); return (int)ErrorNumber.NothingFound; } @@ -97,11 +98,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Commands statistics") + Title = new TableTitle(UI.Commands_statistics) }; - table.AddColumn("Command"); - table.AddColumn("Times used"); + table.AddColumn(UI.Title_Command); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); if(ctx.Commands.Any(c => c.Name == "analyze")) @@ -154,11 +155,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Filters statistics") + Title = new TableTitle(UI.Filters_statistics) }; - table.AddColumn("Filter"); - table.AddColumn("Times found"); + table.AddColumn(UI.Title_Filter); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); foreach(string filter in ctx.Filters.Select(c => c.Name).Distinct().OrderBy(c => c)) @@ -183,11 +184,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Media image format statistics") + Title = new TableTitle(UI.Media_image_format_statistics) }; - table.AddColumn("Format"); - table.AddColumn("Times found"); + table.AddColumn(UI.Title_Format); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); foreach(string format in ctx.MediaFormats.Select(c => c.Name).Distinct().OrderBy(c => c)) @@ -212,11 +213,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Partitioning scheme statistics") + Title = new TableTitle(UI.Partitioning_scheme_statistics) }; - table.AddColumn("Scheme"); - table.AddColumn("Times found"); + table.AddColumn(UI.Title_Scheme); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); foreach(string partition in ctx.Partitions.Select(c => c.Name).Distinct().OrderBy(c => c)) @@ -241,11 +242,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Filesystem statistics") + Title = new TableTitle(UI.Filesystem_statistics) }; - table.AddColumn("Filesystem"); - table.AddColumn("Times found"); + table.AddColumn(UI.Title_Filesystem); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); foreach(string filesystem in ctx.Filesystems.Select(c => c.Name).Distinct().OrderBy(c => c)) @@ -270,13 +271,13 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Device statistics") + Title = new TableTitle(UI.Device_statistics) }; - table.AddColumn("Manufacturer"); - table.AddColumn("Model"); - table.AddColumn("Revision"); - table.AddColumn("Bus"); + table.AddColumn(UI.Title_Manufacturer); + table.AddColumn(UI.Title_Model); + table.AddColumn(UI.Title_Revision); + table.AddColumn(UI.Title_Bus); foreach(DeviceStat ds in ctx.SeenDevices.OrderBy(ds => ds.Manufacturer).ThenBy(ds => ds.Model). ThenBy(ds => ds.Revision).ThenBy(ds => ds.Bus)) @@ -292,11 +293,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Media found in real device statistics") + Title = new TableTitle(UI.Media_found_in_real_device_statistics) }; - table.AddColumn("Type"); - table.AddColumn("Times found"); + table.AddColumn(UI.Title_Type_for_media); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); foreach(string media in ctx.Medias.Where(ms => ms.Real).Select(ms => ms.Type).Distinct().OrderBy(ms => ms)) @@ -322,11 +323,11 @@ sealed class StatisticsCommand : Command { table = new Table { - Title = new TableTitle("Media found in images statistics") + Title = new TableTitle(UI.Media_found_in_images_statistics) }; - table.AddColumn("Type"); - table.AddColumn("Times found"); + table.AddColumn(UI.Title_Type_for_media); + table.AddColumn(UI.Title_Times_used); table.Columns[1].RightAligned(); foreach(string media in ctx.Medias.Where(ms => !ms.Real).Select(ms => ms.Type).Distinct().OrderBy(ms => ms)) @@ -349,7 +350,7 @@ sealed class StatisticsCommand : Command } if(!thereAreStats) - AaruConsole.WriteLine("There are no statistics."); + AaruConsole.WriteLine(UI.There_are_no_statistics); return (int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Database/Update.cs b/Aaru/Commands/Database/Update.cs index bd8f5e06d..22b06a37e 100644 --- a/Aaru/Commands/Database/Update.cs +++ b/Aaru/Commands/Database/Update.cs @@ -39,6 +39,7 @@ using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; using Aaru.Database; +using Aaru.Localization; using Microsoft.EntityFrameworkCore; using Spectre.Console; @@ -48,12 +49,12 @@ sealed class UpdateCommand : Command { readonly bool _mainDbUpdate; - public UpdateCommand(bool mainDbUpdate) : base("update", "Updates the database.") + public UpdateCommand(bool mainDbUpdate) : base("update", UI.Database_Update_Command_Description) { _mainDbUpdate = mainDbUpdate; - Add(new Option("--clear", () => false, "Clear existing main database.")); - Add(new Option("--clear-all", () => false, "Clear existing main and local database.")); + Add(new Option("--clear", () => false, UI.Clear_existing_main_database)); + Add(new Option("--clear-all", () => false, UI.Clear_existing_main_and_local_database)); Handler = CommandHandler.Create((Func)Invoke); } @@ -107,7 +108,7 @@ sealed class UpdateCommand : Command if(Debugger.IsAttached) throw; - AaruConsole.ErrorWriteLine("Could not remove local database."); + AaruConsole.ErrorWriteLine(UI.Could_not_remove_local_database); return (int)ErrorNumber.CannotRemoveDatabase; } @@ -122,7 +123,7 @@ sealed class UpdateCommand : Command if(Debugger.IsAttached) throw; - AaruConsole.ErrorWriteLine("Could not remove main database."); + AaruConsole.ErrorWriteLine(UI.Could_not_remove_main_database); return (int)ErrorNumber.CannotRemoveDatabase; } diff --git a/Aaru/Commands/Device/DeviceFamily.cs b/Aaru/Commands/Device/DeviceFamily.cs index 4726f0d0c..4b6e50e0f 100644 --- a/Aaru/Commands/Device/DeviceFamily.cs +++ b/Aaru/Commands/Device/DeviceFamily.cs @@ -31,12 +31,13 @@ // ****************************************************************************/ using System.CommandLine; +using Aaru.Localization; namespace Aaru.Commands.Device; sealed class DeviceFamily : Command { - public DeviceFamily() : base("device", "Commands that talks to devices") + public DeviceFamily() : base("device", UI.Device_Command_Family_Description) { AddAlias("dev"); diff --git a/Aaru/Commands/Device/DeviceReport.cs b/Aaru/Commands/Device/DeviceReport.cs index 56fbd4197..6f7986c83 100644 --- a/Aaru/Commands/Device/DeviceReport.cs +++ b/Aaru/Commands/Device/DeviceReport.cs @@ -49,6 +49,7 @@ using Aaru.Database.Models; using Aaru.Decoders.SCSI; using Aaru.Decoders.SCSI.MMC; using Aaru.Helpers; +using Aaru.Localization; using Newtonsoft.Json; using Spectre.Console; using Command = System.CommandLine.Command; @@ -59,19 +60,19 @@ namespace Aaru.Commands.Device; sealed class DeviceReportCommand : Command { - public DeviceReportCommand() : base("report", "Tests the device capabilities and creates an JSON report of them.") + public DeviceReportCommand() : base("report", UI.Device_Report_Command_Description) { AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Device path", + Description = UI.Device_path, Name = "device-path" }); Add(new Option(new[] { "--trap-disc", "-t" - }, () => false, "Does a device report using a trap disc.")); + }, () => false, UI.Device_report_using_trap_disc)); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); } @@ -122,7 +123,7 @@ sealed class DeviceReportCommand : Command switch(dev) { case null: - AaruConsole.ErrorWriteLine($"Could not open device, error {devErrno}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Could_not_open_device_error_0, devErrno)); return (int)devErrno; case Devices.Remote.Device remoteDev: @@ -146,10 +147,9 @@ sealed class DeviceReportCommand : Command if(!isAdmin) { - AaruConsole. - ErrorWriteLine("Because of the commands sent to a device, device report must be run with administrative privileges."); + AaruConsole.ErrorWriteLine(UI.Device_report_must_be_run_as_admin); - AaruConsole.ErrorWriteLine("Not continuing."); + AaruConsole.ErrorWriteLine(UI.Not_continuing); return (int)ErrorNumber.NotPermitted; } @@ -190,7 +190,7 @@ sealed class DeviceReportCommand : Command if(trapDisc && dev.ScsiType != PeripheralDeviceTypes.MultiMediaDevice) { - AaruConsole.ErrorWriteLine("This device type does not support doing reports with trap discs."); + AaruConsole.ErrorWriteLine(UI.Device_does_not_report_with_trap_discs); return (int)ErrorNumber.InvalidArgument; } @@ -198,22 +198,21 @@ sealed class DeviceReportCommand : Command var reporter = new DeviceReport(dev); if(dev.IsUsb) - if(AnsiConsole.Confirm("[italic]Is the device natively USB (in case of doubt, press Y)?[/]")) + if(AnsiConsole.Confirm($"[italic]{UI.Is_the_device_natively_USB}[/]")) { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Querying USB information...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Querying_USB_information).IsIndeterminate(); report.USB = reporter.UsbReport(); }); - report.USB.RemovableMedia = - AnsiConsole.Confirm("[italic]Is the media removable from the reading/writing elements?[/]"); + report.USB.RemovableMedia = AnsiConsole.Confirm($"[italic]{UI.Is_the_media_removable}[/]"); removable = report.USB.RemovableMedia; } if(dev.IsFireWire) - if(AnsiConsole.Confirm("[italic]Is the device natively FireWire (in case of doubt, press Y)?[/]")) + if(AnsiConsole.Confirm($"[italic]{UI.Is_the_device_natively_FireWire}[/]")) { Core.Spectre.ProgressSingleSpinner(ctx => { @@ -221,8 +220,7 @@ sealed class DeviceReportCommand : Command report.FireWire = reporter.FireWireReport(); }); - report.FireWire.RemovableMedia = - AnsiConsole.Confirm("[italic]Is the media removable from the reading/writing elements?[/]"); + report.FireWire.RemovableMedia = AnsiConsole.Confirm($"[italic]{UI.Is_the_media_removable}[/]"); removable = report.FireWire.RemovableMedia; } @@ -230,7 +228,7 @@ sealed class DeviceReportCommand : Command if(dev.IsPcmcia) Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Querying PCMCIA information...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Querying_PCMCIA_information).IsIndeterminate(); report.PCMCIA = reporter.PcmciaReport(); }); @@ -244,7 +242,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Querying ATA IDENTIFY...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Querying_ATA_IDENTIFY).IsIndeterminate(); dev.AtaIdentify(out buffer, out _, dev.Timeout, out _); }); @@ -267,33 +265,31 @@ sealed class DeviceReportCommand : Command else if(!removable && report.ATA.IdentifyDevice?.GeneralConfiguration.HasFlag(Identify.GeneralConfigurationBit. Removable) == true) - removable = - AnsiConsole.Confirm("[italic]Is the media removable from the reading/writing elements?[/]"); + removable = AnsiConsole.Confirm($"[italic]{UI.Is_the_media_removable}[/]"); if(removable) { - AaruConsole.WriteLine("Please remove any media from the device and press any key when it is out."); + AaruConsole.WriteLine(UI.Please_remove_any_media); System.Console.ReadKey(true); Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Querying ATA IDENTIFY...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Querying_ATA_IDENTIFY).IsIndeterminate(); dev.AtaIdentify(out buffer, out _, dev.Timeout, out _); }); report.ATA.Identify = DeviceReport.ClearIdentify(buffer); List mediaTests = new(); - while(AnsiConsole.Confirm("[italic]Do you have media that you can insert in the drive?[/]")) + while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]")) { - AaruConsole.WriteLine("Please insert it in the drive and press any key when it is ready."); + AaruConsole.WriteLine(UI.Please_insert_it_in_the_drive); System.Console.ReadKey(true); - mediumTypeName = - AnsiConsole.Ask("Please write a description of the media type and press enter: "); + mediumTypeName = AnsiConsole.Ask(UI.Please_write_description_of_media_type); - mediumModel = AnsiConsole.Ask("Please write the media model and press enter: "); + mediumModel = AnsiConsole.Ask(UI.Please_write_media_model); TestedMedia mediaTest = reporter.ReportAtaMedia(); mediaTest.MediumTypeName = mediumTypeName; @@ -318,11 +314,11 @@ sealed class DeviceReportCommand : Command report.SecureDigital = reporter.MmcSdReport(); break; - case DeviceType.NVMe: throw new NotImplementedException("NVMe devices not yet supported."); + case DeviceType.NVMe: throw new NotImplementedException(Localization.Core.NVMe_devices_not_yet_supported); case DeviceType.ATAPI: Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Querying ATAPI IDENTIFY...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Querying_ATAPI_IDENTIFY).IsIndeterminate(); dev.AtapiIdentify(out buffer, out _, dev.Timeout, out _); }); @@ -347,7 +343,7 @@ sealed class DeviceReportCommand : Command case PeripheralDeviceTypes.SCSIZonedBlockDevice: break; default: { - AaruConsole.ErrorWriteLine("Unsupported device type, report cannot be created"); + AaruConsole.ErrorWriteLine(UI.Unsupported_device_type_for_report); throw new IOException(); } @@ -356,9 +352,7 @@ sealed class DeviceReportCommand : Command if(!dev.IsUsb && !dev.IsFireWire && dev.IsRemovable) - removable = - AnsiConsole. - Confirm("[italic]Is the media removable from the reading/writing elements (flash memories ARE NOT removable)?[/]"); + removable = AnsiConsole.Confirm($"[italic]{UI.Is_the_media_removable_flash_is_not}[/]"); if(removable) { @@ -377,8 +371,7 @@ sealed class DeviceReportCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Asking drive to unload tape (can take a few minutes)..."). - IsIndeterminate(); + ctx.AddTask(UI.Asking_drive_to_unload_tape).IsIndeterminate(); dev.Unload(out buffer, dev.Timeout, out _); }); @@ -386,7 +379,7 @@ sealed class DeviceReportCommand : Command break; } - AaruConsole.WriteLine("Please remove any media from the device and press any key when it is out."); + AaruConsole.WriteLine(UI.Please_remove_any_media); System.Console.ReadKey(true); } @@ -422,26 +415,22 @@ sealed class DeviceReportCommand : Command { if(iomegaRev) { - AaruConsole. - ErrorWriteLine("This device type does not support doing reports with trap discs."); + AaruConsole.ErrorWriteLine(UI.Device_does_not_report_with_trap_discs); return (int)ErrorNumber.InvalidArgument; } - if(!AnsiConsole. - Confirm("[italic]Are you sure you want to do a report using a trap disc and the swapping method?\n" + - "This method can damage the drive, or the disc, and requires some ability.\n" + - "In you are unsure, please press N to not continue.[/]")) + if(!AnsiConsole.Confirm($"[italic]{UI.Sure_report_trap_disc}[/]")) return (int)ErrorNumber.NoError; - if(!AnsiConsole.Confirm("[italic]Do you have an audio trap disc (if unsure press N)?[/]")) + if(!AnsiConsole.Confirm($"[italic]{UI.Do_you_have_audio_trap_disc}[/]")) { - AaruConsole.ErrorWriteLine("Please burn an audio trap disc before continuing..."); + AaruConsole.ErrorWriteLine(UI.Please_burn_audio_trap_disc); return (int)ErrorNumber.NoError; } - if(AnsiConsole.Confirm("[italic]Do you have a GD-ROM disc (if unsure press N)?[/]")) + if(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_GD_ROM_disc}[/]")) reporter.ReportGdRomSwapTrick(ref report); else return (int)ErrorNumber.NoError; @@ -702,30 +691,30 @@ sealed class DeviceReportCommand : Command if(!tryPlextor) tryPlextor |= AnsiConsole. - Confirm("[italic]Do you have want to try Plextor vendor commands? [red]THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N')[/][/]", + Confirm($"[italic]{UI.Do_you_want_to_try_Plextor_commands} [red]{UI.This_is_dangerous}[/][/]", false); if(!tryNec) tryNec |= AnsiConsole. - Confirm("[italic]Do you have want to try NEC vendor commands? [red]THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N')[/][/]", + Confirm($"[italic]{UI.Do_you_want_to_try_NEC_commands} [red]{UI.This_is_dangerous}[/][/]", false); if(!tryPioneer) tryPioneer |= AnsiConsole. - Confirm("[italic]Do you have want to try Pioneer vendor commands? [red]THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N')[/][/]", + Confirm($"[italic]{UI.Do_you_want_to_try_Pioneer_commands} [red]{UI.This_is_dangerous}[/][/]", false); if(!tryHldtst) tryHldtst |= AnsiConsole. - Confirm("[italic]Do you have want to try HL-DT-ST (aka LG) vendor commands? [red]THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N')[/][/]", + Confirm($"[italic]{UI.Do_you_want_to_try_HLDTST_commands} [red]{UI.This_is_dangerous}[/][/]", false); tryMediaTekF106 = AnsiConsole. - Confirm("[italic]Do you have want to try MediaTek vendor command F1h subcommand 06h? [red]THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N')[/][/]", + Confirm($"[italic]{UI.Do_you_want_to_try_MediaTek_commands} [red]{UI.This_is_dangerous}[/][/]", false); } @@ -736,12 +725,11 @@ sealed class DeviceReportCommand : Command foreach(string mediaType in mediaTypes) { - if(!AnsiConsole.Confirm($"[italic]Do you have a {mediaType - } disc that you can insert in the drive?[/]")) + if(!AnsiConsole.Confirm($"[italic]{string.Format(UI.Do_you_have_a_0_disc, mediaType) + }[/]")) continue; - AaruConsole. - WriteLine("Please insert it in the drive and press any key when it is ready."); + AaruConsole.WriteLine(UI.Please_insert_it_in_the_drive); System.Console.ReadKey(true); @@ -749,7 +737,7 @@ sealed class DeviceReportCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Waiting for drive to become ready").IsIndeterminate(); + ctx.AddTask(Localization.Core.Waiting_for_drive_to_become_ready).IsIndeterminate(); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); if(!sense) @@ -830,7 +818,7 @@ sealed class DeviceReportCommand : Command } default: AaruConsole.DebugWriteLine("Device-Report command", - "Device not ready. Sense {0}h ASC {1:X2}h ASCQ {2:X2}h", + Localization.Core.Device_not_ready_Sense, decSense.Value.SenseKey, decSense.Value.ASC, decSense.Value.ASCQ); @@ -841,7 +829,8 @@ sealed class DeviceReportCommand : Command else { AaruConsole.DebugWriteLine("Device-Report command", - "Got sense status but no sense buffer"); + Localization.Core. + Got_sense_status_but_no_sense_buffer); mediaIsRecognized = false; } @@ -859,19 +848,23 @@ sealed class DeviceReportCommand : Command if((mediaTest.SupportsReadLong == true || mediaTest.SupportsReadLong16 == true) && mediaTest.LongBlockSize == mediaTest.BlockSize && - AnsiConsole. - Confirm("[italic]Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours)[/]")) + AnsiConsole.Confirm($"[italic]{Localization.Core.Try_to_find_SCSI_READ_LONG_size + }[/]")) AnsiConsole.Progress().AutoClear(true).HideCompleted(true). Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()).Start(ctx => { - ProgressTask task = ctx.AddTask("Trying to READ LONG..."); + ProgressTask task = + ctx.AddTask(Localization.Core.Trying_to_READ_LONG); + task.MaxValue = ushort.MaxValue; for(ushort i = (ushort)mediaTest.BlockSize;; i++) { - task.Description = $"Trying to READ LONG with a size of {i - } bytes..."; + task.Description = + string. + Format(Localization.Core.Trying_READ_LONG_with_size_0, + i); task.Value = i; @@ -899,7 +892,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (10)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_10).IsIndeterminate(); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, (ushort)mediaTest.LongBlockSize, dev.Timeout, out _); @@ -914,7 +907,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (16)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_16).IsIndeterminate(); sense = dev.ReadLong16(out buffer, out senseBuffer, false, 0, mediaTest.LongBlockSize.Value, dev.Timeout, out _); @@ -944,26 +937,24 @@ sealed class DeviceReportCommand : Command List seqTests = new(); - while(AnsiConsole.Confirm("[italic]Do you have media that you can insert in the drive?[/]")) + while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]")) { - AaruConsole.WriteLine("Please insert it in the drive and press any key when it is ready."); + AaruConsole.WriteLine(UI.Please_insert_it_in_the_drive); System.Console.ReadKey(true); - mediumTypeName = - AnsiConsole. - Ask("Please write a description of the media type and press enter: "); + mediumTypeName = AnsiConsole.Ask(UI.Please_write_description_of_media_type); mediumManufacturer = - AnsiConsole.Ask("Please write the media manufacturer and press enter: "); + AnsiConsole.Ask(Localization.Core.Please_write_media_manufacturer); - mediumModel = AnsiConsole.Ask("Please write the media model and press enter: "); + mediumModel = AnsiConsole.Ask(UI.Please_write_media_model); bool mediaIsRecognized = true; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Waiting for drive to become ready").IsIndeterminate(); + ctx.AddTask(Localization.Core.Waiting_for_drive_to_become_ready).IsIndeterminate(); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); AaruConsole.DebugWriteLine("Device reporting", "sense = {0}", sense); @@ -1046,7 +1037,7 @@ sealed class DeviceReportCommand : Command } default: AaruConsole.DebugWriteLine("Device-Report command", - "Device not ready. Sense {0} ASC {1:X2}h ASCQ {2:X2}h", + Localization.Core.Device_not_ready_Sense, decSense.Value.SenseKey, decSense.Value.ASC, decSense.Value.ASCQ); @@ -1057,7 +1048,7 @@ sealed class DeviceReportCommand : Command else { AaruConsole.DebugWriteLine("Device-Report command", - "Got sense status but no sense buffer"); + Localization.Core.Got_sense_status_but_no_sense_buffer); mediaIsRecognized = false; } @@ -1077,8 +1068,7 @@ sealed class DeviceReportCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Asking drive to unload tape (can take a few minutes)..."). - IsIndeterminate(); + ctx.AddTask(UI.Asking_drive_to_unload_tape).IsIndeterminate(); dev.SpcAllowMediumRemoval(out buffer, dev.Timeout, out _); dev.Unload(out buffer, dev.Timeout, out _); @@ -1095,11 +1085,11 @@ sealed class DeviceReportCommand : Command { List mediaTypes = new() { - "MD DATA (140Mb data MiniDisc)", - "60 minutes rewritable MiniDisc", - "74 minutes rewritable MiniDisc", - "80 minutes rewritable MiniDisc", - "Embossed Audio MiniDisc" + Localization.Core.Media_Type_Name_MMD_140A, + Localization.Core.Media_Type_Name_MDW_60, + Localization.Core.Media_Type_Name_MDW_74, + Localization.Core.Media_Type_Name_MDW_80, + Localization.Core.Media_Type_Name_MiniDisc }; mediaTypes.Sort(); @@ -1108,11 +1098,10 @@ sealed class DeviceReportCommand : Command foreach(string mediaType in mediaTypes) { - if(!AnsiConsole.Confirm($"[italic]Do you have a {mediaType - } disc that you can insert in the drive?[/]")) + if(!AnsiConsole.Confirm($"[italic]{string.Format(UI.Do_you_have_a_0_disc, mediaType)}[/]")) continue; - AaruConsole.WriteLine("Please insert it in the drive and press any key when it is ready."); + AaruConsole.WriteLine(UI.Please_insert_it_in_the_drive); System.Console.ReadKey(true); @@ -1120,7 +1109,7 @@ sealed class DeviceReportCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Waiting for drive to become ready").IsIndeterminate(); + ctx.AddTask(Localization.Core.Waiting_for_drive_to_become_ready).IsIndeterminate(); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -1196,7 +1185,7 @@ sealed class DeviceReportCommand : Command } default: AaruConsole.DebugWriteLine("Device-Report command", - "Device not ready. Sense {0}h ASC {1:X2}h ASCQ {2:X2}h", + Localization.Core.Device_not_ready_Sense, decSense.Value.SenseKey, decSense.Value.ASC, decSense.Value.ASCQ); @@ -1207,7 +1196,7 @@ sealed class DeviceReportCommand : Command else { AaruConsole.DebugWriteLine("Device-Report command", - "Got sense status but no sense buffer"); + Localization.Core.Got_sense_status_but_no_sense_buffer); mediaIsRecognized = false; } @@ -1224,21 +1213,25 @@ sealed class DeviceReportCommand : Command if((mediaTest.SupportsReadLong == true || mediaTest.SupportsReadLong16 == true) && mediaTest.LongBlockSize == mediaTest.BlockSize && - AnsiConsole. - Confirm("[italic]Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours)[/]")) + AnsiConsole.Confirm($"[italic]{Localization.Core.Try_to_find_SCSI_READ_LONG_size + }[/]")) AnsiConsole.Progress().AutoClear(true).HideCompleted(true). Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()).Start(ctx => { - ProgressTask task = ctx.AddTask("Trying to READ LONG..."); + ProgressTask task = + ctx.AddTask(Localization.Core.Trying_to_READ_LONG); + task.MaxValue = ushort.MaxValue; for(ushort i = (ushort)mediaTest.BlockSize;; i++) { task.Value = i; - task.Description = $"Trying to READ LONG with a size of {i - } bytes..."; + task.Description = + string. + Format(Localization.Core.Trying_READ_LONG_with_size_0, + i); sense = mediaTest.SupportsReadLong16 == true ? dev.ReadLong16(out buffer, out senseBuffer, false, @@ -1265,7 +1258,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (10)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_10).IsIndeterminate(); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, (ushort)mediaTest.LongBlockSize, dev.Timeout, out _); @@ -1280,7 +1273,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (16)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_16).IsIndeterminate(); sense = dev.ReadLong16(out buffer, out senseBuffer, false, 0, (ushort)mediaTest.LongBlockSize, dev.Timeout, out _); @@ -1291,15 +1284,16 @@ sealed class DeviceReportCommand : Command } } - mediaTest.MediumTypeName = mediaType switch - { - "MD DATA (140Mb data MiniDisc)" => "MMD-140A", - "60 minutes rewritable MiniDisc" => "MDW-60", - "74 minutes rewritable MiniDisc" => "MDW-74", - "80 minutes rewritable MiniDisc" => "MDW-80", - "Embossed Audio MiniDisc" => "MiniDisc", - _ => mediaTest.MediumTypeName - }; + if(mediaType == Localization.Core.Media_Type_Name_MMD_140A) + mediaTest.MediumTypeName = "MMD-140A"; + else if(mediaType == Localization.Core.Media_Type_Name_MDW_60) + mediaTest.MediumTypeName = "MDW-60"; + else if(mediaType == Localization.Core.Media_Type_Name_MDW_74) + mediaTest.MediumTypeName = "MDW-74"; + else if(mediaType == Localization.Core.Media_Type_Name_MDW_80) + mediaTest.MediumTypeName = "MDW-80"; + else if(mediaType == Localization.Core.Media_Type_Name_MiniDisc) + mediaTest.MediumTypeName = "MiniDisc"; mediaTest.Manufacturer = "SONY"; mediaTest.MediaIsRecognized = mediaIsRecognized; @@ -1319,27 +1313,24 @@ sealed class DeviceReportCommand : Command { List mediaTests = new(); - while(AnsiConsole.Confirm("[italic]Do you have media that you can insert in the drive?[/]")) + while(AnsiConsole.Confirm($"[italic]{UI.Do_you_have_media_you_can_insert}[/]")) { - AaruConsole. - WriteLine("Please insert it in the drive and press any key when it is ready."); + AaruConsole.WriteLine(UI.Please_insert_it_in_the_drive); System.Console.ReadKey(true); - mediumTypeName = - AnsiConsole. - Ask("Please write a description of the media type and press enter: "); + mediumTypeName = AnsiConsole.Ask(UI.Please_write_description_of_media_type); mediumManufacturer = - AnsiConsole.Ask("Please write the media manufacturer and press enter: "); + AnsiConsole.Ask(Localization.Core.Please_write_media_manufacturer); - mediumModel = AnsiConsole.Ask("Please write the media model and press enter: "); + mediumModel = AnsiConsole.Ask(UI.Please_write_media_model); bool mediaIsRecognized = true; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Waiting for drive to become ready").IsIndeterminate(); + ctx.AddTask(Localization.Core.Waiting_for_drive_to_become_ready).IsIndeterminate(); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); if(!sense) @@ -1407,21 +1398,25 @@ sealed class DeviceReportCommand : Command if((mediaTest.SupportsReadLong == true || mediaTest.SupportsReadLong16 == true) && mediaTest.LongBlockSize == mediaTest.BlockSize && - AnsiConsole. - Confirm("[italic]Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours)[/]")) + AnsiConsole.Confirm($"[italic]{Localization.Core.Try_to_find_SCSI_READ_LONG_size + }[/]")) AnsiConsole.Progress().AutoClear(true).HideCompleted(true). Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()).Start(ctx => { - ProgressTask task = ctx.AddTask("Trying to READ LONG..."); + ProgressTask task = + ctx.AddTask(Localization.Core.Trying_to_READ_LONG); + task.MaxValue = ushort.MaxValue; for(ushort i = (ushort)mediaTest.BlockSize;; i++) { task.Value = i; - task.Description = $"Trying to READ LONG with a size of {i - } bytes..."; + task.Description = + string. + Format(Localization.Core.Trying_READ_LONG_with_size_0, + i); sense = mediaTest.SupportsReadLong16 == true ? dev.ReadLong16(out buffer, out senseBuffer, @@ -1449,7 +1444,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (10)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_10).IsIndeterminate(); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, (ushort)mediaTest.LongBlockSize, dev.Timeout, out _); @@ -1464,7 +1459,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (16)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_16).IsIndeterminate(); sense = dev.ReadLong16(out buffer, out senseBuffer, false, 0, (ushort)mediaTest.LongBlockSize, dev.Timeout, out _); @@ -1495,21 +1490,25 @@ sealed class DeviceReportCommand : Command if((report.SCSI.ReadCapabilities.SupportsReadLong == true || report.SCSI.ReadCapabilities.SupportsReadLong16 == true) && report.SCSI.ReadCapabilities.LongBlockSize == report.SCSI.ReadCapabilities.BlockSize) - if(AnsiConsole. - Confirm("[italic]Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours)[/]")) + if(AnsiConsole.Confirm($"[italic]{Localization.Core.Try_to_find_SCSI_READ_LONG_size + }[/]")) AnsiConsole.Progress().AutoClear(true).HideCompleted(true). Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()).Start(ctx => { - ProgressTask task = ctx.AddTask("Trying to READ LONG..."); + ProgressTask task = + ctx.AddTask(Localization.Core.Trying_to_READ_LONG); + task.MaxValue = ushort.MaxValue; for(ushort i = (ushort)report.SCSI.ReadCapabilities.BlockSize;; i++) { task.Value = i; - task.Description = $"Trying to READ LONG with a size of {i - } bytes..."; + task.Description = + string. + Format(Localization.Core.Trying_READ_LONG_with_size_0, + i); sense = report.SCSI.ReadCapabilities.SupportsReadLong16 == true ? dev.ReadLong16(out buffer, out senseBuffer, false, @@ -1536,7 +1535,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (10)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_10).IsIndeterminate(); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, (ushort)report.SCSI.ReadCapabilities.LongBlockSize, @@ -1552,7 +1551,7 @@ sealed class DeviceReportCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Trying SCSI READ LONG (16)...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Trying_SCSI_READ_LONG_16).IsIndeterminate(); sense = dev.ReadLong16(out buffer, out senseBuffer, false, 0, report.SCSI.ReadCapabilities.LongBlockSize.Value, @@ -1569,7 +1568,7 @@ sealed class DeviceReportCommand : Command } break; - default: throw new NotSupportedException("Unknown device type."); + default: throw new NotSupportedException(Localization.Core.Unknown_device_type); } var jsonFs = new FileStream(jsonFile, FileMode.Create); diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index 0e476670c..2ba8cc092 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -51,6 +51,7 @@ using Aaru.Decoders.SCSI.MMC; using Aaru.Decoders.SCSI.SSC; using Aaru.Devices; using Aaru.Helpers; +using Aaru.Localization; using Spectre.Console; using Command = System.CommandLine.Command; using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo; @@ -61,17 +62,17 @@ namespace Aaru.Commands.Device; sealed class DeviceInfoCommand : Command { - public DeviceInfoCommand() : base("info", "Gets information about a device.") + public DeviceInfoCommand() : base("info", UI.Device_Info_Command_Description) { Add(new Option(new[] { "--output-prefix", "-w" - }, () => null, "Prefix for saving binary information from device.")); + }, () => null, UI.Prefix_for_saving_binary_information)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Device path", + Description = UI.Device_path, Name = "device-path" }); @@ -125,7 +126,7 @@ sealed class DeviceInfoCommand : Command switch(dev) { case null: - AaruConsole.ErrorWriteLine($"Could not open device, error {devErrno}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Could_not_open_device_error_0, devErrno)); return (int)devErrno; case Devices.Remote.Device remoteDev: @@ -151,7 +152,7 @@ sealed class DeviceInfoCommand : Command { table = new Table { - Title = new TableTitle("[bold]USB device[/]") + Title = new TableTitle($"[bold]{UI.Title_USB_device}[/]") }; table.HideHeaders(); @@ -160,13 +161,13 @@ sealed class DeviceInfoCommand : Command table.Columns[0].RightAligned(); if(dev.UsbDescriptors != null) - table.AddRow("Descriptor size", $"{dev.UsbDescriptors.Length}"); + table.AddRow(UI.Title_Descriptor_size, $"{dev.UsbDescriptors.Length}"); - table.AddRow("Vendor ID", $"{dev.UsbVendorId:X4}"); - table.AddRow("Product ID", $"{dev.UsbProductId:X4}"); - table.AddRow("Manufacturer", $"{Markup.Escape(dev.UsbManufacturerString ?? "")}"); - table.AddRow("Product", $"{Markup.Escape(dev.UsbProductString ?? "")}"); - table.AddRow("Serial number", $"{Markup.Escape(dev.UsbSerialString ?? "")}"); + table.AddRow(UI.Title_Vendor_ID, $"{dev.UsbVendorId:X4}"); + table.AddRow(UI.Title_Product_ID, $"{dev.UsbProductId:X4}"); + table.AddRow(UI.Title_Manufacturer, Markup.Escape(dev.UsbManufacturerString ?? "")); + table.AddRow(UI.Title_Product, Markup.Escape(dev.UsbProductString ?? "")); + table.AddRow(UI.Title_Serial_number, Markup.Escape(dev.UsbSerialString ?? "")); AnsiConsole.Write(table); AaruConsole.WriteLine(); @@ -176,7 +177,7 @@ sealed class DeviceInfoCommand : Command { table = new Table { - Title = new TableTitle("[bold]FireWire device[/]") + Title = new TableTitle($"[bold]{UI.Title_FireWire_device}[/]") }; table.HideHeaders(); @@ -184,11 +185,11 @@ sealed class DeviceInfoCommand : Command table.AddColumn(""); table.Columns[0].RightAligned(); - table.AddRow("Vendor ID", $"{dev.FireWireVendor:X6}"); - table.AddRow("Model ID", $"{dev.FireWireModel:X6}"); - table.AddRow("Vendor", $"{Markup.Escape(dev.FireWireVendorName ?? "")}"); - table.AddRow("Model", $"{Markup.Escape(dev.FireWireModelName ?? "")}"); - table.AddRow("GUID", $"{dev.FireWireGuid:X16}"); + table.AddRow(UI.Title_Vendor_ID, $"{dev.FireWireVendor:X6}"); + table.AddRow(UI.Title_Model_ID, $"{dev.FireWireModel:X6}"); + table.AddRow(UI.Title_Vendor, $"{Markup.Escape(dev.FireWireVendorName ?? "")}"); + table.AddRow(UI.Title_Model, $"{Markup.Escape(dev.FireWireModelName ?? "")}"); + table.AddRow(UI.Title_GUID, $"{dev.FireWireGuid:X16}"); AnsiConsole.Write(table); AaruConsole.WriteLine(); @@ -196,8 +197,8 @@ sealed class DeviceInfoCommand : Command if(dev.IsPcmcia) { - AaruConsole.WriteLine("[bold]PCMCIA device[/]"); - AaruConsole.WriteLine("PCMCIA CIS is {0} bytes", dev.Cis.Length); + AaruConsole.WriteLine($"[bold]{UI.Title_PCMCIA_device}[/]"); + AaruConsole.WriteLine(UI.PCMCIA_CIS_is_0_bytes, dev.Cis.Length); Tuple[] tuples = CIS.GetTuples(dev.Cis); if(tuples != null) @@ -253,18 +254,18 @@ sealed class DeviceInfoCommand : Command case TupleCodes.CISTPL_SPCL: case TupleCodes.CISTPL_SWIL: case TupleCodes.CISTPL_VERS_2: - AaruConsole.DebugWriteLine("Device-Info command", "Found undecoded tuple ID {0}", + AaruConsole.DebugWriteLine("Device-Info command", UI.Invoke_Found_undecoded_tuple_ID_0, tuple.Code); break; default: - AaruConsole.DebugWriteLine("Device-Info command", "Found unknown tuple ID 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", UI.Found_unknown_tuple_ID_0, (byte)tuple.Code); break; } else - AaruConsole.DebugWriteLine("Device-Info command", "Could not get tuples"); + AaruConsole.DebugWriteLine("Device-Info command", UI.Could_not_get_tuples); } var devInfo = new DeviceInfo(dev); @@ -279,45 +280,45 @@ sealed class DeviceInfoCommand : Command if(devInfo.AtaMcptError.HasValue) { - AaruConsole.WriteLine("Device supports the Media Card Pass Through Command Set"); + AaruConsole.WriteLine(Localization.Core.Device_supports_MCPT_Command_Set); switch(devInfo.AtaMcptError.Value.DeviceHead & 0x7) { case 0: - AaruConsole.WriteLine("Device reports incorrect media card type"); + AaruConsole.WriteLine(Localization.Core.Device_reports_incorrect_media_card_type); break; case 1: - AaruConsole.WriteLine("Device contains a Secure Digital card"); + AaruConsole.WriteLine(Localization.Core.Device_contains_SD_card); break; case 2: - AaruConsole.WriteLine("Device contains a MultiMediaCard "); + AaruConsole.WriteLine(Localization.Core.Device_contains_MMC); break; case 3: - AaruConsole.WriteLine("Device contains a Secure Digital I/O card"); + AaruConsole.WriteLine(Localization.Core.Device_contains_SDIO_card); break; case 4: - AaruConsole.WriteLine("Device contains a Smart Media card"); + AaruConsole.WriteLine(Localization.Core.Device_contains_SM_card); break; default: - AaruConsole.WriteLine("Device contains unknown media card type {0}", + AaruConsole.WriteLine(Localization.Core.Device_contains_unknown_media_card_type_0, devInfo.AtaMcptError.Value.DeviceHead & 0x07); break; } if((devInfo.AtaMcptError.Value.DeviceHead & 0x08) == 0x08) - AaruConsole.WriteLine("Media card is write protected"); + AaruConsole.WriteLine(Localization.Core.Media_card_is_write_protected); ushort specificData = (ushort)((devInfo.AtaMcptError.Value.CylinderHigh * 0x100) + devInfo.AtaMcptError.Value.CylinderLow); if(specificData != 0) - AaruConsole.WriteLine("Card specific data: 0x{0:X4}", specificData); + AaruConsole.WriteLine(Localization.Core.Card_specific_data_0, specificData); } if(decodedIdentify.HasValue) @@ -343,7 +344,9 @@ sealed class DeviceInfoCommand : Command MediaType mediaType = MediaTypeFromDevice.GetFromAta(dev.Manufacturer, dev.Model, removable, dev.IsCompactFlash, dev.IsPcmcia, blocks); - AaruConsole.WriteLine(removable ? "Media identified as {0}" : "Device identified as {0}", mediaType); + AaruConsole. + WriteLine(removable ? Localization.Core.Media_identified_as_0 : Localization.Core.Device_identified_as_0, + mediaType); Statistics.AddMedia(mediaType, true); } @@ -360,7 +363,7 @@ sealed class DeviceInfoCommand : Command if(devInfo.ScsiInquiry != null) { if(dev.Type != DeviceType.ATAPI) - AaruConsole.WriteLine("[bold]SCSI device[/]"); + AaruConsole.WriteLine($"[bold]{UI.Title_SCSI_device}[/]"); DataFile.WriteTo("Device-Info command", outputPrefix, "_scsi_inquiry.bin", "SCSI INQUIRY", devInfo.ScsiInquiryData); @@ -372,14 +375,15 @@ sealed class DeviceInfoCommand : Command switch(page.Key) { case >= 0x01 and <= 0x7F: - AaruConsole.WriteLine("ASCII Page {0:X2}h: {1}", page.Key, + AaruConsole.WriteLine(Localization.Core.ASCII_Page_0_1, page.Key, EVPD.DecodeASCIIPage(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, page.Value); break; case 0x80: - AaruConsole.WriteLine("Unit Serial Number: {0}", EVPD.DecodePage80(page.Value)); + AaruConsole.WriteLine(Localization.Core.Unit_Serial_Number_0, + EVPD.DecodePage80(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -393,7 +397,7 @@ sealed class DeviceInfoCommand : Command break; case 0x82: - AaruConsole.WriteLine("ASCII implemented operating definitions: {0}", + AaruConsole.WriteLine(Localization.Core.ASCII_implemented_operating_definitions_0, EVPD.DecodePage82(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -443,7 +447,7 @@ sealed class DeviceInfoCommand : Command break; case 0xB1: - AaruConsole.WriteLine("Manufacturer-assigned Serial Number: {0}", + AaruConsole.WriteLine(Localization.Core.Manufacturer_assigned_Serial_Number_0, EVPD.DecodePageB1(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -451,7 +455,7 @@ sealed class DeviceInfoCommand : Command break; case 0xB2: - AaruConsole.WriteLine("TapeAlert Supported Flags Bitmap: 0x{0:X16}", + AaruConsole.WriteLine(Localization.Core.TapeAlert_Supported_Flags_Bitmap_0, EVPD.DecodePageB2(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -459,7 +463,7 @@ sealed class DeviceInfoCommand : Command break; case 0xB3: - AaruConsole.WriteLine("Automation Device Serial Number: {0}", + AaruConsole.WriteLine(Localization.Core.Automation_Device_Serial_Number_0, EVPD.DecodePageB3(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -467,7 +471,7 @@ sealed class DeviceInfoCommand : Command break; case 0xB4: - AaruConsole.WriteLine("Data Transfer Device Element Address: 0x{0}", + AaruConsole.WriteLine(Localization.Core.Data_Transfer_Device_Element_Address_0, EVPD.DecodePageB4(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -546,8 +550,8 @@ sealed class DeviceInfoCommand : Command if(page.Key == 0x00) continue; - AaruConsole.DebugWriteLine("Device-Info command", "Found undecoded SCSI VPD page 0x{0:X2}", - page.Key); + AaruConsole.DebugWriteLine("Device-Info command", + Localization.Core.Found_undecoded_SCSI_VPD_page_0, page.Key); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -576,19 +580,20 @@ sealed class DeviceInfoCommand : Command Features.SeparatedFeatures ftr = Features.Separate(devInfo.MmcConfiguration); - AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes", + AaruConsole.DebugWriteLine("Device-Info command", Localization.Core.GET_CONFIGURATION_length_is_0, ftr.DataLength); - AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION current profile is {0:X4}h", + AaruConsole.DebugWriteLine("Device-Info command", + Localization.Core.GET_CONFIGURATION_current_profile_is_0, ftr.CurrentProfile); if(ftr.Descriptors != null) { - AaruConsole.WriteLine("[bold]SCSI MMC GET CONFIGURATION Features:[/]"); + AaruConsole.WriteLine($"[bold]{UI.Title_SCSI_MMC_GET_CONFIGURATION_Features}[/]"); foreach(Features.FeatureDescriptor desc in ftr.Descriptors) { - AaruConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code); + AaruConsole.DebugWriteLine("Device-Info command", Localization.Core.Feature_0, desc.Code); switch(desc.Code) { @@ -825,7 +830,7 @@ sealed class DeviceInfoCommand : Command break; default: - AaruConsole.WriteLine("Found unknown feature code {0:X4}h", desc.Code); + AaruConsole.WriteLine(Localization.Core.Found_unknown_feature_code_0, desc.Code); break; } @@ -833,7 +838,7 @@ sealed class DeviceInfoCommand : Command } else AaruConsole.DebugWriteLine("Device-Info command", - "GET CONFIGURATION returned no feature descriptors"); + Localization.Core.GET_CONFIGURATION_returned_no_feature_descriptors); } if(devInfo.RPC != null) @@ -844,173 +849,165 @@ sealed class DeviceInfoCommand : Command DataFile.WriteTo("Device-Info command", outputPrefix, "_plextor_eeprom.bin", "PLEXTOR READ EEPROM", devInfo.PlextorFeatures.Eeprom); - AaruConsole.WriteLine("Drive has loaded a total of {0} discs", devInfo.PlextorFeatures.Discs); + AaruConsole.WriteLine(Localization.Core.Drive_has_loaded_a_total_of_0_discs, + devInfo.PlextorFeatures.Discs); - AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading CDs", + AaruConsole.WriteLine(Localization.Core.Drive_has_spent_0_hours_1_minutes_and_2_seconds_reading_CDs, devInfo.PlextorFeatures.CdReadTime / 3600, devInfo.PlextorFeatures.CdReadTime / 60 % 60, devInfo.PlextorFeatures.CdReadTime % 60); - AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing CDs", + AaruConsole.WriteLine(Localization.Core.Drive_has_spent_0_hours_1_minutes_and_2_seconds_writing_CDs, devInfo.PlextorFeatures.CdWriteTime / 3600, devInfo.PlextorFeatures.CdWriteTime / 60 % 60, devInfo.PlextorFeatures.CdWriteTime % 60); if(devInfo.PlextorFeatures.IsDvd) { - AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading DVDs", - devInfo.PlextorFeatures.DvdReadTime / 3600, - devInfo.PlextorFeatures.DvdReadTime / 60 % 60, - devInfo.PlextorFeatures.DvdReadTime % 60); + AaruConsole. + WriteLine(Localization.Core.Drive_has_spent_0_hours_1_minutes_and_2_seconds_reading_DVDs, + devInfo.PlextorFeatures.DvdReadTime / 3600, + devInfo.PlextorFeatures.DvdReadTime / 60 % 60, + devInfo.PlextorFeatures.DvdReadTime % 60); - AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing DVDs", - devInfo.PlextorFeatures.DvdWriteTime / 3600, - devInfo.PlextorFeatures.DvdWriteTime / 60 % 60, - devInfo.PlextorFeatures.DvdWriteTime % 60); + AaruConsole. + WriteLine(Localization.Core.Drive_has_spent_0_hours_1_minutes_and_2_seconds_writing_DVDs, + devInfo.PlextorFeatures.DvdWriteTime / 3600, + devInfo.PlextorFeatures.DvdWriteTime / 60 % 60, + devInfo.PlextorFeatures.DvdWriteTime % 60); } } if(devInfo.PlextorFeatures?.PoweRec == true) { - AaruConsole.Write("Drive supports PoweRec"); - if(devInfo.PlextorFeatures.PoweRecEnabled) { - AaruConsole.Write(", has it enabled"); - if(devInfo.PlextorFeatures.PoweRecRecommendedSpeed > 0) - AaruConsole.WriteLine(" and recommends {0} Kb/sec.", + AaruConsole.WriteLine(Localization.Core.Drive_supports_PoweRec_is_enabled_and_recommends_0, devInfo.PlextorFeatures.PoweRecRecommendedSpeed); else - AaruConsole.WriteLine("."); + AaruConsole.WriteLine(Localization.Core.Drive_supports_PoweRec_and_has_it_enabled); if(devInfo.PlextorFeatures.PoweRecSelected > 0) AaruConsole. - WriteLine("Selected PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)", + 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) - AaruConsole.WriteLine("Maximum PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)", - devInfo.PlextorFeatures.PoweRecMax, - devInfo.PlextorFeatures.PoweRecMax / 177); + AaruConsole. + 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) - AaruConsole.WriteLine("Last used PoweRec was {0} Kb/sec ({1}x)", + AaruConsole.WriteLine(Localization.Core.Last_used_PoweRec_was_0_1, devInfo.PlextorFeatures.PoweRecLast, devInfo.PlextorFeatures.PoweRecLast / 177); } else - { - AaruConsole.WriteLine("."); - AaruConsole.WriteLine("PoweRec is disabled"); - } + AaruConsole.WriteLine(Localization.Core.Drive_supports_PoweRec_and_has_it_disabled); } if(devInfo.PlextorFeatures?.SilentMode == true) { - AaruConsole.WriteLine("Drive supports Plextor SilentMode"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_Plextor_SilentMode); if(devInfo.PlextorFeatures.SilentModeEnabled) { - AaruConsole.WriteLine("Plextor SilentMode is enabled:"); + AaruConsole.WriteLine(Localization.Core.Plextor_SilentMode_is_enabled); - AaruConsole.WriteLine(devInfo.PlextorFeatures.AccessTimeLimit == 2 ? "\tAccess time is slow" - : "\tAccess time is fast"); + AaruConsole.WriteLine("\t" + (devInfo.PlextorFeatures.AccessTimeLimit == 2 + ? Localization.Core.Access_time_is_slow + : Localization.Core.Access_time_is_fast)); if(devInfo.PlextorFeatures.CdReadSpeedLimit > 0) - AaruConsole.WriteLine("\tCD read speed limited to {0}x", + AaruConsole.WriteLine("\t" + Localization.Core.CD_read_speed_limited_to_0, devInfo.PlextorFeatures.CdReadSpeedLimit); if(devInfo.PlextorFeatures.DvdReadSpeedLimit > 0 && devInfo.PlextorFeatures.IsDvd) - AaruConsole.WriteLine("\tDVD read speed limited to {0}x", + AaruConsole.WriteLine("\t" + Localization.Core.DVD_read_speed_limited_to_0, devInfo.PlextorFeatures.DvdReadSpeedLimit); if(devInfo.PlextorFeatures.CdWriteSpeedLimit > 0) - AaruConsole.WriteLine("\tCD write speed limited to {0}x", + AaruConsole.WriteLine("\t" + Localization.Core.CD_write_speed_limited_to_0, devInfo.PlextorFeatures.CdWriteSpeedLimit); } } if(devInfo.PlextorFeatures?.GigaRec == true) - AaruConsole.WriteLine("Drive supports Plextor GigaRec"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_Plextor_GigaRec); if(devInfo.PlextorFeatures?.SecuRec == true) - AaruConsole.WriteLine("Drive supports Plextor SecuRec"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_Plextor_SecuRec); if(devInfo.PlextorFeatures?.SpeedRead == true) - { - AaruConsole.Write("Drive supports Plextor SpeedRead"); - - if(devInfo.PlextorFeatures.SpeedReadEnabled) - AaruConsole.WriteLine("and has it enabled"); - else - AaruConsole.WriteLine(); - } + AaruConsole.WriteLine(devInfo.PlextorFeatures.SpeedReadEnabled + ? Localization.Core.Drive_supports_Plextor_SpeedRead_and_has_it_enabled + : Localization.Core.Drive_supports_Plextor_SpeedRead); if(devInfo.PlextorFeatures?.Hiding == true) { - AaruConsole.WriteLine("Drive supports hiding CD-Rs and forcing single session"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_hiding_CDRs_and_forcing_single_session); if(devInfo.PlextorFeatures.HidesRecordables) - AaruConsole.WriteLine("Drive currently hides CD-Rs"); + AaruConsole.WriteLine(Localization.Core.Drive_currently_hides_CDRs); if(devInfo.PlextorFeatures.HidesSessions) - AaruConsole.WriteLine("Drive currently forces single session"); + AaruConsole.WriteLine(Localization.Core.Drive_currently_forces_single_session); } if(devInfo.PlextorFeatures?.VariRec == true) - AaruConsole.WriteLine("Drive supports Plextor VariRec"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_Plextor_VariRec); if(devInfo.PlextorFeatures?.IsDvd == true) { if(devInfo.PlextorFeatures.VariRecDvd) - AaruConsole.WriteLine("Drive supports Plextor VariRec for DVDs"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_Plextor_VariRec_for_DVDs); if(devInfo.PlextorFeatures.BitSetting) - AaruConsole.WriteLine("Drive supports bitsetting DVD+R book type"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_bitsetting_DVD_R_book_type); if(devInfo.PlextorFeatures.BitSettingDl) - AaruConsole.WriteLine("Drive supports bitsetting DVD+R DL book type"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_bitsetting_DVD_R_DL_book_type); if(devInfo.PlextorFeatures.DvdPlusWriteTest) - AaruConsole.WriteLine("Drive supports test writing DVD+"); + AaruConsole.WriteLine(Localization.Core.Drive_supports_test_writing_DVD_Plus); } if(devInfo.ScsiInquiry.Value.KreonPresent) { - AaruConsole.WriteLine("[bold]Drive has kreon firmware:[/]"); + AaruConsole.WriteLine($"[bold]{UI.Title_Drive_has_kreon_firmware}[/]"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ChallengeResponse)) - AaruConsole.WriteLine("\tCan do challenge/response with Xbox discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_do_challenge_response_with_Xbox_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.DecryptSs)) - AaruConsole.WriteLine("\tCan read and decrypt SS from Xbox discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_read_and_decrypt_SS_from_Xbox_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.XtremeUnlock)) - AaruConsole.WriteLine("\tCan set xtreme unlock state with Xbox discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_set_xtreme_unlock_state_with_Xbox_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.WxripperUnlock)) - AaruConsole.WriteLine("\tCan set wxripper unlock state with Xbox discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_set_wxripper_unlock_state_with_Xbox_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ChallengeResponse360)) - AaruConsole.WriteLine("\tCan do challenge/response with Xbox 360 discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_do_challenge_response_with_Xbox_360_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.DecryptSs360)) - AaruConsole.WriteLine("\tCan read and decrypt SS from Xbox 360 discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_read_and_decrypt_SS_from_Xbox_360_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.XtremeUnlock360)) - AaruConsole.WriteLine("\tCan set xtreme unlock state with Xbox 360 discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_set_xtreme_unlock_state_with_Xbox_360_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.WxripperUnlock360)) - AaruConsole.WriteLine("\tCan set wxripper unlock state with Xbox 360 discs"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_set_wxripper_unlock_state_with_Xbox_360_discs); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.Lock)) - AaruConsole.WriteLine("\tCan set locked state"); + AaruConsole.WriteLine("\t" + Localization.Core.Can_set_Kreon_locked_state); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ErrorSkipping)) - AaruConsole.WriteLine("\tCan skip read errors"); + AaruConsole.WriteLine("\t" + Localization.Core.Kreon_Can_skip_read_errors); } if(devInfo.BlockLimits != null) @@ -1018,7 +1015,7 @@ sealed class DeviceInfoCommand : Command DataFile.WriteTo("Device-Info command", outputPrefix, "_ssc_readblocklimits.bin", "SSC READ BLOCK LIMITS", devInfo.BlockLimits); - AaruConsole.WriteLine("Block limits for device:"); + AaruConsole.WriteLine(Localization.Core.Block_limits_for_device); AaruConsole.WriteLine(BlockLimits.Prettify(devInfo.BlockLimits)); } diff --git a/Aaru/Commands/Device/List.cs b/Aaru/Commands/Device/List.cs index 4ee61cc1e..1b480f495 100644 --- a/Aaru/Commands/Device/List.cs +++ b/Aaru/Commands/Device/List.cs @@ -37,6 +37,7 @@ using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; using Aaru.Devices; +using Aaru.Localization; using JetBrains.Annotations; using Spectre.Console; @@ -44,12 +45,12 @@ namespace Aaru.Commands.Device; sealed class ListDevicesCommand : Command { - public ListDevicesCommand() : base("list", "Lists all connected devices.") + public ListDevicesCommand() : base("list", UI.Device_List_Command_Description) { AddArgument(new Argument { Arity = ArgumentArity.ZeroOrOne, - Description = "aaruremote host", + Description = UI.aaruremote_host, Name = "aaru-remote-host" }); @@ -101,16 +102,16 @@ sealed class ListDevicesCommand : Command if(devices == null || devices.Length == 0) - AaruConsole.WriteLine("No known devices attached."); + AaruConsole.WriteLine(UI.No_known_devices_attached); else { Table table = new(); - table.AddColumn("Path"); - table.AddColumn("Vendor"); - table.AddColumn("Model"); - table.AddColumn("Serial"); - table.AddColumn("Bus"); - table.AddColumn("Supported?"); + table.AddColumn(UI.Path); + table.AddColumn(UI.Title_Vendor); + table.AddColumn(UI.Title_Model); + table.AddColumn(UI.Serial); + table.AddColumn(UI.Title_Bus); + table.AddColumn(UI.Supported_Question); foreach(DeviceInfo dev in devices.OrderBy(d => d.Path)) table.AddRow(Markup.Escape(dev.Path ?? ""), Markup.Escape(dev.Vendor ?? ""), diff --git a/Aaru/Commands/Filesystem/ExtractFiles.cs b/Aaru/Commands/Filesystem/ExtractFiles.cs index b352ba1ce..7ec247644 100644 --- a/Aaru/Commands/Filesystem/ExtractFiles.cs +++ b/Aaru/Commands/Filesystem/ExtractFiles.cs @@ -43,6 +43,7 @@ using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using JetBrains.Annotations; using Spectre.Console; using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes; @@ -53,39 +54,39 @@ sealed class ExtractFilesCommand : Command { const long BUFFER_SIZE = 16777216; - public ExtractFilesCommand() : base("extract", "Extracts all files in disc image.") + public ExtractFilesCommand() : base("extract", UI.Filesystem_Extract_Command_Description) { Add(new Option(new[] { "--encoding", "-e" - }, () => null, "Name of character encoding to use.")); + }, () => null, UI.Name_of_character_encoding_to_use)); Add(new Option(new[] { "--options", "-O" - }, () => null, "Comma separated name=value pairs of options to pass to filesystem plugin.")); + }, () => null, UI.Comma_separated_name_value_pairs_of_filesystem_options)); Add(new Option(new[] { "--xattrs", "-x" - }, () => false, "Extract extended attributes if present.")); + }, () => false, UI.Extract_extended_attributes_if_present)); Add(new Option(new[] { "--namespace", "-n" - }, () => null, "Namespace to use for filenames.")); + }, () => null, UI.Namespace_to_use_for_filenames)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Disc image path", + Description = UI.Disc_image_path, Name = "image-path" }); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Directory where extracted files will be created. Will abort if it exists", + Description = UI.Directory_where_extracted_files_will_be_created, Name = "output-dir" }); @@ -137,12 +138,12 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); Dictionary parsedOptions = Core.Options.Parse(options); - AaruConsole.DebugWriteLine("Extract-Files command", "Parsed options:"); + AaruConsole.DebugWriteLine("Extract-Files command", UI.Parsed_options); foreach(KeyValuePair parsedOption in parsedOptions) AaruConsole.DebugWriteLine("Extract-Files command", "{0} = {1}", parsedOption.Key, parsedOption.Value); @@ -151,7 +152,7 @@ sealed class ExtractFilesCommand : Command if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -164,11 +165,11 @@ sealed class ExtractFilesCommand : Command encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine(UI.encoding_for_0, encodingClass.EncodingName); } catch(ArgumentException) { - AaruConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine(UI.Specified_encoding_is_not_supported); return (int)ErrorNumber.EncodingUnknown; } @@ -182,33 +183,33 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); baseImage = ImageFormat.Detect(inputFilter); imageFormat = baseImage as IMediaImage; }); if(baseImage == null) { - AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine(UI.Image_format_not_identified_not_proceeding_with_file_extraction); return (int)ErrorNumber.UnrecognizedFormat; } if(imageFormat == null) { - AaruConsole.WriteLine("Command not supported for this image type."); + AaruConsole.WriteLine(UI.Command_not_supported_for_this_image_type); return (int)ErrorNumber.InvalidArgument; } if(verbose) - AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); + AaruConsole.VerboseWriteLine(UI.Image_format_identified_by_0_1, imageFormat.Name, imageFormat.Id); else - AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine(UI.Image_format_identified_by_0, imageFormat.Name); if(outputDir == null) { - AaruConsole.WriteLine("Output directory missing."); + AaruConsole.WriteLine(UI.Output_directory_missing); return (int)ErrorNumber.MissingArgument; } @@ -216,7 +217,7 @@ sealed class ExtractFilesCommand : Command if(Directory.Exists(outputDir) || File.Exists(outputDir)) { - AaruConsole.ErrorWriteLine("Destination exists, aborting."); + AaruConsole.ErrorWriteLine(UI.Destination_exists_aborting); return (int)ErrorNumber.FileExists; } @@ -229,26 +230,26 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = imageFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image format"); - AaruConsole.WriteLine("Error {0}", opened); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } - AaruConsole.DebugWriteLine("Extract-Files command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Extract-Files command", UI.Correctly_opened_image_file); - AaruConsole.DebugWriteLine("Extract-Files command", "Image without headers is {0} bytes.", + AaruConsole.DebugWriteLine("Extract-Files command", UI.Image_without_headers_is_0_bytes, imageFormat.Info.ImageSize); - AaruConsole.DebugWriteLine("Extract-Files command", "Image has {0} sectors.", imageFormat.Info.Sectors); + AaruConsole.DebugWriteLine("Extract-Files command", UI.Image_has_0_sectors, imageFormat.Info.Sectors); - AaruConsole.DebugWriteLine("Extract-Files command", "Image identifies disk type as {0}.", + AaruConsole.DebugWriteLine("Extract-Files command", UI.Image_identifies_disk_type_as_0, imageFormat.Info.MediaType); Statistics.AddMediaFormat(imageFormat.Format); @@ -257,8 +258,8 @@ sealed class ExtractFilesCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); - AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_image_format); + AaruConsole.ErrorWriteLine(UI.Error_0, ex.Message); return (int)ErrorNumber.CannotOpenFormat; } @@ -267,7 +268,7 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Enumerating partitions...").IsIndeterminate(); + ctx.AddTask(UI.Enumerating_partitions).IsIndeterminate(); partitions = Core.Partitions.GetAll(imageFormat); }); @@ -275,11 +276,11 @@ sealed class ExtractFilesCommand : Command if(partitions.Count == 0) { - AaruConsole.DebugWriteLine("Ls command", "No partitions found"); + AaruConsole.DebugWriteLine("Ls command", UI.No_partitions_found); partitions.Add(new Partition { - Description = "Whole device", + Description = Localization.Core.Whole_device, Length = imageFormat.Info.Sectors, Offset = 0, Size = imageFormat.Info.SectorSize * imageFormat.Info.Sectors, @@ -288,23 +289,23 @@ sealed class ExtractFilesCommand : Command }); } - AaruConsole.WriteLine("{0} partitions found.", partitions.Count); + AaruConsole.WriteLine(UI._0_partitions_found, partitions.Count); for(int i = 0; i < partitions.Count; i++) { AaruConsole.WriteLine(); - AaruConsole.WriteLine("[bold]Partition {0}:[/]", partitions[i].Sequence); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Partition_0, partitions[i].Sequence)}[/]"); List idPlugins = null; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying filesystems on partition...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_filesystems_on_partition).IsIndeterminate(); Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]); }); if(idPlugins.Count == 0) - AaruConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine(UI.Filesystem_not_identified); else { IReadOnlyFilesystem plugin; @@ -312,12 +313,13 @@ sealed class ExtractFilesCommand : Command if(idPlugins.Count > 1) { - AaruConsole.WriteLine($"[italic]Identified by {idPlugins.Count} plugins[/]"); + AaruConsole.WriteLine($"[italic]{string.Format(UI.Identified_by_0_plugins, idPlugins.Count) + }[/]"); foreach(string pluginName in idPlugins) if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { - AaruConsole.WriteLine($"[bold]As identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.As_identified_by_0, plugin.Name)}[/]"); var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?. Invoke(Array.Empty()); @@ -327,7 +329,7 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Mounting filesystem...").IsIndeterminate(); + ctx.AddTask(UI.Mounting_filesystem).IsIndeterminate(); error = fs.Mount(imageFormat, partitions[i], encodingClass, parsedOptions, @namespace); @@ -343,7 +345,7 @@ sealed class ExtractFilesCommand : Command Statistics.AddFilesystem(fs.XmlFsType.Type); } else - AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine(UI.Unable_to_mount_volume_error_0, error.ToString()); } } else @@ -353,7 +355,7 @@ sealed class ExtractFilesCommand : Command if(plugin == null) continue; - AaruConsole.WriteLine($"[bold]Identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Identified_by_0, plugin.Name)}[/]"); var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?. Invoke(Array.Empty()); @@ -363,7 +365,7 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Mounting filesystem...").IsIndeterminate(); + ctx.AddTask(UI.Mounting_filesystem).IsIndeterminate(); error = fs.Mount(imageFormat, partitions[i], encodingClass, parsedOptions, @namespace); }); @@ -377,14 +379,14 @@ sealed class ExtractFilesCommand : Command Statistics.AddFilesystem(fs.XmlFsType.Type); } else - AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine(UI.Unable_to_mount_volume_error_0, error.ToString()); } } } } catch(Exception ex) { - AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_reading_file_0, ex.Message)); AaruConsole.DebugWriteLine("Extract-Files command", ex.StackTrace); return (int)ErrorNumber.UnexpectedException; @@ -403,7 +405,7 @@ sealed class ExtractFilesCommand : Command if(error != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString()); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_directory_1, error.ToString(), path); return; } @@ -414,7 +416,7 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Retrieving file information...").IsIndeterminate(); + ctx.AddTask(UI.Retrieving_file_information).IsIndeterminate(); error = fs.Stat(path + "/" + entry, out stat); }); @@ -433,7 +435,7 @@ sealed class ExtractFilesCommand : Command Directory.CreateDirectory(outputPath); - AaruConsole.WriteLine("Created subdirectory at {0}", Markup.Escape(outputPath)); + AaruConsole.WriteLine(UI.Created_subdirectory_at_0, Markup.Escape(outputPath)); ExtractFilesInDir(path + "/" + entry, fs, volumeName, outputDir, doXattrs); @@ -482,7 +484,7 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Listing extended attributes...").IsIndeterminate(); + ctx.AddTask(UI.Listing_extended_attributes).IsIndeterminate(); error = fs.ListXAttr(path + "/" + entry, out xattrs); }); @@ -493,7 +495,7 @@ sealed class ExtractFilesCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Reading extended attribute...").IsIndeterminate(); + ctx.AddTask(UI.Reading_extended_attribute).IsIndeterminate(); error = fs.GetXattr(path + "/" + entry, xattr, ref xattrBuf); }); @@ -525,7 +527,7 @@ sealed class ExtractFilesCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Writing extended attribute...").IsIndeterminate(); + ctx.AddTask(UI.Writing_extended_attribute).IsIndeterminate(); outputFile = new FileStream(outputPath, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None); @@ -566,12 +568,11 @@ sealed class ExtractFilesCommand : Command // ignored } #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body - AaruConsole.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}", - xattrBuf.Length, xattr, entry, outputPath); + AaruConsole.WriteLine(UI.Written_0_bytes_of_xattr_1_from_file_2_to_3, xattrBuf.Length, + xattr, entry, outputPath); } else - AaruConsole.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists", xattr, - entry); + AaruConsole.ErrorWriteLine(UI.Cannot_write_xattr_0_for_1_output_exists, xattr, entry); } } @@ -603,7 +604,8 @@ sealed class ExtractFilesCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask task = ctx.AddTask($"Reading file {Markup.Escape(entry)}..."); + ProgressTask task = + ctx.AddTask(string.Format(UI.Reading_file_0, Markup.Escape(entry))); task.MaxValue = stat.Length; byte[] outBuf = null; @@ -623,7 +625,7 @@ sealed class ExtractFilesCommand : Command outputFile.Write(outBuf, 0, (int)bytesToRead); else { - AaruConsole.ErrorWriteLine("Error {0} reading file {1}", error, entry); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_file_1, error, entry); break; } @@ -667,14 +669,14 @@ sealed class ExtractFilesCommand : Command // ignored } #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body - AaruConsole.WriteLine("Written {0} bytes of file {1} to {2}", position, Markup.Escape(entry), + AaruConsole.WriteLine(UI.Written_0_bytes_of_file_1_to_2, position, Markup.Escape(entry), Markup.Escape(outputPath)); } else - AaruConsole.ErrorWriteLine("Cannot write file {0}, output exists", Markup.Escape(entry)); + AaruConsole.ErrorWriteLine(UI.Cannot_write_file_0_output_exists, Markup.Escape(entry)); } else - AaruConsole.ErrorWriteLine("Error reading file {0}", Markup.Escape(entry)); + AaruConsole.ErrorWriteLine(UI.Error_reading_file_0, Markup.Escape(entry)); } } } \ No newline at end of file diff --git a/Aaru/Commands/Filesystem/FilesystemFamily.cs b/Aaru/Commands/Filesystem/FilesystemFamily.cs index d70a78639..bcdef68b0 100644 --- a/Aaru/Commands/Filesystem/FilesystemFamily.cs +++ b/Aaru/Commands/Filesystem/FilesystemFamily.cs @@ -31,12 +31,13 @@ // ****************************************************************************/ using System.CommandLine; +using Aaru.Localization; namespace Aaru.Commands.Filesystem; sealed class FilesystemFamily : Command { - public FilesystemFamily() : base("filesystem", "Commands to manage filesystems") + public FilesystemFamily() : base("filesystem", UI.Filesystem_Command_Family_Description) { AddAlias("fi"); AddAlias("fs"); diff --git a/Aaru/Commands/Filesystem/Info.cs b/Aaru/Commands/Filesystem/Info.cs index bb2b2763d..7a198a9df 100644 --- a/Aaru/Commands/Filesystem/Info.cs +++ b/Aaru/Commands/Filesystem/Info.cs @@ -40,34 +40,34 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Filesystem; sealed class FilesystemInfoCommand : Command { - public FilesystemInfoCommand() : base("info", - "Opens a disc image and prints info on the found partitions and/or filesystems.") + public FilesystemInfoCommand() : base("info", UI.Filesystem_Info_Command_Description) { Add(new Option(new[] { "--encoding", "-e" - }, () => null, "Name of character encoding to use.")); + }, () => null, UI.Name_of_character_encoding_to_use)); Add(new Option(new[] { "--filesystems", "-f" - }, () => true, "Searches and prints information about filesystems.")); + }, () => true, UI.Searches_and_prints_information_about_filesystems)); Add(new Option(new[] { "--partitions", "-p" - }, () => true, "Searches and interprets partitions.")); + }, () => true, UI.Searches_and_interprets_partitions)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -118,13 +118,13 @@ sealed class FilesystemInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -137,11 +137,11 @@ sealed class FilesystemInfoCommand : Command encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine(UI.encoding_for_0, encodingClass.EncodingName); } catch(ArgumentException) { - AaruConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine(UI.Specified_encoding_is_not_supported); return (int)ErrorNumber.EncodingUnknown; } @@ -157,29 +157,29 @@ sealed class FilesystemInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); baseImage = ImageFormat.Detect(inputFilter); imageFormat = baseImage as IMediaImage; }); if(baseImage == null) { - AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine(UI.Image_format_not_identified_not_proceeding_with_analysis); return (int)ErrorNumber.UnrecognizedFormat; } if(imageFormat == null) { - AaruConsole.WriteLine("Command not supported for this image type."); + AaruConsole.WriteLine(UI.Command_not_supported_for_this_image_type); return (int)ErrorNumber.InvalidArgument; } if(verbose) - AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); + AaruConsole.VerboseWriteLine(UI.Image_format_identified_by_0_1, imageFormat.Name, imageFormat.Id); else - AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine(UI.Image_format_identified_by_0, imageFormat.Name); AaruConsole.WriteLine(); @@ -189,14 +189,14 @@ sealed class FilesystemInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = imageFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image format"); - AaruConsole.WriteLine("Error {0}", opened); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -213,9 +213,9 @@ sealed class FilesystemInfoCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); - AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); - AaruConsole.DebugWriteLine("Fs-info command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_image_format); + AaruConsole.ErrorWriteLine(UI.Error_0, ex.Message); + AaruConsole.DebugWriteLine("Fs-info command", Localization.Core.Stack_trace_0, ex.StackTrace); return (int)ErrorNumber.CannotOpenFormat; } @@ -230,7 +230,7 @@ sealed class FilesystemInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Enumerating partitions...").IsIndeterminate(); + ctx.AddTask(UI.Enumerating_partitions).IsIndeterminate(); partitionsList = Core.Partitions.GetAll(imageFormat); }); @@ -238,11 +238,11 @@ sealed class FilesystemInfoCommand : Command if(partitionsList.Count == 0) { - AaruConsole.DebugWriteLine("Fs-info command", "No partitions found"); + AaruConsole.DebugWriteLine("Fs-info command", UI.No_partitions_found); if(!filesystems) { - AaruConsole.WriteLine("No partitions founds, not searching for filesystems"); + AaruConsole.WriteLine(UI.No_partitions_founds_not_searching_for_filesystems); return (int)ErrorNumber.NothingFound; } @@ -251,27 +251,32 @@ sealed class FilesystemInfoCommand : Command } else { - AaruConsole.WriteLine("{0} partitions found.", partitionsList.Count); + AaruConsole.WriteLine(UI._0_partitions_found, partitionsList.Count); for(int i = 0; i < partitionsList.Count; i++) { Table table = new() { - Title = new TableTitle($"Partition {partitionsList[i].Sequence}:") + Title = new TableTitle(string.Format(UI.Partition_0, partitionsList[i].Sequence)) }; table.AddColumn(""); table.AddColumn(""); table.HideHeaders(); - table.AddRow("Name", Markup.Escape(partitionsList[i].Name ?? "")); - table.AddRow("Type", Markup.Escape(partitionsList[i].Type ?? "")); - table.AddRow("Start", $"sector {partitionsList[i].Start}, byte {partitionsList[i].Offset}"); + table.AddRow(UI.Title_Name, Markup.Escape(partitionsList[i].Name ?? "")); + table.AddRow(UI.Title_Type, Markup.Escape(partitionsList[i].Type ?? "")); - table.AddRow("Length", $"{partitionsList[i].Length} sectors, {partitionsList[i].Size} bytes"); + table.AddRow(UI.Title_Start, + string.Format(UI.sector_0_byte_1, partitionsList[i].Start, + partitionsList[i].Offset)); - table.AddRow("Scheme", Markup.Escape(partitionsList[i].Scheme ?? "")); - table.AddRow("Description", Markup.Escape(partitionsList[i].Description ?? "")); + table.AddRow(UI.Title_Length, + string.Format(UI._0_sectors_1_bytes, partitionsList[i].Length, + partitionsList[i].Size)); + + table.AddRow(UI.Title_Scheme, Markup.Escape(partitionsList[i].Scheme ?? "")); + table.AddRow(UI.Title_Description, Markup.Escape(partitionsList[i].Description ?? "")); AnsiConsole.Write(table); @@ -280,24 +285,26 @@ sealed class FilesystemInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying filesystems on partition...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_filesystems_on_partition).IsIndeterminate(); Core.Filesystems.Identify(imageFormat, out idPlugins, partitionsList[i]); }); switch(idPlugins.Count) { case 0: - AaruConsole.WriteLine("[bold]Filesystem not identified[/]"); + AaruConsole.WriteLine($"[bold]{UI.Filesystem_not_identified}[/]"); break; case > 1: { - AaruConsole.WriteLine($"[italic]Identified by {idPlugins.Count} plugins[/]"); + AaruConsole.WriteLine($"[italic]{string.Format(UI.Identified_by_0_plugins, + idPlugins.Count)}[/]"); foreach(string pluginName in idPlugins) if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) { - AaruConsole.WriteLine($"[bold]As identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.As_identified_by_0, plugin.Name) + }[/]"); plugin.GetInformation(imageFormat, partitionsList[i], out information, encodingClass); @@ -315,7 +322,7 @@ sealed class FilesystemInfoCommand : Command if(plugin == null) continue; - AaruConsole.WriteLine($"[bold]Identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Identified_by_0, plugin.Name)}[/]"); plugin.GetInformation(imageFormat, partitionsList[i], out information, encodingClass); AaruConsole.Write("{0}", information); Statistics.AddFilesystem(plugin.XmlFsType.Type); @@ -333,31 +340,32 @@ sealed class FilesystemInfoCommand : Command { var wholePart = new Partition { - Name = "Whole device", + Name = Localization.Core.Whole_device, Length = imageFormat.Info.Sectors, Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize }; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying filesystems...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_filesystems).IsIndeterminate(); Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); }); switch(idPlugins.Count) { case 0: - AaruConsole.WriteLine("[bold]Filesystem not identified[/]"); + AaruConsole.WriteLine($"[bold]{UI.Filesystem_not_identified}[/]"); break; case > 1: { - AaruConsole.WriteLine($"[italic]Identified by {idPlugins.Count} plugins[/]"); + AaruConsole.WriteLine($"[italic]{string.Format(UI.Identified_by_0_plugins, idPlugins.Count) + }[/]"); foreach(string pluginName in idPlugins) if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) { - AaruConsole.WriteLine($"[bold]As identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.As_identified_by_0, plugin.Name)}[/]"); plugin.GetInformation(imageFormat, wholePart, out information, encodingClass); AaruConsole.Write(information); Statistics.AddFilesystem(plugin.XmlFsType.Type); @@ -371,7 +379,7 @@ sealed class FilesystemInfoCommand : Command if(plugin != null) { - AaruConsole.WriteLine($"[bold]Identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Identified_by_0, plugin.Name)}[/]"); plugin.GetInformation(imageFormat, wholePart, out information, encodingClass); AaruConsole.Write(information); Statistics.AddFilesystem(plugin.XmlFsType.Type); @@ -384,7 +392,7 @@ sealed class FilesystemInfoCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_reading_file_0, ex.Message)); AaruConsole.DebugWriteLine("Fs-info command", ex.StackTrace); return (int)ErrorNumber.UnexpectedException; diff --git a/Aaru/Commands/Filesystem/Ls.cs b/Aaru/Commands/Filesystem/Ls.cs index 0249541fb..43aeb459f 100644 --- a/Aaru/Commands/Filesystem/Ls.cs +++ b/Aaru/Commands/Filesystem/Ls.cs @@ -42,6 +42,7 @@ using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using JetBrains.Annotations; using Spectre.Console; @@ -49,34 +50,34 @@ namespace Aaru.Commands.Filesystem; sealed class LsCommand : Command { - public LsCommand() : base("list", "Lists files in disc image.") + public LsCommand() : base("list", UI.Filesystem_List_Command_Description) { AddAlias("ls"); Add(new Option(new[] { "--encoding", "-e" - }, () => null, "Name of character encoding to use.")); + }, () => null, UI.Name_of_character_encoding_to_use)); Add(new Option(new[] { "--long-format", "-l" - }, () => true, "Uses long format.")); + }, () => true, UI.Use_long_format)); Add(new Option(new[] { "--options", "-O" - }, () => null, "Comma separated name=value pairs of options to pass to filesystem plugin.")); + }, () => null, UI.Comma_separated_name_value_pairs_of_filesystem_options)); Add(new Option(new[] { "--namespace", "-n" - }, () => null, "Namespace to use for filenames.")); + }, () => null, UI.Namespace_to_use_for_filenames)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -125,12 +126,12 @@ sealed class LsCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); Dictionary parsedOptions = Core.Options.Parse(options); - AaruConsole.DebugWriteLine("Ls command", "Parsed options:"); + AaruConsole.DebugWriteLine("Ls command", UI.Parsed_options); foreach(KeyValuePair parsedOption in parsedOptions) AaruConsole.DebugWriteLine("Ls command", "{0} = {1}", parsedOption.Key, parsedOption.Value); @@ -139,7 +140,7 @@ sealed class LsCommand : Command if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -152,11 +153,11 @@ sealed class LsCommand : Command encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine(UI.encoding_for_0, encodingClass.EncodingName); } catch(ArgumentException) { - AaruConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine(UI.Specified_encoding_is_not_supported); return (int)ErrorNumber.EncodingUnknown; } @@ -170,29 +171,29 @@ sealed class LsCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); baseImage = ImageFormat.Detect(inputFilter); imageFormat = baseImage as IMediaImage; }); if(baseImage == null) { - AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine(UI.Image_format_not_identified_not_proceeding_with_listing); return (int)ErrorNumber.UnrecognizedFormat; } if(imageFormat == null) { - AaruConsole.WriteLine("Command not supported for this image type."); + AaruConsole.WriteLine(UI.Command_not_supported_for_this_image_type); return (int)ErrorNumber.InvalidArgument; } if(verbose) - AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); + AaruConsole.VerboseWriteLine(UI.Image_format_identified_by_0_1, imageFormat.Name, imageFormat.Id); else - AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine(UI.Image_format_identified_by_0, imageFormat.Name); try { @@ -200,26 +201,26 @@ sealed class LsCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = imageFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image format"); - AaruConsole.WriteLine("Error {0}", opened); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } - AaruConsole.DebugWriteLine("Ls command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Ls command", UI.Correctly_opened_image_file); - AaruConsole.DebugWriteLine("Ls command", "Image without headers is {0} bytes.", + AaruConsole.DebugWriteLine("Ls command", UI.Image_without_headers_is_0_bytes, imageFormat.Info.ImageSize); - AaruConsole.DebugWriteLine("Ls command", "Image has {0} sectors.", imageFormat.Info.Sectors); + AaruConsole.DebugWriteLine("Ls command", UI.Image_has_0_sectors, imageFormat.Info.Sectors); - AaruConsole.DebugWriteLine("Ls command", "Image identifies disk type as {0}.", + AaruConsole.DebugWriteLine("Ls command", UI.Image_identifies_disk_type_as_0, imageFormat.Info.MediaType); Statistics.AddMediaFormat(imageFormat.Format); @@ -228,8 +229,8 @@ sealed class LsCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); - AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_image_format); + AaruConsole.ErrorWriteLine(UI.Error_0, ex.Message); return (int)ErrorNumber.CannotOpenFormat; } @@ -238,7 +239,7 @@ sealed class LsCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Enumerating partitions...").IsIndeterminate(); + ctx.AddTask(UI.Enumerating_partitions).IsIndeterminate(); partitions = Core.Partitions.GetAll(imageFormat); }); @@ -246,11 +247,11 @@ sealed class LsCommand : Command if(partitions.Count == 0) { - AaruConsole.DebugWriteLine("Ls command", "No partitions found"); + AaruConsole.DebugWriteLine("Ls command", UI.No_partitions_found); partitions.Add(new Partition { - Description = "Whole device", + Description = Localization.Core.Whole_device, Length = imageFormat.Info.Sectors, Offset = 0, Size = imageFormat.Info.SectorSize * imageFormat.Info.Sectors, @@ -259,23 +260,23 @@ sealed class LsCommand : Command }); } - AaruConsole.WriteLine("{0} partitions found.", partitions.Count); + AaruConsole.WriteLine(UI._0_partitions_found, partitions.Count); for(int i = 0; i < partitions.Count; i++) { AaruConsole.WriteLine(); - AaruConsole.WriteLine("[bold]Partition {0}:[/]", partitions[i].Sequence); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Partition_0, partitions[i].Sequence)}[/]"); List idPlugins = null; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying filesystems on partition...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_filesystems_on_partition).IsIndeterminate(); Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]); }); if(idPlugins.Count == 0) - AaruConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine(UI.Filesystem_not_identified); else { IReadOnlyFilesystem plugin; @@ -283,12 +284,13 @@ sealed class LsCommand : Command if(idPlugins.Count > 1) { - AaruConsole.WriteLine($"[italic]Identified by {idPlugins.Count} plugins[/]"); + AaruConsole.WriteLine($"[italic]{string.Format(UI.Identified_by_0_plugins, idPlugins.Count) + }[/]"); foreach(string pluginName in idPlugins) if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { - AaruConsole.WriteLine($"[bold]As identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.As_identified_by_0, plugin.Name)}[/]"); var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?. Invoke(Array.Empty()); @@ -298,7 +300,7 @@ sealed class LsCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Mounting filesystem...").IsIndeterminate(); + ctx.AddTask(UI.Mounting_filesystem).IsIndeterminate(); error = fs.Mount(imageFormat, partitions[i], encodingClass, parsedOptions, @namespace); @@ -311,7 +313,7 @@ sealed class LsCommand : Command Statistics.AddFilesystem(fs.XmlFsType.Type); } else - AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine(UI.Unable_to_mount_volume_error_0, error.ToString()); } } else @@ -321,7 +323,7 @@ sealed class LsCommand : Command if(plugin == null) continue; - AaruConsole.WriteLine($"[bold]Identified by {plugin.Name}.[/]"); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Identified_by_0, plugin.Name)}[/]"); var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?. Invoke(Array.Empty()); @@ -331,7 +333,7 @@ sealed class LsCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Mounting filesystem...").IsIndeterminate(); + ctx.AddTask(UI.Mounting_filesystem).IsIndeterminate(); error = fs.Mount(imageFormat, partitions[i], encodingClass, parsedOptions, @namespace); }); @@ -342,14 +344,14 @@ sealed class LsCommand : Command Statistics.AddFilesystem(fs.XmlFsType.Type); } else - AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine(UI.Unable_to_mount_volume_error_0, error.ToString()); } } } } catch(Exception ex) { - AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_reading_file_0, ex.Message)); AaruConsole.DebugWriteLine("Ls command", ex.StackTrace); return (int)ErrorNumber.UnexpectedException; @@ -366,17 +368,18 @@ sealed class LsCommand : Command if(path.StartsWith('/')) path = path[1..]; - AaruConsole.WriteLine(string.IsNullOrEmpty(path) ? "Root directory" : $"Directory: {Markup.Escape(path)}"); + AaruConsole.WriteLine(string.IsNullOrEmpty(path) ? UI.Root_directory + : string.Format(UI.Directory_0, Markup.Escape(path))); Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Reading directory...").IsIndeterminate(); + ctx.AddTask(UI.Reading_directory).IsIndeterminate(); error = fs.ReadDir(path, out directory); }); if(error != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} reading root directory {1}", error.ToString(), path); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_directory_1, error.ToString(), path); return; } @@ -386,7 +389,7 @@ sealed class LsCommand : Command AnsiConsole.Progress().AutoClear(true).HideCompleted(true). Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()).Start(ctx => { - ProgressTask task = ctx.AddTask("Retrieving file information..."); + ProgressTask task = ctx.AddTask(UI.Retrieving_file_information); task.MaxValue = directory.Count; foreach(string entry in directory) @@ -406,7 +409,7 @@ sealed class LsCommand : Command { if(entry.Value.Attributes.HasFlag(FileAttributes.Directory)) AaruConsole.WriteLine("{0, 10:d} {0, 12:T} {1, -20} {2}", entry.Value.CreationTimeUtc, - "", Markup.Escape(entry.Key)); + UI.Directory_abbreviation, Markup.Escape(entry.Key)); else AaruConsole.WriteLine("{0, 10:d} {0, 12:T} {1, 6}{2, 14:N0} {3}", entry.Value.CreationTimeUtc, entry.Value.Inode, entry.Value.Length, Markup.Escape(entry.Key)); diff --git a/Aaru/Commands/Filesystem/Options.cs b/Aaru/Commands/Filesystem/Options.cs index dc95a4f45..2745b082d 100644 --- a/Aaru/Commands/Filesystem/Options.cs +++ b/Aaru/Commands/Filesystem/Options.cs @@ -40,6 +40,7 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using JetBrains.Annotations; using Spectre.Console; @@ -47,7 +48,7 @@ namespace Aaru.Commands.Filesystem; sealed class ListOptionsCommand : Command { - public ListOptionsCommand() : base("options", "Lists all options supported by read-only filesystems.") => + public ListOptionsCommand() : base("options", UI.Filesystem_Options_Command_Description) => Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); public static int Invoke(bool debug, bool verbose) @@ -85,7 +86,7 @@ sealed class ListOptionsCommand : Command PluginBase plugins = GetPluginBase.Instance; - AaruConsole.WriteLine("Read-only filesystems options:"); + AaruConsole.WriteLine(UI.Read_only_filesystems_options); foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems) { @@ -96,12 +97,12 @@ sealed class ListOptionsCommand : Command var table = new Table { - Title = new TableTitle($"Options for {kvp.Value.Name}:") + Title = new TableTitle(string.Format(UI.Options_for_0, kvp.Value.Name)) }; - table.AddColumn("Name"); - table.AddColumn("Type"); - table.AddColumn("Description"); + table.AddColumn(UI.Title_Name); + table.AddColumn(UI.Title_Type); + table.AddColumn(UI.Title_Description); foreach((string name, Type type, string description) option in options.OrderBy(t => t.name)) table.AddRow(Markup.Escape(option.name), $"[italic]{TypeToString(option.type)}[/]", @@ -118,27 +119,27 @@ sealed class ListOptionsCommand : Command static string TypeToString([NotNull] Type type) { if(type == typeof(bool)) - return "boolean"; + return UI.TypeToString_boolean; if(type == typeof(sbyte) || type == typeof(short) || type == typeof(int) || type == typeof(long)) - return "signed number"; + return UI.TypeToString_signed_number; if(type == typeof(byte) || type == typeof(ushort) || type == typeof(uint) || type == typeof(ulong)) - return "number"; + return UI.TypeToString_number; if(type == typeof(float) || type == typeof(double)) - return "float number"; + return UI.TypeToString_float_number; if(type == typeof(Guid)) - return "uuid"; + return UI.TypeToString_uuid; - return type == typeof(string) ? "string" : type.ToString(); + return type == typeof(string) ? UI.TypeToString_string : type.ToString(); } } \ No newline at end of file diff --git a/Aaru/Commands/Formats.cs b/Aaru/Commands/Formats.cs index a00fdf89d..5418d4fae 100644 --- a/Aaru/Commands/Formats.cs +++ b/Aaru/Commands/Formats.cs @@ -39,13 +39,14 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands; sealed class FormatsCommand : Command { - public FormatsCommand() : base("formats", "Lists all supported disc images, partition schemes and file systems.") => + public FormatsCommand() : base("formats", UI.List_Formats_Command_Description) => Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); public static int Invoke(bool verbose, bool debug) @@ -87,13 +88,13 @@ sealed class FormatsCommand : Command Table table = new() { - Title = new TableTitle($"Supported filters ({filtersList.Filters.Count}):") + Title = new TableTitle(string.Format(UI.Supported_filters_0, filtersList.Filters.Count)) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); - table.AddColumn("Filter"); + table.AddColumn(UI.Title_Filter); foreach(KeyValuePair kvp in filtersList.Filters) if(verbose) @@ -107,15 +108,16 @@ sealed class FormatsCommand : Command table = new Table { - Title = new TableTitle($"Read-only media image formats ({ - plugins.ImagePluginsList.Count(t => !t.Value.GetType().GetInterfaces().Contains(typeof(IWritableImage))) - }):") + Title = new TableTitle(string.Format(UI.Read_only_media_image_formats_0, + plugins.ImagePluginsList.Count(t => !t.Value.GetType().GetInterfaces(). + Contains(typeof( + IWritableImage))))) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); - table.AddColumn("Media image format"); + table.AddColumn(UI.Title_Media_image_format); foreach(KeyValuePair kvp in plugins.ImagePluginsList.Where(t => !t.Value.GetType(). GetInterfaces().Contains(typeof(IWritableImage)))) @@ -130,13 +132,13 @@ sealed class FormatsCommand : Command table = new Table { - Title = new TableTitle($"Read/write media image formats ({plugins.WritableImages.Count}):") + Title = new TableTitle(string.Format(UI.Read_write_media_image_formats_0, plugins.WritableImages.Count)) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); - table.AddColumn("Media image format"); + table.AddColumn(UI.Title_Media_image_format); foreach(KeyValuePair kvp in plugins.WritableImages) if(verbose) @@ -150,15 +152,16 @@ sealed class FormatsCommand : Command table = new Table { - Title = new TableTitle($"Supported filesystems for identification and information only ({ - plugins.PluginsList.Count(t => !t.Value.GetType().GetInterfaces().Contains(typeof(IReadOnlyFilesystem))) - }):") + Title = new TableTitle(string.Format(UI.Supported_filesystems_for_identification_and_information_only_0, + plugins.PluginsList.Count(t => !t.Value.GetType().GetInterfaces(). + Contains(typeof( + IReadOnlyFilesystem))))) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); - table.AddColumn("Filesystem"); + table.AddColumn(UI.Title_Filesystem); foreach(KeyValuePair kvp in plugins.PluginsList.Where(t => !t.Value.GetType(). GetInterfaces().Contains(typeof(IReadOnlyFilesystem)))) @@ -173,14 +176,14 @@ sealed class FormatsCommand : Command table = new Table { - Title = new TableTitle($"Supported filesystems that can read their contents ({ - plugins.ReadOnlyFilesystems.Count}):") + Title = new TableTitle(string.Format(UI.Supported_filesystems_that_can_read_their_contents_0, + plugins.ReadOnlyFilesystems.Count)) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); - table.AddColumn("Filesystem"); + table.AddColumn(UI.Title_Filesystem); foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems) if(verbose) @@ -194,13 +197,13 @@ sealed class FormatsCommand : Command table = new Table { - Title = new TableTitle($"Supported partitioning schemes ({plugins.PartPluginsList.Count}):") + Title = new TableTitle(string.Format(UI.Supported_partitioning_schemes_0, plugins.PartPluginsList.Count)) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); - table.AddColumn("Scheme"); + table.AddColumn(UI.Title_Scheme); foreach(KeyValuePair kvp in plugins.PartPluginsList) if(verbose) @@ -214,11 +217,11 @@ sealed class FormatsCommand : Command table = new Table { - Title = new TableTitle($"Supported archive formats ({plugins.Archives.Count}):") + Title = new TableTitle(string.Format(UI.Supported_archive_formats_0, plugins.Archives.Count)) }; if(verbose) - table.AddColumn("GUID"); + table.AddColumn(UI.Title_GUID); table.AddColumn("Archive format"); diff --git a/Aaru/Commands/Image/Checksum.cs b/Aaru/Commands/Image/Checksum.cs index da8c0db0d..e268bc12b 100644 --- a/Aaru/Commands/Image/Checksum.cs +++ b/Aaru/Commands/Image/Checksum.cs @@ -40,6 +40,7 @@ using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Schemas; using Spectre.Console; @@ -53,59 +54,59 @@ sealed class ChecksumCommand : Command // How many bytes to read at once const int BYTES_TO_READ = 65536; - public ChecksumCommand() : base("checksum", "Checksums an image.") + public ChecksumCommand() : base("checksum", UI.Image_Checksum_Command_Description) { AddAlias("chk"); Add(new Option(new[] { "--adler32", "-a" - }, () => false, "Calculates Adler32.")); + }, () => false, UI.Calculates_Adler_32)); - Add(new Option("--crc16", () => true, "Calculates CRC16.")); + Add(new Option("--crc16", () => true, UI.Calculates_CRC16)); Add(new Option(new[] { "--crc32", "-c" - }, () => true, "Calculates CRC32.")); + }, () => true, UI.Calculates_CRC32)); - Add(new Option("--crc64", () => true, "Calculates CRC64.")); - Add(new Option("--fletcher16", () => false, "Calculates Fletcher-16.")); - Add(new Option("--fletcher32", () => false, "Calculates Fletcher-32.")); + Add(new Option("--crc64", () => true, UI.Calculates_CRC64_ECMA)); + Add(new Option("--fletcher16", () => false, UI.Calculates_Fletcher_16)); + Add(new Option("--fletcher32", () => false, UI.Calculates_Fletcher_32)); Add(new Option(new[] { "--md5", "-m" - }, () => true, "Calculates MD5.")); + }, () => true, UI.Calculates_MD5)); Add(new Option(new[] { "--separated-tracks", "-t" - }, () => true, "Checksums each track separately.")); + }, () => true, UI.Checksums_each_track_separately)); Add(new Option(new[] { "--sha1", "-s" - }, () => true, "Calculates SHA1.")); + }, () => true, UI.Calculates_SHA1)); - Add(new Option("--sha256", () => false, "Calculates SHA256.")); - Add(new Option("--sha384", () => false, "Calculates SHA384.")); - Add(new Option("--sha512", () => true, "Calculates SHA512.")); + Add(new Option("--sha256", () => false, UI.Calculates_SHA256)); + Add(new Option("--sha384", () => false, UI.Calculates_SHA384)); + Add(new Option("--sha512", () => true, UI.Calculates_SHA512)); Add(new Option(new[] { "--spamsum", "-f" - }, () => true, "Calculates SpamSum fuzzy hash.")); + }, () => true, UI.Calculates_SpamSum_fuzzy_hash)); Add(new Option(new[] { "--whole-disc", "-w" - }, () => true, "Checksums the whole disc.")); + }, () => true, UI.Checksums_the_whole_disc)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -168,13 +169,13 @@ sealed class ChecksumCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -183,13 +184,13 @@ sealed class ChecksumCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); inputFormat = ImageFormat.Detect(inputFilter); }); if(inputFormat == null) { - AaruConsole.ErrorWriteLine("Unable to recognize image format, not checksumming"); + AaruConsole.ErrorWriteLine(UI.Unable_to_recognize_image_format_not_checksumming); return (int)ErrorNumber.UnrecognizedFormat; } @@ -198,13 +199,14 @@ sealed class ChecksumCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = inputFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Error {opened} opening image format"); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -270,15 +272,16 @@ sealed class ChecksumCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask discTask = ctx.AddTask("Hashing tracks..."); + ProgressTask discTask = ctx.AddTask(UI.Hashing_tracks); discTask.MaxValue = inputTracks.Count; foreach(Track currentTrack in inputTracks) { discTask.Description = - $"Hashing track {discTask.Value + 1} of {inputTracks.Count}"; + string.Format(UI.Hashing_track_0_of_1, discTask.Value + 1, + inputTracks.Count); - ProgressTask trackTask = ctx.AddTask("Hashing sector"); + ProgressTask trackTask = ctx.AddTask(UI.Hashing_sector); /* if(currentTrack.StartSector - previousTrackEnd != 0 && wholeDisc) @@ -293,7 +296,7 @@ sealed class ChecksumCommand : Command */ AaruConsole.DebugWriteLine("Checksum command", - "Track {0} starts at sector {1} and ends at sector {2}", + UI.Track_0_starts_at_sector_1_and_ends_at_sector_2, currentTrack.Sequence, currentTrack.StartSector, currentTrack.EndSector); @@ -316,15 +319,16 @@ sealed class ChecksumCommand : Command currentTrack.Sequence, out sector); trackTask.Description = - string.Format("Hashing sectors {0} to {2} of track {1}", - doneSectors, currentTrack.Sequence, - doneSectors + SECTORS_TO_READ); + string.Format(UI.Hashing_sectors_0_to_2_of_track_1, doneSectors, + currentTrack.Sequence, doneSectors + SECTORS_TO_READ); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading { - SECTORS_TO_READ} sectors from sector {doneSectors - }, not continuing..."); + AaruConsole. + ErrorWriteLine(string. + Format(UI.Error_0_while_reading_1_sectors_from_sector_2, + errno, SECTORS_TO_READ, + doneSectors)); return; } @@ -338,15 +342,17 @@ sealed class ChecksumCommand : Command out sector); trackTask.Description = - string.Format("Hashing sectors {0} to {2} of track {1}", - doneSectors, currentTrack.Sequence, + string.Format(UI.Hashing_sectors_0_to_2_of_track_1, doneSectors, + currentTrack.Sequence, doneSectors + (sectors - doneSectors)); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading { - sectors - doneSectors} sectors from sector {doneSectors - }, not continuing..."); + AaruConsole. + ErrorWriteLine(string. + Format(UI.Error_0_while_reading_1_sectors_from_sector_2, + errno, sectors - doneSectors, + doneSectors)); return; } @@ -373,8 +379,8 @@ sealed class ChecksumCommand : Command continue; foreach(ChecksumType chk in trackChecksum.End()) - AaruConsole.WriteLine("[bold]Track {0}'s {1}:[/] {2}", - currentTrack.Sequence, chk.type, chk.Value); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Checksums_Track_0_has_1, + currentTrack.Sequence, chk.type)}[/] {chk.Value}"); discTask.Increment(1); } @@ -399,7 +405,8 @@ sealed class ChecksumCommand : Command AaruConsole.WriteLine(); foreach(ChecksumType chk in mediaChecksum.End()) - AaruConsole.WriteLine("[bold]Disc's {0}:[/] {1}", chk.type, chk.Value); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Checksums_Disc_has_0, chk.type) + }:[/] {chk.Value}"); }); if(errno != ErrorNumber.NoError) @@ -408,7 +415,7 @@ sealed class ChecksumCommand : Command catch(Exception ex) { if(debug) - AaruConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); + AaruConsole.DebugWriteLine(UI.Could_not_get_tracks_because_0, ex.Message); else AaruConsole.WriteLine("Unable to get separate tracks, not checksumming them"); } @@ -428,29 +435,30 @@ sealed class ChecksumCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask tapeTask = ctx.AddTask("Hashing files..."); + ProgressTask tapeTask = ctx.AddTask(UI.Hashing_files); tapeTask.MaxValue = tapeImage.Files.Count; foreach(TapeFile currentFile in tapeImage.Files) { tapeTask.Description = - $"Hashing file {currentFile.File} of {tapeImage.Files.Count}"; + string.Format(UI.Hashing_file_0_of_1, currentFile.File, tapeImage.Files.Count); if(currentFile.FirstBlock - previousFileEnd != 0 && wholeDisc) { - ProgressTask preFileTask = ctx.AddTask("Hashing sector"); + ProgressTask preFileTask = ctx.AddTask(UI.Hashing_sector); preFileTask.MaxValue = currentFile.FirstBlock - previousFileEnd; for(ulong i = previousFileEnd + 1; i < currentFile.FirstBlock; i++) { - preFileTask.Description = $"Hashing file-less block {i}"; + preFileTask.Description = string.Format(UI.Hashing_file_less_block_0, i); errno = tapeImage.ReadSector(i, out byte[] hiddenSector); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading sector {i - }, not continuing..."); + AaruConsole. + ErrorWriteLine(string.Format(UI.Error_0_while_reading_block_1, + errno, i)); return; } @@ -463,7 +471,7 @@ sealed class ChecksumCommand : Command } AaruConsole.DebugWriteLine("Checksum command", - "File {0} starts at sector {1} and ends at block {2}", + UI.File_0_starts_at_block_1_and_ends_at_block_2, currentFile.File, currentFile.FirstBlock, currentFile.LastBlock); @@ -473,7 +481,7 @@ sealed class ChecksumCommand : Command ulong sectors = currentFile.LastBlock - currentFile.FirstBlock + 1; ulong doneSectors = 0; - ProgressTask fileTask = ctx.AddTask("Hashing sector"); + ProgressTask fileTask = ctx.AddTask(UI.Hashing_sector); fileTask.MaxValue = sectors; while(doneSectors < sectors) @@ -487,15 +495,17 @@ sealed class ChecksumCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading { - SECTORS_TO_READ} sectors from sector { - doneSectors + currentFile.FirstBlock}, not continuing..."); + AaruConsole. + ErrorWriteLine(string. + Format(UI.Error_0_while_reading_1_sectors_from_sector_2, + errno, SECTORS_TO_READ, + doneSectors + currentFile.FirstBlock)); return; } fileTask.Description = - string.Format("Hashing blocks {0} to {2} of file {1}", doneSectors, + string.Format(UI.Hashing_blocks_0_to_2_of_file_1, doneSectors, currentFile.File, doneSectors + SECTORS_TO_READ); doneSectors += SECTORS_TO_READ; @@ -507,15 +517,17 @@ sealed class ChecksumCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading { - sectors - doneSectors} sectors from sector { - doneSectors + currentFile.FirstBlock}, not continuing..."); + AaruConsole. + ErrorWriteLine(string. + Format(UI.Error_0_while_reading_1_sectors_from_sector_2, + errno, sectors - doneSectors, + doneSectors + currentFile.FirstBlock)); return; } fileTask.Description = - string.Format("Hashing blocks {0} to {2} of file {1}", doneSectors, + string.Format(UI.Hashing_blocks_0_to_2_of_file_1, doneSectors, currentFile.File, doneSectors + (sectors - doneSectors)); doneSectors += sectors - doneSectors; @@ -536,8 +548,8 @@ sealed class ChecksumCommand : Command if(separatedTracks) if(trackChecksum != null) foreach(ChecksumType chk in trackChecksum.End()) - AaruConsole.WriteLine("[bold]File {0}'s {1}[/]: {2}", currentFile.File, - chk.type, chk.Value); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Checksums_File_0_has_1, + currentFile.File, chk.type)}[/]: {chk.Value}"); previousFileEnd = currentFile.LastBlock; @@ -548,19 +560,19 @@ sealed class ChecksumCommand : Command !wholeDisc) return; - ProgressTask postFileTask = ctx.AddTask("Hashing sector"); + ProgressTask postFileTask = ctx.AddTask(UI.Hashing_sector); postFileTask.MaxValue = tapeImage.Info.Sectors - previousFileEnd; for(ulong i = previousFileEnd + 1; i < tapeImage.Info.Sectors; i++) { - postFileTask.Description = $"Hashing file-less block {i}"; + postFileTask.Description = string.Format(UI.Hashing_file_less_block_0, i); errno = tapeImage.ReadSector(i, out byte[] hiddenSector); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading sector {i - }, not continuing..."); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_0_while_reading_block_1, + errno, i)); return; } @@ -578,7 +590,8 @@ sealed class ChecksumCommand : Command AaruConsole.WriteLine(); foreach(ChecksumType chk in mediaChecksum.End()) - AaruConsole.WriteLine("[bold]Tape's {0}:[/] {1}", chk.type, chk.Value); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Checksums_Tape_has_0, chk.type)}[/] {chk.Value + }"); } break; @@ -592,7 +605,7 @@ sealed class ChecksumCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask imageTask = ctx.AddTask("Hashing image..."); + ProgressTask imageTask = ctx.AddTask(UI.Hashing_image); ulong length = byteAddressableImage.Info.Sectors; imageTask.MaxValue = length; ulong doneBytes = 0; @@ -608,14 +621,16 @@ sealed class ChecksumCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading {BYTES_TO_READ - } bytes from {doneBytes}, not continuing..."); + AaruConsole. + ErrorWriteLine(string.Format(UI.Error_0_while_reading_1_bytes_from_2, + errno, BYTES_TO_READ, doneBytes)); return; } imageTask.Description = - $"Hashing bytes {doneBytes} to {doneBytes + BYTES_TO_READ}"; + string.Format(UI.Hashing_bytes_0_to_1, doneBytes, + doneBytes + BYTES_TO_READ); doneBytes += (ulong)bytesRead; @@ -629,14 +644,16 @@ sealed class ChecksumCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading {length - doneBytes - } bytes from {doneBytes}, not continuing..."); + AaruConsole. + ErrorWriteLine(string.Format(UI.Error_0_while_reading_1_bytes_from_2, + errno, length - doneBytes, doneBytes)); return; } - imageTask.Description = $"Hashing bytes {doneBytes} to { - doneBytes + (length - doneBytes)}"; + imageTask.Description = + string.Format(UI.Hashing_bytes_0_to_1, doneBytes, + doneBytes + (length - doneBytes)); doneBytes += length - doneBytes; } @@ -652,7 +669,7 @@ sealed class ChecksumCommand : Command AaruConsole.WriteLine(); foreach(ChecksumType chk in mediaChecksum.End()) - AaruConsole.WriteLine("[bold]Media's {0}:[/] {1}", chk.type, chk.Value); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Checksums_Media_has_0, chk.type)}[/] {chk.Value}"); break; } @@ -666,7 +683,7 @@ sealed class ChecksumCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask diskTask = ctx.AddTask("Hashing sectors..."); + ProgressTask diskTask = ctx.AddTask(UI.Hashing_sectors); ulong sectors = mediaImage.Info.Sectors; diskTask.MaxValue = sectors; ulong doneSectors = 0; @@ -681,14 +698,17 @@ sealed class ChecksumCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading {SECTORS_TO_READ - } sectors from sector {doneSectors}, not continuing..."); + AaruConsole. + ErrorWriteLine(string. + Format(UI.Error_0_while_reading_1_sectors_from_sector_2, + errno, SECTORS_TO_READ, doneSectors)); return; } - diskTask.Description = $"Hashing sectors {doneSectors} to { - doneSectors + SECTORS_TO_READ}"; + diskTask.Description = + string.Format(UI.Hashing_sectors_0_to_1, doneSectors, + doneSectors + SECTORS_TO_READ); doneSectors += SECTORS_TO_READ; } @@ -699,15 +719,17 @@ sealed class ChecksumCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine($"Error {errno} while reading { - sectors - doneSectors} sectors from sector {doneSectors - }, not continuing..."); + AaruConsole. + ErrorWriteLine(string. + Format(UI.Error_0_while_reading_1_sectors_from_sector_2, + errno, sectors - doneSectors, doneSectors)); return; } - diskTask.Description = $"Hashing sectors {doneSectors} to { - doneSectors + (sectors - doneSectors)}"; + diskTask.Description = + string.Format(UI.Hashing_sectors_0_to_1, doneSectors, + doneSectors + (sectors - doneSectors)); doneSectors += sectors - doneSectors; } @@ -723,7 +745,7 @@ sealed class ChecksumCommand : Command AaruConsole.WriteLine(); foreach(ChecksumType chk in mediaChecksum.End()) - AaruConsole.WriteLine("[bold]Disk's {0}:[/] {1}", chk.type, chk.Value); + AaruConsole.WriteLine($"[bold]{string.Format(UI.Checksums_Disk_has_0, chk.type)}[/] {chk.Value}"); break; } diff --git a/Aaru/Commands/Image/Compare.cs b/Aaru/Commands/Image/Compare.cs index df9f42ccf..2190f282c 100644 --- a/Aaru/Commands/Image/Compare.cs +++ b/Aaru/Commands/Image/Compare.cs @@ -43,6 +43,7 @@ using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; using Aaru.Helpers; +using Aaru.Localization; using Spectre.Console; using ImageInfo = Aaru.CommonTypes.Structs.ImageInfo; @@ -50,21 +51,21 @@ namespace Aaru.Commands.Image; sealed class CompareCommand : Command { - public CompareCommand() : base("compare", "Compares two disc images.") + public CompareCommand() : base("compare", UI.Image_Compare_Command_Description) { AddAlias("cmp"); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "First media image path", + Description = UI.First_media_image_path, Name = "image-path1" }); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Second media image path", + Description = UI.Second_media_image_path, Name = "image-path2" }); @@ -113,7 +114,7 @@ sealed class CompareCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file 1 filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_first_file_filter).IsIndeterminate(); inputFilter1 = filtersList.GetFilter(imagePath1); }); @@ -121,20 +122,20 @@ sealed class CompareCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file 2 filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_second_file_filter).IsIndeterminate(); inputFilter2 = filtersList.GetFilter(imagePath2); }); if(inputFilter1 == null) { - AaruConsole.ErrorWriteLine("Cannot open input file 1"); + AaruConsole.ErrorWriteLine(UI.Cannot_open_first_input_file); return (int)ErrorNumber.CannotOpenFile; } if(inputFilter2 == null) { - AaruConsole.ErrorWriteLine("Cannot open input file 2"); + AaruConsole.ErrorWriteLine(UI.Cannot_open_second_input_file); return (int)ErrorNumber.CannotOpenFile; } @@ -144,69 +145,69 @@ sealed class CompareCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image 1 format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_first_image_format).IsIndeterminate(); input1Format = ImageFormat.Detect(inputFilter1); }); Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image 1 format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_second_image_format).IsIndeterminate(); input2Format = ImageFormat.Detect(inputFilter2); }); if(input1Format == null) { - AaruConsole.ErrorWriteLine("Input file 1 format not identified, not proceeding with comparison."); + AaruConsole.ErrorWriteLine(UI.First_input_file_format_not_identified); return (int)ErrorNumber.UnrecognizedFormat; } if(verbose) - AaruConsole.VerboseWriteLine("Input file 1 format identified by {0} ({1}).", input1Format.Name, + AaruConsole.VerboseWriteLine(UI.First_input_file_format_identified_by_0_1, input1Format.Name, input1Format.Id); else - AaruConsole.WriteLine("Input file 1 format identified by {0}.", input1Format.Name); + AaruConsole.WriteLine(UI.First_input_file_format_identified_by_0, input1Format.Name); if(input2Format == null) { - AaruConsole.ErrorWriteLine("Input file 2 format not identified, not proceeding with comparison."); + AaruConsole.ErrorWriteLine(UI.Second_input_file_format_not_identified); return (int)ErrorNumber.UnrecognizedFormat; } if(verbose) - AaruConsole.VerboseWriteLine("Input file 2 format identified by {0} ({1}).", input2Format.Name, + AaruConsole.VerboseWriteLine(UI.Second_input_file_format_identified_by_0_1, input2Format.Name, input2Format.Id); else - AaruConsole.WriteLine("Input file 2 format identified by {0}.", input2Format.Name); + AaruConsole.WriteLine(UI.Second_input_file_format_identified_by_0, input2Format.Name); ErrorNumber opened1 = ErrorNumber.NoData; ErrorNumber opened2 = ErrorNumber.NoData; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image 1 file...").IsIndeterminate(); + ctx.AddTask(UI.Opening_first_image_file).IsIndeterminate(); opened1 = input1Format.Open(inputFilter1); }); if(opened1 != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image 1 format"); - AaruConsole.WriteLine("Error {0}", opened1); + AaruConsole.WriteLine(UI.Unable_to_open_first_image_format); + AaruConsole.WriteLine(UI.Error_0, opened1); return (int)opened1; } Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image 2 file...").IsIndeterminate(); + ctx.AddTask(UI.Opening_second_image_file).IsIndeterminate(); opened2 = input2Format.Open(inputFilter2); }); if(opened2 != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image 2 format"); - AaruConsole.WriteLine("Error {0}", opened2); + AaruConsole.WriteLine(UI.Unable_to_open_second_image_format); + AaruConsole.WriteLine(UI.Error_0, opened2); return (int)opened2; } @@ -221,19 +222,19 @@ sealed class CompareCommand : Command var sb = new StringBuilder(); Table table = new(); table.AddColumn(""); - table.AddColumn("Media image 1"); - table.AddColumn("Media image 2"); + table.AddColumn(UI.Title_First_Media_image); + table.AddColumn(UI.Title_Second_Media_image); table.Columns[0].RightAligned(); if(verbose) { - table.AddRow("File", Markup.Escape(imagePath1), Markup.Escape(imagePath2)); - table.AddRow("Media image format", input1Format.Name, input2Format.Name); + table.AddRow(UI.Title_File, Markup.Escape(imagePath1), Markup.Escape(imagePath2)); + table.AddRow(UI.Title_Media_image_format, input1Format.Name, input2Format.Name); } else { - sb.AppendFormat("[bold]Media image 1:[/] {0}", imagePath1).AppendLine(); - sb.AppendFormat("[bold]Media image 2:[/] {0}", imagePath2).AppendLine(); + sb.AppendFormat($"[bold]{UI.Title_First_Media_image}:[/] {imagePath1}").AppendLine(); + sb.AppendFormat($"[bold]{UI.Title_Second_Media_image}:[/] {imagePath2}").AppendLine(); } bool imagesDiffer = false; @@ -266,64 +267,74 @@ sealed class CompareCommand : Command if(verbose) { - table.AddRow("Has partitions?", image1Info.HasPartitions.ToString(), image2Info.HasPartitions.ToString()); + table.AddRow(UI.Has_partitions_Question, image1Info.HasPartitions.ToString(), + image2Info.HasPartitions.ToString()); - table.AddRow("Has sessions?", image1Info.HasSessions.ToString(), image2Info.HasSessions.ToString()); + table.AddRow(UI.Has_sessions_Question, image1Info.HasSessions.ToString(), + image2Info.HasSessions.ToString()); - table.AddRow("Image size", image1Info.ImageSize.ToString(), image2Info.ImageSize.ToString()); + table.AddRow(UI.Title_Image_size, image1Info.ImageSize.ToString(), image2Info.ImageSize.ToString()); - table.AddRow("Sectors", image1Info.Sectors.ToString(), image2Info.Sectors.ToString()); + table.AddRow(UI.Title_Sectors, image1Info.Sectors.ToString(), image2Info.Sectors.ToString()); - table.AddRow("Sector size", image1Info.SectorSize.ToString(), image2Info.SectorSize.ToString()); + table.AddRow(UI.Title_Sector_size, image1Info.SectorSize.ToString(), image2Info.SectorSize.ToString()); - table.AddRow("Creation time", image1Info.CreationTime.ToString(CultureInfo.CurrentCulture), + table.AddRow(UI.Title_Creation_time, image1Info.CreationTime.ToString(CultureInfo.CurrentCulture), image2Info.CreationTime.ToString(CultureInfo.CurrentCulture)); - table.AddRow("Last modification time", image1Info.LastModificationTime.ToString(CultureInfo.CurrentCulture), + table.AddRow(UI.Title_Last_modification_time, + image1Info.LastModificationTime.ToString(CultureInfo.CurrentCulture), image2Info.LastModificationTime.ToString(CultureInfo.CurrentCulture)); - table.AddRow("Disk type", image1Info.MediaType.ToString(), image2Info.MediaType.ToString()); + table.AddRow(UI.Title_Media_type, image1Info.MediaType.ToString(), image2Info.MediaType.ToString()); - table.AddRow("Image version", image1Info.Version ?? "", image2Info.Version ?? ""); + table.AddRow(UI.Title_Image_version, image1Info.Version ?? "", image2Info.Version ?? ""); - table.AddRow("Image application", image1Info.Application ?? "", image2Info.Application ?? ""); + table.AddRow(UI.Title_Image_application, image1Info.Application ?? "", image2Info.Application ?? ""); - table.AddRow("Image application version", image1Info.ApplicationVersion ?? "", - image2Info.ApplicationVersion ?? ""); + table.AddRow(UI.Title_Image_application_version, image1Info.ApplicationVersion ?? "", + image2Info.ApplicationVersion ?? ""); - table.AddRow("Image creator", image1Info.Creator ?? "", image2Info.Creator ?? ""); + table.AddRow(UI.Title_Image_creator, image1Info.Creator ?? "", image2Info.Creator ?? ""); - table.AddRow("Image name", image1Info.MediaTitle ?? "", image2Info.MediaTitle ?? ""); + table.AddRow(UI.Title_Image_name, image1Info.MediaTitle ?? "", image2Info.MediaTitle ?? ""); - table.AddRow("Image comments", image1Info.Comments ?? "", image2Info.Comments ?? ""); + table.AddRow(UI.Title_Image_comments, image1Info.Comments ?? "", image2Info.Comments ?? ""); - table.AddRow("Disk manufacturer", image1Info.MediaManufacturer ?? "", image2Info.MediaManufacturer ?? ""); + table.AddRow(UI.Title_Media_manufacturer, image1Info.MediaManufacturer ?? "", + image2Info.MediaManufacturer ?? ""); - table.AddRow("Disk model", image1Info.MediaModel ?? "", image2Info.MediaModel ?? ""); + table.AddRow(UI.Title_Media_model, image1Info.MediaModel ?? "", image2Info.MediaModel ?? ""); - table.AddRow("Disk serial number", image1Info.MediaSerialNumber ?? "", image2Info.MediaSerialNumber ?? ""); + table.AddRow(UI.Title_Media_serial_number, image1Info.MediaSerialNumber ?? "", + image2Info.MediaSerialNumber ?? ""); - table.AddRow("Disk barcode", image1Info.MediaBarcode ?? "", image2Info.MediaBarcode ?? ""); + table.AddRow(UI.Title_Media_barcode, image1Info.MediaBarcode ?? "", image2Info.MediaBarcode ?? ""); - table.AddRow("Disk part no.", image1Info.MediaPartNumber ?? "", image2Info.MediaPartNumber ?? ""); + table.AddRow(UI.Title_Media_part_number, image1Info.MediaPartNumber ?? "", + image2Info.MediaPartNumber ?? ""); - table.AddRow("Disk sequence", image1Info.MediaSequence.ToString(), image2Info.MediaSequence.ToString()); + table.AddRow(UI.Title_Media_sequence, image1Info.MediaSequence.ToString(), + image2Info.MediaSequence.ToString()); - table.AddRow("Last disk on sequence", image1Info.LastMediaSequence.ToString(), + table.AddRow(UI.Title_Last_media_on_sequence, image1Info.LastMediaSequence.ToString(), image2Info.LastMediaSequence.ToString()); - table.AddRow("Drive manufacturer", image1Info.DriveManufacturer ?? "", image2Info.DriveManufacturer ?? ""); + table.AddRow(UI.Title_Drive_manufacturer, image1Info.DriveManufacturer ?? "", + image2Info.DriveManufacturer ?? ""); - table.AddRow("Drive firmware revision", image1Info.DriveFirmwareRevision ?? "", - image2Info.DriveFirmwareRevision ?? ""); + table.AddRow(UI.Title_Drive_firmware_revision, image1Info.DriveFirmwareRevision ?? "", + image2Info.DriveFirmwareRevision ?? ""); - table.AddRow("Drive model", image1Info.DriveModel ?? "", image2Info.DriveModel ?? ""); + table.AddRow(UI.Title_Drive_model, image1Info.DriveModel ?? "", image2Info.DriveModel ?? ""); - table.AddRow("Drive serial number", image1Info.DriveSerialNumber ?? "", image2Info.DriveSerialNumber ?? ""); + table.AddRow(UI.Title_Drive_serial_number, image1Info.DriveSerialNumber ?? "", + image2Info.DriveSerialNumber ?? ""); foreach(MediaTagType diskTag in (Enum.GetValues(typeof(MediaTagType)) as MediaTagType[]).OrderBy(e => e.ToString())) - table.AddRow($"Has {diskTag}?", image1DiskTags.ContainsKey(diskTag).ToString(), + table.AddRow(string.Format(UI.Has_tag_0_Question, diskTag), + image1DiskTags.ContainsKey(diskTag).ToString(), image2DiskTags.ContainsKey(diskTag).ToString()); } @@ -331,14 +342,14 @@ sealed class CompareCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Comparing disk image characteristics").IsIndeterminate(); + ctx.AddTask(UI.Comparing_media_image_characteristics).IsIndeterminate(); if(image1Info.HasPartitions != image2Info.HasPartitions) { imagesDiffer = true; if(!verbose) - sb.AppendLine("Image partitioned status differ"); + sb.AppendLine(UI.Image_partitioned_status_differ); } if(image1Info.HasSessions != image2Info.HasSessions) @@ -346,7 +357,7 @@ sealed class CompareCommand : Command imagesDiffer = true; if(!verbose) - sb.AppendLine("Image session status differ"); + sb.AppendLine(UI.Image_session_status_differ); } if(image1Info.Sectors != image2Info.Sectors) @@ -354,7 +365,7 @@ sealed class CompareCommand : Command imagesDiffer = true; if(!verbose) - sb.AppendLine("Image sectors differ"); + sb.AppendLine(UI.Image_sectors_differ); } if(image1Info.SectorSize != image2Info.SectorSize) @@ -362,7 +373,7 @@ sealed class CompareCommand : Command imagesDiffer = true; if(!verbose) - sb.AppendLine("Image sector size differ"); + sb.AppendLine(UI.Image_sector_size_differ); } if(image1Info.MediaType != image2Info.MediaType) @@ -370,7 +381,7 @@ sealed class CompareCommand : Command imagesDiffer = true; if(!verbose) - sb.AppendLine("Disk type differ"); + sb.AppendLine(UI.Media_type_differs); } if(image1Info.Sectors < image2Info.Sectors) @@ -379,7 +390,7 @@ sealed class CompareCommand : Command leastSectors = image1Info.Sectors; if(!verbose) - sb.AppendLine("Image 2 has more sectors"); + sb.AppendLine(UI.Second_image_has_more_sectors); } else if(image1Info.Sectors > image2Info.Sectors) { @@ -387,7 +398,7 @@ sealed class CompareCommand : Command leastSectors = image2Info.Sectors; if(!verbose) - sb.AppendLine("Image 1 has more sectors"); + sb.AppendLine(UI.First_image_has_more_sectors); } else leastSectors = image1Info.Sectors; @@ -418,27 +429,29 @@ sealed class CompareCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask task = ctx.AddTask("Comparing sectors..."); + ProgressTask task = ctx.AddTask(UI.Comparing_sectors); task.MaxValue = leastSectors; for(ulong sector = 0; sector < leastSectors; sector++) { task.Value = sector; - task.Description = $"Comparing sector {sector + 1} of {leastSectors}..."; + task.Description = string.Format(UI.Comparing_sector_0_of_1, sector + 1, leastSectors); try { errno = input1MediaImage.ReadSector(sector, out byte[] image1Sector); if(errno != ErrorNumber.NoError) - AaruConsole.ErrorWriteLine($"Error {errno} reading sector {sector - } from image 1."); + AaruConsole. + ErrorWriteLine(string.Format(UI.Error_0_reading_sector_1_from_first_image, + errno, sector)); errno = input2MediaImage.ReadSector(sector, out byte[] image2Sector); if(errno != ErrorNumber.NoError) - AaruConsole.ErrorWriteLine($"Error {errno} reading sector {sector - } from image 2."); + AaruConsole. + ErrorWriteLine(string.Format(UI.Error_0_reading_sector_1_from_second_image, + errno, sector)); ArrayHelpers.CompareBytes(out bool different, out bool sameSize, image1Sector, image2Sector); @@ -468,7 +481,7 @@ sealed class CompareCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask task = ctx.AddTask("Comparing images..."); + ProgressTask task = ctx.AddTask(UI.Comparing_images); task.IsIndeterminate = true; byte[] data1 = new byte[input1ByteAddressable.Info.Sectors]; @@ -503,7 +516,7 @@ sealed class CompareCommand : Command AaruConsole.WriteLine(); - sb.AppendLine(imagesDiffer ? "Images differ" : "Images do not differ"); + sb.AppendLine(imagesDiffer ? UI.Images_differ : UI.Images_do_not_differ); if(verbose) AnsiConsole.Write(table); diff --git a/Aaru/Commands/Image/Convert.cs b/Aaru/Commands/Image/Convert.cs index f6baf3796..d57f0cf92 100644 --- a/Aaru/Commands/Image/Convert.cs +++ b/Aaru/Commands/Image/Convert.cs @@ -47,6 +47,7 @@ using Aaru.Console; using Aaru.Core; using Aaru.Core.Media; using Aaru.Devices; +using Aaru.Localization; using Schemas; using Spectre.Console; using ImageInfo = Aaru.CommonTypes.Structs.ImageInfo; @@ -57,105 +58,98 @@ namespace Aaru.Commands.Image; sealed class ConvertImageCommand : Command { - public ConvertImageCommand() : base("convert", "Converts one image to another format.") + public ConvertImageCommand() : base("convert", UI.Image_Convert_Command_Description) { Add(new Option(new[] { "--cicm-xml", "-x" - }, () => null, "Take metadata from existing CICM XML sidecar.")); + }, () => null, UI.Take_metadata_from_existing_CICM_XML_sidecar)); - Add(new Option("--comments", () => null, "Image comments.")); + Add(new Option("--comments", () => null, UI.Image_comments)); Add(new Option(new[] { "--count", "-c" - }, () => 64, "How many sectors to convert at once.")); + }, () => 64, UI.How_many_sectors_to_convert_at_once)); - Add(new Option("--creator", () => null, "Who (person) created the image?.")); + Add(new Option("--creator", () => null, UI.Who_person_created_the_image)); - Add(new Option("--drive-manufacturer", () => null, - "Manufacturer of the drive used to read the media represented by the image.")); + Add(new Option("--drive-manufacturer", () => null, UI.Manufacturer_of_drive_read_the_media_by_image)); - Add(new Option("--drive-model", () => null, - "Model of the drive used to read the media represented by the image.")); + Add(new Option("--drive-model", () => null, UI.Model_of_drive_read_the_media_by_image)); - Add(new Option("--drive-revision", () => null, - "Firmware revision of the drive used to read the media represented by the image.")); + Add(new Option("--drive-revision", () => null, UI.Firmware_revision_of_drive_read_the_media_by_image)); - Add(new Option("--drive-serial", () => null, - "Serial number of the drive used to read the media represented by the image.")); + Add(new Option("--drive-serial", () => null, UI.Serial_number_of_drive_read_the_media_by_image)); Add(new Option(new[] { "--force", "-f" - }, "Continue conversion even if sector or media tags will be lost in the process.")); + }, UI.Continue_conversion_even_if_data_lost)); Add(new Option(new[] - { - "--format", "-p" - }, () => null, - "Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension.")); + { + "--format", "-p" + }, () => null, UI.Format_of_the_output_image_as_plugin_name_or_plugin_id)); - Add(new Option("--media-barcode", () => null, "Barcode of the media represented by the image.")); + Add(new Option("--media-barcode", () => null, UI.Barcode_of_the_media_by_image)); - Add(new Option("--media-lastsequence", () => 0, - "Last media of the sequence the media represented by the image corresponds to.")); + Add(new Option("--media-lastsequence", () => 0, UI.Last_media_of_sequence_by_image)); - Add(new Option("--media-manufacturer", () => null, - "Manufacturer of the media represented by the image.")); + Add(new Option("--media-manufacturer", () => null, UI.Manufacturer_of_media_by_image)); - Add(new Option("--media-model", () => null, "Model of the media represented by the image.")); - Add(new Option("--media-partnumber", () => null, "Part number of the media represented by the image.")); - Add(new Option("--media-sequence", () => 0, "Number in sequence for the media represented by the image.")); - Add(new Option("--media-serial", () => null, "Serial number of the media represented by the image.")); - Add(new Option("--media-title", () => null, "Title of the media represented by the image.")); + Add(new Option("--media-model", () => null, UI.Model_of_media_by_image)); + Add(new Option("--media-partnumber", () => null, UI.Part_number_of_media_by_image)); + Add(new Option("--media-sequence", () => 0, UI.Number_in_sequence_for_media_by_image)); + Add(new Option("--media-serial", () => null, UI.Serial_number_of_media_by_image)); + Add(new Option("--media-title", () => null, UI.Title_of_media_represented_by_image)); Add(new Option(new[] { "--options", "-O" - }, () => null, "Comma separated name=value pairs of options to pass to output image plugin.")); + }, () => null, UI.Comma_separated_name_value_pairs_of_image_options)); Add(new Option(new[] { "--resume-file", "-r" - }, () => null, "Take list of dump hardware from existing resume file.")); + }, () => null, UI.Take_dump_hardware_from_existing_resume)); Add(new Option(new[] { "--geometry", "-g" - }, () => null, "Force geometry, only supported in not tape block media. Specify as C/H/S.")); + }, () => null, UI.Force_geometry_help)); Add(new Option(new[] { "--fix-subchannel-position" - }, () => true, "Store subchannel according to the sector they describe.")); + }, () => true, UI.Fix_subchannel_position_help)); Add(new Option(new[] { "--fix-subchannel" - }, () => false, "Try to fix subchannel. Implies fixing subchannel position.")); + }, () => false, UI.Fix_subchannel_help)); Add(new Option(new[] { "--fix-subchannel-crc" - }, () => false, "If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel.")); + }, () => false, UI.Fix_subchannel_crc_help)); Add(new Option(new[] { "--generate-subchannels" - }, () => false, "Generates missing subchannels.")); + }, () => false, UI.Generates_subchannels_help)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Input image path", + Description = UI.Input_image_path, Name = "input-path" }); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Output image path", + Description = UI.Output_image_path, Name = "output-path" }); @@ -237,14 +231,14 @@ sealed class ConvertImageCommand : Command AaruConsole.DebugWriteLine("Image convert command", "--generate-subchannels={0}", generateSubchannels); Dictionary parsedOptions = Core.Options.Parse(options); - AaruConsole.DebugWriteLine("Image convert command", "Parsed options:"); + AaruConsole.DebugWriteLine("Image convert command", UI.Parsed_options); foreach(KeyValuePair parsedOption in parsedOptions) AaruConsole.DebugWriteLine("Image convert command", "{0} = {1}", parsedOption.Key, parsedOption.Value); if(count == 0) { - AaruConsole.ErrorWriteLine("Need to specify more than 0 sectors to copy at once"); + AaruConsole.ErrorWriteLine(UI.Need_to_specify_more_than_zero_sectors_to_copy_at_once); return (int)ErrorNumber.InvalidArgument; } @@ -260,7 +254,7 @@ sealed class ConvertImageCommand : Command if(geometryPieces.Length != 3) { - AaruConsole.ErrorWriteLine("Invalid geometry specified"); + AaruConsole.ErrorWriteLine(UI.Invalid_geometry_specified); return (int)ErrorNumber.InvalidArgument; } @@ -268,7 +262,7 @@ sealed class ConvertImageCommand : Command if(!uint.TryParse(geometryPieces[0], out uint cylinders) || cylinders == 0) { - AaruConsole.ErrorWriteLine("Invalid number of cylinders specified"); + AaruConsole.ErrorWriteLine(UI.Invalid_number_of_cylinders_specified); return (int)ErrorNumber.InvalidArgument; } @@ -276,7 +270,7 @@ sealed class ConvertImageCommand : Command if(!uint.TryParse(geometryPieces[1], out uint heads) || heads == 0) { - AaruConsole.ErrorWriteLine("Invalid number of heads specified"); + AaruConsole.ErrorWriteLine(UI.Invalid_number_of_heads_specified); return (int)ErrorNumber.InvalidArgument; } @@ -284,7 +278,7 @@ sealed class ConvertImageCommand : Command if(!uint.TryParse(geometryPieces[2], out uint spt) || spt == 0) { - AaruConsole.ErrorWriteLine("Invalid sectors per track specified"); + AaruConsole.ErrorWriteLine(UI.Invalid_sectors_per_track_specified); return (int)ErrorNumber.InvalidArgument; } @@ -308,14 +302,14 @@ sealed class ConvertImageCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Incorrect metadata sidecar file, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Incorrect_metadata_sidecar_file); AaruConsole.DebugWriteLine("Image conversion", $"{ex}"); return (int)ErrorNumber.InvalidSidecar; } else { - AaruConsole.ErrorWriteLine("Could not find metadata sidecar, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Could_not_find_metadata_sidecar); return (int)ErrorNumber.NoSuchFile; } @@ -332,14 +326,14 @@ sealed class ConvertImageCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Incorrect resume file, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Incorrect_resume_file); AaruConsole.DebugWriteLine("Image conversion", $"{ex}"); return (int)ErrorNumber.InvalidResume; } else { - AaruConsole.ErrorWriteLine("Could not find resume file, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Could_not_find_resume_file); return (int)ErrorNumber.NoSuchFile; } @@ -349,20 +343,20 @@ sealed class ConvertImageCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(inputPath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } if(File.Exists(outputPath)) { - AaruConsole.ErrorWriteLine("Output file already exists, not continuing."); + AaruConsole.ErrorWriteLine(UI.Output_file_already_exists); return (int)ErrorNumber.FileExists; } @@ -373,14 +367,14 @@ sealed class ConvertImageCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); baseImage = ImageFormat.Detect(inputFilter); inputFormat = baseImage as IMediaImage; }); if(inputFormat == null) { - AaruConsole.WriteLine("Input image format not identified, not proceeding with conversion."); + AaruConsole.WriteLine(UI.Input_image_format_not_identified); return (int)ErrorNumber.UnrecognizedFormat; } @@ -388,16 +382,15 @@ sealed class ConvertImageCommand : Command // TODO: Implement if(inputFormat == null) { - AaruConsole.WriteLine("Command not yet supported for this image type."); + AaruConsole.WriteLine(UI.Command_not_yet_supported_for_this_image_type); return (int)ErrorNumber.InvalidArgument; } if(verbose) - AaruConsole.VerboseWriteLine("Input image format identified by {0} ({1}).", inputFormat.Name, - inputFormat.Id); + AaruConsole.VerboseWriteLine(UI.Input_image_format_identified_by_0_1, inputFormat.Name, inputFormat.Id); else - AaruConsole.WriteLine("Input image format identified by {0}.", inputFormat.Name); + AaruConsole.WriteLine(UI.Input_image_format_identified_by_0, inputFormat.Name); try { @@ -405,14 +398,14 @@ sealed class ConvertImageCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = inputFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image format"); - AaruConsole.WriteLine("Error {0}", opened); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -430,14 +423,14 @@ sealed class ConvertImageCommand : Command }; #pragma warning restore 612 - AaruConsole.DebugWriteLine("Convert-image command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Convert-image command", UI.Correctly_opened_image_file); - AaruConsole.DebugWriteLine("Convert-image command", "Image without headers is {0} bytes.", + AaruConsole.DebugWriteLine("Convert-image command", UI.Image_without_headers_is_0_bytes, inputFormat.Info.ImageSize); - AaruConsole.DebugWriteLine("Convert-image command", "Image has {0} sectors.", inputFormat.Info.Sectors); + AaruConsole.DebugWriteLine("Convert-image command", UI.Image_has_0_sectors, inputFormat.Info.Sectors); - AaruConsole.DebugWriteLine("Convert-image command", "Image identifies media type as {0}.", mediaType); + AaruConsole.DebugWriteLine("Convert-image command", UI.Image_identifies_media_type_as_0, mediaType); Statistics.AddMediaFormat(inputFormat.Format); Statistics.AddMedia(mediaType, false); @@ -445,9 +438,9 @@ sealed class ConvertImageCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); - AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); - AaruConsole.DebugWriteLine("Convert-image command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_image_format); + AaruConsole.ErrorWriteLine(UI.Error_0, ex.Message); + AaruConsole.DebugWriteLine("Convert-image command", Localization.Core.Stack_trace_0, ex.StackTrace); return (int)ErrorNumber.CannotOpenFormat; } @@ -473,11 +466,11 @@ sealed class ConvertImageCommand : Command switch(candidates.Count) { case 0: - AaruConsole.WriteLine("No plugin supports requested extension."); + AaruConsole.WriteLine(UI.No_plugin_supports_requested_extension); return (int)ErrorNumber.FormatNotFound; case > 1: - AaruConsole.WriteLine("More than one plugin supports requested extension."); + AaruConsole.WriteLine(UI.More_than_one_plugin_supports_requested_extension); return (int)ErrorNumber.TooManyFormats; } @@ -485,13 +478,13 @@ sealed class ConvertImageCommand : Command IBaseWritableImage outputFormat = candidates[0]; if(verbose) - AaruConsole.VerboseWriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); + AaruConsole.VerboseWriteLine(UI.Output_image_format_0_1, outputFormat.Name, outputFormat.Id); else - AaruConsole.WriteLine("Output image format: {0}.", outputFormat.Name); + AaruConsole.WriteLine(UI.Output_image_format_0, outputFormat.Name); if(!outputFormat.SupportedMediaTypes.Contains(mediaType)) { - AaruConsole.ErrorWriteLine("Output format does not support media type, cannot continue..."); + AaruConsole.ErrorWriteLine(UI.Output_format_does_not_support_media_type); return (int)ErrorNumber.UnsupportedMedia; } @@ -499,8 +492,8 @@ sealed class ConvertImageCommand : Command foreach(MediaTagType mediaTag in inputFormat.Info.ReadableMediaTags.Where(mediaTag => !outputFormat.SupportedMediaTags.Contains(mediaTag) && !force)) { - AaruConsole.ErrorWriteLine("Converting image will lose media tag {0}, not continuing...", mediaTag); - AaruConsole.ErrorWriteLine("If you don't care, use force option."); + AaruConsole.ErrorWriteLine(UI.Converting_image_will_lose_media_tag_0, mediaTag); + AaruConsole.ErrorWriteLine(UI.If_you_dont_care_use_force_option); return (int)ErrorNumber.DataWillBeLost; } @@ -520,10 +513,10 @@ sealed class ConvertImageCommand : Command continue; } - AaruConsole.ErrorWriteLine("Converting image will lose sector tag {0}, not continuing...", sectorTag); + AaruConsole.ErrorWriteLine(UI.Converting_image_will_lose_sector_tag_0, sectorTag); - AaruConsole. - ErrorWriteLine("If you don't care, use force option. This will skip all sector tags converting only user data."); + AaruConsole.ErrorWriteLine(UI. + If_you_dont_care_use_force_option_This_will_skip_all_sector_tags_converting_only_user_data); return (int)ErrorNumber.DataWillBeLost; } @@ -534,8 +527,7 @@ sealed class ConvertImageCommand : Command if(inputTape?.IsTape == true && outputTape is null) { - AaruConsole. - ErrorWriteLine("Input format contains a tape image and is not supported by output format, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Input_format_contains_a_tape_image_and_is_not_supported_by_output_format); return (int)ErrorNumber.UnsupportedMedia; } @@ -550,7 +542,7 @@ sealed class ConvertImageCommand : Command // Cannot set image to tape mode if(!ret) { - AaruConsole.ErrorWriteLine("Error setting output image in tape mode, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Error_setting_output_image_in_tape_mode); AaruConsole.ErrorWriteLine(outputFormat.ErrorMessage); return (int)ErrorNumber.WriteError; @@ -564,8 +556,7 @@ sealed class ConvertImageCommand : Command // TODO: Disabled until 6.0 /*if(!_force) {*/ - AaruConsole. - ErrorWriteLine("Output format does not support sessions, this will end in a loss of data, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Output_format_does_not_support_sessions); return (int)ErrorNumber.UnsupportedMedia; /*} @@ -577,7 +568,7 @@ sealed class ConvertImageCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); created = outputFormat.Create(outputPath, mediaType, parsedOptions, inputFormat.Info.Sectors, inputFormat.Info.SectorSize); @@ -585,7 +576,7 @@ sealed class ConvertImageCommand : Command if(!created) { - AaruConsole.ErrorWriteLine("Error {0} creating output image.", outputFormat.ErrorMessage); + AaruConsole.ErrorWriteLine(UI.Error_0_creating_output_image, outputFormat.ErrorMessage); return (int)ErrorNumber.CannotCreateFormat; } @@ -612,16 +603,14 @@ sealed class ConvertImageCommand : Command if(!outputFormat.SetMetadata(metadata)) { - AaruConsole.ErrorWrite("Error {0} setting metadata, ", outputFormat.ErrorMessage); - if(!force) { - AaruConsole.ErrorWriteLine("not continuing..."); + AaruConsole.ErrorWriteLine(UI.Error_0_setting_metadata_not_continuing, outputFormat.ErrorMessage); return (int)ErrorNumber.WriteError; } - AaruConsole.ErrorWriteLine("continuing..."); + AaruConsole.ErrorWriteLine(UI.Error_0_setting_metadata, outputFormat.ErrorMessage); } CICMMetadataType cicmMetadata = inputFormat.CicmMetadata; @@ -635,16 +624,16 @@ sealed class ConvertImageCommand : Command AnsiConsole.Progress().AutoClear(false).HideCompleted(false). Columns(new TaskDescriptionColumn(), new SpinnerColumn()).Start(ctx => { - ctx.AddTask($"Converting media tag {Markup.Escape(mediaTag.ToString())}"); + ctx.AddTask(string.Format(UI.Converting_media_tag_0, Markup.Escape(mediaTag.ToString()))); ErrorNumber errno = inputFormat.ReadMediaTag(mediaTag, out byte[] tag); if(errno != ErrorNumber.NoError) { if(force) - AaruConsole.ErrorWriteLine("Error {0} reading media tag, continuing...", errno); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_media_tag, errno); else { - AaruConsole.ErrorWriteLine("Error {0} writing media tag, not continuing...", errno); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_media_tag_not_continuing, errno); errorNumber = errno; } @@ -656,11 +645,10 @@ sealed class ConvertImageCommand : Command return; if(force) - AaruConsole.ErrorWriteLine("Error {0} writing media tag, continuing...", - outputFormat.ErrorMessage); + AaruConsole.ErrorWriteLine(UI.Error_0_writing_media_tag, outputFormat.ErrorMessage); else { - AaruConsole.ErrorWriteLine("Error {0} writing media tag, not continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_writing_media_tag_not_continuing, outputFormat.ErrorMessage); errorNumber = ErrorNumber.WriteError; @@ -671,7 +659,7 @@ sealed class ConvertImageCommand : Command return (int)errorNumber; } - AaruConsole.WriteLine("{0} sectors to convert", inputFormat.Info.Sectors); + AaruConsole.WriteLine(UI._0_sectors_to_convert, inputFormat.Info.Sectors); ulong doneSectors = 0; if(inputFormat is IOpticalMediaImage inputOptical && @@ -680,8 +668,7 @@ sealed class ConvertImageCommand : Command { if(!outputOptical.SetTracks(inputOptical.Tracks)) { - AaruConsole.ErrorWriteLine("Error {0} sending tracks list to output image.", - outputOptical.ErrorMessage); + AaruConsole.ErrorWriteLine(UI.Error_0_sending_tracks_list_to_output_image, outputOptical.ErrorMessage); return (int)ErrorNumber.WriteError; } @@ -692,18 +679,18 @@ sealed class ConvertImageCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask discTask = ctx.AddTask("Converting disc..."); + ProgressTask discTask = ctx.AddTask(UI.Converting_disc); discTask.MaxValue = inputOptical.Tracks.Count; foreach(Track track in inputOptical.Tracks) { - discTask.Description = $"Converting sectors in track {discTask.Value + 1} of { - discTask.MaxValue}"; + discTask.Description = string.Format(UI.Converting_sectors_in_track_0_of_1, + discTask.Value + 1, discTask.MaxValue); doneSectors = 0; ulong trackSectors = track.EndSector - track.StartSector + 1; - ProgressTask trackTask = ctx.AddTask("Converting track"); + ProgressTask trackTask = ctx.AddTask(UI.Converting_track); trackTask.MaxValue = trackSectors; while(doneSectors < trackSectors) @@ -717,8 +704,10 @@ sealed class ConvertImageCommand : Command else sectorsToDo = (uint)(trackSectors - doneSectors); - trackTask.Description = $"Converting sectors {doneSectors + track.StartSector} to { - doneSectors + sectorsToDo + track.StartSector} in track {track.Sequence}"; + trackTask.Description = + string.Format(UI.Converting_sectors_0_to_1_in_track_2, + doneSectors + track.StartSector, + doneSectors + sectorsToDo + track.StartSector, track.Sequence); bool useNotLong = false; bool result = false; @@ -742,14 +731,12 @@ sealed class ConvertImageCommand : Command result = true; if(force) - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, continuing...", errno, - doneSectors + track.StartSector); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_continuing, + errno, doneSectors + track.StartSector); else { - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, not continuing...", - errno, doneSectors + track.StartSector); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_not_continuing, + errno, doneSectors + track.StartSector); errno = ErrorNumber.WriteError; @@ -763,7 +750,8 @@ sealed class ConvertImageCommand : Command if(!force) { AaruConsole. - ErrorWriteLine("Input image is not returning raw sectors, use force if you want to continue..."); + ErrorWriteLine(UI. + Input_image_is_not_returning_raw_sectors_use_force_if_you_want_to_continue); errno = ErrorNumber.InOutError; @@ -793,14 +781,12 @@ sealed class ConvertImageCommand : Command result = true; if(force) - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, continuing...", errno, - doneSectors + track.StartSector); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_continuing, + errno, doneSectors + track.StartSector); else { - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, not continuing...", - errno, doneSectors + track.StartSector); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_not_continuing, + errno, doneSectors + track.StartSector); errno = ErrorNumber.WriteError; @@ -811,15 +797,14 @@ sealed class ConvertImageCommand : Command if(!result) if(force) - AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_writing_sector_1_continuing, outputOptical.ErrorMessage, doneSectors + track.StartSector); else { - AaruConsole. - ErrorWriteLine("Error {0} writing sector {1}, not continuing...", - outputOptical.ErrorMessage, - doneSectors + track.StartSector); + AaruConsole.ErrorWriteLine(UI.Error_0_writing_sector_1_not_continuing, + outputOptical.ErrorMessage, + doneSectors + track.StartSector); errno = ErrorNumber.WriteError; @@ -927,13 +912,14 @@ sealed class ConvertImageCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask discTask = ctx.AddTask("Converting disc..."); + ProgressTask discTask = ctx.AddTask(UI.Converting_disc); discTask.MaxValue = inputOptical.Tracks.Count; foreach(Track track in inputOptical.Tracks) { - discTask.Description = $"Converting tags in track {discTask.Value + 1} of { - discTask.MaxValue}"; + discTask.Description = + string.Format(UI.Converting_tags_in_track_0_of_1, discTask.Value + 1, + discTask.MaxValue); doneSectors = 0; ulong trackSectors = track.EndSector - track.StartSector + 1; @@ -960,16 +946,14 @@ sealed class ConvertImageCommand : Command { if(force) { - AaruConsole. - ErrorWriteLine("Error {0} writing tag, continuing...", - outputOptical.ErrorMessage); + AaruConsole.ErrorWriteLine(UI.Error_0_writing_tag_continuing, + outputOptical.ErrorMessage); continue; } - AaruConsole. - ErrorWriteLine("Error {0} writing tag, not continuing...", - outputOptical.ErrorMessage); + AaruConsole.ErrorWriteLine(UI.Error_0_writing_tag_not_continuing, + outputOptical.ErrorMessage); errno = ErrorNumber.WriteError; @@ -979,13 +963,12 @@ sealed class ConvertImageCommand : Command if(!result) if(force) - AaruConsole.ErrorWriteLine("Error {0} writing tag, continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_writing_tag_continuing, outputOptical.ErrorMessage); else { - AaruConsole. - ErrorWriteLine("Error {0} writing tag, not continuing...", - outputOptical.ErrorMessage); + AaruConsole.ErrorWriteLine(UI.Error_0_writing_tag_not_continuing, + outputOptical.ErrorMessage); errno = ErrorNumber.WriteError; @@ -995,7 +978,7 @@ sealed class ConvertImageCommand : Command continue; } - ProgressTask trackTask = ctx.AddTask("Converting track"); + ProgressTask trackTask = ctx.AddTask(UI.Converting_track); trackTask.MaxValue = trackSectors; while(doneSectors < trackSectors) @@ -1008,7 +991,7 @@ sealed class ConvertImageCommand : Command sectorsToDo = (uint)(trackSectors - doneSectors); trackTask.Description = - string.Format("Converting tag {3} for sectors {0} to {1} in track {2}", + string.Format(UI.Converting_tag_3_for_sectors_0_to_1_in_track_2, doneSectors + track.StartSector, doneSectors + sectorsToDo + track.StartSector, track.Sequence, tag); @@ -1047,12 +1030,12 @@ sealed class ConvertImageCommand : Command if(force) AaruConsole. - ErrorWriteLine("Error {0} reading tag for sector {1}, continuing...", + ErrorWriteLine(UI.Error_0_reading_tag_for_sector_1_continuing, errno, doneSectors + track.StartSector); else { AaruConsole. - ErrorWriteLine("Error {0} reading tag for sector {1}, not continuing...", + ErrorWriteLine(UI.Error_0_reading_tag_for_sector_1_not_continuing, errno, doneSectors + track.StartSector); return; @@ -1093,12 +1076,12 @@ sealed class ConvertImageCommand : Command if(force) AaruConsole. - ErrorWriteLine("Error {0} reading tag for sector {1}, continuing...", + ErrorWriteLine(UI.Error_0_reading_tag_for_sector_1_continuing, errno, doneSectors + track.StartSector); else { AaruConsole. - ErrorWriteLine("Error {0} reading tag for sector {1}, not continuing...", + ErrorWriteLine(UI.Error_0_reading_tag_for_sector_1_not_continuing, errno, doneSectors + track.StartSector); return; @@ -1109,13 +1092,13 @@ sealed class ConvertImageCommand : Command if(!result) if(force) AaruConsole. - ErrorWriteLine("Error {0} writing tag for sector {1}, continuing...", + ErrorWriteLine(UI.Error_0_writing_tag_for_sector_1_continuing, outputOptical.ErrorMessage, doneSectors + track.StartSector); else { AaruConsole. - ErrorWriteLine("Error {0} writing tag for sector {1}, not continuing...", + ErrorWriteLine(UI.Error_0_writing_tag_for_sector_1_not_continuing, outputOptical.ErrorMessage, doneSectors + track.StartSector); @@ -1165,7 +1148,7 @@ sealed class ConvertImageCommand : Command or MediaType.VideoNowXp or MediaType.CVD && generateSubchannels) Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Generating subchannels...").IsIndeterminate(); + ctx.AddTask(Localization.Core.Generating_subchannels).IsIndeterminate(); CompactDisc.GenerateSubchannels(subchannelExtents, tracks, trackFlags, inputOptical.Info.Sectors, null, null, null, null, null, outputOptical); @@ -1184,11 +1167,11 @@ sealed class ConvertImageCommand : Command ? (geometryValues.Value.cylinders, geometryValues.Value.heads, geometryValues.Value.sectors) : (inputFormat.Info.Cylinders, inputFormat.Info.Heads, inputFormat.Info.SectorsPerTrack); - AaruConsole.WriteLine("Setting geometry to {0} cylinders, {1} heads and {2} sectors per track", - chs.cylinders, chs.heads, chs.sectors); + AaruConsole.WriteLine(UI.Setting_geometry_to_0_cylinders_1_heads_and_2_sectors_per_track, chs.cylinders, + chs.heads, chs.sectors); if(!outputMedia.SetGeometry(chs.cylinders, chs.heads, chs.sectors)) - AaruConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_setting_geometry_image_may_be_incorrect_continuing, outputMedia.ErrorMessage); } @@ -1198,7 +1181,7 @@ sealed class ConvertImageCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask mediaTask = ctx.AddTask("Converting media"); + ProgressTask mediaTask = ctx.AddTask(UI.Converting_media); mediaTask.MaxValue = inputFormat.Info.Sectors; while(doneSectors < inputFormat.Info.Sectors) @@ -1215,7 +1198,7 @@ sealed class ConvertImageCommand : Command sectorsToDo = (uint)(inputFormat.Info.Sectors - doneSectors); mediaTask.Description = - $"Converting sectors {doneSectors} to {doneSectors + sectorsToDo}"; + string.Format(UI.Converting_sectors_0_to_1, doneSectors, doneSectors + sectorsToDo); bool result; @@ -1232,13 +1215,12 @@ sealed class ConvertImageCommand : Command result = true; if(force) - AaruConsole.ErrorWriteLine("Error {0} reading sector {1}, continuing...", - errno, doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_continuing, errno, + doneSectors); else { - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, not continuing...", errno, - doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_not_continuing, + errno, doneSectors); return; } @@ -1257,13 +1239,12 @@ sealed class ConvertImageCommand : Command result = true; if(force) - AaruConsole.ErrorWriteLine("Error {0} reading sector {1}, continuing...", - errno, doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_continuing, errno, + doneSectors); else { - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, not continuing...", errno, - doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_not_continuing, + errno, doneSectors); return; } @@ -1272,11 +1253,11 @@ sealed class ConvertImageCommand : Command if(!result) if(force) - AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_writing_sector_1_continuing, outputMedia.ErrorMessage, doneSectors); else { - AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_writing_sector_1_not_continuing, outputMedia.ErrorMessage, doneSectors); errno = ErrorNumber.WriteError; @@ -1311,7 +1292,7 @@ sealed class ConvertImageCommand : Command doneSectors = 0; - ProgressTask tagsTask = ctx.AddTask("Converting tags"); + ProgressTask tagsTask = ctx.AddTask(UI.Converting_tags); tagsTask.MaxValue = inputFormat.Info.Sectors; while(doneSectors < inputFormat.Info.Sectors) @@ -1326,7 +1307,7 @@ sealed class ConvertImageCommand : Command sectorsToDo = (uint)(inputFormat.Info.Sectors - doneSectors); tagsTask.Description = - string.Format("Converting tag {2} for sectors {0} to {1}", doneSectors, + string.Format(UI.Converting_tag_2_for_sectors_0_to_1, doneSectors, doneSectors + sectorsToDo, tag); bool result; @@ -1343,13 +1324,12 @@ sealed class ConvertImageCommand : Command result = true; if(force) - AaruConsole.ErrorWriteLine("Error {0} reading sector {1}, continuing...", - errno, doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_continuing, errno, + doneSectors); else { - AaruConsole. - ErrorWriteLine("Error {0} reading sector {1}, not continuing...", errno, - doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_reading_sector_1_not_continuing, + errno, doneSectors); return; } @@ -1357,13 +1337,12 @@ sealed class ConvertImageCommand : Command if(!result) if(force) - AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine(UI.Error_0_writing_sector_1_continuing, outputMedia.ErrorMessage, doneSectors); else { - AaruConsole. - ErrorWriteLine("Error {0} writing sector {1}, not continuing...", - outputMedia.ErrorMessage, doneSectors); + AaruConsole.ErrorWriteLine(UI.Error_0_writing_sector_1_not_continuing, + outputMedia.ErrorMessage, doneSectors); errno = ErrorNumber.WriteError; @@ -1382,13 +1361,14 @@ sealed class ConvertImageCommand : Command !inputTape.IsTape) return; - ProgressTask filesTask = ctx.AddTask("Converting files"); + ProgressTask filesTask = ctx.AddTask(UI.Converting_files); filesTask.MaxValue = inputTape.Files.Count; foreach(TapeFile tapeFile in inputTape.Files) { - filesTask.Description = $"Converting file {tapeFile.File} of partition { - tapeFile.Partition}..."; + filesTask.Description = + string.Format(UI.Converting_file_0_of_partition_1, tapeFile.File, + tapeFile.Partition); outputTape.AddFile(tapeFile); filesTask.Increment(1); @@ -1396,12 +1376,13 @@ sealed class ConvertImageCommand : Command filesTask.StopTask(); - ProgressTask partitionTask = ctx.AddTask("Converting files"); + ProgressTask partitionTask = ctx.AddTask(UI.Converting_files); partitionTask.MaxValue = inputTape.TapePartitions.Count; foreach(TapePartition tapePartition in inputTape.TapePartitions) { - partitionTask.Description = $"Converting tape partition {tapePartition.Number}..."; + partitionTask.Description = + string.Format(UI.Converting_tape_partition_0, tapePartition.Number); outputTape.AddPartition(tapePartition); } @@ -1418,7 +1399,7 @@ sealed class ConvertImageCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Writing dump hardware list...").IsIndeterminate(); + ctx.AddTask(UI.Writing_dump_hardware_list).IsIndeterminate(); if(resume != null) ret = outputFormat.SetDumpHardware(resume.Tries); @@ -1427,7 +1408,7 @@ sealed class ConvertImageCommand : Command }); if(ret) - AaruConsole.WriteLine("Written dump hardware list to output image."); + AaruConsole.WriteLine(UI.Written_dump_hardware_list_to_output_image); } ret = false; @@ -1437,7 +1418,7 @@ sealed class ConvertImageCommand : Command { Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Writing metadata...").IsIndeterminate(); + ctx.AddTask(UI.Writing_metadata).IsIndeterminate(); if(sidecar != null) ret = outputFormat.SetCicmMetadata(sidecar); @@ -1446,26 +1427,26 @@ sealed class ConvertImageCommand : Command }); if(ret) - AaruConsole.WriteLine("Written CICM XML metadata to output image."); + AaruConsole.WriteLine(UI.Written_CICM_XML_metadata_to_output_image); } bool closed = false; Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Closing output image...").IsIndeterminate(); + ctx.AddTask(UI.Closing_output_image).IsIndeterminate(); closed = outputFormat.Close(); }); if(!closed) { - AaruConsole.ErrorWriteLine("Error {0} closing output image... Contents are not correct.", + AaruConsole.ErrorWriteLine(UI.Error_0_closing_output_image_Contents_are_not_correct, outputFormat.ErrorMessage); return (int)ErrorNumber.WriteError; } - AaruConsole.WriteLine("Conversion done."); + AaruConsole.WriteLine(UI.Conversion_done); return (int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Image/CreateSidecar.cs b/Aaru/Commands/Image/CreateSidecar.cs index 26457017d..75d66aea4 100644 --- a/Aaru/Commands/Image/CreateSidecar.cs +++ b/Aaru/Commands/Image/CreateSidecar.cs @@ -43,6 +43,7 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using JetBrains.Annotations; using Schemas; using Spectre.Console; @@ -54,29 +55,27 @@ sealed class CreateSidecarCommand : Command static ProgressTask _progressTask1; static ProgressTask _progressTask2; - public CreateSidecarCommand() : base("create-sidecar", "Creates CICM Metadata XML sidecar.") + public CreateSidecarCommand() : base("create-sidecar", UI.Image_Create_Sidecar_Command_Description) { Add(new Option(new[] - { - "--block-size", "-b" - }, () => 512, - "Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.")); + { + "--block-size", "-b" + }, () => 512, UI.Tape_block_size_argument_help)); Add(new Option(new[] { "--encoding", "-e" - }, () => null, "Name of character encoding to use.")); + }, () => null, UI.Name_of_character_encoding_to_use)); Add(new Option(new[] - { - "--tape", "-t" - }, () => false, - "When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).")); + { + "--tape", "-t" + }, () => false, UI.Tape_argument_input_help)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -130,11 +129,11 @@ sealed class CreateSidecarCommand : Command encodingClass = Claunia.Encoding.Encoding.GetEncoding(encodingName); if(verbose) - AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine(UI.encoding_for_0, encodingClass.EncodingName); } catch(ArgumentException) { - AaruConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine(UI.Specified_encoding_is_not_supported); return (int)ErrorNumber.EncodingUnknown; } @@ -143,7 +142,7 @@ sealed class CreateSidecarCommand : Command { if(tape) { - AaruConsole.ErrorWriteLine("You cannot use --tape option when input is a file."); + AaruConsole.ErrorWriteLine(UI.You_cannot_use_tape_option_when_input_is_a_file); return (int)ErrorNumber.NotDirectory; } @@ -153,13 +152,13 @@ sealed class CreateSidecarCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -170,22 +169,21 @@ sealed class CreateSidecarCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); imageFormat = ImageFormat.Detect(inputFilter); }); if(imageFormat == null) { - AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine(UI.Image_format_not_identified_not_proceeding_with_sidecar_creation); return (int)ErrorNumber.UnrecognizedFormat; } if(verbose) - AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, - imageFormat.Id); + AaruConsole.VerboseWriteLine(UI.Image_format_identified_by_0_1, imageFormat.Name, imageFormat.Id); else - AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine(UI.Image_format_identified_by_0, imageFormat.Name); try { @@ -193,23 +191,24 @@ sealed class CreateSidecarCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = imageFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Error {opened} opening image format"); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } - AaruConsole.DebugWriteLine("Create sidecar command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Create sidecar command", UI.Correctly_opened_image_file); } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); - AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_image_format); + AaruConsole.ErrorWriteLine(UI.Error_0, ex.Message); return (int)ErrorNumber.CannotOpenFormat; } @@ -278,7 +277,7 @@ sealed class CreateSidecarCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Writing metadata sidecar").IsIndeterminate(); + ctx.AddTask(Localization.Core.Writing_metadata_sidecar).IsIndeterminate(); var xmlFs = new @@ -292,7 +291,7 @@ sealed class CreateSidecarCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_reading_file_0, ex.Message)); AaruConsole.DebugWriteLine("Create sidecar command", ex.StackTrace); return (int)ErrorNumber.UnexpectedException; @@ -302,7 +301,7 @@ sealed class CreateSidecarCommand : Command { if(!tape) { - AaruConsole.ErrorWriteLine("Cannot create a sidecar from a directory."); + AaruConsole.ErrorWriteLine(Localization.Core.Cannot_create_a_sidecar_from_a_directory); return (int)ErrorNumber.IsDirectory; } @@ -373,7 +372,7 @@ sealed class CreateSidecarCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Writing metadata sidecar").IsIndeterminate(); + ctx.AddTask(Localization.Core.Writing_metadata_sidecar).IsIndeterminate(); var xmlFs = new @@ -386,7 +385,7 @@ sealed class CreateSidecarCommand : Command }); } else - AaruConsole.ErrorWriteLine("The specified input file cannot be found."); + AaruConsole.ErrorWriteLine(UI.The_specified_input_file_cannot_be_found); return (int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Image/Decode.cs b/Aaru/Commands/Image/Decode.cs index 532746408..7a13c2b46 100644 --- a/Aaru/Commands/Image/Decode.cs +++ b/Aaru/Commands/Image/Decode.cs @@ -32,6 +32,7 @@ using System.CommandLine; using System.CommandLine.NamingConventionBinder; +using System.Globalization; using Aaru.CommonTypes; using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; @@ -40,38 +41,39 @@ using Aaru.Core; using Aaru.Decoders.ATA; using Aaru.Decoders.CD; using Aaru.Decoders.SCSI; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Image; sealed class DecodeCommand : Command { - public DecodeCommand() : base("decode", "Decodes and pretty prints disk and/or sector tags.") + public DecodeCommand() : base("decode", UI.Image_Decode_Command_Description) { Add(new Option(new[] { "--disk-tags", "-f" - }, () => true, "Decode disk tags.")); + }, () => true, UI.Decode_disk_tags)); Add(new Option(new[] { "--length", "-l" - }, () => "all", "How many sectors to decode, or \"all\".")); + }, () => UI.Parameter_response_all_sectors, UI.How_many_sectors_to_decode_or_all)); Add(new Option(new[] { "--sector-tags", "-p" - }, () => true, "Decode sector tags.")); + }, () => true, UI.Decode_sector_tags)); Add(new Option(new[] { "--start", "-s" - }, () => 0, "Sector to start decoding from.")); + }, () => 0, UI.Sector_to_start_decoding_from)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -123,13 +125,13 @@ sealed class DecodeCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -139,21 +141,21 @@ sealed class DecodeCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); baseImage = ImageFormat.Detect(inputFilter); inputFormat = baseImage as IMediaImage; }); if(baseImage == null) { - AaruConsole.ErrorWriteLine("Unable to recognize image format, not decoding"); + AaruConsole.ErrorWriteLine(UI.Unable_to_recognize_image_format_not_decoding); return (int)ErrorNumber.UnrecognizedFormat; } if(inputFormat == null) { - AaruConsole.WriteLine("Command not supported for this image type."); + AaruConsole.WriteLine(UI.Command_not_supported_for_this_image_type); return (int)ErrorNumber.InvalidArgument; } @@ -162,13 +164,14 @@ sealed class DecodeCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = inputFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Error {opened} opening image format"); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -180,7 +183,7 @@ sealed class DecodeCommand : Command if(diskTags) if(inputFormat.Info.ReadableMediaTags.Count == 0) - AaruConsole.WriteLine("There are no disk tags in chosen disc image."); + AaruConsole.WriteLine(UI.There_are_no_disk_tags_in_chosen_disc_image); else foreach(MediaTagType tag in inputFormat.Info.ReadableMediaTags) switch(tag) @@ -190,10 +193,10 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.SCSI_INQUIRY, out byte[] inquiry); if(inquiry == null) - AaruConsole.WriteLine("Error {0} reading SCSI INQUIRY response from disc image", errno); + AaruConsole.WriteLine(UI.Error_0_reading_SCSI_INQUIRY_response_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]SCSI INQUIRY command response:[/]"); + AaruConsole.WriteLine($"[bold]{UI.SCSI_INQUIRY_command_response}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -211,11 +214,11 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.ATA_IDENTIFY, out byte[] identify); if(errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error {0} reading ATA IDENTIFY DEVICE response from disc image", + AaruConsole.WriteLine(UI.Error_0_reading_ATA_IDENTIFY_DEVICE_response_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]ATA IDENTIFY DEVICE command response:[/]"); + AaruConsole.WriteLine($"[bold]{UI.ATA_IDENTIFY_DEVICE_command_response}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -234,11 +237,11 @@ sealed class DecodeCommand : Command if(identify == null) AaruConsole. - WriteLine("Error {0} reading ATA IDENTIFY PACKET DEVICE response from disc image", + WriteLine(UI.Error_0_reading_ATA_IDENTIFY_PACKET_DEVICE_response_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]ATA IDENTIFY PACKET DEVICE command response:[/]"); + AaruConsole.WriteLine($"[bold]{UI.ATA_IDENTIFY_PACKET_DEVICE_command_response}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -256,10 +259,10 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.CD_ATIP, out byte[] atip); if(errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error {0} reading CD ATIP from disc image", errno); + AaruConsole.WriteLine(UI.Error_0_reading_CD_ATIP_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]CD ATIP:[/]"); + AaruConsole.WriteLine($"[bold]{UI.CD_ATIP}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -277,10 +280,10 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.CD_FullTOC, out byte[] fullToc); if(errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error {0} reading CD full TOC from disc image", errno); + AaruConsole.WriteLine(UI.Error_0_reading_CD_full_TOC_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]CD full TOC:[/]"); + AaruConsole.WriteLine($"[bold]{UI.CD_full_TOC}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -298,10 +301,10 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.CD_PMA, out byte[] pma); if(errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error {0} reading CD PMA from disc image", errno); + AaruConsole.WriteLine(UI.Error_0_reading_CD_PMA_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]CD PMA:[/]"); + AaruConsole.WriteLine($"[bold]{"CD PMA:"}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -319,11 +322,10 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.CD_SessionInfo, out byte[] sessionInfo); if(errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error {0} reading CD session information from disc image", - errno); + AaruConsole.WriteLine(UI.Error_0_reading_CD_session_information_from_disc_image, errno); else { - AaruConsole.WriteLine("[bold]CD session information:[/]"); + AaruConsole.WriteLine($"[bold]{UI.CD_session_information}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -341,10 +343,10 @@ sealed class DecodeCommand : Command errno = inputFormat.ReadMediaTag(MediaTagType.CD_TEXT, out byte[] cdText); if(errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error reading CD-TEXT from disc image"); + AaruConsole.WriteLine(UI.Error_reading_CD_TEXT_from_disc_image); else { - AaruConsole.WriteLine("[bold]CD-TEXT:[/]"); + AaruConsole.WriteLine($"[bold]{UI.CD_TEXT}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -363,10 +365,10 @@ sealed class DecodeCommand : Command if(toc == null || errno != ErrorNumber.NoError) - AaruConsole.WriteLine("Error reading CD TOC from disc image"); + AaruConsole.WriteLine(UI.Error_reading_CD_TOC_from_disc_image); else { - AaruConsole.WriteLine("[bold]CD TOC:[/]"); + AaruConsole.WriteLine($"[bold]{UI.CD_TOC}[/]"); AaruConsole. WriteLine("================================================================================"); @@ -380,7 +382,7 @@ sealed class DecodeCommand : Command break; } default: - AaruConsole.WriteLine("Decoder for disk tag type \"{0}\" not yet implemented, sorry.", tag); + AaruConsole.WriteLine(UI.Decoder_for_disk_tag_type_0_not_yet_implemented_sorry, tag); break; } @@ -388,26 +390,26 @@ sealed class DecodeCommand : Command if(!sectorTags) return (int)ErrorNumber.NoError; - if(length.ToLowerInvariant() == "all") {} + if(length.ToLower(CultureInfo.CurrentUICulture) == UI.Parameter_response_all_sectors) {} else { if(!ulong.TryParse(length, out ulong _)) { - AaruConsole.WriteLine("Value \"{0}\" is not a valid number for length.", length); - AaruConsole.WriteLine("Not decoding sectors tags"); + AaruConsole.WriteLine(UI.Value_0_is_not_a_valid_number_for_length, length); + AaruConsole.WriteLine(UI.Not_decoding_sectors_tags); return 3; } } if(inputFormat.Info.ReadableSectorTags.Count == 0) - AaruConsole.WriteLine("There are no sector tags in chosen disc image."); + AaruConsole.WriteLine(UI.There_are_no_sector_tags_in_chosen_disc_image); else foreach(SectorTagType tag in inputFormat.Info.ReadableSectorTags) switch(tag) { default: - AaruConsole.WriteLine("Decoder for disk tag type \"{0}\" not yet implemented, sorry.", tag); + AaruConsole.WriteLine(UI.Decoder_for_sector_tag_type_0_not_yet_implemented_sorry, tag); break; } diff --git a/Aaru/Commands/Image/Entropy.cs b/Aaru/Commands/Image/Entropy.cs index 29d2a33d6..9e1bee108 100644 --- a/Aaru/Commands/Image/Entropy.cs +++ b/Aaru/Commands/Image/Entropy.cs @@ -37,6 +37,7 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Image; @@ -46,27 +47,27 @@ sealed class EntropyCommand : Command static ProgressTask _progressTask1; static ProgressTask _progressTask2; - public EntropyCommand() : base("entropy", "Calculates entropy and/or duplicated sectors of an image.") + public EntropyCommand() : base("entropy", UI.Image_Entropy_Command_Description) { Add(new Option(new[] { "--duplicated-sectors", "-p" - }, () => true, "Calculates how many sectors are duplicated (have same exact data in user area).")); + }, () => true, UI.Calculates_how_many_sectors_are_duplicated)); Add(new Option(new[] { "--separated-tracks", "-t" - }, () => true, "Calculates entropy for each track separately.")); + }, () => true, UI.Calculates_entropy_for_each_track_separately)); Add(new Option(new[] { "--whole-disc", "-w" - }, () => true, "Calculates entropy for the whole disc.")); + }, () => true, UI.Calculates_entropy_for_the_whole_disc)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -117,13 +118,13 @@ sealed class EntropyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -132,13 +133,13 @@ sealed class EntropyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); inputFormat = ImageFormat.Detect(inputFilter); }); if(inputFormat == null) { - AaruConsole.ErrorWriteLine("Unable to recognize image format, not checksumming"); + AaruConsole.ErrorWriteLine(UI.Unable_to_recognize_image_format_not_checksumming); return (int)ErrorNumber.UnrecognizedFormat; } @@ -147,13 +148,14 @@ sealed class EntropyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = inputFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Error {opened} opening image format"); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -209,8 +211,8 @@ sealed class EntropyCommand : Command { if(opticalFormat.Sessions?.Count > 1) { - AaruConsole. - ErrorWriteLine("Calculating disc entropy of multisession images is not yet implemented."); + AaruConsole.ErrorWriteLine(UI. + Calculating_disc_entropy_of_multisession_images_is_not_yet_implemented); wholeDisc = false; } @@ -226,12 +228,12 @@ sealed class EntropyCommand : Command foreach(EntropyResults trackEntropy in tracksEntropy) { - AaruConsole.WriteLine("Entropy for track {0} is {1:F4}.", trackEntropy.Track, + AaruConsole.WriteLine(UI.Entropy_for_track_0_is_1, trackEntropy.Track, trackEntropy.Entropy); if(trackEntropy.UniqueSectors != null) - AaruConsole.WriteLine("Track {0} has {1} unique sectors ({2:P3})", - trackEntropy.Track, trackEntropy.UniqueSectors, + AaruConsole.WriteLine(UI.Track_0_has_1_unique_sectors_2, trackEntropy.Track, + trackEntropy.UniqueSectors, (double)trackEntropy.UniqueSectors / trackEntropy.Sectors); } } @@ -243,10 +245,10 @@ sealed class EntropyCommand : Command ? entropyCalculator.CalculateLinearMediaEntropy() : entropyCalculator.CalculateMediaEntropy(duplicatedSectors); - AaruConsole.WriteLine("Entropy for disk is {0:F4}.", entropy.Entropy); + AaruConsole.WriteLine(UI.Entropy_for_disk_is_0, entropy.Entropy); if(entropy.UniqueSectors != null) - AaruConsole.WriteLine("Disk has {0} unique sectors ({1:P3})", entropy.UniqueSectors, + AaruConsole.WriteLine(UI.Disk_has_0_unique_sectors_1, entropy.UniqueSectors, (double)entropy.UniqueSectors / entropy.Sectors); }); diff --git a/Aaru/Commands/Image/ImageFamily.cs b/Aaru/Commands/Image/ImageFamily.cs index 3f5bdaa3c..acbd37fb0 100644 --- a/Aaru/Commands/Image/ImageFamily.cs +++ b/Aaru/Commands/Image/ImageFamily.cs @@ -31,12 +31,13 @@ // ****************************************************************************/ using System.CommandLine; +using Aaru.Localization; namespace Aaru.Commands.Image; sealed class ImageFamily : Command { - public ImageFamily() : base("image", "Commands to manage images") + public ImageFamily() : base("image", UI.Image_Command_Family_Description) { AddAlias("i"); diff --git a/Aaru/Commands/Image/Info.cs b/Aaru/Commands/Image/Info.cs index af6eb4290..477bee404 100644 --- a/Aaru/Commands/Image/Info.cs +++ b/Aaru/Commands/Image/Info.cs @@ -38,19 +38,19 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Image; sealed class ImageInfoCommand : Command { - public ImageInfoCommand() : base("info", - "Identifies a media image and shows information about the media it represents and metadata.") + public ImageInfoCommand() : base("info", UI.Image_Info_Command_Description) { AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -97,13 +97,13 @@ sealed class ImageInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -114,18 +114,18 @@ sealed class ImageInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); imageFormat = ImageFormat.Detect(inputFilter); }); if(imageFormat == null) { - AaruConsole.WriteLine("Image format not identified."); + AaruConsole.WriteLine(UI.Image_format_not_identified); return (int)ErrorNumber.UnrecognizedFormat; } - AaruConsole.WriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); + AaruConsole.WriteLine(UI.Image_format_identified_by_0_1, imageFormat.Name, imageFormat.Id); AaruConsole.WriteLine(); try @@ -134,13 +134,14 @@ sealed class ImageInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = imageFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Error {opened} opening image format"); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -153,16 +154,16 @@ sealed class ImageInfoCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); - AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); - AaruConsole.DebugWriteLine("Image-info command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_image_format); + AaruConsole.ErrorWriteLine(UI.Error_0, ex.Message); + AaruConsole.DebugWriteLine("Image-info command", Localization.Core.Stack_trace_0, ex.StackTrace); return (int)ErrorNumber.CannotOpenFormat; } } catch(Exception ex) { - AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_reading_file_0, ex.Message)); AaruConsole.DebugWriteLine("Image-info command", ex.StackTrace); return (int)ErrorNumber.UnexpectedException; diff --git a/Aaru/Commands/Image/Options.cs b/Aaru/Commands/Image/Options.cs index bf11b54c7..fc6694c6b 100644 --- a/Aaru/Commands/Image/Options.cs +++ b/Aaru/Commands/Image/Options.cs @@ -40,6 +40,7 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using JetBrains.Annotations; using Spectre.Console; @@ -47,7 +48,7 @@ namespace Aaru.Commands.Image; sealed class ListOptionsCommand : Command { - public ListOptionsCommand() : base("options", "Lists all options supported by writable media images.") => + public ListOptionsCommand() : base("options", UI.Image_Options_Command_Description) => Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); public static int Invoke(bool debug, bool verbose) @@ -85,7 +86,7 @@ sealed class ListOptionsCommand : Command PluginBase plugins = GetPluginBase.Instance; - AaruConsole.WriteLine("Read/Write media images options:"); + AaruConsole.WriteLine(UI.Read_Write_media_images_options); foreach(KeyValuePair kvp in plugins.WritableImages) { @@ -97,13 +98,13 @@ sealed class ListOptionsCommand : Command var table = new Table { - Title = new TableTitle($"Options for {kvp.Value.Name}:") + Title = new TableTitle(string.Format(UI.Options_for_0, kvp.Value.Name)) }; - table.AddColumn("Name"); - table.AddColumn("Type"); - table.AddColumn("Default"); - table.AddColumn("Description"); + table.AddColumn(UI.Title_Name); + table.AddColumn(UI.Title_Type); + table.AddColumn(UI.Default); + table.AddColumn(UI.Title_Description); foreach((string name, Type type, string description, object @default) option in options.OrderBy(t => t.name)) @@ -121,27 +122,27 @@ sealed class ListOptionsCommand : Command static string TypeToString([NotNull] Type type) { if(type == typeof(bool)) - return "boolean"; + return UI.TypeToString_boolean; if(type == typeof(sbyte) || type == typeof(short) || type == typeof(int) || type == typeof(long)) - return "signed number"; + return UI.TypeToString_signed_number; if(type == typeof(byte) || type == typeof(ushort) || type == typeof(uint) || type == typeof(ulong)) - return "number"; + return UI.TypeToString_number; if(type == typeof(float) || type == typeof(double)) - return "float number"; + return UI.TypeToString_float_number; if(type == typeof(Guid)) - return "uuid"; + return UI.TypeToString_uuid; - return type == typeof(string) ? "string" : type.ToString(); + return type == typeof(string) ? UI.TypeToString_string : type.ToString(); } } \ No newline at end of file diff --git a/Aaru/Commands/Image/Print.cs b/Aaru/Commands/Image/Print.cs index a7115e9ba..8569595f8 100644 --- a/Aaru/Commands/Image/Print.cs +++ b/Aaru/Commands/Image/Print.cs @@ -39,38 +39,39 @@ using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; using Aaru.Helpers; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Image; sealed class PrintHexCommand : Command { - public PrintHexCommand() : base("print", "Prints a sector, in hexadecimal values, to the console.") + public PrintHexCommand() : base("print", UI.Image_Print_Command_Description) { Add(new Option(new[] { "--length", "-l" - }, () => 1, "How many sectors to print.")); + }, () => 1, UI.How_many_sectors_to_print)); Add(new Option(new[] { "--long-sectors", "-r" - }, () => false, "Print sectors with tags included.")); + }, () => false, UI.Print_sectors_with_tags_included)); Add(new Option(new[] { "--start", "-s" - }, "Starting sector.")); + }, UI.Starting_sector)); Add(new Option(new[] { "--width", "-w" - }, () => 32, "How many bytes to print per line.")); + }, () => 32, UI.How_many_bytes_to_print_per_line)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Media image path", + Description = UI.Media_image_path, Name = "image-path" }); @@ -122,13 +123,13 @@ sealed class PrintHexCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -137,13 +138,13 @@ sealed class PrintHexCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); inputFormat = ImageFormat.Detect(inputFilter); }); if(inputFormat == null) { - AaruConsole.ErrorWriteLine("Unable to recognize image format, not verifying"); + AaruConsole.ErrorWriteLine(UI.Unable_to_recognize_image_format_not_printing); return (int)ErrorNumber.UnrecognizedFormat; } @@ -152,14 +153,14 @@ sealed class PrintHexCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = inputFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image format"); - AaruConsole.WriteLine("Error {0}", opened); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -168,7 +169,7 @@ sealed class PrintHexCommand : Command { var byteAddressableImage = inputFormat as IByteAddressableImage; - AaruConsole.WriteLine("[bold][italic]Start {0}[/][/]", start); + AaruConsole.WriteLine($"[bold][italic]{string.Format(UI.Start_0_as_in_sector_start, start)}[/][/]"); byte[] data = new byte[length]; ErrorNumber errno = ErrorNumber.NoError; @@ -176,7 +177,7 @@ sealed class PrintHexCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Reading data...").IsIndeterminate(); + ctx.AddTask(UI.Reading_data).IsIndeterminate(); errno = byteAddressableImage?.ReadBytesAt((long)start, data, 0, (int)length, out bytesRead) ?? ErrorNumber.InvalidArgument; @@ -193,24 +194,24 @@ sealed class PrintHexCommand : Command if(errno == ErrorNumber.NoError) AaruConsole.WriteLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(data, width, true))); else - AaruConsole.ErrorWriteLine($"Error {errno} reading data from {start}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_0_reading_data_from_1, errno, start)); } else for(ulong i = 0; i < length; i++) { if(inputFormat is not IMediaImage blockImage) { - AaruConsole.ErrorWriteLine("Cannot open image file, aborting..."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_image_file_aborting); break; } - AaruConsole.WriteLine("[bold][italic]Sector {0}[/][/]", start + i); + AaruConsole.WriteLine($"[bold][italic]{string.Format(UI.Sector_0_as_in_sector_number, start)}[/][/]" + + i); if(blockImage.Info.ReadableSectorTags == null) { - AaruConsole. - WriteLine("Requested sectors with tags, unsupported by underlying image format, printing only user data."); + AaruConsole.WriteLine(UI.Requested_sectors_tags_unsupported_by_image_format_printing_user_data); longSectors = false; } @@ -218,8 +219,7 @@ sealed class PrintHexCommand : Command { if(blockImage.Info.ReadableSectorTags.Count == 0) { - AaruConsole. - WriteLine("Requested sectors with tags, unsupported by underlying image format, printing only user data."); + AaruConsole.WriteLine(UI.Requested_sectors_tags_unsupported_by_image_format_printing_user_data); longSectors = false; } @@ -230,7 +230,7 @@ sealed class PrintHexCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Reading sector...").IsIndeterminate(); + ctx.AddTask(UI.Reading_sector).IsIndeterminate(); errno = longSectors ? blockImage.ReadSectorLong(start + i, out sector) : blockImage.ReadSector(start + i, out sector); @@ -239,7 +239,7 @@ sealed class PrintHexCommand : Command if(errno == ErrorNumber.NoError) AaruConsole.WriteLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(sector, width, true))); else - AaruConsole.ErrorWriteLine($"Error {errno} reading sector {start + i}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Error_0_reading_sector_1, errno, start + i)); } return (int)ErrorNumber.NoError; diff --git a/Aaru/Commands/Image/Verify.cs b/Aaru/Commands/Image/Verify.cs index 229e61028..75348bbf6 100644 --- a/Aaru/Commands/Image/Verify.cs +++ b/Aaru/Commands/Image/Verify.cs @@ -40,28 +40,29 @@ using Aaru.CommonTypes.Interfaces; using Aaru.CommonTypes.Structs; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Image; sealed class VerifyCommand : Command { - public VerifyCommand() : base("verify", "Verifies a disc image integrity, and if supported, sector integrity.") + public VerifyCommand() : base("verify", UI.Image_Verify_Command_Description) { Add(new Option(new[] { "--verify-disc", "-w" - }, () => true, "Verify disc image if supported.")); + }, () => true, UI.Verify_disc_image_if_supported)); Add(new Option(new[] { "--verify-sectors", "-s" - }, () => true, "Verify all sectors if supported.")); + }, () => true, UI.Verify_all_sectors_if_supported)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Disc image path", + Description = UI.Disc_image_path, Name = "image-path" }); @@ -111,13 +112,13 @@ sealed class VerifyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying file filter...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_file_filter).IsIndeterminate(); inputFilter = filtersList.GetFilter(imagePath); }); if(inputFilter == null) { - AaruConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine(UI.Cannot_open_specified_file); return (int)ErrorNumber.CannotOpenFile; } @@ -126,13 +127,13 @@ sealed class VerifyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Identifying image format...").IsIndeterminate(); + ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); inputFormat = ImageFormat.Detect(inputFilter); }); if(inputFormat == null) { - AaruConsole.ErrorWriteLine("Unable to recognize image format, not verifying"); + AaruConsole.ErrorWriteLine(UI.Unable_to_recognize_image_format_not_verifying); return (int)ErrorNumber.FormatNotFound; } @@ -141,14 +142,14 @@ sealed class VerifyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening image file...").IsIndeterminate(); + ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); opened = inputFormat.Open(inputFilter); }); if(opened != ErrorNumber.NoError) { - AaruConsole.WriteLine("Unable to open image format"); - AaruConsole.WriteLine("Error {0}", opened); + AaruConsole.WriteLine(UI.Unable_to_open_image_format); + AaruConsole.WriteLine(UI.Error_0, opened); return (int)opened; } @@ -158,9 +159,7 @@ sealed class VerifyCommand : Command Statistics.AddFilter(inputFilter.Name); bool? correctImage = null; - long errorSectors = 0; bool? correctSectors = null; - long unknownSectors = 0; var verifiableImage = inputFormat as IVerifiableImage; var verifiableSectorsImage = inputFormat as IVerifiableSectorsImage; @@ -168,7 +167,7 @@ sealed class VerifyCommand : Command if(verifiableImage is null && verifiableSectorsImage is null) { - AaruConsole.ErrorWriteLine("The specified image does not support any kind of verification"); + AaruConsole.ErrorWriteLine(UI.The_specified_image_does_not_support_any_kind_of_verification); return (int)ErrorNumber.NotVerifiable; } @@ -182,7 +181,7 @@ sealed class VerifyCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Verifying image checksums...").IsIndeterminate(); + ctx.AddTask(UI.Verifying_image_checksums).IsIndeterminate(); DateTime startCheck = DateTime.UtcNow; discCheckStatus = verifiableImage.VerifyMediaImage(); @@ -193,21 +192,21 @@ sealed class VerifyCommand : Command switch(discCheckStatus) { case true: - AaruConsole.WriteLine("Disc image checksums are correct"); + AaruConsole.WriteLine(UI.Disc_image_checksums_are_correct); break; case false: - AaruConsole.WriteLine("Disc image checksums are incorrect"); + AaruConsole.WriteLine(UI.Disc_image_checksums_are_incorrect); break; case null: - AaruConsole.WriteLine("Disc image does not contain checksums"); + AaruConsole.WriteLine(UI.Disc_image_does_not_contain_checksums); break; } correctImage = discCheckStatus; - AaruConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds); + AaruConsole.VerboseWriteLine(UI.Checking_disc_image_checksums_took_0_seconds, checkTime.TotalSeconds); } if(!verifySectors) @@ -234,24 +233,26 @@ sealed class VerifyCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask discTask = ctx.AddTask("Checking tracks..."); + ProgressTask discTask = ctx.AddTask(UI.Checking_tracks); discTask.MaxValue = inputTracks.Count; foreach(Track currentTrack in inputTracks) { - discTask.Description = $"Checking track {discTask.Value + 1} of {inputTracks.Count}"; + discTask.Description = + string.Format(UI.Checking_track_0_of_1, discTask.Value + 1, inputTracks.Count); ulong remainingSectors = currentTrack.EndSector - currentTrack.StartSector + 1; ulong currentSector = 0; - ProgressTask trackTask = ctx.AddTask("Checking sector"); + ProgressTask trackTask = ctx.AddTask(UI.Checking_sector); trackTask.MaxValue = remainingSectors; while(remainingSectors > 0) { - trackTask.Description = $"Checking sector {currentSectorAll} of { - inputFormat.Info.Sectors}, on track {currentTrack.Sequence}"; + trackTask.Description = + string.Format(UI.Checking_sector_0_of_1_on_track_2, currentSectorAll, + inputFormat.Info.Sectors, currentTrack.Sequence); List tempFailingLbas; List tempUnknownLbas; @@ -300,14 +301,15 @@ sealed class VerifyCommand : Command Columns(new TaskDescriptionColumn(), new ProgressBarColumn(), new PercentageColumn()). Start(ctx => { - ProgressTask diskTask = ctx.AddTask("Checking sectors..."); + ProgressTask diskTask = ctx.AddTask(UI.Checking_sectors); diskTask.MaxValue = inputFormat.Info.Sectors; startCheck = DateTime.UtcNow; while(remainingSectors > 0) { - diskTask.Description = $"Checking sector {currentSector} of {inputFormat.Info.Sectors}"; + diskTask.Description = + string.Format(UI.Checking_sector_0_of_1, currentSector, inputFormat.Info.Sectors); List tempFailingLbas; List tempUnknownLbas; @@ -344,40 +346,41 @@ sealed class VerifyCommand : Command checkTime = endCheck - startCheck; if(unknownLbas.Count > 0) - AaruConsole.WriteLine("There is at least one sector that does not contain a checksum"); + AaruConsole.WriteLine(UI.There_is_at_least_one_sector_that_does_not_contain_a_checksum); if(failingLbas.Count > 0) - AaruConsole.WriteLine("There is at least one sector with incorrect checksum or errors"); + AaruConsole.WriteLine(UI.There_is_at_least_one_sector_with_incorrect_checksum_or_errors); if(unknownLbas.Count == 0 && failingLbas.Count == 0) - AaruConsole.WriteLine("All sector checksums are correct"); + AaruConsole.WriteLine(UI.All_sector_checksums_are_correct); - AaruConsole.VerboseWriteLine("Checking sector checksums took {0} seconds", checkTime.TotalSeconds); + AaruConsole.VerboseWriteLine(UI.Checking_sector_checksums_took_0_seconds, checkTime.TotalSeconds); if(verbose) { - AaruConsole.VerboseWriteLine("[red]LBAs with error:[/]"); + AaruConsole.VerboseWriteLine($"[red]{UI.LBAs_with_error}[/]"); if(failingLbas.Count == (int)inputFormat.Info.Sectors) - AaruConsole.VerboseWriteLine("\t[red]all sectors.[/]"); + AaruConsole.VerboseWriteLine($"\t[red]{UI.all_sectors}[/]"); else foreach(ulong t in failingLbas) AaruConsole.VerboseWriteLine("\t{0}", t); - AaruConsole.WriteLine("[yellow3_1]LBAs without checksum:[/]"); + AaruConsole.WriteLine($"[yellow3_1]{UI.LBAs_without_checksum}[/]"); if(unknownLbas.Count == (int)inputFormat.Info.Sectors) - AaruConsole.VerboseWriteLine("\t[yellow3_1]all sectors.[/]"); + AaruConsole.VerboseWriteLine($"\t[yellow3_1]{UI.all_sectors}[/]"); else foreach(ulong t in unknownLbas) AaruConsole.VerboseWriteLine("\t{0}", t); } - AaruConsole.WriteLine("[italic]Total sectors...........[/] {0}", inputFormat.Info.Sectors); - AaruConsole.WriteLine("[italic]Total errors............[/] {0}", failingLbas.Count); - AaruConsole.WriteLine("[italic]Total unknowns..........[/] {0}", unknownLbas.Count); - AaruConsole.WriteLine("[italic]Total errors+unknowns...[/] {0}", failingLbas.Count + unknownLbas.Count); + // TODO: Convert to table + AaruConsole.WriteLine($"[italic]{UI.Total_sectors}[/] {inputFormat.Info.Sectors}"); + AaruConsole.WriteLine($"[italic]{UI.Total_errors}[/] {failingLbas.Count}"); + AaruConsole.WriteLine($"[italic]{UI.Total_unknowns}[/] {unknownLbas.Count}"); + AaruConsole.WriteLine($"[italic]{UI.Total_errors_plus_unknowns}[/] {failingLbas.Count + unknownLbas.Count}"); if(failingLbas.Count > 0) correctSectors = false; diff --git a/Aaru/Commands/ListEncodings.cs b/Aaru/Commands/ListEncodings.cs index dffbd10ca..713217797 100644 --- a/Aaru/Commands/ListEncodings.cs +++ b/Aaru/Commands/ListEncodings.cs @@ -38,13 +38,14 @@ using System.Text; using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands; sealed class ListEncodingsCommand : Command { - public ListEncodingsCommand() : base("list-encodings", "Lists all supported text encodings and code pages.") => + public ListEncodingsCommand() : base("list-encodings", UI.List_Encodings_Command_Description) => Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); public static int Invoke(bool debug, bool verbose) @@ -94,8 +95,8 @@ sealed class ListEncodingsCommand : Command })); Table table = new(); - table.AddColumn("Name"); - table.AddColumn("Description"); + table.AddColumn(UI.Title_Name); + table.AddColumn(UI.Title_Description); foreach(CommonEncodingInfo info in encodings.OrderBy(t => t.DisplayName)) table.AddRow(info.Name, info.DisplayName); diff --git a/Aaru/Commands/ListNamespaces.cs b/Aaru/Commands/ListNamespaces.cs index f784afef5..b8b2c4c42 100644 --- a/Aaru/Commands/ListNamespaces.cs +++ b/Aaru/Commands/ListNamespaces.cs @@ -39,14 +39,14 @@ using Aaru.CommonTypes.Enums; using Aaru.CommonTypes.Interfaces; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands; sealed class ListNamespacesCommand : Command { - public ListNamespacesCommand() : - base("list-namespaces", "Lists all namespaces supported by read-only filesystems.") => + public ListNamespacesCommand() : base("list-namespaces", UI.List_Namespaces_Command_Description) => Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); public static int Invoke(bool debug, bool verbose) @@ -89,11 +89,11 @@ sealed class ListNamespacesCommand : Command { Table table = new() { - Title = new TableTitle($"Namespaces for {kvp.Value.Name}:") + Title = new TableTitle(string.Format(UI.Namespaces_for_0, kvp.Value.Name)) }; - table.AddColumn("Namespace"); - table.AddColumn("Description"); + table.AddColumn(UI.Title_Namespace); + table.AddColumn(UI.Title_Description); foreach(KeyValuePair @namespace in kvp.Value.Namespaces.OrderBy(t => t.Key)) table.AddRow(@namespace.Key, @namespace.Value); diff --git a/Aaru/Commands/Media/Dump.cs b/Aaru/Commands/Media/Dump.cs index a8603b095..bfc12e605 100644 --- a/Aaru/Commands/Media/Dump.cs +++ b/Aaru/Commands/Media/Dump.cs @@ -35,6 +35,7 @@ using System; using System.Collections.Generic; using System.CommandLine; using System.CommandLine.NamingConventionBinder; +using System.Globalization; using System.IO; using System.Linq; using System.Text; @@ -50,6 +51,7 @@ using Aaru.Console; using Aaru.Core; using Aaru.Core.Devices.Dumping; using Aaru.Core.Logging; +using Aaru.Localization; using Schemas; using Spectre.Console; @@ -61,149 +63,145 @@ sealed class DumpMediaCommand : Command static ProgressTask _progressTask1; static ProgressTask _progressTask2; - public DumpMediaCommand() : base("dump", "Dumps the media inserted on a device to a media image.") + public DumpMediaCommand() : base("dump", UI.Media_Dump_Command_Description) { Add(new Option(new[] { "--cicm-xml", "-x" - }, () => null, "Take metadata from existing CICM XML sidecar.")); + }, () => null, UI.Take_metadata_from_existing_CICM_XML_sidecar)); Add(new Option(new[] { "--encoding", "-e" - }, () => null, "Name of character encoding to use.")); + }, () => null, UI.Name_of_character_encoding_to_use)); - Add(new Option("--first-pregap", () => false, - "Try to read first track pregap. Only applicable to CD/DDCD/GD.")); + Add(new Option("--first-pregap", () => false, UI.Try_to_read_first_track_pregap)); - Add(new Option("--fix-offset", () => true, "Fix audio tracks offset. Only applicable to CD/GD.")); + Add(new Option("--fix-offset", () => true, UI.Fix_audio_tracks_offset)); Add(new Option(new[] { "--force", "-f" - }, () => false, "Continue dump whatever happens.")); + }, () => false, UI.Continue_dump_whatever_happens)); Add(new Option(new[] - { - "--format", "-t" - }, () => null, - "Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension.")); + { + "--format", "-t" + }, () => null, UI.Format_of_the_output_image_as_plugin_name_or_plugin_id)); - Add(new Option("--metadata", () => true, "Enables creating CICM XML sidecar.")); + Add(new Option("--metadata", () => true, UI.Enables_creating_CICM_XML_sidecar)); - Add(new Option("--trim", () => true, "Enables trimming errored from skipped sectors.")); + Add(new Option("--trim", () => true, UI.Enables_trimming_errored_from_skipped_sectors)); Add(new Option(new[] { "--options", "-O" - }, () => null, "Comma separated name=value pairs of options to pass to output image plugin.")); + }, () => null, UI.Comma_separated_name_value_pairs_of_image_options)); - Add(new Option("--persistent", () => false, "Try to recover partial or incorrect data.")); + Add(new Option("--persistent", () => false, UI.Try_to_recover_partial_or_incorrect_data)); Add(new Option(new[] { "--resume", "-r" - }, () => true, "Create/use resume mapfile.")); + }, () => true, UI.Create_or_use_resume_mapfile)); Add(new Option(new[] { "--retry-passes", "-p" - }, () => 5, "How many retry passes to do.")); + }, () => 5, UI.How_many_retry_passes_to_do)); Add(new Option(new[] { "--skip", "-k" - }, () => 512, "When an unreadable sector is found skip this many sectors.")); + }, () => 512, UI.When_an_unreadable_sector_is_found_skip_this_many_sectors)); Add(new Option(new[] { "--stop-on-error", "-s" - }, () => false, "Stop media dump on first error.")); + }, () => false, UI.Stop_media_dump_on_first_error)); - Add(new Option("--subchannel", () => "any", - "Subchannel to dump. Only applicable to CD/GD. Values: any, rw, rw-or-pq, pq, none.")); + Add(new Option("--subchannel", () => UI.Subchannel_name_any, UI.Subchannel_to_dump_help)); - Add(new Option("--speed", () => 0, "Speed to dump. Only applicable to optical drives, 0 for maximum.")); + Add(new Option("--speed", () => 0, UI.Speed_to_dump)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Device path", + Description = UI.Device_path, Name = "device-path" }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, - Description = - "Output image path. If filename starts with # and exists, it will be read as a list of output images, its extension will be used to detect the image output format, each media will be ejected and confirmation for the next one will be asked.", - Name = "output-path" + Arity = ArgumentArity.ExactlyOne, + Description = UI.Output_image_path_Dump_help, + Name = "output-path" }); Add(new Option(new[] { "--private" - }, () => false, "Do not store paths and serial numbers in log or metadata.")); + }, () => false, UI.Do_not_store_paths_and_serial_numbers_in_log_or_metadata)); Add(new Option(new[] { "--fix-subchannel-position" - }, () => true, "Store subchannel according to the sector they describe.")); + }, () => true, UI.Fix_subchannel_position_help)); Add(new Option(new[] { "--retry-subchannel" - }, () => true, "Retry subchannel. Implies fixing subchannel position.")); + }, () => true, UI.Retry_subchannel_help)); Add(new Option(new[] { "--fix-subchannel" - }, () => false, "Try to fix subchannel. Implies fixing subchannel position.")); + }, () => false, UI.Fix_subchannel_help)); Add(new Option(new[] { "--fix-subchannel-crc" - }, () => false, "If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel.")); + }, () => false, UI.Fix_subchannel_crc_help)); Add(new Option(new[] { "--generate-subchannels" - }, () => false, "Generates missing subchannels (they don't count as dumped in resume file).")); + }, () => false, UI.Generate_subchannels_dump_help)); Add(new Option(new[] { "--skip-cdiready-hole" - }, () => true, "Skip the hole between data and audio in a CD-i Ready disc.")); + }, () => true, UI.Skip_CDi_Ready_hole_help)); Add(new Option(new[] { "--eject" - }, () => false, "Eject media after dump finishes.")); + }, () => false, UI.Eject_media_after_dump_finishes)); Add(new Option(new[] { "--max-blocks" - }, () => 64, "Maximum number of blocks to read at once.")); + }, () => 64, UI.Maximum_number_of_blocks_to_read_at_once)); Add(new Option(new[] { "--use-buffered-reads" - }, () => true, "For MMC/SD, use OS buffered reads if CMD23 is not supported.")); + }, () => true, UI.OS_buffered_reads_help)); Add(new Option(new[] { "--store-encrypted" - }, () => true, "Store encrypted data as is.")); + }, () => true, UI.Store_encrypted_data_as_is)); Add(new Option(new[] { "--title-keys" - }, () => true, "Try to read the title keys from CSS encrypted DVDs (very slow).")); + }, () => true, UI.Try_to_read_the_title_keys_from_CSS_DVDs)); Add(new Option(new[] { "--ignore-cdr-runouts" - }, () => 10, "How many CD-R(W) run-out sectors to ignore and regenerate (0 for none).")); + }, () => 10, UI.How_many_CDRW_run_out_sectors_to_ignore_and_regenerate)); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); } @@ -289,7 +287,7 @@ sealed class DumpMediaCommand : Command //AaruConsole.DebugWriteLine("Dump-Media command", "--raw={0}", raw); Dictionary parsedOptions = Core.Options.Parse(options); - AaruConsole.DebugWriteLine("Dump-Media command", "Parsed options:"); + AaruConsole.DebugWriteLine("Dump-Media command", UI.Parsed_options); foreach(KeyValuePair parsedOption in parsedOptions) AaruConsole.DebugWriteLine("Dump-Media command", "{0} = {1}", parsedOption.Key, parsedOption.Value); @@ -302,45 +300,30 @@ sealed class DumpMediaCommand : Command encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine(UI.encoding_for_0, encodingClass.EncodingName); } catch(ArgumentException) { - AaruConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine(UI.Specified_encoding_is_not_supported); return (int)ErrorNumber.EncodingUnknown; } DumpSubchannel wantedSubchannel = DumpSubchannel.Any; - switch(subchannel?.ToLowerInvariant()) - { - case "any": - case null: - wantedSubchannel = DumpSubchannel.Any; - - break; - case "rw": - wantedSubchannel = DumpSubchannel.Rw; - - break; - case "rw-or-pq": - wantedSubchannel = DumpSubchannel.RwOrPq; - - break; - case "pq": - wantedSubchannel = DumpSubchannel.Pq; - - break; - case "none": - wantedSubchannel = DumpSubchannel.None; - - break; - default: - AaruConsole.WriteLine("Incorrect subchannel type \"{0}\" requested.", subchannel); - - break; - } + if(subchannel?.ToLower(CultureInfo.CurrentUICulture) == UI.Subchannel_name_any || + subchannel is null) + wantedSubchannel = DumpSubchannel.Any; + else if(subchannel?.ToLowerInvariant() == UI.Subchannel_name_rw) + wantedSubchannel = DumpSubchannel.Rw; + else if(subchannel?.ToLowerInvariant() == UI.Subchannel_name_rw_or_pq) + wantedSubchannel = DumpSubchannel.RwOrPq; + else if(subchannel?.ToLowerInvariant() == UI.Subchannel_name_pq) + wantedSubchannel = DumpSubchannel.Pq; + else if(subchannel?.ToLowerInvariant() == UI.Subchannel_name_none) + wantedSubchannel = DumpSubchannel.None; + else + AaruConsole.WriteLine(UI.Incorrect_subchannel_type_0_requested, subchannel); string filename = Path.GetFileNameWithoutExtension(outputPath); @@ -380,11 +363,11 @@ sealed class DumpMediaCommand : Command switch(candidates.Count) { case 0: - AaruConsole.WriteLine("No plugin supports requested extension."); + AaruConsole.WriteLine(UI.No_plugin_supports_requested_extension); return (int)ErrorNumber.FormatNotFound; case > 1: - AaruConsole.WriteLine("More than one plugin supports requested extension."); + AaruConsole.WriteLine(UI.More_than_one_plugin_supports_requested_extension); return (int)ErrorNumber.TooManyFormats; } @@ -398,15 +381,14 @@ sealed class DumpMediaCommand : Command if(responseLine.Any(c => c < 0x20)) { - AaruConsole.ErrorWriteLine("Invalid characters found in list of files, exiting..."); + AaruConsole.ErrorWriteLine(UI.Invalid_characters_found_in_list_of_files); return (int)ErrorNumber.InvalidArgument; } if(isResponse) { - AaruConsole.WriteLine("Please insert media with title {0} and press any key to continue...", - responseLine); + AaruConsole.WriteLine(UI.Please_insert_media_with_title_0_and_press_any_key_to_continue_, responseLine); System.Console.ReadKey(); Thread.Sleep(1000); @@ -431,7 +413,7 @@ sealed class DumpMediaCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening device...").IsIndeterminate(); + ctx.AddTask(UI.Opening_device).IsIndeterminate(); dev = Devices.Device.Create(devicePath, out devErrno); }); @@ -439,7 +421,7 @@ sealed class DumpMediaCommand : Command { case null: { - AaruConsole.ErrorWriteLine($"Could not open device, error {devErrno}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Could_not_open_device_error_0, devErrno)); if(isResponse) continue; @@ -480,7 +462,7 @@ sealed class DumpMediaCommand : Command } catch { - AaruConsole.ErrorWriteLine("Incorrect resume file, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Incorrect_resume_file_not_continuing); if(isResponse) continue; @@ -495,7 +477,7 @@ sealed class DumpMediaCommand : Command (resumeClass.BadSubchannels is null || resumeClass.BadSubchannels.Count == 0) && (resumeClass.MissingTitleKeys is null || resumeClass.MissingTitleKeys.Count == 0)) { - AaruConsole.WriteLine("Media already dumped correctly, not continuing..."); + AaruConsole.WriteLine(UI.Media_already_dumped_correctly_not_continuing); if(isResponse) continue; @@ -516,7 +498,7 @@ sealed class DumpMediaCommand : Command } catch { - AaruConsole.ErrorWriteLine("Incorrect metadata sidecar file, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Incorrect_metadata_sidecar_file); if(isResponse) continue; @@ -525,7 +507,7 @@ sealed class DumpMediaCommand : Command } else { - AaruConsole.ErrorWriteLine("Could not find metadata sidecar, not continuing..."); + AaruConsole.ErrorWriteLine(UI.Could_not_find_metadata_sidecar); if(isResponse) continue; @@ -558,13 +540,13 @@ sealed class DumpMediaCommand : Command if(verbose) { - dumpLog.WriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); - AaruConsole.VerboseWriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); + dumpLog.WriteLine(UI.Output_image_format_0_1, outputFormat.Name, outputFormat.Id); + AaruConsole.VerboseWriteLine(UI.Output_image_format_0_1, outputFormat.Name, outputFormat.Id); } else { - dumpLog.WriteLine("Output image format: {0}.", outputFormat.Name); - AaruConsole.WriteLine("Output image format: {0}.", outputFormat.Name); + dumpLog.WriteLine(UI.Output_image_format_0, outputFormat.Name); + AaruConsole.WriteLine(UI.Output_image_format_0, outputFormat.Name); } var errorLog = new ErrorLog(outputPrefix + ".error.log"); @@ -657,7 +639,7 @@ sealed class DumpMediaCommand : Command if(eject && dev.IsRemovable) Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Ejecting media...").IsIndeterminate(); + ctx.AddTask(UI.Ejecting_media).IsIndeterminate(); switch(dev.Type) { diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index 004b2d28c..d23cc74ca 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -50,6 +50,7 @@ using Aaru.Decoders.DVD; using Aaru.Decoders.SCSI.MMC; using Aaru.Decoders.SCSI.SSC; using Aaru.Decoders.Xbox; +using Aaru.Localization; using Spectre.Console; using BCA = Aaru.Decoders.Bluray.BCA; using Cartridge = Aaru.Decoders.DVD.Cartridge; @@ -63,17 +64,17 @@ namespace Aaru.Commands.Media; sealed class MediaInfoCommand : Command { - public MediaInfoCommand() : base("info", "Gets information about the media inserted on a device.") + public MediaInfoCommand() : base("info", UI.Media_Info_Command_Description) { Add(new Option(new[] { "--output-prefix", "-w" - }, () => null, "Write binary responses from device with that prefix.")); + }, () => null, UI.Prefix_for_saving_binary_information)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Device path", + Description = UI.Device_path, Name = "device-path" }); @@ -127,14 +128,14 @@ sealed class MediaInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening device...").IsIndeterminate(); + ctx.AddTask(UI.Opening_device).IsIndeterminate(); dev = Devices.Device.Create(devicePath, out devErrno); }); switch(dev) { case null: - AaruConsole.ErrorWriteLine($"Could not open device, error {devErrno}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Could_not_open_device_error_0, devErrno)); return (int)devErrno; case Devices.Remote.Device remoteDev: @@ -174,18 +175,18 @@ sealed class MediaInfoCommand : Command DoScsiMediaInfo(debug, outputPrefix, dev); break; - default: throw new NotSupportedException("Unknown device type."); + default: throw new NotSupportedException(Localization.Core.Unknown_device_type); } return (int)ErrorNumber.NoError; } - static void DoAtaMediaInfo() => AaruConsole.ErrorWriteLine("Please use device-info command for ATA devices."); + static void DoAtaMediaInfo() => AaruConsole.ErrorWriteLine(UI.Please_use_device_info_command_for_ATA_devices); static void DoNvmeMediaInfo(string outputPrefix, Devices.Device dev) => - throw new NotImplementedException("NVMe devices not yet supported."); + throw new NotImplementedException(Localization.Core.NVMe_devices_not_yet_supported); - static void DoSdMediaInfo() => AaruConsole.ErrorWriteLine("Please use device-info command for MMC/SD devices."); + static void DoSdMediaInfo() => AaruConsole.ErrorWriteLine(UI.Please_use_device_info_command_for_MMC_SD_devices); static void DoScsiMediaInfo(bool debug, string outputPrefix, Devices.Device dev) { @@ -193,7 +194,7 @@ sealed class MediaInfoCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Retrieving SCSI information...").IsIndeterminate(); + ctx.AddTask(UI.Retrieving_SCSI_information).IsIndeterminate(); scsiInfo = new ScsiInfo(dev); }); @@ -234,28 +235,33 @@ sealed class MediaInfoCommand : Command switch(totalSize) { case > 1099511627776: - AaruConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} TiB)", - scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1099511627776d); + AaruConsole. + WriteLine(Localization.Core.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_TiB, + scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1099511627776d); break; case > 1073741824: - AaruConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} GiB)", - scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1073741824d); + AaruConsole. + WriteLine(Localization.Core.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_GiB, + scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1073741824d); break; case > 1048576: - AaruConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} MiB)", - scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1048576d); + AaruConsole. + WriteLine(Localization.Core.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_MiB, + scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1048576d); break; case > 1024: - AaruConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2:F3} KiB)", - scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1024d); + AaruConsole. + WriteLine(Localization.Core.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_KiB, + scsiInfo.Blocks, scsiInfo.BlockSize, totalSize / 1024d); break; default: - AaruConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2} bytes)", - scsiInfo.Blocks, scsiInfo.BlockSize, totalSize); + AaruConsole. + WriteLine(Localization.Core.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2_bytes, + scsiInfo.Blocks, scsiInfo.BlockSize, totalSize); break; } @@ -270,7 +276,7 @@ sealed class MediaInfoCommand : Command if(scsiInfo.DensitySupportHeader.HasValue) { - AaruConsole.WriteLine("[bold]Densities supported by currently inserted media:[/]"); + AaruConsole.WriteLine($"[bold]{UI.Densities_supported_by_currently_inserted_media}:[/]"); AaruConsole.WriteLine(DensitySupport.PrettifyDensity(scsiInfo.DensitySupportHeader)); } } @@ -282,7 +288,7 @@ sealed class MediaInfoCommand : Command if(scsiInfo.MediaTypeSupportHeader.HasValue) { - AaruConsole.WriteLine("[bold]Medium types currently inserted in device:[/]"); + AaruConsole.WriteLine($"[bold]{UI.Medium_types_currently_inserted_in_device}:[/]"); AaruConsole.WriteLine(DensitySupport.PrettifyMediumType(scsiInfo.MediaTypeSupportHeader)); } @@ -321,10 +327,11 @@ sealed class MediaInfoCommand : Command "SCSI READ DISC STRUCTURE", scsiInfo.DvdDmi); if(DMI.IsXbox(scsiInfo.DvdDmi)) - AaruConsole.WriteLine("[bold]Xbox DMI:[/]\n{0}", Markup.Escape(DMI.PrettifyXbox(scsiInfo.DvdDmi))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Xbox_DMI}:[/]", + $"\n{Markup.Escape(DMI.PrettifyXbox(scsiInfo.DvdDmi))}"); else if(DMI.IsXbox360(scsiInfo.DvdDmi)) - AaruConsole.WriteLine("[bold]Xbox 360 DMI:[/]\n{0}", - Markup.Escape(DMI.PrettifyXbox360(scsiInfo.DvdDmi))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Xbox_360_DMI}:[/]", + $"\n{Markup.Escape(DMI.PrettifyXbox360(scsiInfo.DvdDmi))}"); } if(scsiInfo.DvdCmi != null) @@ -332,8 +339,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvd_cmi.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdCmi); - AaruConsole.WriteLine("[bold]Lead-In CMI:[/]\n{0}", - Markup.Escape(CSS_CPRM.PrettifyLeadInCopyright(scsiInfo.DvdCmi))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Lead_In_CMI}:[/]", + $"\n{Markup.Escape(CSS_CPRM.PrettifyLeadInCopyright(scsiInfo.DvdCmi))}"); } if(scsiInfo.DvdDiscKey != null) @@ -357,8 +364,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvdram_dds.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdRamDds); - AaruConsole.WriteLine("[bold]Disc Definition Structure:[/]\n{0}", - Markup.Escape(DDS.Prettify(scsiInfo.DvdRamDds))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Disc_Definition_Structure}:[/]", + $"\n{Markup.Escape(DDS.Prettify(scsiInfo.DvdRamDds))}"); } if(scsiInfo.DvdRamCartridgeStatus != null) @@ -366,8 +373,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvdram_status.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdRamCartridgeStatus); - AaruConsole.WriteLine("[bold]Medium Status:[/]\n{0}", - Markup.Escape(Cartridge.Prettify(scsiInfo.DvdRamCartridgeStatus))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Medium_Status}:[/]", + $"\n{Markup.Escape(Cartridge.Prettify(scsiInfo.DvdRamCartridgeStatus))}"); } if(scsiInfo.DvdRamSpareArea != null) @@ -375,8 +382,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvdram_spare.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdRamSpareArea); - AaruConsole.WriteLine("[bold]Spare Area Information:[/]\n{0}", - Markup.Escape(Spare.Prettify(scsiInfo.DvdRamSpareArea))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Spare_Area_Information}:[/]", + $"\n{Markup.Escape(Spare.Prettify(scsiInfo.DvdRamSpareArea))}"); } if(scsiInfo.LastBorderOutRmd != null) @@ -389,8 +396,8 @@ sealed class MediaInfoCommand : Command "SCSI READ DISC STRUCTURE", scsiInfo.DvdPreRecordedInfo); if(scsiInfo.DecodedDvdPrePitInformation.HasValue) - AaruConsole.WriteLine("[bold]DVD-R(W) Pre-Recorded Information:[/]\n{0}", - Markup.Escape(PRI.Prettify(scsiInfo.DecodedDvdPrePitInformation))); + AaruConsole.WriteLine($"[bold]{Localization.Core.DVD_RW_Pre_Recorded_Information}:[/]", + $"\n{Markup.Escape(PRI.Prettify(scsiInfo.DecodedDvdPrePitInformation))}"); } if(scsiInfo.DvdrMediaIdentifier != null) @@ -403,8 +410,8 @@ sealed class MediaInfoCommand : Command "SCSI READ DISC STRUCTURE", scsiInfo.DvdrPhysicalInformation); if(scsiInfo.DecodedDvdrPfi.HasValue) - AaruConsole.WriteLine("[bold]DVD-R(W) PFI:[/]\n{0}", - Markup.Escape(PFI.Prettify(scsiInfo.DecodedDvdrPfi))); + AaruConsole.WriteLine($"[bold]{Localization.Core.DVD_RW_PFI}:[/]", + $"\n{Markup.Escape(PFI.Prettify(scsiInfo.DecodedDvdrPfi))}"); } if(scsiInfo.DvdPlusAdip != null) @@ -452,8 +459,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_di.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayDiscInformation); - AaruConsole.WriteLine("[bold]Blu-ray Disc Information:[/]\n{0}", - Markup.Escape(DI.Prettify(scsiInfo.BlurayDiscInformation))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Bluray_Disc_Information}:[/]", + $"\n{Markup.Escape(DI.Prettify(scsiInfo.BlurayDiscInformation))}"); } if(scsiInfo.BlurayPac != null) @@ -465,8 +472,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_bca.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayBurstCuttingArea); - AaruConsole.WriteLine("[bold]Blu-ray Burst Cutting Area:[/]\n{0}", - Markup.Escape(BCA.Prettify(scsiInfo.BlurayBurstCuttingArea))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Bluray_Burst_Cutting_Area}:[/]", + $"\n{Markup.Escape(BCA.Prettify(scsiInfo.BlurayBurstCuttingArea))}"); } if(scsiInfo.BlurayDds != null) @@ -474,8 +481,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_dds.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayDds); - AaruConsole.WriteLine("[bold]Blu-ray Disc Definition Structure:[/]\n{0}", - Markup.Escape(Decoders.Bluray.DDS.Prettify(scsiInfo.BlurayDds))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Bluray_Disc_Definition_Structure}:[/]", + $"\n{Markup.Escape(Decoders.Bluray.DDS.Prettify(scsiInfo.BlurayDds))}"); } if(scsiInfo.BlurayCartridgeStatus != null) @@ -483,9 +490,9 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_cartstatus.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayCartridgeStatus); - AaruConsole.WriteLine("[bold]Blu-ray Cartridge Status:[/]\n{0}", - Markup.Escape(Decoders.Bluray.Cartridge. - Prettify(scsiInfo.BlurayCartridgeStatus))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Bluray_Cartridge_Status}:[/]", + $"\n{Markup.Escape(Decoders.Bluray.Cartridge.Prettify(scsiInfo. + BlurayCartridgeStatus))}"); } if(scsiInfo.BluraySpareAreaInformation != null) @@ -493,9 +500,9 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_spare.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BluraySpareAreaInformation); - AaruConsole.WriteLine("[bold]Blu-ray Spare Area Information:[/]\n{0}", - Markup.Escape(Decoders.Bluray.Spare. - Prettify(scsiInfo.BluraySpareAreaInformation))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Bluray_Spare_Area_Information}:[/]", + $"\n{Markup.Escape(Decoders.Bluray.Spare.Prettify(scsiInfo. + BluraySpareAreaInformation))}"); } if(scsiInfo.BlurayRawDfl != null) @@ -504,8 +511,8 @@ sealed class MediaInfoCommand : Command if(scsiInfo.BlurayTrackResources != null) { - AaruConsole.WriteLine("[bold]Track Resources Information:[/]\n{0}", - Markup.Escape(DiscInformation.Prettify(scsiInfo.BlurayTrackResources))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Track_Resources_Information}:[/]", + $"\n{Markup.Escape(DiscInformation.Prettify(scsiInfo.BlurayTrackResources))}"); DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscinformation_001b.bin", "SCSI READ DISC INFORMATION", scsiInfo.BlurayTrackResources); @@ -513,8 +520,8 @@ sealed class MediaInfoCommand : Command if(scsiInfo.BlurayPowResources != null) { - AaruConsole.WriteLine("[bold]POW Resources Information:[/]\n{0}", - Markup.Escape(DiscInformation.Prettify(scsiInfo.BlurayPowResources))); + AaruConsole.WriteLine($"[bold]{Localization.Core.POW_Resources_Information}:[/]", + $"\n{Markup.Escape(DiscInformation.Prettify(scsiInfo.BlurayPowResources))}"); DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscinformation_010b.bin", "SCSI READ DISC INFORMATION", scsiInfo.BlurayPowResources); @@ -526,7 +533,8 @@ sealed class MediaInfoCommand : Command scsiInfo.Toc); if(scsiInfo.DecodedToc.HasValue) - AaruConsole.WriteLine("[bold]TOC:[/]\n{0}", Markup.Escape(TOC.Prettify(scsiInfo.DecodedToc))); + AaruConsole.WriteLine($"[bold]{Localization.Core.TOC}:[/]", + $"\n{Markup.Escape(TOC.Prettify(scsiInfo.DecodedToc))}"); } if(scsiInfo.Atip != null) @@ -535,7 +543,8 @@ sealed class MediaInfoCommand : Command scsiInfo.Atip); if(scsiInfo.DecodedAtip != null) - AaruConsole.WriteLine("[bold]ATIP:[/]\n{0}", Markup.Escape(ATIP.Prettify(scsiInfo.DecodedAtip))); + AaruConsole.WriteLine($"[bold]{Localization.Core.ATIP}:[/]", + $"\n{Markup.Escape(ATIP.Prettify(scsiInfo.DecodedAtip))}"); } if(scsiInfo.DiscInformation != null) @@ -544,8 +553,9 @@ sealed class MediaInfoCommand : Command "SCSI READ DISC INFORMATION", scsiInfo.DiscInformation); if(scsiInfo.DecodedDiscInformation.HasValue) - AaruConsole.WriteLine("[bold]Standard Disc Information:[/]\n{0}", - Markup.Escape(DiscInformation.Prettify000b(scsiInfo.DecodedDiscInformation))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Standard_Disc_Information}:[/]", + $"\n{Markup.Escape(DiscInformation.Prettify000b(scsiInfo. + DecodedDiscInformation))}"); } if(scsiInfo.Session != null) @@ -554,8 +564,8 @@ sealed class MediaInfoCommand : Command scsiInfo.Session); if(scsiInfo.DecodedSession.HasValue) - AaruConsole.WriteLine("[bold]Session information:[/]\n{0}", - Markup.Escape(Session.Prettify(scsiInfo.DecodedSession))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Session_information}:[/]", + $"\n{Markup.Escape(Session.Prettify(scsiInfo.DecodedSession))}"); } if(scsiInfo.RawToc != null) @@ -564,7 +574,8 @@ sealed class MediaInfoCommand : Command scsiInfo.RawToc); if(scsiInfo.FullToc.HasValue) - AaruConsole.WriteLine("[bold]Raw TOC:[/]\n{0}", Markup.Escape(FullTOC.Prettify(scsiInfo.RawToc))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Raw_TOC}:[/]", + $"\n{Markup.Escape(FullTOC.Prettify(scsiInfo.RawToc))}"); } if(scsiInfo.Pma != null) @@ -572,7 +583,8 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_pma.bin", "SCSI READ TOC/PMA/ATIP", scsiInfo.Pma); - AaruConsole.WriteLine("[bold]PMA:\n[/]{0}", Markup.Escape(PMA.Prettify(scsiInfo.Pma))); + AaruConsole.WriteLine($"[bold]{Localization.Core.PMA}:[/]", + $"\n[/]{Markup.Escape(PMA.Prettify(scsiInfo.Pma))}"); } if(scsiInfo.CdTextLeadIn != null) @@ -581,33 +593,45 @@ sealed class MediaInfoCommand : Command scsiInfo.CdTextLeadIn); if(scsiInfo.DecodedCdTextLeadIn.HasValue) - AaruConsole.WriteLine("[bold]CD-TEXT on Lead-In:[/]\n{0}", - Markup.Escape(CDTextOnLeadIn.Prettify(scsiInfo.DecodedCdTextLeadIn))); + AaruConsole.WriteLine($"[bold]{Localization.Core.CD_TEXT_on_Lead_In}:[/]", + $"\n{Markup.Escape(CDTextOnLeadIn.Prettify(scsiInfo.DecodedCdTextLeadIn))}"); } if(!string.IsNullOrEmpty(scsiInfo.Mcn)) - AaruConsole.WriteLine("[bold]MCN:[/] {0}", Markup.Escape(scsiInfo.Mcn)); + AaruConsole.WriteLine($"[bold]{Localization.Core.MCN}:[/]", $" {Markup.Escape(scsiInfo.Mcn)}"); if(scsiInfo.Isrcs != null) foreach(KeyValuePair isrc in scsiInfo.Isrcs) - AaruConsole.WriteLine("[bold]Track's {0} ISRC:[/] {1}", isrc.Key, Markup.Escape(isrc.Value)); + AaruConsole.WriteLine($"[bold]{string.Format(Localization.Core.Tracks_0_ISRC, isrc.Key)}:[/] { + Markup.Escape(isrc.Value)}"); if(scsiInfo.XboxSecuritySector != null) DataFile.WriteTo("Media-Info command", outputPrefix, "_xbox_ss.bin", "KREON EXTRACT SS", scsiInfo.XboxSecuritySector); if(scsiInfo.DecodedXboxSecuritySector.HasValue) - AaruConsole.WriteLine("[bold]Xbox Security Sector:[/]\n{0}", - Markup.Escape(SS.Prettify(scsiInfo.DecodedXboxSecuritySector))); + AaruConsole.WriteLine($"[bold]{Localization.Core.Xbox_Security_Sector}:[/]", + $"\n{Markup.Escape(SS.Prettify(scsiInfo.DecodedXboxSecuritySector))}"); if(scsiInfo.XgdInfo != null) { - AaruConsole.WriteLine("[bold]Video layer 0 size:[/] {0} sectors", scsiInfo.XgdInfo.L0Video); - AaruConsole.WriteLine("[bold]Video layer 1 size:[/] {0} sectors", scsiInfo.XgdInfo.L1Video); - AaruConsole.WriteLine("[bold]Middle zone size:[/] {0} sectors", scsiInfo.XgdInfo.MiddleZone); - AaruConsole.WriteLine("[bold]Game data size:[/] {0} sectors", scsiInfo.XgdInfo.GameSize); - AaruConsole.WriteLine("[bold]Total size:[/] {0} sectors", scsiInfo.XgdInfo.TotalSize); - AaruConsole.WriteLine("[bold]Real layer break:[/] {0}", scsiInfo.XgdInfo.LayerBreak); + AaruConsole.WriteLine($"[bold]{Localization.Core.Video_layer_zero_size}:[/] {scsiInfo.XgdInfo.L0Video + } sectors"); + + AaruConsole.WriteLine($"[bold]{Localization.Core.Video_layer_one_size}:[/] {scsiInfo.XgdInfo.L1Video + } sectors"); + + AaruConsole.WriteLine($"[bold]{Localization.Core.Middle_zone_size}:[/] {scsiInfo.XgdInfo.MiddleZone + } sectors"); + + AaruConsole.WriteLine($"[bold]{Localization.Core.Game_data_size}:[/] {scsiInfo.XgdInfo.GameSize + } sectors"); + + AaruConsole.WriteLine($"[bold]{Localization.Core.Total_size}:[/] {scsiInfo.XgdInfo.TotalSize} sectors"); + + AaruConsole.WriteLine($"[bold]{Localization.Core.Real_layer_break}:[/] {scsiInfo.XgdInfo.LayerBreak + } sectors"); + AaruConsole.WriteLine(); } } @@ -617,7 +641,7 @@ sealed class MediaInfoCommand : Command DataFile.WriteTo("Media-Info command", outputPrefix, "_mediaserialnumber.bin", "SCSI READ MEDIA SERIAL NUMBER", scsiInfo.MediaSerialNumber); - AaruConsole.Write("[bold]Media Serial Number:[/] "); + AaruConsole.Write($"[bold]{Localization.Core.Media_Serial_Number}:[/] "); for(int i = 4; i < scsiInfo.MediaSerialNumber.Length; i++) AaruConsole.Write("{0:X2}", scsiInfo.MediaSerialNumber[i]); @@ -625,7 +649,7 @@ sealed class MediaInfoCommand : Command AaruConsole.WriteLine(); } - AaruConsole.WriteLine("[bold]Media identified as [italic]{0}[/][/]", scsiInfo.MediaType); + AaruConsole.WriteLine($"[bold]{Localization.Core.Media_identified_as} [italic]{scsiInfo.MediaType}[/][/]"); Statistics.AddMedia(scsiInfo.MediaType, true); if(scsiInfo.Toc != null || @@ -658,22 +682,22 @@ sealed class MediaInfoCommand : Command tracks[^1].EndSector = (ulong)lastSector; AaruConsole.WriteLine(); - AaruConsole.WriteLine("[bold]Track calculations:[/]"); + AaruConsole.WriteLine($"[bold]{Localization.Core.Track_calculations}:[/]"); if(inexactPositioning) - AaruConsole. - WriteLine("[yellow]WARNING: The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect.[/]"); + AaruConsole.WriteLine($"[yellow]{UI. + The_drive_has_returned_incorrect_Q_positioning_calculating_pregaps}[/]"); if(firstLba > 0) - AaruConsole.WriteLine("Hidden track starts at LBA {0}, ends at LBA {1}", 0, firstLba - 1); + AaruConsole.WriteLine(UI.Hidden_track_starts_at_LBA_0_ends_at_LBA_1, 0, firstLba - 1); foreach(Track track in tracks) AaruConsole. - WriteLine("Track {0} starts at LBA {1}, ends at LBA {2}, has a pregap of {3} sectors and is of type {4}", + WriteLine(UI.Track_0_starts_at_LBA_1_ends_at_LBA_2_has_a_pregap_of_3_sectors_and_is_of_type_4, track.Sequence, track.StartSector, track.EndSector, track.Pregap, track.Type); AaruConsole.WriteLine(); - AaruConsole.WriteLine("[bold]Offsets:[/]"); + AaruConsole.WriteLine($"[bold]{Localization.Core.Offsets}:[/]"); // Search for read offset in main database CdOffset cdOffset = @@ -688,15 +712,17 @@ sealed class MediaInfoCommand : Command { if(driveOffset is null) { - AaruConsole.WriteLine("[red]Drive reading offset not found in database.[/]"); - AaruConsole.WriteLine("[red]Disc offset cannot be calculated.[/]"); + AaruConsole.WriteLine($"[red]{Localization.Core.Drive_reading_offset_not_found_in_database + }[/]"); + + AaruConsole.WriteLine($"[red]{Localization.Core.Disc_offset_cannot_be_calculated}[/]"); } else { - AaruConsole.WriteLine($"Drive reading offset is {driveOffset} bytes ({driveOffset / 4 - } samples)."); + AaruConsole.WriteLine(string.Format(Localization.Core.Drive_reading_offset_is_0_bytes_1_samples, + driveOffset, driveOffset / 4)); - AaruConsole.WriteLine("[red]Disc write offset is unknown.[/]"); + AaruConsole.WriteLine($"[red]{Localization.Core.Disc_write_offset_is_unknown}[/]"); } } else @@ -705,21 +731,26 @@ sealed class MediaInfoCommand : Command if(driveOffset is null) { - AaruConsole.WriteLine("[red]Drive reading offset not found in database.[/]"); + AaruConsole.WriteLine($"[red]{Localization.Core.Drive_reading_offset_not_found_in_database + }[/]"); - AaruConsole.WriteLine($"Combined disc and drive offset are {offsetBytes} bytes ({offsetBytes / 4 - } samples)."); + AaruConsole. + WriteLine(string. + Format(Localization.Core.Combined_disc_and_drive_offset_are_0_bytes_1_samples, + offsetBytes, offsetBytes / 4)); } else { - AaruConsole.WriteLine($"Drive reading offset is {driveOffset} bytes ({driveOffset / 4 - } samples)."); + AaruConsole.WriteLine(string.Format(Localization.Core.Drive_reading_offset_is_0_bytes_1_samples, + driveOffset, driveOffset / 4)); - AaruConsole.WriteLine($"Combined offset is {offsetBytes} bytes ({offsetBytes / 4} samples)."); + AaruConsole.WriteLine(string.Format(Localization.Core.Combined_offset_is_0_bytes_1_samples, + offsetBytes, offsetBytes / 4)); int? discOffset = offsetBytes - driveOffset; - AaruConsole.WriteLine($"Disc offset is {discOffset} bytes ({discOffset / 4} samples)."); + AaruConsole.WriteLine(string.Format(Localization.Core.Disc_offset_is_0_bytes_1_samples, + discOffset, discOffset / 4)); } } } diff --git a/Aaru/Commands/Media/MediaFamily.cs b/Aaru/Commands/Media/MediaFamily.cs index 40ad9bbaa..d4e982f47 100644 --- a/Aaru/Commands/Media/MediaFamily.cs +++ b/Aaru/Commands/Media/MediaFamily.cs @@ -31,12 +31,13 @@ // ****************************************************************************/ using System.CommandLine; +using Aaru.Localization; namespace Aaru.Commands.Media; sealed class MediaFamily : Command { - public MediaFamily() : base("media", "Commands to manage media inserted in devices") + public MediaFamily() : base("media", UI.Media_Command_Family_Description) { AddAlias("m"); diff --git a/Aaru/Commands/Media/Scan.cs b/Aaru/Commands/Media/Scan.cs index 825d4b4be..de7543603 100644 --- a/Aaru/Commands/Media/Scan.cs +++ b/Aaru/Commands/Media/Scan.cs @@ -36,6 +36,7 @@ using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; using Aaru.Core.Devices.Scanning; +using Aaru.Localization; using Spectre.Console; namespace Aaru.Commands.Media; @@ -44,27 +45,27 @@ sealed class MediaScanCommand : Command { static ProgressTask _progressTask1; - public MediaScanCommand() : base("scan", "Scans the media inserted on a device.") + public MediaScanCommand() : base("scan", UI.Media_Scan_Command_Description) { Add(new Option(new[] { "--mhdd-log", "-m" - }, () => null, "Write a log of the scan in the format used by MHDD.")); + }, () => null, UI.Write_a_log_of_the_scan_in_the_format_used_by_MHDD)); Add(new Option(new[] { "--ibg-log", "-b" - }, () => null, "Write a log of the scan in the format used by ImgBurn.")); + }, () => null, UI.Write_a_log_of_the_scan_in_the_format_used_by_ImgBurn)); Add(new Option(new[] { "--use-buffered-reads" - }, () => true, "For MMC/SD, use OS buffered reads if CMD23 is not supported.")); + }, () => true, UI.OS_buffered_reads_help)); AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Device path", + Description = UI.Device_path, Name = "device-path" }); @@ -121,14 +122,14 @@ sealed class MediaScanCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask("Opening device...").IsIndeterminate(); + ctx.AddTask(UI.Opening_device).IsIndeterminate(); dev = Devices.Device.Create(devicePath, out devErrno); }); switch(dev) { case null: - AaruConsole.ErrorWriteLine($"Could not open device, error {devErrno}."); + AaruConsole.ErrorWriteLine(string.Format(UI.Could_not_open_device_error_0, devErrno)); return (int)devErrno; case Devices.Remote.Device remoteDev: @@ -203,25 +204,37 @@ sealed class MediaScanCommand : Command results = scanner.Scan(); }); - AaruConsole.WriteLine("Took a total of {0} seconds ({1} processing commands).", results.TotalTime, + AaruConsole.WriteLine(Localization.Core.Took_a_total_of_0_seconds_1_processing_commands, results.TotalTime, results.ProcessingTime); - AaruConsole.WriteLine("Average speed: {0:F3} MiB/sec.", results.AvgSpeed); - AaruConsole.WriteLine("Fastest speed burst: {0:F3} MiB/sec.", results.MaxSpeed); - AaruConsole.WriteLine("Slowest speed burst: {0:F3} MiB/sec.", results.MinSpeed); + AaruConsole.WriteLine(Localization.Core.Average_speed_0_MiB_sec, results.AvgSpeed); + AaruConsole.WriteLine(Localization.Core.Fastest_speed_burst_0_MiB_sec, results.MaxSpeed); + AaruConsole.WriteLine(Localization.Core.Slowest_speed_burst_0_MiB_sec, results.MinSpeed); AaruConsole.WriteLine(); - AaruConsole.WriteLine("[bold]Summary:[/]"); - AaruConsole.WriteLine("[lime]{0} sectors took less than 3 ms.[/]", results.A); - AaruConsole.WriteLine("[green]{0} sectors took less than 10 ms but more than 3 ms.[/]", results.B); - AaruConsole.WriteLine("[darkorange]{0} sectors took less than 50 ms but more than 10 ms.[/]", results.C); - AaruConsole.WriteLine("[olive]{0} sectors took less than 150 ms but more than 50 ms.[/]", results.D); - AaruConsole.WriteLine("[orange3]{0} sectors took less than 500 ms but more than 150 ms.[/]", results.E); - AaruConsole.WriteLine("[red]{0} sectors took more than 500 ms.[/]", results.F); - AaruConsole.WriteLine("[maroon]{0} sectors could not be read.[/]", results.UnreadableSectors.Count); + AaruConsole.WriteLine($"[bold]{Localization.Core.Summary}:[/]"); + AaruConsole.WriteLine($"[lime]{string.Format(Localization.Core._0_sectors_took_less_than_3_ms, results.A)}[/]"); + + AaruConsole.WriteLine($"[green]{ + string.Format(Localization.Core._0_sectors_took_less_than_10_ms_but_more_than_3_ms, results.B)}[/]"); + + AaruConsole.WriteLine($"[darkorange]{ + string.Format(Localization.Core._0_sectors_took_less_than_50_ms_but_more_than_10_ms, results.C)}[/]"); + + AaruConsole.WriteLine($"[olive]{ + string.Format(Localization.Core._0_sectors_took_less_than_150_ms_but_more_than_50_ms, results.D)}[/]"); + + AaruConsole.WriteLine($"[orange3]{ + string.Format(Localization.Core._0_sectors_took_less_than_500_ms_but_more_than_150_ms, results.E)}[/]"); + + AaruConsole.WriteLine($"[red]{string.Format(Localization.Core._0_sectors_took_more_than_500_ms, results.F) + }[/]"); + + AaruConsole.WriteLine($"[maroon]{string.Format(Localization.Core._0_sectors_could_not_be_read, + results.UnreadableSectors.Count)}[/]"); if(results.UnreadableSectors.Count > 0) foreach(ulong bad in results.UnreadableSectors) - AaruConsole.WriteLine("Sector {0} could not be read", bad); + AaruConsole.WriteLine(Localization.Core.Sector_0_could_not_be_read, bad); AaruConsole.WriteLine(); @@ -230,7 +243,7 @@ sealed class MediaScanCommand : Command results.SeekMax > double.MinValue) AaruConsole. - WriteLine("Testing {0} seeks, longest seek took {1:F3} ms, fastest one took {2:F3} ms. ({3:F3} ms average)", + WriteLine(Localization.Core.Testing_0_seeks_longest_seek_took_1_ms_fastest_one_took_2_ms_3_ms_average, results.SeekTimes, results.SeekMax, results.SeekMin, results.SeekTotal / 1000); dev.Close(); diff --git a/Aaru/Commands/Remote.cs b/Aaru/Commands/Remote.cs index 9e5768f03..9a4c1b63a 100644 --- a/Aaru/Commands/Remote.cs +++ b/Aaru/Commands/Remote.cs @@ -38,6 +38,7 @@ using System.CommandLine.NamingConventionBinder; using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; +using Aaru.Localization; using Spectre.Console; using Remote = Aaru.Devices.Remote.Remote; @@ -45,7 +46,7 @@ namespace Aaru.Commands; sealed class RemoteCommand : Command { - public RemoteCommand() : base("remote", "Tests connection to a Aaru Remote Server.") + public RemoteCommand() : base("remote", UI.Remote_Command_Description) { AddArgument(new Argument { diff --git a/Aaru/Main.cs b/Aaru/Main.cs index 7c37b7585..7778b2ac0 100644 --- a/Aaru/Main.cs +++ b/Aaru/Main.cs @@ -48,6 +48,7 @@ using Aaru.CommonTypes.Enums; using Aaru.Console; using Aaru.Core; using Aaru.Database; +using Aaru.Localization; using Aaru.Settings; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; @@ -171,7 +172,7 @@ class MainClass if(mainContext.Database.GetPendingMigrations().Any()) { - AaruConsole.WriteLine("New database version, updating..."); + AaruConsole.WriteLine(UI.New_database_version_updating); try { @@ -179,8 +180,8 @@ class MainClass } catch(Exception) { - AaruConsole.ErrorWriteLine("Exception trying to remove old database version, cannot continue..."); - AaruConsole.ErrorWriteLine("Please manually remove file at {0}", Settings.Settings.MainDbPath); + AaruConsole.ErrorWriteLine(UI.Exception_trying_to_remove_old_database_version); + AaruConsole.ErrorWriteLine(UI.Please_manually_remove_file_at_0, Settings.Settings.MainDbPath); return (int)ErrorNumber.CannotRemoveDatabase; } @@ -205,17 +206,17 @@ class MainClass rootCommand.AddGlobalOption(new Option(new[] { "--verbose", "-v" - }, () => false, "Shows verbose output.")); + }, () => false, UI.Shows_verbose_output)); rootCommand.AddGlobalOption(new Option(new[] { "--debug", "-d" - }, () => false, "Shows debug output from plugins.")); + }, () => false, UI.Shows_debug_output_from_plugins)); Option pauseOption = new(new[] { "--pause" - }, () => false, "Pauses before exiting."); + }, () => false, UI.Pauses_before_exiting); rootCommand.AddGlobalOption(pauseOption); @@ -241,7 +242,7 @@ class MainClass if(!rootCommand.Parse(args).RootCommandResult.GetValueForOption(pauseOption)) return ret; - AaruConsole.WriteLine("Press any key to exit."); + AaruConsole.WriteLine(UI.Press_any_key_to_exit); System.Console.ReadKey(); return ret;