mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 16:00:17 +00:00
Fix locale keys
This commit is contained in:
parent
fdfbafa137
commit
e629a383d4
3 changed files with 77 additions and 77 deletions
|
@ -44,7 +44,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
HorizonClient = horizonClient;
|
HorizonClient = horizonClient;
|
||||||
ViewModel = new UserProfileViewModel();
|
ViewModel = new UserProfileViewModel();
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
|
|
||||||
if (contentManager.GetCurrentFirmwareVersion() != null)
|
if (contentManager.GetCurrentFirmwareVersion() != null)
|
||||||
{
|
{
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
|
@ -94,7 +94,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
|
|
||||||
Style closeButtonParent = new(x => x.Name("CommandSpace"));
|
Style closeButtonParent = new(x => x.Name("CommandSpace"));
|
||||||
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty, Avalonia.Layout.HorizontalAlignment.Right));
|
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty, Avalonia.Layout.HorizontalAlignment.Right));
|
||||||
|
|
||||||
contentDialog.Styles.Add(closeButton);
|
contentDialog.Styles.Add(closeButton);
|
||||||
contentDialog.Styles.Add(closeButtonParent);
|
contentDialog.Styles.Add(closeButtonParent);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
|
|
||||||
Navigate(typeof(UserSelector), this);
|
Navigate(typeof(UserSelector), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadProfiles()
|
public void LoadProfiles()
|
||||||
{
|
{
|
||||||
ViewModel.Profiles.Clear();
|
ViewModel.Profiles.Clear();
|
||||||
|
@ -167,7 +167,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
{
|
{
|
||||||
ViewModel.LostProfiles.Add(new UserProfile(new HLE.HOS.Services.Account.Acc.UserProfile(account, "", null), this));
|
ViewModel.LostProfiles.Add(new UserProfile(new HLE.HOS.Services.Account.Acc.UserProfile(account, "", null), this));
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewModel.Profiles.Add(new AddModel());
|
ViewModel.Profiles.Add(new AddModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
{
|
{
|
||||||
async void Action()
|
async void Action()
|
||||||
{
|
{
|
||||||
await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance["DialogUserProfileDeletionWarningMessage"]);
|
await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance[LocaleKeys.DialogUserProfileDeletionWarningMessage]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dispatcher.UIThread.Post(Action);
|
Dispatcher.UIThread.Post(Action);
|
||||||
|
@ -196,23 +196,23 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
}
|
}
|
||||||
|
|
||||||
var result =
|
var result =
|
||||||
await ContentDialogHelper.CreateConfirmationDialog(LocaleManager.Instance["DialogUserProfileDeletionConfirmMessage"], "",
|
await ContentDialogHelper.CreateConfirmationDialog(LocaleManager.Instance[LocaleKeys.DialogUserProfileDeletionConfirmMessage], "",
|
||||||
LocaleManager.Instance["InputDialogYes"], LocaleManager.Instance["InputDialogNo"], "");
|
LocaleManager.Instance[LocaleKeys.InputDialogYes], LocaleManager.Instance[LocaleKeys.InputDialogNo], "");
|
||||||
|
|
||||||
if (result == UserResult.Yes)
|
if (result == UserResult.Yes)
|
||||||
{
|
{
|
||||||
GoBack();
|
GoBack();
|
||||||
AccountManager.DeleteUser(userProfile.UserId);
|
AccountManager.DeleteUser(userProfile.UserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddUser()
|
public void AddUser()
|
||||||
{
|
{
|
||||||
Navigate(typeof(UserEditor), (this, (UserProfile)null, true));
|
Navigate(typeof(UserEditor), (this, (UserProfile)null, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EditUser(UserProfile userProfile)
|
public void EditUser(UserProfile userProfile)
|
||||||
{
|
{
|
||||||
Navigate(typeof(UserEditor), (this, userProfile, false));
|
Navigate(typeof(UserEditor), (this, userProfile, false));
|
||||||
|
@ -222,7 +222,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
{
|
{
|
||||||
Navigate(typeof(UserRecoverer), this);
|
Navigate(typeof(UserRecoverer), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ManageSaves()
|
public void ManageSaves()
|
||||||
{
|
{
|
||||||
Navigate(typeof(UserSaveManager), (this, AccountManager, HorizonClient, VirtualFileSystem));
|
Navigate(typeof(UserSaveManager), (this, AccountManager, HorizonClient, VirtualFileSystem));
|
||||||
|
|
|
@ -20,9 +20,9 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||||
private ContentManager _contentManager;
|
private ContentManager _contentManager;
|
||||||
private NavigationDialogHost _parent;
|
private NavigationDialogHost _parent;
|
||||||
private TempProfile _profile;
|
private TempProfile _profile;
|
||||||
|
|
||||||
internal UserProfileImageSelectorViewModel ViewModel { get; private set; }
|
internal UserProfileImageSelectorViewModel ViewModel { get; private set; }
|
||||||
|
|
||||||
public UserProfileImageSelector()
|
public UserProfileImageSelector()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -47,7 +47,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||||
DataContext = ViewModel = new UserProfileImageSelectorViewModel();
|
DataContext = ViewModel = new UserProfileImageSelectorViewModel();
|
||||||
ViewModel.FirmwareFound = _contentManager.GetCurrentFirmwareVersion() != null;
|
ViewModel.FirmwareFound = _contentManager.GetCurrentFirmwareVersion() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case NavigationMode.Back:
|
case NavigationMode.Back:
|
||||||
_parent.GoBack();
|
_parent.GoBack();
|
||||||
|
@ -61,7 +61,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||||
OpenFileDialog dialog = new();
|
OpenFileDialog dialog = new();
|
||||||
dialog.Filters.Add(new FileDialogFilter
|
dialog.Filters.Add(new FileDialogFilter
|
||||||
{
|
{
|
||||||
Name = LocaleManager.Instance["AllSupportedFormats"],
|
Name = LocaleManager.Instance[LocaleKeys.AllSupportedFormats],
|
||||||
Extensions = { "jpg", "jpeg", "png", "bmp" }
|
Extensions = { "jpg", "jpeg", "png", "bmp" }
|
||||||
});
|
});
|
||||||
dialog.Filters.Add(new FileDialogFilter { Name = "JPEG", Extensions = { "jpg", "jpeg" } });
|
dialog.Filters.Add(new FileDialogFilter { Name = "JPEG", Extensions = { "jpg", "jpeg" } });
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<UserControl
|
<UserControl
|
||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
@ -8,8 +8,8 @@
|
||||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||||
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
|
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
Height="400"
|
Height="400"
|
||||||
Width="550"
|
Width="550"
|
||||||
|
@ -28,19 +28,19 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Spacing="10"
|
Spacing="10"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
<Button
|
<Button
|
||||||
Height="30"
|
Height="30"
|
||||||
Width="50"
|
Width="50"
|
||||||
MinWidth="50"
|
MinWidth="50"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
<Label Content="{locale:Locale CommonSort}" VerticalAlignment="Center" />
|
<Label Content="{locale:Locale CommonSort}" VerticalAlignment="Center" />
|
||||||
<ComboBox SelectedIndex="{Binding SortIndex}" Width="100">
|
<ComboBox SelectedIndex="{Binding SortIndex}" Width="100">
|
||||||
<ComboBoxItem>
|
<ComboBoxItem>
|
||||||
<Label
|
<Label
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
Content="{locale:Locale Name}" />
|
Content="{locale:Locale Name}" />
|
||||||
|
@ -65,45 +65,45 @@
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ComboBox SelectedIndex="{Binding OrderIndex}" Width="150">
|
<ComboBox SelectedIndex="{Binding OrderIndex}" Width="150">
|
||||||
<ComboBoxItem>
|
<ComboBoxItem>
|
||||||
<Label
|
<Label
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
Content="{locale:Locale OrderAscending}" />
|
Content="{locale:Locale OrderAscending}" />
|
||||||
</ComboBoxItem>
|
</ComboBoxItem>
|
||||||
<ComboBoxItem>
|
<ComboBoxItem>
|
||||||
<Label
|
<Label
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalContentAlignment="Left"
|
HorizontalContentAlignment="Left"
|
||||||
Content="{locale:Locale Descending}" />
|
Content="{locale:Locale OrderDescending}" />
|
||||||
</ComboBoxItem>
|
</ComboBoxItem>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Margin="10,0, 0, 0">
|
Margin="10,0, 0, 0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Content="{locale:Locale Search}" VerticalAlignment="Center" />
|
<Label Content="{locale:Locale Search}" VerticalAlignment="Center" />
|
||||||
<TextBox
|
<TextBox
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Text="{Binding Search}" />
|
Text="{Binding Search}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Border
|
<Border
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="0,5"
|
Margin="0,5"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
<ListBox
|
<ListBox
|
||||||
Name="SaveList"
|
Name="SaveList"
|
||||||
Items="{Binding Views}"
|
Items="{Binding Views}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
<ListBox.Styles>
|
<ListBox.Styles>
|
||||||
<Style Selector="ListBoxItem">
|
<Style Selector="ListBoxItem">
|
||||||
|
@ -120,64 +120,64 @@
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||||
<Border
|
<Border
|
||||||
Height="42"
|
Height="42"
|
||||||
Margin="2"
|
Margin="2"
|
||||||
Width="42"
|
Width="42"
|
||||||
Padding="10"
|
Padding="10"
|
||||||
IsVisible="{Binding !InGameList}">
|
IsVisible="{Binding !InGameList}">
|
||||||
<ui:SymbolIcon
|
<ui:SymbolIcon
|
||||||
Symbol="Help"
|
Symbol="Help"
|
||||||
FontSize="30"
|
FontSize="30"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Border>
|
</Border>
|
||||||
<Image
|
<Image
|
||||||
IsVisible="{Binding InGameList}"
|
IsVisible="{Binding InGameList}"
|
||||||
Width="42"
|
Width="42"
|
||||||
Height="42"
|
Height="42"
|
||||||
Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
MaxLines="3"
|
MaxLines="3"
|
||||||
Width="320"
|
Width="320"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Text="{Binding Title}"
|
Text="{Binding Title}"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Spacing="10"
|
Spacing="10"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Label
|
<Label
|
||||||
Content="{Binding SizeString}"
|
Content="{Binding SizeString}"
|
||||||
IsVisible="{Binding SizeAvailable}"
|
IsVisible="{Binding SizeAvailable}"
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Right" />
|
|
||||||
<Button
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right" />
|
||||||
|
<Button
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Padding="10"
|
Padding="10"
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Name="OpenLocation"
|
Name="OpenLocation"
|
||||||
Click="OpenLocation">
|
Click="OpenLocation">
|
||||||
<ui:SymbolIcon
|
<ui:SymbolIcon
|
||||||
Symbol="OpenFolder"
|
Symbol="OpenFolder"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Padding="10"
|
Padding="10"
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Name="Delete"
|
Name="Delete"
|
||||||
Click="Delete">
|
Click="Delete">
|
||||||
<ui:SymbolIcon
|
<ui:SymbolIcon
|
||||||
Symbol="Delete"
|
Symbol="Delete"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
Loading…
Reference in a new issue