[GUI] Modernize XAML localization.

This commit is contained in:
2025-10-25 12:53:52 +01:00
parent 3add9f9264
commit 2cee66a08d
66 changed files with 615 additions and 1181 deletions

View File

@@ -45,7 +45,6 @@ using Aaru.Decoders.SCSI.MMC;
using Aaru.Decoders.Xbox;
using Aaru.Gui.Models;
using Aaru.Helpers;
using Aaru.Localization;
using CommunityToolkit.Mvvm.ComponentModel;
using JetBrains.Annotations;
using BCA = Aaru.Decoders.Bluray.BCA;
@@ -235,8 +234,4 @@ public sealed partial class DecodeMediaTagsViewModel : ViewModelBase
if(DecodedText != null) value.Decoded = DecodedText;
}
}
public string TagLabel => UI.Title_Tag;
public string HexViewLabel => UI.Title_HexView;
public string DecodedLabel => UI.Title_Decoded;
}

View File

@@ -168,29 +168,6 @@ public sealed partial class ImageChecksumViewModel : ViewModelBase
}
}
public string ChecksumMediaLabel => UI.Checksums_the_whole_disc;
public string ChecksumTracksLabel => UI.Checksums_each_track_separately;
public string Adler32Label => UI.Calculates_Adler_32;
public string Crc16Label => UI.Calculates_CRC16;
public string Crc32Label => UI.Calculates_CRC32;
public string Crc64Label => UI.Calculates_CRC64_ECMA;
public string Fletcher16Label => UI.Calculates_Fletcher_16;
public string Fletcher32Label => UI.Calculates_Fletcher_32;
public string Md5Label => UI.Calculates_MD5;
public string Sha1Label => UI.Calculates_SHA1;
public string Sha256Label => UI.Calculates_SHA256;
public string Sha384Label => UI.Calculates_SHA384;
public string Sha512Label => UI.Calculates_SHA512;
public string SpamSumLabel => UI.Calculates_SpamSum_fuzzy_hash;
public string TrackChecksumsLabel => UI.Title_Track_checksums;
public string TrackLabel => Localization.Core.Title_Track;
public string AlgorithmsLabel => UI.Title_Algorithms;
public string HashLabel => UI.Title_Hash;
public string MediaChecksumsLabel => UI.Title_Media_checksums;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
public ObservableCollection<ChecksumModel> TrackChecksums { get; }
public ObservableCollection<ChecksumModel> MediaChecksums { get; }
public ICommand StartCommand { get; }

View File

@@ -261,56 +261,29 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
ResumeFileText = _dumpHardware == null ? "" : UI._From_image_;
}
public string SourceImageLabel => UI.Source_image;
public string OutputFormatLabel => UI.Output_format;
public string ChooseLabel => UI.ButtonLabel_Choose;
public string SectorsLabel => UI.How_many_sectors_to_convert_at_once;
public string ForceLabel => UI.Continue_conversion_even_if_data_lost;
public string CreatorLabel => UI.Who_person_created_the_image;
public string GetFromSourceImageLabel => UI.ButtonLabel_Get_from_source_image;
public string MetadataLabel => UI.Title_Metadata;
public string MediaLabel => UI.Title_Media;
public string TitleLabel => UI.Title_Title;
public string ManufacturerLabel => UI.Title_Manufacturer;
public string ModelLabel => UI.Title_Model;
public string SerialNumberLabel => UI.Title_Serial_number;
public string BarcodeLabel => UI.Title_Barcode;
public string PartNumberLabel => UI.Title_Part_number;
public string NumberInSequenceLabel => UI.Title_Number_in_sequence;
public string LastMediaOfTheSequenceLabel => UI.Title_Last_media_of_the_sequence;
public string DriveLabel => UI.Title_Drive;
public string FirmwareRevisionLabel => UI.Title_Firmware_revision;
public string CommentsLabel => UI.Title_Comments;
public string AaruMetadataLabel => UI.Title_Existing_Aaru_Metadata_sidecar;
public string FromImageLabel => UI.Title_From_image;
public string ResumeFileLabel => UI.Title_Existing_resume_file;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
public ObservableCollection<ImagePluginModel> PluginsList { get; }
public ICommand DestinationCommand { get; }
public ICommand CreatorCommand { get; }
public ICommand MediaTitleCommand { get; }
public ICommand MediaManufacturerCommand { get; }
public ICommand MediaModelCommand { get; }
public ICommand MediaSerialNumberCommand { get; }
public ICommand MediaBarcodeCommand { get; }
public ICommand MediaPartNumberCommand { get; }
public ICommand MediaSequenceCommand { get; }
public ICommand LastMediaSequenceCommand { get; }
public ICommand DriveManufacturerCommand { get; }
public ICommand DriveModelCommand { get; }
public ICommand DriveSerialNumberCommand { get; }
public ICommand DriveFirmwareRevisionCommand { get; }
public ICommand CommentsCommand { get; }
public ICommand AaruMetadataFromImageCommand { get; }
public ICommand AaruMetadataCommand { get; }
public ICommand ResumeFileFromImageCommand { get; }
public ICommand ResumeFileCommand { get; }
public ICommand StartCommand { get; }
public ICommand CloseCommand { get; }
public ICommand StopCommand { get; }
public ObservableCollection<ImagePluginModel> PluginsList { get; }
public ICommand DestinationCommand { get; }
public ICommand CreatorCommand { get; }
public ICommand MediaTitleCommand { get; }
public ICommand MediaManufacturerCommand { get; }
public ICommand MediaModelCommand { get; }
public ICommand MediaSerialNumberCommand { get; }
public ICommand MediaBarcodeCommand { get; }
public ICommand MediaPartNumberCommand { get; }
public ICommand MediaSequenceCommand { get; }
public ICommand LastMediaSequenceCommand { get; }
public ICommand DriveManufacturerCommand { get; }
public ICommand DriveModelCommand { get; }
public ICommand DriveSerialNumberCommand { get; }
public ICommand DriveFirmwareRevisionCommand { get; }
public ICommand CommentsCommand { get; }
public ICommand AaruMetadataFromImageCommand { get; }
public ICommand AaruMetadataCommand { get; }
public ICommand ResumeFileFromImageCommand { get; }
public ICommand ResumeFileCommand { get; }
public ICommand StartCommand { get; }
public ICommand CloseCommand { get; }
public ICommand StopCommand { get; }
async Task StartAsync()
{

View File

@@ -141,20 +141,6 @@ public sealed partial class ImageEntropyViewModel : ViewModelBase
}
}
public string DuplicatedSectorsLabel => UI.Calculates_how_many_sectors_are_duplicated;
public string SeparatedTracksLabel => UI.Calculates_entropy_for_each_track_separately;
public string WholeDiscLabel => UI.Calculates_entropy_for_the_whole_disc;
public string TrackEntropyLabel => UI.Title_Track_entropy;
public string TrackLabel => Localization.Core.Title_Track;
public string EntropyLabel => UI.Title_Entropy;
public string UniqueSectorsLabel => UI.Title_Unique_sectors;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
[JetBrains.Annotations.NotNull]
public string Title => UI.Title_Calculating_entropy;
public ObservableCollection<TrackEntropyModel> TrackEntropy { get; }
public ICommand StartCommand { get; }
public ICommand CloseCommand { get; }

View File

@@ -121,12 +121,6 @@ public sealed partial class ImageSidecarViewModel : ViewModelBase
StopCommand = new RelayCommand(Stop);
}
public string DestinationFileLabel => UI.Title_Destination_file;
public string ChooseLabel => UI.ButtonLabel_Choose;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
public string Title { get; }
public ICommand DestinationCommand { get; }
public ICommand StartCommand { get; }

View File

@@ -149,13 +149,6 @@ public sealed partial class ImageVerifyViewModel : ViewModelBase
OptionsVisible = true;
}
public string VerifyImageLabel => UI.Verify_media_image_if_supported;
public string VerifySectorsLabel => UI.Verify_all_sectors_if_supported;
public string LBALabel => UI.Title_LBA;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
public ObservableCollection<LbaModel> ErrorList { get; }
public ObservableCollection<LbaModel> UnknownList { get; }
public ICommand StartCommand { get; }

View File

@@ -165,28 +165,6 @@ public sealed class MainWindowViewModel : ViewModelBase
new Bitmap(AssetLoader.Open(new Uri("avares://Aaru.Gui/Assets/Icons/oxygen/32x32/media-eject.png")));
}
public string FileLabel => UI.Menu_File;
public string OpenLabel => UI.Menu_Open;
public string SettingsLabel => UI.Menu_Settings;
public string ExitLabel => UI.Menu_Exit;
public string DevicesLabel => UI.Menu_Devices;
public string RefreshDevicesLabel => UI.Menu_Refresh;
public string WindowLabel => UI.Menu_Window;
public string ConsoleLabel => UI.Menu_Console;
public string HelpLabel => UI.Menu_Help;
public string EncodingsLabel => UI.Menu_Encodings;
public string PluginsLabel => UI.Menu_Plugins;
public string StatisticsLabel => UI.Menu_Statistics;
public string AboutLabel => UI.Menu_About;
public string RefreshDevicesFullLabel => UI.Menu_Refresh_devices;
public string CloseAllImagesLabel => UI.Menu_Close_all_images;
public string CalculateEntropyLabel => UI.ButtonLabel_Calculate_entropy;
public string VerifyImageLabel => UI.ButtonLabel_Verify;
public string ChecksumImageLabel => UI.ButtonLabel_Checksum;
public string CreateSidecarLabel => UI.ButtonLabel_Create_Aaru_Metadata_sidecar;
public string ViewImageSectorsLabel => UI.ButtonLabel_View_sectors;
public string DecodeImageMediaTagsLabel => UI.ButtonLabel_Decode_media_tags;
public bool DevicesSupported
{
get => _devicesSupported;
@@ -609,7 +587,7 @@ public sealed class MainWindowViewModel : ViewModelBase
List<CommonTypes.Partition> partitions = Core.Partitions.GetAll(imageFormat);
Core.Partitions.AddSchemesToStats(partitions);
bool checkRaw = false;
var checkRaw = false;
List<string> idPlugins;
PluginRegister plugins = PluginRegister.Singleton;

View File

@@ -289,25 +289,6 @@ public sealed partial class MediaDumpViewModel : ViewModelBase
_devicePath = devicePath;
}
public string OutputFormatLabel => UI.Output_format;
public string ChooseLabel => UI.ButtonLabel_Choose;
public string StopOnErrorLabel => UI.Stop_media_dump_on_first_error;
public string ForceLabel => UI.Continue_dumping_whatever_happens;
public string RetriesLabel => UI.Retry_passes;
public string PersistentLabel => UI.Try_to_recover_partial_or_incorrect_data;
public string ResumeLabel => UI.Create_or_use_resume_mapfile;
public string Track1PregapLabel => UI.Try_to_read_track_1_pregap;
public string SkippedLabel => UI.Skipped_sectors_on_error;
public string SidecarLabel => UI.Create_Aaru_Metadata_sidecar;
public string TrimLabel => UI.Trim_errors_from_skipped_sectors;
public string ExistingMetadataLabel => UI.Take_metadata_from_existing_CICM_XML_sidecar;
public string EncodingLabel => UI.Encoding_to_use_on_metadata_sidecar_creation;
public string DestinationLabel => UI.Writing_image_to;
public string LogLabel => UI.Title_Log;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
public ICommand StartCommand { get; }
public ICommand CloseCommand { get; }
public ICommand StopCommand { get; }

View File

@@ -161,9 +161,6 @@ public sealed partial class MediaScanViewModel : ViewModelBase
public string SpeedLabel => UI.ButtonLabel_Stop;
public string KbsLabel => UI.Kb_s;
public string BlockLabel => UI.Title_Block;
public string StartLabel => UI.ButtonLabel_Start;
public string CloseLabel => UI.ButtonLabel_Close;
public string StopLabel => UI.ButtonLabel_Stop;
public ObservableCollection<(ulong block, double duration)> BlockMapList { get; }

View File

@@ -33,7 +33,6 @@
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.Helpers;
using Aaru.Localization;
using CommunityToolkit.Mvvm.ComponentModel;
using JetBrains.Annotations;
@@ -71,10 +70,6 @@ public sealed partial class ViewSectorViewModel : ViewModelBase
SectorNumber = 0;
}
public string SectorLabel => UI.Title_Sector;
public string LongSectorLabel => UI.Show_long_sector;
public double SectorNumber
{
get => _sectorNumber;