fix: use locales for everything UI related

This commit is contained in:
Jacobwasbeast 2025-02-20 17:53:53 -06:00
parent bf34837038
commit 330f995018
6 changed files with 298 additions and 20 deletions

View File

@ -19,6 +19,7 @@ namespace Ryujinx.HLE.HOS.Applets.Dummy
public ResultCode Start(AppletSession normalSession, AppletSession interactiveSession)
{
_system.Device.UIHandler.DisplayMissingAppletDialog();
_normalSession = normalSession;
_normalSession.Push(BuildResponse());
AppletStateChanged?.Invoke(this, null);

View File

@ -79,5 +79,10 @@ namespace Ryujinx.HLE.UI
/// Gets weather or not the applet is real in the system
/// </summary>
bool IsAppletReal(RealAppletId appletId);
/// <summary>
/// Displays a dialog informing the user that the requested applet is missing implementation.
/// </summary>
void DisplayMissingAppletDialog();
}
}

View File

@ -19247,6 +19247,256 @@
"zh_TW": "已設定底座模式。手提控制應該停用。"
}
},
{
"ID": "RealDescription",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "This is a collection of real applet options.",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealReal",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Real",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealSoftware",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Software",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealMissingApplets",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Missing Applets",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealSoftwareKeyboard",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Software Keyboard",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealBrowser",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Browser",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealController",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Controller",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealPlayerSelect",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Player Select",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "RealCabinet",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "Cabinet",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "ErrorMissingApplet",
"Translations": {
"ar_SA": "",
"de_DE": "",
"el_GR": "",
"en_US": "The functionality of this applet is not implemented, Please set '{0}' to '{1}' if you wish to use the NX version.\n",
"es_ES": "",
"fr_FR": "",
"he_IL": "",
"it_IT": "",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "",
"pt_BR": "",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{
"ID": "UpdaterRenaming",
"Translations": {

View File

@ -574,5 +574,10 @@ namespace Ryujinx.Headless
{
return false;
}
public void DisplayMissingAppletDialog()
{
DisplayMessageDialog("Missing Applet", "The requested applet was not found.");
}
}
}

View File

@ -364,5 +364,21 @@ namespace Ryujinx.Ava.UI.Applet
return missingAppletsAsReal;
}
}
public void DisplayMissingAppletDialog()
{
string title = LocaleManager.Instance[LocaleKeys.RealMissingApplets];
string message = LocaleManager.Instance[LocaleKeys.ErrorMissingApplet];
string real = LocaleManager.Instance[LocaleKeys.RealReal];
string options = LocaleManager.Instance[LocaleKeys.MenuBarOptions].Trim('_');
message = message.Replace("{0}", title);
message = message.Replace("{1}", real);
string location = options + "->" +
LocaleManager.Instance[LocaleKeys.Settings] + "->" +
LocaleManager.Instance[LocaleKeys.SettingsTabRealApplets] + "->" +
LocaleManager.Instance[LocaleKeys.RealMissingApplets];
message += location;
DisplayErrorAppletDialog(title, message, [LocaleManager.Instance[LocaleKeys.InputDialogOk]]);
}
}
}

View File

@ -6,6 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
xmlns:markup="clr-namespace:Ryujinx.Ava.Common.Markup"
mc:Ignorable="d"
x:DataType="viewModels:SettingsViewModel">
@ -30,10 +31,10 @@
<!-- Header -->
<TextBlock HorizontalAlignment="Center"
Classes="h1"
Text="Real Applets" />
Text="{markup:Locale SettingsTabRealApplets}" />
<TextBlock Foreground="{DynamicResource SecondaryTextColor}"
TextDecorations="Underline"
Text="This is a collection of real applet options." />
Text="{markup:Locale RealDescription}" />
<!-- Missing Applets Row -->
<Grid Margin="10,0,0,0">
@ -43,13 +44,13 @@
</Grid.ColumnDefinitions>
<ComboBox Width="100"
SelectedIndex="{Binding MissingAppletsAsReal, Mode=TwoWay, Converter={StaticResource BoolToIndexConverter}}">
<ComboBoxItem Content="Real" />
<ComboBoxItem Content="Skip" />
<ComboBoxItem Content="{markup:Locale RealReal}" />
<ComboBoxItem Content="{markup:Locale RealSoftware}" />
</ComboBox>
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Margin="10,0,0,0"
Text="Missing Applets" />
Text="{markup:Locale RealMissingApplets}" />
</Grid>
<!-- Software Keyboard Row -->
@ -60,13 +61,13 @@
</Grid.ColumnDefinitions>
<ComboBox Width="100"
SelectedIndex="{Binding SoftwareKeyboardIsReal, Mode=TwoWay, Converter={StaticResource BoolToIndexConverter}}">
<ComboBoxItem Content="Real" />
<ComboBoxItem Content="Software" />
<ComboBoxItem Content="{markup:Locale RealReal}" />
<ComboBoxItem Content="{markup:Locale RealSoftware}" />
</ComboBox>
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Margin="10,0,0,0"
Text="Software Keyboard" />
Text="{markup:Locale RealSoftwareKeyboard}" />
</Grid>
<!-- Browser Row -->
@ -77,13 +78,13 @@
</Grid.ColumnDefinitions>
<ComboBox Width="100"
SelectedIndex="{Binding BrowserIsReal, Mode=TwoWay, Converter={StaticResource BoolToIndexConverter}}">
<ComboBoxItem Content="Real" />
<ComboBoxItem Content="Software" />
<ComboBoxItem Content="{markup:Locale RealReal}" />
<ComboBoxItem Content="{markup:Locale RealSoftware}" />
</ComboBox>
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Margin="10,0,0,0"
Text="Browser" />
Text="{markup:Locale RealBrowser}" />
</Grid>
<!-- Controller Row -->
@ -94,13 +95,13 @@
</Grid.ColumnDefinitions>
<ComboBox Width="100"
SelectedIndex="{Binding ControllerIsReal, Mode=TwoWay, Converter={StaticResource BoolToIndexConverter}}">
<ComboBoxItem Content="Real" />
<ComboBoxItem Content="Software" />
<ComboBoxItem Content="{markup:Locale RealReal}" />
<ComboBoxItem Content="{markup:Locale RealSoftware}" />
</ComboBox>
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Margin="10,0,0,0"
Text="Controller" />
Text="{markup:Locale RealController}" />
</Grid>
<!-- Player Select Row -->
@ -111,13 +112,13 @@
</Grid.ColumnDefinitions>
<ComboBox Width="100"
SelectedIndex="{Binding PlayerSelectIsReal, Mode=TwoWay, Converter={StaticResource BoolToIndexConverter}}">
<ComboBoxItem Content="Real" />
<ComboBoxItem Content="Software" />
<ComboBoxItem Content="{markup:Locale RealReal}" />
<ComboBoxItem Content="{markup:Locale RealSoftware}" />
</ComboBox>
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Margin="10,0,0,0"
Text="Player Select" />
Text="{markup:Locale RealPlayerSelect}" />
</Grid>
<!-- Cabinet Row -->
@ -128,13 +129,13 @@
</Grid.ColumnDefinitions>
<ComboBox Width="100"
SelectedIndex="{Binding CabinetIsReal, Mode=TwoWay, Converter={StaticResource BoolToIndexConverter}}">
<ComboBoxItem Content="Real" />
<ComboBoxItem Content="Software" />
<ComboBoxItem Content="{markup:Locale RealReal}" />
<ComboBoxItem Content="{markup:Locale RealSoftware}" />
</ComboBox>
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
Margin="10,0,0,0"
Text="Cabinet" />
Text="{markup:Locale RealCabinet}" />
</Grid>
</StackPanel>
</Border>