diff --git a/Aaru.Localization/UI.Designer.cs b/Aaru.Localization/UI.Designer.cs index c64f91823..7e3dd1001 100644 --- a/Aaru.Localization/UI.Designer.cs +++ b/Aaru.Localization/UI.Designer.cs @@ -59,6 +59,24 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to {0} files. + /// + public static string _0_files { + get { + return ResourceManager.GetString("_0_files", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} files, {1} folders. + /// + public static string _0_files_1_folders { + get { + return ResourceManager.GetString("_0_files_1_folders", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} Kb/sec.. /// @@ -167,6 +185,33 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Extracts all files in archive.. + /// + public static string Archive_Extract_Command_Description { + get { + return ResourceManager.GetString("Archive_Extract_Command_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Archive file path. + /// + public static string Archive_file_path { + get { + return ResourceManager.GetString("Archive_file_path", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Archive format identified by {0}.. + /// + public static string Archive_format_identified_by_0 { + get { + return ResourceManager.GetString("Archive_format_identified_by_0", resourceCulture); + } + } + /// /// Looks up a localized string similar to Archive format identified by {0} ({1}).. /// @@ -185,6 +230,24 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Archive format not identified, not proceeding with extraction.. + /// + public static string Archive_format_not_identified_not_proceeding_with_extraction { + get { + return ResourceManager.GetString("Archive_format_not_identified_not_proceeding_with_extraction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Archive format not identified, not proceeding with listing.. + /// + public static string Archive_format_not_identified_not_proceeding_with_listing { + get { + return ResourceManager.GetString("Archive_format_not_identified_not_proceeding_with_listing", resourceCulture); + } + } + /// /// Looks up a localized string similar to Identifies an archive file and shows information about it.. /// @@ -1772,6 +1835,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Correctly opened archive file.. + /// + public static string Correctly_opened_archive_file { + get { + return ResourceManager.GetString("Correctly_opened_archive_file", resourceCulture); + } + } + /// /// Looks up a localized string similar to Correctly opened image file.. /// @@ -2683,6 +2755,51 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Error {0} getting compressed size for archive entry #{1}.. + /// + public static string Error_0_getting_compressed_size_for_archive_entry_1 { + get { + return ResourceManager.GetString("Error_0_getting_compressed_size_for_archive_entry_1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error {0} getting filename for archive entry #{1}.. + /// + public static string Error_0_getting_filename_for_archive_entry_1 { + get { + return ResourceManager.GetString("Error_0_getting_filename_for_archive_entry_1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error {0} getting filter for archive entry #{1}.. + /// + public static string Error_0_getting_filter_for_archive_entry_1 { + get { + return ResourceManager.GetString("Error_0_getting_filter_for_archive_entry_1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error {0} getting uncompressed size for archive entry #{1}.. + /// + public static string Error_0_getting_uncompressed_size_for_archive_entry_1 { + get { + return ResourceManager.GetString("Error_0_getting_uncompressed_size_for_archive_entry_1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error {0} listing extended attributes for archive entry #{1}.. + /// + public static string Error_0_listing_extended_attributes_for_archive_entry_1 { + get { + return ResourceManager.GetString("Error_0_listing_extended_attributes_for_archive_entry_1", resourceCulture); + } + } + /// /// Looks up a localized string similar to Error {0} opening device. /// @@ -2773,6 +2890,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Error {0} reading extended attribute {1} for archive entry #{2}.. + /// + public static string Error_0_reading_extended_attribute_1_for_archive_entry_2 { + get { + return ResourceManager.GetString("Error_0_reading_extended_attribute_1_for_archive_entry_2", resourceCulture); + } + } + /// /// Looks up a localized string similar to Error {0} reading file {1}. /// @@ -2891,6 +3017,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Error {0} retrieving stat for archive entry #{1}.. + /// + public static string Error_0_retrieving_stat_for_archive_entry_1 { + get { + return ResourceManager.GetString("Error_0_retrieving_stat_for_archive_entry_1", resourceCulture); + } + } + /// /// Looks up a localized string similar to Error {0} sending tracks list to output image.. /// @@ -5195,6 +5330,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Opening archive.... + /// + public static string Opening_archive { + get { + return ResourceManager.GetString("Opening_archive", resourceCulture); + } + } + /// /// Looks up a localized string similar to Opening device.... /// @@ -6628,6 +6772,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Attr. + /// + public static string Title_Attributes_ABBREVIATED { + get { + return ResourceManager.GetString("Title_Attributes_ABBREVIATED", resourceCulture); + } + } + /// /// Looks up a localized string similar to Author. /// @@ -6745,6 +6898,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Compressed. + /// + public static string Title_Compressed { + get { + return ResourceManager.GetString("Title_Compressed", resourceCulture); + } + } + /// /// Looks up a localized string similar to Connected by USB. /// @@ -6799,6 +6961,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Date. + /// + public static string Title_Date { + get { + return ResourceManager.GetString("Title_Date", resourceCulture); + } + } + /// /// Looks up a localized string similar to Decoded. /// @@ -8005,6 +8176,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Size. + /// + public static string Title_Size { + get { + return ResourceManager.GetString("Title_Size", resourceCulture); + } + } + /// /// Looks up a localized string similar to Software. /// @@ -8401,6 +8581,15 @@ namespace Aaru.Localization { } } + /// + /// Looks up a localized string similar to Unable to open archive format. + /// + public static string Unable_to_open_archive_format { + get { + return ResourceManager.GetString("Unable_to_open_archive_format", resourceCulture); + } + } + /// /// Looks up a localized string similar to Unable to open image 1 format. /// diff --git a/Aaru.Localization/UI.es.resx b/Aaru.Localization/UI.es.resx index 22a50e1ae..7d64995bb 100644 --- a/Aaru.Localization/UI.es.resx +++ b/Aaru.Localization/UI.es.resx @@ -563,8 +563,8 @@ Convirtiendo pista - No se pudo abrir el fichero de imagen. - + Fichero de imagen abierto correctamente. + No se puedo eliminar el fichero existente. ¿Desea continuar? @@ -2939,4 +2939,82 @@ Probadores: Registrando extensiones... + + Extrae todos los ficheros del archivo + + + Ruta al archivo + + + Formato de archivo identificado por {0}. + + + Format de archivo identificado por {0} ({1}). + + + Formato de archivo no identificado. + + + Formato de archivo no identificado, no se procederá con la extracción + + + Formato de archivo no identificado, no se procederá con el listado. + + + Archivo abierto correctamente. + + + Error {0} obteniendo el tamaño de la entrada nº {1} del archivo. + + + Error {0} obteniendo el nombre de fichero de la entrada nº {1} del archivo. + + + Error {0} obteniendo el filtro de la entrada nº {1} del archivo. + + + Error {0} obteniendo el tamaño descomprimido de la entrada nº {1} del archivo. + + + Error {0} listando los atributos extendidos de la entrada nº {1} del archivo. + + + Error {0} leyendo el atributo extendido {1} de la entrada nº {2} del archivo. + + + Error {0} obteniendo información de la entrada nº {1} del archivo. + + + Identificando el formato del archivo... + + + Obteniendo información del archivo... + + + Abriendo archivo... + + + Atrib + + + Comprimido + + + Fecha + + + Tamaño + + + No se pudo obtener información sobre el archivo... + + + No se pudo abrir el archivo + + + {0} ficheros + + + {0} ficheros, {1} carpetas + \ No newline at end of file diff --git a/Aaru.Localization/UI.resx b/Aaru.Localization/UI.resx index 60cf6ac1e..821ad0d08 100644 --- a/Aaru.Localization/UI.resx +++ b/Aaru.Localization/UI.resx @@ -3029,4 +3029,68 @@ Do you want to continue? Unable to get information about archive... + + Archive file path + + + Extracts all files in archive. + + + Archive format not identified, not proceeding with extraction. + + + Archive format identified by {0}. + + + Archive format not identified, not proceeding with listing. + + + Opening archive... + + + Unable to open archive format + + + Correctly opened archive file. + + + Error {0} getting filename for archive entry #{1}. + + + Error {0} retrieving stat for archive entry #{1}. + + + Error {0} getting uncompressed size for archive entry #{1}. + + + Error {0} getting filter for archive entry #{1}. + + + Error {0} listing extended attributes for archive entry #{1}. + + + Error {0} reading extended attribute {1} for archive entry #{2}. + + + Date + + + Attr + "Attributes" abbreviated to the smallest possible size, if allowed by language rules. + + + Size + + + Compressed + + + Error {0} getting compressed size for archive entry #{1}. + + + {0} files, {1} folders + + + {0} files + \ No newline at end of file diff --git a/Aaru/Commands/Archive/Extract.cs b/Aaru/Commands/Archive/Extract.cs index 6ea7f7c17..42dcf4534 100644 --- a/Aaru/Commands/Archive/Extract.cs +++ b/Aaru/Commands/Archive/Extract.cs @@ -54,7 +54,7 @@ sealed class ArchiveExtractCommand : Command const int BUFFER_SIZE = 16777216; const string MODULE_NAME = "Extract-Files command"; - public ArchiveExtractCommand() : base("extract", UI.Filesystem_Extract_Command_Description) + public ArchiveExtractCommand() : base("extract", UI.Archive_Extract_Command_Description) { AddAlias("x"); @@ -71,7 +71,7 @@ sealed class ArchiveExtractCommand : Command AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Archive file path", + Description = UI.Archive_file_path, Name = "archive-path" }); @@ -166,21 +166,21 @@ sealed class ArchiveExtractCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); + ctx.AddTask(UI.Identifying_archive_format).IsIndeterminate(); archive = ArchiveFormat.Detect(inputFilter); }); if(archive == null) { - AaruConsole.WriteLine("Archive format not identified, not proceeding with listing."); + AaruConsole.WriteLine(UI.Archive_format_not_identified_not_proceeding_with_extraction); return (int)ErrorNumber.UnrecognizedFormat; } if(verbose) - AaruConsole.VerboseWriteLine("Archive format identified by {0} ({1}).", archive.Name, archive.Id); + AaruConsole.VerboseWriteLine(UI.Archive_format_identified_by_0_1, archive.Name, archive.Id); else - AaruConsole.WriteLine("Archive format identified by {0}.", archive.Name); + AaruConsole.WriteLine(UI.Archive_format_identified_by_0, archive.Name); try { @@ -188,19 +188,19 @@ sealed class ArchiveExtractCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); + ctx.AddTask(UI.Opening_archive).IsIndeterminate(); opened = archive.Open(inputFilter, encodingClass); }); if(opened != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Unable to open archive format"); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_archive_format); AaruConsole.ErrorWriteLine(Localization.Core.Error_0, opened); return (int)opened; } - AaruConsole.DebugWriteLine(MODULE_NAME, "Correctly opened archive file."); + AaruConsole.DebugWriteLine(MODULE_NAME, UI.Correctly_opened_archive_file); // TODO: Implement //Statistics.AddArchiveFormat(archive.Name); @@ -208,7 +208,7 @@ sealed class ArchiveExtractCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_archive_format); AaruConsole.ErrorWriteLine(Localization.Core.Error_0, ex.Message); return (int)ErrorNumber.CannotOpenFormat; @@ -221,28 +221,28 @@ sealed class ArchiveExtractCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} getting filename for archive entry #{1}", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_getting_filename_for_archive_entry_1, errno, i); continue; } errno = archive.Stat(i, out FileEntryInfo stat); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} retrieving stat for file #{1}.", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_retrieving_stat_for_archive_entry_1, errno, i); continue; } errno = archive.GetUncompressedSize(i, out long uncompressedSize); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} getting uncompressed size for file #{1}.", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_getting_uncompressed_size_for_archive_entry_1, errno, i); continue; } errno = archive.GetEntry(i, out IFilter filter); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} getting filter for file #{1}.", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_getting_filter_for_archive_entry_1, errno, i); continue; } @@ -352,7 +352,7 @@ sealed class ArchiveExtractCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} listing extended attributes for file #{1}.", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_listing_extended_attributes_for_archive_entry_1, errno, i); continue; } @@ -368,7 +368,7 @@ sealed class ArchiveExtractCommand : Command if(errno != ErrorNumber.NoError) { AaruConsole.DebugWriteLine(MODULE_NAME, - "Error {0} reading extended attribute {1} for file #{2}.", errno, + UI.Error_0_reading_extended_attribute_1_for_archive_entry_2, errno, xattrName, i); continue; } diff --git a/Aaru/Commands/Archive/Info.cs b/Aaru/Commands/Archive/Info.cs index 2757ba701..9a1848823 100644 --- a/Aaru/Commands/Archive/Info.cs +++ b/Aaru/Commands/Archive/Info.cs @@ -54,7 +54,7 @@ sealed class ArchiveInfoCommand : Command AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Archive file path", + Description = UI.Archive_file_path, Name = "archive-path" }); diff --git a/Aaru/Commands/Archive/List.cs b/Aaru/Commands/Archive/List.cs index fd4955327..d300728f1 100644 --- a/Aaru/Commands/Archive/List.cs +++ b/Aaru/Commands/Archive/List.cs @@ -66,7 +66,7 @@ sealed class ArchiveListCommand : Command AddArgument(new Argument { Arity = ArgumentArity.ExactlyOne, - Description = "Archive file path", + Description = UI.Archive_file_path, Name = "archive-path" }); @@ -153,21 +153,21 @@ sealed class ArchiveListCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask(UI.Identifying_image_format).IsIndeterminate(); + ctx.AddTask(UI.Identifying_archive_format).IsIndeterminate(); archive = ArchiveFormat.Detect(inputFilter); }); if(archive == null) { - AaruConsole.WriteLine("Archive format not identified, not proceeding with listing."); + AaruConsole.WriteLine(UI.Archive_format_not_identified_not_proceeding_with_listing); return (int)ErrorNumber.UnrecognizedFormat; } if(verbose) - AaruConsole.VerboseWriteLine("Archive format identified by {0} ({1}).", archive.Name, archive.Id); + AaruConsole.VerboseWriteLine(UI.Archive_format_identified_by_0_1, archive.Name, archive.Id); else - AaruConsole.WriteLine("Archive format identified by {0}.", archive.Name); + AaruConsole.WriteLine(UI.Archive_format_identified_by_0, archive.Name); try { @@ -175,19 +175,19 @@ sealed class ArchiveListCommand : Command Core.Spectre.ProgressSingleSpinner(ctx => { - ctx.AddTask(UI.Invoke_Opening_image_file).IsIndeterminate(); + ctx.AddTask(UI.Opening_archive).IsIndeterminate(); opened = archive.Open(inputFilter, encodingClass); }); if(opened != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Unable to open archive format"); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_archive_format); AaruConsole.ErrorWriteLine(Localization.Core.Error_0, opened); return (int)opened; } - AaruConsole.DebugWriteLine(MODULE_NAME, "Correctly opened archive file."); + AaruConsole.DebugWriteLine(MODULE_NAME, UI.Correctly_opened_archive_file); // TODO: Implement //Statistics.AddArchiveFormat(archive.Name); @@ -195,7 +195,7 @@ sealed class ArchiveListCommand : Command } catch(Exception ex) { - AaruConsole.ErrorWriteLine("Unable to open archive format"); + AaruConsole.ErrorWriteLine(UI.Unable_to_open_archive_format); AaruConsole.ErrorWriteLine(Localization.Core.Error_0, ex.Message); return (int)ErrorNumber.CannotOpenFormat; @@ -210,7 +210,7 @@ sealed class ArchiveListCommand : Command // Ignore that file if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} getting filename for archive entry #{1}", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_getting_filename_for_archive_entry_1, errno, i); continue; } @@ -231,28 +231,28 @@ sealed class ArchiveListCommand : Command { table.HideFooters(); - table.AddColumn(new TableColumn("Date") + table.AddColumn(new TableColumn(UI.Title_Date) { NoWrap = true, Alignment = Justify.Center }); ctx.Refresh(); - table.AddColumn(new TableColumn("Time") + table.AddColumn(new TableColumn(UI.Title_Time) { NoWrap = true, Alignment = Justify.Center }); ctx.Refresh(); - table.AddColumn(new TableColumn("Attr") + table.AddColumn(new TableColumn(UI.Title_Attributes_ABBREVIATED) { NoWrap = true, Alignment = Justify.Right }); ctx.Refresh(); - table.AddColumn(new TableColumn("Size") + table.AddColumn(new TableColumn(UI.Title_Size) { NoWrap = true, Alignment = Justify.Right @@ -261,7 +261,7 @@ sealed class ArchiveListCommand : Command if(archive.ArchiveFeatures.HasFlag(ArchiveSupportedFeature.SupportsCompression)) { - table.AddColumn(new TableColumn("Compressed") + table.AddColumn(new TableColumn(UI.Title_Compressed) { NoWrap = true, Alignment = Justify.Right @@ -270,7 +270,7 @@ sealed class ArchiveListCommand : Command ctx.Refresh(); - table.AddColumn(new TableColumn("Name") + table.AddColumn(new TableColumn(UI.Title_Name) { Alignment = Justify.Left }); @@ -282,8 +282,7 @@ sealed class ArchiveListCommand : Command if(errno != ErrorNumber.NoError) { - AaruConsole.DebugWriteLine(MODULE_NAME, - "Error {0} retrieving filename for file #{1}.", errno, + AaruConsole.ErrorWriteLine(UI.Error_0_getting_filename_for_archive_entry_1, errno, i); continue; } @@ -291,7 +290,8 @@ sealed class ArchiveListCommand : Command errno = archive.Stat(i, out FileEntryInfo stat); if(errno != ErrorNumber.NoError) { - AaruConsole.ErrorWriteLine("Error {0} retrieving stat for file #{1}.", errno, i); + AaruConsole.ErrorWriteLine(UI.Error_0_retrieving_stat_for_archive_entry_1, errno, + i); continue; } @@ -328,7 +328,7 @@ sealed class ArchiveListCommand : Command if(errno != ErrorNumber.NoError) { AaruConsole.DebugWriteLine(MODULE_NAME, - "Error {0} getting compressed size for file #{1}.", + UI.Error_0_getting_compressed_size_for_archive_entry_1, errno, i); continue; } @@ -337,7 +337,7 @@ sealed class ArchiveListCommand : Command if(errno != ErrorNumber.NoError) { AaruConsole.DebugWriteLine(MODULE_NAME, - "Error {0} getting uncompressed size for file #{1}.", + UI.Error_0_getting_uncompressed_size_for_archive_entry_1, errno, i); continue; } @@ -372,16 +372,16 @@ sealed class ArchiveListCommand : Command table.Columns[5]. Footer(archive.ArchiveFeatures.HasFlag(ArchiveSupportedFeature. HasExplicitDirectories) - ? $"{files} files, {folders} folders" - : $"{files} files"); + ? string.Format(UI._0_files_1_folders, files, folders) + : string.Format(UI._0_files, files)); } else { table.Columns[4]. Footer(archive.ArchiveFeatures.HasFlag(ArchiveSupportedFeature. HasExplicitDirectories) - ? $"{files} files, {folders} folders" - : $"{files} files"); + ? string.Format(UI._0_files_1_folders, files, folders) + : string.Format(UI._0_files, files)); } table.ShowFooters();