diff options
| author | Emmanuel Hansen <emmausssss@gmail.com> | 2023-01-03 18:45:08 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-03 19:45:08 +0100 |
| commit | 02714a1291e1b548908ffd7adcd537897bf6f541 (patch) | |
| tree | 4c0aec3e5024115bb994811067733528345b9234 /Ryujinx.Ava/UI/Models | |
| parent | 09c9686498c7c987c94f33c79732c7592045e035 (diff) | |
Avalonia - Add source generator for locale items (#3999)
* Add source generator for locale keys
* use locale keys in Ui subdir
Diffstat (limited to 'Ryujinx.Ava/UI/Models')
| -rw-r--r-- | Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.Ava/UI/Models/SaveModel.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Ava/UI/Models/TitleUpdateModel.cs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs b/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs index b322ed64..98caceb5 100644 --- a/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs +++ b/Ryujinx.Ava/UI/Models/Generic/LastPlayedSortComparer.cs @@ -17,12 +17,12 @@ namespace Ryujinx.Ava.UI.Models.Generic string aValue = x.LastPlayed; string bValue = y.LastPlayed; - if (aValue == LocaleManager.Instance["Never"]) + if (aValue == LocaleManager.Instance[LocaleKeys.Never]) { aValue = DateTime.UnixEpoch.ToString(); } - if (bValue == LocaleManager.Instance["Never"]) + if (bValue == LocaleManager.Instance[LocaleKeys.Never]) { bValue = DateTime.UnixEpoch.ToString(); } diff --git a/Ryujinx.Ava/UI/Models/SaveModel.cs b/Ryujinx.Ava/UI/Models/SaveModel.cs index c9311104..3c20741f 100644 --- a/Ryujinx.Ava/UI/Models/SaveModel.cs +++ b/Ryujinx.Ava/UI/Models/SaveModel.cs @@ -107,10 +107,10 @@ namespace Ryujinx.Ava.UI.Models public async void Delete() { - var result = await ContentDialogHelper.CreateConfirmationDialog(LocaleManager.Instance["DeleteUserSave"], - LocaleManager.Instance["IrreversibleActionNote"], - LocaleManager.Instance["InputDialogYes"], - LocaleManager.Instance["InputDialogNo"], ""); + var result = await ContentDialogHelper.CreateConfirmationDialog(LocaleManager.Instance[LocaleKeys.DeleteUserSave], + LocaleManager.Instance[LocaleKeys.IrreversibleActionNote], + LocaleManager.Instance[LocaleKeys.InputDialogYes], + LocaleManager.Instance[LocaleKeys.InputDialogNo], ""); if (result == UserResult.Yes) { diff --git a/Ryujinx.Ava/UI/Models/TitleUpdateModel.cs b/Ryujinx.Ava/UI/Models/TitleUpdateModel.cs index 77203222..c3ba6230 100644 --- a/Ryujinx.Ava/UI/Models/TitleUpdateModel.cs +++ b/Ryujinx.Ava/UI/Models/TitleUpdateModel.cs @@ -11,8 +11,8 @@ namespace Ryujinx.Ava.UI.Models public string Path { get; } public string Label => IsNoUpdate - ? LocaleManager.Instance["NoUpdate"] - : string.Format(LocaleManager.Instance["TitleUpdateVersionLabel"], Control.DisplayVersionString.ToString(), + ? LocaleManager.Instance[LocaleKeys.NoUpdate] + : string.Format(LocaleManager.Instance[LocaleKeys.TitleUpdateVersionLabel], Control.DisplayVersionString.ToString(), Path); public TitleUpdateModel(ApplicationControlProperty control, string path, bool isNoUpdate = false) |
