mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Localize strings
This commit is contained in:
@@ -355,7 +355,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
Dispatcher.UIThread.Invoke(() =>
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
{
|
{
|
||||||
StatusMessageVisible = true;
|
StatusMessageVisible = true;
|
||||||
StatusMessage = "Opening device...";
|
StatusMessage = UI.Opening_device;
|
||||||
});
|
});
|
||||||
|
|
||||||
var dev = Device.Create(DevicePath, out ErrorNumber devErrno);
|
var dev = Device.Create(DevicePath, out ErrorNumber devErrno);
|
||||||
@@ -408,18 +408,18 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
ScsiType = $"[orange]{dev.ScsiType.Humanize()}[/]";
|
ScsiType = $"[orange]{dev.ScsiType.Humanize()}[/]";
|
||||||
RemovableChecked = dev.IsRemovable;
|
RemovableChecked = dev.IsRemovable;
|
||||||
UsbConnected = dev.IsUsb;
|
UsbConnected = dev.IsUsb;
|
||||||
StatusMessage = "Device opened successfully.";
|
StatusMessage = UI.Device_opened_successfully;
|
||||||
});
|
});
|
||||||
|
|
||||||
_dev = dev;
|
_dev = dev;
|
||||||
|
|
||||||
Statistics.AddDevice(dev);
|
Statistics.AddDevice(dev);
|
||||||
|
|
||||||
Dispatcher.UIThread.Invoke(() => StatusMessage = "Querying device information...");
|
Dispatcher.UIThread.Invoke(() => StatusMessage = UI.Querying_device_information);
|
||||||
|
|
||||||
var devInfo = new DeviceInfo(dev);
|
var devInfo = new DeviceInfo(dev);
|
||||||
|
|
||||||
Dispatcher.UIThread.Invoke(() => StatusMessage = "Device information queryied successfully...");
|
Dispatcher.UIThread.Invoke(() => StatusMessage = UI.Device_information_queryied_successfully);
|
||||||
|
|
||||||
if(devInfo.IsUsb)
|
if(devInfo.IsUsb)
|
||||||
{
|
{
|
||||||
@@ -553,12 +553,14 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
if(devInfo.PlextorFeatures.PoweRecMax > 0)
|
if(devInfo.PlextorFeatures.PoweRecMax > 0)
|
||||||
{
|
{
|
||||||
PlextorPoweRecMaxVisible = true;
|
PlextorPoweRecMaxVisible = true;
|
||||||
|
|
||||||
PlextorPoweRecMax = string.Format(UI._0_Kb_sec, devInfo.PlextorFeatures.PoweRecMax);
|
PlextorPoweRecMax = string.Format(UI._0_Kb_sec, devInfo.PlextorFeatures.PoweRecMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(devInfo.PlextorFeatures.PoweRecLast > 0)
|
if(devInfo.PlextorFeatures.PoweRecLast > 0)
|
||||||
{
|
{
|
||||||
PlextorPoweRecLastVisible = true;
|
PlextorPoweRecLastVisible = true;
|
||||||
|
|
||||||
PlextorPoweRecLast = string.Format(UI._0_Kb_sec, devInfo.PlextorFeatures.PoweRecLast);
|
PlextorPoweRecLast = string.Format(UI._0_Kb_sec, devInfo.PlextorFeatures.PoweRecLast);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -713,7 +715,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Dispatcher.UIThread.Invoke(() => StatusMessage = "Querying media information...");
|
Dispatcher.UIThread.Invoke(() => StatusMessage = UI.Querying_media_information);
|
||||||
|
|
||||||
var mediaInfo = new ScsiInfo(dev);
|
var mediaInfo = new ScsiInfo(dev);
|
||||||
|
|
||||||
@@ -977,7 +979,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
case CommonTypes.MediaType.GDR or CommonTypes.MediaType.GDROM:
|
case CommonTypes.MediaType.GDR or CommonTypes.MediaType.GDROM:
|
||||||
await MessageBoxManager
|
await MessageBoxManager
|
||||||
.GetMessageBoxStandard(UI.Title_Error,
|
.GetMessageBoxStandard(Localization.UI.Title_Error,
|
||||||
Localization.Core.GD_ROM_dump_support_is_not_yet_implemented,
|
Localization.Core.GD_ROM_dump_support_is_not_yet_implemented,
|
||||||
ButtonEnum.Ok,
|
ButtonEnum.Ok,
|
||||||
Icon.Error)
|
Icon.Error)
|
||||||
@@ -987,7 +989,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
case CommonTypes.MediaType.XGD or CommonTypes.MediaType.XGD2 or CommonTypes.MediaType.XGD3
|
case CommonTypes.MediaType.XGD or CommonTypes.MediaType.XGD2 or CommonTypes.MediaType.XGD3
|
||||||
when _scsiInfo.DeviceInfo.ScsiInquiry?.KreonPresent != true:
|
when _scsiInfo.DeviceInfo.ScsiInquiry?.KreonPresent != true:
|
||||||
await MessageBoxManager
|
await MessageBoxManager
|
||||||
.GetMessageBoxStandard(UI.Title_Error,
|
.GetMessageBoxStandard(Localization.UI.Title_Error,
|
||||||
Localization.Core
|
Localization.Core
|
||||||
.Dumping_Xbox_Game_Discs_requires_a_drive_with_Kreon_firmware,
|
.Dumping_Xbox_Game_Discs_requires_a_drive_with_Kreon_firmware,
|
||||||
ButtonEnum.Ok,
|
ButtonEnum.Ok,
|
||||||
@@ -1015,7 +1017,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
case CommonTypes.MediaType.GDR:
|
case CommonTypes.MediaType.GDR:
|
||||||
case CommonTypes.MediaType.GDROM:
|
case CommonTypes.MediaType.GDROM:
|
||||||
await MessageBoxManager
|
await MessageBoxManager
|
||||||
.GetMessageBoxStandard(UI.Title_Error,
|
.GetMessageBoxStandard(Localization.UI.Title_Error,
|
||||||
Localization.Core.GD_ROM_scan_support_is_not_yet_implemented,
|
Localization.Core.GD_ROM_scan_support_is_not_yet_implemented,
|
||||||
ButtonEnum.Ok,
|
ButtonEnum.Ok,
|
||||||
Icon.Error)
|
Icon.Error)
|
||||||
@@ -1027,7 +1029,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
case CommonTypes.MediaType.XGD:
|
case CommonTypes.MediaType.XGD:
|
||||||
case CommonTypes.MediaType.XGD2:
|
case CommonTypes.MediaType.XGD2:
|
||||||
case CommonTypes.MediaType.XGD3:
|
case CommonTypes.MediaType.XGD3:
|
||||||
await MessageBoxManager.GetMessageBoxStandard(UI.Title_Error,
|
await MessageBoxManager.GetMessageBoxStandard(Localization.UI.Title_Error,
|
||||||
Localization.Core
|
Localization.Core
|
||||||
.Scanning_Xbox_discs_is_not_yet_supported,
|
.Scanning_Xbox_discs_is_not_yet_supported,
|
||||||
ButtonEnum.Ok,
|
ButtonEnum.Ok,
|
||||||
|
|||||||
@@ -621,8 +621,8 @@
|
|||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Scan_media_surface}" />
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Scan_media_surface}" />
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Grid.Row="3"
|
<controls:SpectreTextBlock Grid.Row="3"
|
||||||
IsVisible="{Binding StatusMessageVisible, Mode=OneWay}"
|
IsVisible="{Binding StatusMessageVisible, Mode=OneWay}"
|
||||||
Text="{Binding StatusMessage, Mode=OneWay}" />
|
Text="{Binding StatusMessage, Mode=OneWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
24
Aaru.Localization/UI.Designer.cs
generated
24
Aaru.Localization/UI.Designer.cs
generated
@@ -6531,5 +6531,29 @@ namespace Aaru.Localization {
|
|||||||
return ResourceManager.GetString("Title_Device_path", resourceCulture);
|
return ResourceManager.GetString("Title_Device_path", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string Device_opened_successfully {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Device_opened_successfully", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Querying_device_information {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Querying_device_information", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Device_information_queryied_successfully {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Device_information_queryied_successfully", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Querying_media_information {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Querying_media_information", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3266,4 +3266,16 @@ Probadores:
|
|||||||
<data name="Title_Device_path" xml:space="preserve">
|
<data name="Title_Device_path" xml:space="preserve">
|
||||||
<value>[bold][slateblue1]Ruta al dispositivo[/][/]</value>
|
<value>[bold][slateblue1]Ruta al dispositivo[/][/]</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Device_opened_successfully" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Dispositivo abierto correctamente.[/]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Querying_device_information" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Obteniendo información del dispositivo[/]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Device_information_queryied_successfully" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Información del dispositivo obtenida correctamente.[/]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Querying_media_information" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Obteniendo información del medio...[/]</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -3341,4 +3341,16 @@ Do you want to continue?</value>
|
|||||||
<data name="Title_Device_path" xml:space="preserve">
|
<data name="Title_Device_path" xml:space="preserve">
|
||||||
<value>[bold][slateblue1]Device path[/][/]</value>
|
<value>[bold][slateblue1]Device path[/][/]</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Device_opened_successfully" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Device opened successfully.[/]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Querying_device_information" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Querying device information...[/]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Device_information_queryied_successfully" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Device information queryied successfully.[/]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Querying_media_information" xml:space="preserve">
|
||||||
|
<value>[slateblue1]Querying media information...[/]</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user