mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use Humanizer for media size.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Aaru" type="DotNetProject" factoryName=".NET Project">
|
||||
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru/bin/Debug/net7.0/aaru" />
|
||||
<option name="PROGRAM_PARAMETERS" value="formats" />
|
||||
<option name="WORKING_DIRECTORY" value="$USER_HOME$/Desktop" />
|
||||
<option name="EXE_PATH" value="$PROJECT_DIR$/Aaru/bin/Debug/net8.0/aaru.exe" />
|
||||
<option name="PROGRAM_PARAMETERS" value="i info archlinux-2023.07.01-x86_64.iso" />
|
||||
<option name="WORKING_DIRECTORY" value="$USER_HOME$/Downloads" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="USE_MONO" value="0" />
|
||||
@@ -12,7 +12,7 @@
|
||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="0" />
|
||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||
<option name="PROJECT_TFM" value="net7.0" />
|
||||
<option name="PROJECT_TFM" value="net8.0" />
|
||||
<method v="2">
|
||||
<option name="Build" />
|
||||
</method>
|
||||
|
||||
@@ -50,6 +50,7 @@ using Aaru.Decoders.PCMCIA;
|
||||
using Aaru.Decoders.SCSI;
|
||||
using Aaru.Decoders.Xbox;
|
||||
using Aaru.Helpers;
|
||||
using Humanizer.Bytes;
|
||||
using Spectre.Console;
|
||||
using DDS = Aaru.Decoders.DVD.DDS;
|
||||
using DMI = Aaru.Decoders.Xbox.DMI;
|
||||
@@ -94,7 +95,7 @@ public static class ImageInfo
|
||||
|
||||
AaruConsole.WriteLine(Localization.Core.Contains_a_media_of_0_sectors_with_a_maximum_sector_size_of_1_bytes_etc,
|
||||
imageFormat.Info.Sectors, imageFormat.Info.SectorSize,
|
||||
imageFormat.Info.Sectors * imageFormat.Info.SectorSize);
|
||||
ByteSize.FromBytes(imageFormat.Info.Sectors * imageFormat.Info.SectorSize));
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(imageFormat.Info.Creator))
|
||||
AaruConsole.WriteLine(Localization.Core.Created_by_0_WithMarkup, Markup.Escape(imageFormat.Info.Creator));
|
||||
|
||||
@@ -54,6 +54,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using Humanizer.Bytes;
|
||||
using ReactiveUI;
|
||||
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
|
||||
using Session = Aaru.CommonTypes.Structs.Session;
|
||||
@@ -126,7 +127,7 @@ public sealed class ImageInfoViewModel : ViewModelBase
|
||||
SectorsText =
|
||||
string.Format(Localization.Core.Contains_a_media_of_0_sectors_with_a_maximum_sector_size_of_1_bytes_etc,
|
||||
imageFormat.Info.Sectors, imageFormat.Info.SectorSize,
|
||||
imageFormat.Info.Sectors * imageFormat.Info.SectorSize);
|
||||
ByteSize.FromBytes(imageFormat.Info.Sectors * imageFormat.Info.SectorSize));
|
||||
|
||||
MediaTypeText = string.Format(Localization.Core.Contains_a_media_of_type_0_and_XML_type_1,
|
||||
imageFormat.Info.MediaType, imageFormat.Info.MetadataMediaType);
|
||||
|
||||
2
Aaru.Localization/Core.Designer.cs
generated
2
Aaru.Localization/Core.Designer.cs
generated
@@ -1338,7 +1338,7 @@ namespace Aaru.Localization {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Contains a media of {0} sectors with a maximum sector size of {1} bytes (if all sectors are of the same size this would be {2} bytes).
|
||||
/// Looks up a localized string similar to Contains a media of {0} sectors with a maximum sector size of {1} bytes (if all sectors are of the same size this would be {2}).
|
||||
/// </summary>
|
||||
public static string Contains_a_media_of_0_sectors_with_a_maximum_sector_size_of_1_bytes_etc {
|
||||
get {
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
<value>Image without headers is {0} bytes long</value>
|
||||
</data>
|
||||
<data name="Contains_a_media_of_0_sectors_with_a_maximum_sector_size_of_1_bytes_etc" xml:space="preserve">
|
||||
<value>Contains a media of {0} sectors with a maximum sector size of {1} bytes (if all sectors are of the same size this would be {2} bytes)</value>
|
||||
<value>Contains a media of {0} sectors with a maximum sector size of {1} bytes (if all sectors are of the same size this would be {2})</value>
|
||||
</data>
|
||||
<data name="Contains_a_media_of_type_0_and_XML_type_1" xml:space="preserve">
|
||||
<value>Contains a media of type {0} and XML type {1}</value>
|
||||
|
||||
Reference in New Issue
Block a user