Avalonia - Add source generator for locale items (#3999)
* Add source generator for locale keys * use locale keys in Ui subdir
This commit is contained in:
parent
09c9686498
commit
02714a1291
40 changed files with 337 additions and 271 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue