mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Archive commands] Move all messages to localizable resources.
This commit is contained in:
189
Aaru.Localization/UI.Designer.cs
generated
189
Aaru.Localization/UI.Designer.cs
generated
@@ -59,6 +59,24 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} files.
|
||||
/// </summary>
|
||||
public static string _0_files {
|
||||
get {
|
||||
return ResourceManager.GetString("_0_files", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} files, {1} folders.
|
||||
/// </summary>
|
||||
public static string _0_files_1_folders {
|
||||
get {
|
||||
return ResourceManager.GetString("_0_files_1_folders", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} Kb/sec..
|
||||
/// </summary>
|
||||
@@ -167,6 +185,33 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Extracts all files in archive..
|
||||
/// </summary>
|
||||
public static string Archive_Extract_Command_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Archive_Extract_Command_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Archive file path.
|
||||
/// </summary>
|
||||
public static string Archive_file_path {
|
||||
get {
|
||||
return ResourceManager.GetString("Archive_file_path", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Archive format identified by {0}..
|
||||
/// </summary>
|
||||
public static string Archive_format_identified_by_0 {
|
||||
get {
|
||||
return ResourceManager.GetString("Archive_format_identified_by_0", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Archive format identified by {0} ({1})..
|
||||
/// </summary>
|
||||
@@ -185,6 +230,24 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Archive format not identified, not proceeding with extraction..
|
||||
/// </summary>
|
||||
public static string Archive_format_not_identified_not_proceeding_with_extraction {
|
||||
get {
|
||||
return ResourceManager.GetString("Archive_format_not_identified_not_proceeding_with_extraction", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Archive format not identified, not proceeding with listing..
|
||||
/// </summary>
|
||||
public static string Archive_format_not_identified_not_proceeding_with_listing {
|
||||
get {
|
||||
return ResourceManager.GetString("Archive_format_not_identified_not_proceeding_with_listing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Identifies an archive file and shows information about it..
|
||||
/// </summary>
|
||||
@@ -1772,6 +1835,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Correctly opened archive file..
|
||||
/// </summary>
|
||||
public static string Correctly_opened_archive_file {
|
||||
get {
|
||||
return ResourceManager.GetString("Correctly_opened_archive_file", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Correctly opened image file..
|
||||
/// </summary>
|
||||
@@ -2683,6 +2755,51 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} getting compressed size for archive entry #{1}..
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} getting filename for archive entry #{1}..
|
||||
/// </summary>
|
||||
public static string Error_0_getting_filename_for_archive_entry_1 {
|
||||
get {
|
||||
return ResourceManager.GetString("Error_0_getting_filename_for_archive_entry_1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} getting filter for archive entry #{1}..
|
||||
/// </summary>
|
||||
public static string Error_0_getting_filter_for_archive_entry_1 {
|
||||
get {
|
||||
return ResourceManager.GetString("Error_0_getting_filter_for_archive_entry_1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} getting uncompressed size for archive entry #{1}..
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} listing extended attributes for archive entry #{1}..
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} opening device.
|
||||
/// </summary>
|
||||
@@ -2773,6 +2890,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} reading extended attribute {1} for archive entry #{2}..
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} reading file {1}.
|
||||
/// </summary>
|
||||
@@ -2891,6 +3017,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} retrieving stat for archive entry #{1}..
|
||||
/// </summary>
|
||||
public static string Error_0_retrieving_stat_for_archive_entry_1 {
|
||||
get {
|
||||
return ResourceManager.GetString("Error_0_retrieving_stat_for_archive_entry_1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error {0} sending tracks list to output image..
|
||||
/// </summary>
|
||||
@@ -5195,6 +5330,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Opening archive....
|
||||
/// </summary>
|
||||
public static string Opening_archive {
|
||||
get {
|
||||
return ResourceManager.GetString("Opening_archive", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Opening device....
|
||||
/// </summary>
|
||||
@@ -6628,6 +6772,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Attr.
|
||||
/// </summary>
|
||||
public static string Title_Attributes_ABBREVIATED {
|
||||
get {
|
||||
return ResourceManager.GetString("Title_Attributes_ABBREVIATED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Author.
|
||||
/// </summary>
|
||||
@@ -6745,6 +6898,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Compressed.
|
||||
/// </summary>
|
||||
public static string Title_Compressed {
|
||||
get {
|
||||
return ResourceManager.GetString("Title_Compressed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connected by USB.
|
||||
/// </summary>
|
||||
@@ -6799,6 +6961,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Date.
|
||||
/// </summary>
|
||||
public static string Title_Date {
|
||||
get {
|
||||
return ResourceManager.GetString("Title_Date", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Decoded.
|
||||
/// </summary>
|
||||
@@ -8005,6 +8176,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Size.
|
||||
/// </summary>
|
||||
public static string Title_Size {
|
||||
get {
|
||||
return ResourceManager.GetString("Title_Size", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Software.
|
||||
/// </summary>
|
||||
@@ -8401,6 +8581,15 @@ namespace Aaru.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unable to open archive format.
|
||||
/// </summary>
|
||||
public static string Unable_to_open_archive_format {
|
||||
get {
|
||||
return ResourceManager.GetString("Unable_to_open_archive_format", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unable to open image 1 format.
|
||||
/// </summary>
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
<value>Convirtiendo pista</value>
|
||||
</data>
|
||||
<data name="Correctly_opened_image_file" xml:space="preserve">
|
||||
<value>No se pudo abrir el fichero de imagen.</value>
|
||||
<value>Fichero de imagen abierto correctamente.</value>
|
||||
</data>
|
||||
<data name="Could_note_delete_existe_file_continue_Q" xml:space="preserve">
|
||||
<value>No se puedo eliminar el fichero existente. ¿Desea continuar?</value>
|
||||
@@ -2939,4 +2939,82 @@ Probadores:
|
||||
<data name="Registering_plugins" xml:space="preserve">
|
||||
<value>Registrando extensiones...</value>
|
||||
</data>
|
||||
<data name="Archive_Extract_Command_Description" xml:space="preserve">
|
||||
<value>Extrae todos los ficheros del archivo</value>
|
||||
</data>
|
||||
<data name="Archive_file_path" xml:space="preserve">
|
||||
<value>Ruta al archivo</value>
|
||||
</data>
|
||||
<data name="Archive_format_identified_by_0" xml:space="preserve">
|
||||
<value>Formato de archivo identificado por {0}.</value>
|
||||
</data>
|
||||
<data name="Archive_format_identified_by_0_1" xml:space="preserve">
|
||||
<value>Format de archivo identificado por {0} ({1}).</value>
|
||||
</data>
|
||||
<data name="Archive_format_not_identified" xml:space="preserve">
|
||||
<value>Formato de archivo no identificado.</value>
|
||||
</data>
|
||||
<data name="Archive_format_not_identified_not_proceeding_with_extraction" xml:space="preserve">
|
||||
<value>Formato de archivo no identificado, no se procederá con la extracción</value>
|
||||
</data>
|
||||
<data name="Archive_format_not_identified_not_proceeding_with_listing" xml:space="preserve">
|
||||
<value>Formato de archivo no identificado, no se procederá con el listado.</value>
|
||||
</data>
|
||||
<data name="Correctly_opened_archive_file" xml:space="preserve">
|
||||
<value>Archivo abierto correctamente.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_compressed_size_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} obteniendo el tamaño de la entrada nº {1} del archivo.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_filename_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} obteniendo el nombre de fichero de la entrada nº {1} del archivo.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_filter_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} obteniendo el filtro de la entrada nº {1} del archivo.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_uncompressed_size_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} obteniendo el tamaño descomprimido de la entrada nº {1} del archivo.</value>
|
||||
</data>
|
||||
<data name="Error_0_listing_extended_attributes_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} listando los atributos extendidos de la entrada nº {1} del archivo.</value>
|
||||
</data>
|
||||
<data name="Error_0_reading_extended_attribute_1_for_archive_entry_2" xml:space="preserve">
|
||||
<value>Error {0} leyendo el atributo extendido {1} de la entrada nº {2} del archivo.</value>
|
||||
</data>
|
||||
<data name="Error_0_retrieving_stat_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} obteniendo información de la entrada nº {1} del archivo.</value>
|
||||
</data>
|
||||
<data name="Identifying_archive_format" xml:space="preserve">
|
||||
<value>Identificando el formato del archivo...</value>
|
||||
</data>
|
||||
<data name="Obtaining_archive_information" xml:space="preserve">
|
||||
<value>Obteniendo información del archivo...</value>
|
||||
</data>
|
||||
<data name="Opening_archive" xml:space="preserve">
|
||||
<value>Abriendo archivo...</value>
|
||||
</data>
|
||||
<data name="Title_Attributes_ABBREVIATED" xml:space="preserve">
|
||||
<value>Atrib</value>
|
||||
</data>
|
||||
<data name="Title_Compressed" xml:space="preserve">
|
||||
<value>Comprimido</value>
|
||||
</data>
|
||||
<data name="Title_Date" xml:space="preserve">
|
||||
<value>Fecha</value>
|
||||
</data>
|
||||
<data name="Title_Size" xml:space="preserve">
|
||||
<value>Tamaño</value>
|
||||
</data>
|
||||
<data name="Unable_to_get_information_about_archive" xml:space="preserve">
|
||||
<value>No se pudo obtener información sobre el archivo...</value>
|
||||
</data>
|
||||
<data name="Unable_to_open_archive_format" xml:space="preserve">
|
||||
<value>No se pudo abrir el archivo</value>
|
||||
</data>
|
||||
<data name="_0_files" xml:space="preserve">
|
||||
<value>{0} ficheros</value>
|
||||
</data>
|
||||
<data name="_0_files_1_folders" xml:space="preserve">
|
||||
<value>{0} ficheros, {1} carpetas</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -3029,4 +3029,68 @@ Do you want to continue?</value>
|
||||
<data name="Unable_to_get_information_about_archive" xml:space="preserve">
|
||||
<value>Unable to get information about archive...</value>
|
||||
</data>
|
||||
<data name="Archive_file_path" xml:space="preserve">
|
||||
<value>Archive file path</value>
|
||||
</data>
|
||||
<data name="Archive_Extract_Command_Description" xml:space="preserve">
|
||||
<value>Extracts all files in archive.</value>
|
||||
</data>
|
||||
<data name="Archive_format_not_identified_not_proceeding_with_extraction" xml:space="preserve">
|
||||
<value>Archive format not identified, not proceeding with extraction.</value>
|
||||
</data>
|
||||
<data name="Archive_format_identified_by_0" xml:space="preserve">
|
||||
<value>Archive format identified by {0}.</value>
|
||||
</data>
|
||||
<data name="Archive_format_not_identified_not_proceeding_with_listing" xml:space="preserve">
|
||||
<value>Archive format not identified, not proceeding with listing.</value>
|
||||
</data>
|
||||
<data name="Opening_archive" xml:space="preserve">
|
||||
<value>Opening archive...</value>
|
||||
</data>
|
||||
<data name="Unable_to_open_archive_format" xml:space="preserve">
|
||||
<value>Unable to open archive format</value>
|
||||
</data>
|
||||
<data name="Correctly_opened_archive_file" xml:space="preserve">
|
||||
<value>Correctly opened archive file.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_filename_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} getting filename for archive entry #{1}.</value>
|
||||
</data>
|
||||
<data name="Error_0_retrieving_stat_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} retrieving stat for archive entry #{1}.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_uncompressed_size_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} getting uncompressed size for archive entry #{1}.</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_filter_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} getting filter for archive entry #{1}.</value>
|
||||
</data>
|
||||
<data name="Error_0_listing_extended_attributes_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} listing extended attributes for archive entry #{1}.</value>
|
||||
</data>
|
||||
<data name="Error_0_reading_extended_attribute_1_for_archive_entry_2" xml:space="preserve">
|
||||
<value>Error {0} reading extended attribute {1} for archive entry #{2}.</value>
|
||||
</data>
|
||||
<data name="Title_Date" xml:space="preserve">
|
||||
<value>Date</value>
|
||||
</data>
|
||||
<data name="Title_Attributes_ABBREVIATED" xml:space="preserve">
|
||||
<value>Attr</value>
|
||||
<comment>"Attributes" abbreviated to the smallest possible size, if allowed by language rules.</comment>
|
||||
</data>
|
||||
<data name="Title_Size" xml:space="preserve">
|
||||
<value>Size</value>
|
||||
</data>
|
||||
<data name="Title_Compressed" xml:space="preserve">
|
||||
<value>Compressed</value>
|
||||
</data>
|
||||
<data name="Error_0_getting_compressed_size_for_archive_entry_1" xml:space="preserve">
|
||||
<value>Error {0} getting compressed size for archive entry #{1}.</value>
|
||||
</data>
|
||||
<data name="_0_files_1_folders" xml:space="preserve">
|
||||
<value>{0} files, {1} folders</value>
|
||||
</data>
|
||||
<data name="_0_files" xml:space="preserve">
|
||||
<value>{0} files</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -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<string>
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ sealed class ArchiveInfoCommand : Command
|
||||
AddArgument(new Argument<string>
|
||||
{
|
||||
Arity = ArgumentArity.ExactlyOne,
|
||||
Description = "Archive file path",
|
||||
Description = UI.Archive_file_path,
|
||||
Name = "archive-path"
|
||||
});
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ sealed class ArchiveListCommand : Command
|
||||
AddArgument(new Argument<string>
|
||||
{
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user