Skip to content

Commit

Permalink
impr(funbox): add 46 group languages to wikipedia funbox (RealCyGuy) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
RealCyGuy authored Feb 19, 2024
1 parent a1f883b commit d1b663a
Showing 1 changed file with 196 additions and 3 deletions.
199 changes: 196 additions & 3 deletions frontend/src/ts/test/wikipedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,62 @@ import { Section } from "../utils/misc";

export async function getTLD(
languageGroup: MonkeyTypes.LanguageGroup
): Promise<"en" | "es" | "fr" | "de" | "pt" | "it" | "nl" | "pl"> {
): Promise<
| "en"
| "es"
| "fr"
| "de"
| "pt"
| "ar"
| "it"
| "la"
| "af"
| "ko"
| "ru"
| "pl"
| "cs"
| "sk"
| "uk"
| "lt"
| "id"
| "el"
| "tr"
| "th"
| "ta"
| "sl"
| "hr"
| "nl"
| "da"
| "hu"
| "no"
| "nn"
| "he"
| "ms"
| "ro"
| "fi"
| "et"
| "cy"
| "fa"
| "kk"
| "vi"
| "sv"
| "sr"
| "ka"
| "ca"
| "bg"
| "eo"
| "bn"
| "ur"
| "hy"
| "my"
| "hi"
| "mk"
| "uz"
| "be"
| "az"
| "lv"
| "eu"
> {
// language group to tld
switch (languageGroup.name) {
case "english":
Expand All @@ -22,15 +77,153 @@ export async function getTLD(
case "portuguese":
return "pt";

case "arabic":
return "ar";

case "italian":
return "it";

case "dutch":
return "nl";
case "latin":
return "la";

case "afrikaans":
return "af";

case "korean":
return "ko";

case "russian":
return "ru";

case "polish":
return "pl";

case "czech":
return "cs";

case "slovak":
return "sk";

case "ukrainian":
return "uk";

case "lithuanian":
return "lt";

case "indonesian":
return "id";

case "greek":
return "el";

case "turkish":
return "tr";

case "thai":
return "th";

case "tamil":
return "ta";

case "slovenian":
return "sl";

case "croatian":
return "hr";

case "dutch":
return "nl";

case "danish":
return "da";

case "hungarian":
return "hu";

case "norwegian_bokmal":
return "no";

case "norwegian_nynorsk":
return "nn";

case "hebrew":
return "he";

case "malay":
return "ms";

case "romanian":
return "ro";

case "finnish":
return "fi";

case "estonian":
return "et";

case "welsh":
return "cy";

case "persian":
return "fa";

case "kazakh":
return "kk";

case "vietnamese":
return "vi";

case "swedish":
return "sv";

case "serbian":
return "sr";

case "georgian":
return "ka";

case "catalan":
return "ca";

case "bulgarian":
return "bg";

case "esperanto":
return "eo";

case "bangla":
return "bn";

case "urdu":
return "ur";

case "armenian":
return "hy";

case "myanmar":
return "my";

case "hindi":
return "hi";

case "macedonian":
return "mk";

case "uzbek":
return "uz";

case "belarusian":
return "be";

case "azerbaijani":
return "az";

case "latvian":
return "lv";

case "euskera":
return "eu";

default:
return "en";
}
Expand Down

0 comments on commit d1b663a

Please sign in to comment.