Fill in some gaps

This commit is contained in:
Matt Nadareski
2025-10-16 23:02:35 -04:00
parent 8c551dc990
commit 052d074e92
3 changed files with 5 additions and 4 deletions

View File

@@ -282,8 +282,7 @@ namespace MPF.Frontend
{
return (internalLanguage?.ToLowerInvariant()) switch
{
"auto"
or "auto detect" => InterfaceLanguage.AutoDetect,
"auto" or "autodetect" or "auto detect" => InterfaceLanguage.AutoDetect,
"eng" or "english" => InterfaceLanguage.English,
"kor" or "korean" or "한국어" => InterfaceLanguage.Korean,

View File

@@ -149,12 +149,12 @@ namespace MPF.Frontend
{
get
{
var valueString = GetStringSetting(Settings, "DefaultUILanguage", InterfaceLanguage.AutoDetect.ToString());
var valueString = GetStringSetting(Settings, "DefaultUILanguage", InterfaceLanguage.AutoDetect.ShortName());
return valueString.ToInterfaceLanguage();
}
set
{
Settings["DefaultUILanguage"] = value.ToString();
Settings["DefaultUILanguage"] = value.ShortName();
}
}

View File

@@ -18,6 +18,7 @@ namespace MPF.UI
return value switch
{
DiscCategory discCategory => new Element<DiscCategory>(discCategory),
InterfaceLanguage interfaceLanguage => new Element<InterfaceLanguage>(interfaceLanguage),
InternalProgram internalProgram => new Element<InternalProgram>(internalProgram),
LogCompression logCompression => new Element<LogCompression>(logCompression),
MediaType mediaType => new Element<MediaType>(mediaType),
@@ -41,6 +42,7 @@ namespace MPF.UI
return element switch
{
Element<DiscCategory> dcElement => dcElement.Value,
Element<InterfaceLanguage> ilElement => ilElement.Value,
Element<InternalProgram> ipElement => ipElement.Value,
Element<LogCompression> lcElement => lcElement.Value,
Element<MediaType> mtElement => mtElement.Value,