New: Add 'zhtw' and 'yue' language codes as Chinese language
Closes #6363
This commit is contained in:
parent
091449d9bf
commit
666455f9b1
|
@ -64,7 +64,9 @@ namespace NzbDrone.Core.Parser
|
|||
{ "cze", Language.Czech },
|
||||
{ "dut", Language.Dutch },
|
||||
{ "mac", Language.Macedonian },
|
||||
{ "rum", Language.Romanian }
|
||||
{ "rum", Language.Romanian },
|
||||
{ "yue", Language.Chinese },
|
||||
{ "zhtw", Language.Chinese }
|
||||
};
|
||||
|
||||
public static IsoLanguage Find(string isoCode)
|
||||
|
@ -86,6 +88,10 @@ namespace NzbDrone.Core.Parser
|
|||
|
||||
return isoLanguages.FirstOrDefault();
|
||||
}
|
||||
else if (AlternateIsoCodeMappings.TryGetValue(isoCode, out var alternateLanguage))
|
||||
{
|
||||
return Get(alternateLanguage);
|
||||
}
|
||||
else if (langCode.Length == 3)
|
||||
{
|
||||
// Lookup ISO639-2T code
|
||||
|
@ -96,10 +102,6 @@ namespace NzbDrone.Core.Parser
|
|||
|
||||
return All.FirstOrDefault(l => l.ThreeLetterCode == langCode);
|
||||
}
|
||||
else if (AlternateIsoCodeMappings.TryGetValue(isoCode, out var alternateLanguage))
|
||||
{
|
||||
return Get(alternateLanguage);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue