Unified locales #391

Merged
LotP1 merged 25 commits from unified-locales into master 2024-12-20 19:27:11 +00:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit af4a71d6eb - Show all commits

View File

@ -26,7 +26,7 @@ namespace Ryujinx.BuildValidationTasks
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
data = sr.ReadToEnd();
}
LocalesJSON json = JsonConvert.DeserializeObject<LocalesJSON>(data);
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
LocalesJson json = JsonConvert.DeserializeObject<LocalesJson>(data);
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
for (int i = 0; i < json.Locales.Count; i++)
{
@ -55,7 +55,7 @@ namespace Ryujinx.BuildValidationTasks
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
return true;
}
struct LocalesJSON
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
struct LocalesJson
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
{
public List<string> Languages { get; set; }
public List<LocalesEntry> Locales { get; set; }

WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`
WilliamWsyHK commented 2024-12-18 13:51:48 +00:00 (Migrated from github.com)
Review

A minor comment: LocalesJSON -> LocalesJson

A minor comment: `LocalesJSON` -> `LocalesJson`

View File

@ -158,7 +158,7 @@ namespace Ryujinx.Ava.Common.Locale
return null;
}
LocalesJSON json = JsonHelper.Deserialize(fileData, LocalesJSONContext.Default.LocalesJSON);
LocalesJson json = JsonHelper.Deserialize(fileData, LocalesJsonContext.Default.LocalesJSON);
foreach (LocalesEntry locale in json.Locales)
{
@ -186,7 +186,7 @@ namespace Ryujinx.Ava.Common.Locale
}
}
public struct LocalesJSON
public struct LocalesJson
{
public List<string> Languages { get; set; }
public List<LocalesEntry> Locales { get; set; }
@ -199,6 +199,6 @@ namespace Ryujinx.Ava.Common.Locale
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(LocalesJSON))]
internal partial class LocalesJSONContext : JsonSerializerContext { }
[JsonSerializable(typeof(LocalesJson))]
internal partial class LocalesJsonContext : JsonSerializerContext { }
}

View File

@ -58,7 +58,7 @@ namespace Ryujinx.Ava.UI.Views.Main
string languageJson = EmbeddedResources.ReadAllText(localePath);
LocalesJSON locales = JsonHelper.Deserialize(languageJson, LocalesJSONContext.Default.LocalesJSON);
LocalesJson locales = JsonHelper.Deserialize(languageJson, LocalesJsonContext.Default.LocalesJSON);
foreach (string language in locales.Languages)
{