Skip to content

Commit

Permalink
Fix language conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Nov 23, 2023
1 parent 3c0773a commit 94e117c
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions YoutubeExplode.Converter/Utils/Extensions/LanguageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static string GetThreeLetterCode(this Language language) =>
"bi" => "bis",
"bm" => "bam",
"bn" => "ben",
"bo" => "tib",
"bo" => "bod",
"br" => "bre",
"bs" => "bos",
"ca" => "cat",
Expand All @@ -44,24 +44,24 @@ public static string GetThreeLetterCode(this Language language) =>
"cs" => "cze",
"cu" => "chu",
"cv" => "chv",
"cy" => "wel",
"cy" => "cym",
"da" => "dan",
"de" => "ger",
"de" => "deu",
"dv" => "div",
"dz" => "dzo",
"ee" => "ewe",
"el" => "gre",
"el" => "ell",
"en" => "eng",
"eo" => "epo",
"es" => "spa",
"et" => "est",
"eu" => "baq",
"fa" => "per",
"eu" => "eus",
"fa" => "fas",
"ff" => "ful",
"fi" => "fin",
"fj" => "fij",
"fo" => "fao",
"fr" => "fre",
"fr" => "fra",
"fy" => "fry",
"ga" => "gle",
"gd" => "gla",
Expand All @@ -76,21 +76,25 @@ public static string GetThreeLetterCode(this Language language) =>
"hr" => "hrv",
"ht" => "hat",
"hu" => "hun",
"hy" => "arm",
"hy" => "hye",
"hz" => "her",
"ia" => "ina",
"id" => "ind",
"ie" => "ile",
"ig" => "ibo",
"ii" => "iii",
"ik" => "ipk",
"in" => "ind",
"io" => "ido",
"is" => "ice",
"is" => "isl",
"it" => "ita",
"iu" => "iku",
"iw" => "heb",
"ja" => "jpn",
"ji" => "yid",
"jv" => "jav",
"ka" => "geo",
"jw" => "jav",
"ka" => "kat",
"kg" => "kon",
"ki" => "kik",
"kj" => "kua",
Expand All @@ -116,20 +120,21 @@ public static string GetThreeLetterCode(this Language language) =>
"lv" => "lav",
"mg" => "mlg",
"mh" => "mah",
"mi" => "mao",
"mk" => "mac",
"mi" => "mri",
"mk" => "mkd",
"ml" => "mal",
"mn" => "mon",
"mo" => "ron",
"mr" => "mar",
"ms" => "may",
"ms" => "msa",
"mt" => "mlt",
"my" => "bur",
"my" => "mya",
"na" => "nau",
"nb" => "nob",
"nd" => "nde",
"ne" => "nep",
"ng" => "ndo",
"nl" => "dut",
"nl" => "nld",
"nn" => "nno",
"no" => "nor",
"nr" => "nbl",
Expand All @@ -148,21 +153,22 @@ public static string GetThreeLetterCode(this Language language) =>
"qu" => "que",
"rm" => "roh",
"rn" => "run",
"ro" => "rum",
"ro" => "ron",
"ru" => "rus",
"rw" => "kin",
"sa" => "san",
"sc" => "srd",
"sd" => "snd",
"se" => "sme",
"sg" => "sag",
"sh" => "hbs",
"si" => "sin",
"sk" => "slo",
"sl" => "slv",
"sm" => "smo",
"sn" => "sna",
"so" => "som",
"sq" => "alb",
"sq" => "sqi",
"sr" => "srp",
"ss" => "ssw",
"st" => "sot",
Expand Down Expand Up @@ -196,7 +202,7 @@ public static string GetThreeLetterCode(this Language language) =>
"yi" => "yid",
"yo" => "yor",
"za" => "zha",
"zh" => "chi",
"zh" => "zho",
"zu" => "zul",
var code => throw new InvalidOperationException($"Unrecognized language code '{code}'.")
};
Expand Down

0 comments on commit 94e117c

Please sign in to comment.