aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/translate/languages.ts
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-05-10 23:14:04 +0200
committerGitHub <noreply@github.com>2023-05-10 23:14:04 +0200
commitcb385d1b280551eb16f1f9836a93cc9bcc43da15 (patch)
tree87897b84fe78d4d10686981c8bd1c31a5326b46d /src/plugins/translate/languages.ts
parent195f1a032fc63d4fd35564a9d11f8ed4afbcac4d (diff)
downloadVencord-cb385d1b280551eb16f1f9836a93cc9bcc43da15.tar.gz
Vencord-cb385d1b280551eb16f1f9836a93cc9bcc43da15.tar.bz2
Vencord-cb385d1b280551eb16f1f9836a93cc9bcc43da15.zip
New Plugin: Translate (#1089)
Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Diffstat (limited to 'src/plugins/translate/languages.ts')
-rw-r--r--src/plugins/translate/languages.ts172
1 files changed, 172 insertions, 0 deletions
diff --git a/src/plugins/translate/languages.ts b/src/plugins/translate/languages.ts
new file mode 100644
index 0000000..c3be053
--- /dev/null
+++ b/src/plugins/translate/languages.ts
@@ -0,0 +1,172 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2023 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
+
+/*
+To generate:
+- Visit https://translate.google.com/?sl=auto&tl=en&op=translate
+- Open Language dropdown
+- Open Devtools and use the element picker to pick the root of the language picker
+- Right click on the element in devtools and click "Store as global variable"
+
+copy(Object.fromEntries(
+ Array.from(
+ temp1.querySelectorAll("[data-language-code]"),
+ e => [e.dataset.languageCode, e.children[1].textContent]
+ ).sort((a, b) => a[1] === "Detect language" ? -1 : b[1] === "Detect language" ? 1 : a[1].localeCompare(b[1]))
+))
+*/
+
+export type Language = keyof typeof Languages;
+
+export const Languages = {
+ "auto": "Detect language",
+ "af": "Afrikaans",
+ "sq": "Albanian",
+ "am": "Amharic",
+ "ar": "Arabic",
+ "hy": "Armenian",
+ "as": "Assamese",
+ "ay": "Aymara",
+ "az": "Azerbaijani",
+ "bm": "Bambara",
+ "eu": "Basque",
+ "be": "Belarusian",
+ "bn": "Bengali",
+ "bho": "Bhojpuri",
+ "bs": "Bosnian",
+ "bg": "Bulgarian",
+ "ca": "Catalan",
+ "ceb": "Cebuano",
+ "ny": "Chichewa",
+ "zh-CN": "Chinese (Simplified)",
+ "zh-TW": "Chinese (Traditional)",
+ "co": "Corsican",
+ "hr": "Croatian",
+ "cs": "Czech",
+ "da": "Danish",
+ "dv": "Dhivehi",
+ "doi": "Dogri",
+ "nl": "Dutch",
+ "en": "English",
+ "eo": "Esperanto",
+ "et": "Estonian",
+ "ee": "Ewe",
+ "tl": "Filipino",
+ "fi": "Finnish",
+ "fr": "French",
+ "fy": "Frisian",
+ "gl": "Galician",
+ "ka": "Georgian",
+ "de": "German",
+ "el": "Greek",
+ "gn": "Guarani",
+ "gu": "Gujarati",
+ "ht": "Haitian Creole",
+ "ha": "Hausa",
+ "haw": "Hawaiian",
+ "iw": "Hebrew",
+ "hi": "Hindi",
+ "hmn": "Hmong",
+ "hu": "Hungarian",
+ "is": "Icelandic",
+ "ig": "Igbo",
+ "ilo": "Ilocano",
+ "id": "Indonesian",
+ "ga": "Irish",
+ "it": "Italian",
+ "ja": "Japanese",
+ "jw": "Javanese",
+ "kn": "Kannada",
+ "kk": "Kazakh",
+ "km": "Khmer",
+ "rw": "Kinyarwanda",
+ "gom": "Konkani",
+ "ko": "Korean",
+ "kri": "Krio",
+ "ku": "Kurdish (Kurmanji)",
+ "ckb": "Kurdish (Sorani)",
+ "ky": "Kyrgyz",
+ "lo": "Lao",
+ "la": "Latin",
+ "lv": "Latvian",
+ "ln": "Lingala",
+ "lt": "Lithuanian",
+ "lg": "Luganda",
+ "lb": "Luxembourgish",
+ "mk": "Macedonian",
+ "mai": "Maithili",
+ "mg": "Malagasy",
+ "ms": "Malay",
+ "ml": "Malayalam",
+ "mt": "Maltese",
+ "mi": "Maori",
+ "mr": "Marathi",
+ "mni-Mtei": "Meiteilon (Manipuri)",
+ "lus": "Mizo",
+ "mn": "Mongolian",
+ "my": "Myanmar (Burmese)",
+ "ne": "Nepali",
+ "no": "Norwegian",
+ "or": "Odia (Oriya)",
+ "om": "Oromo",
+ "ps": "Pashto",
+ "fa": "Persian",
+ "pl": "Polish",
+ "pt": "Portuguese",
+ "pa": "Punjabi",
+ "qu": "Quechua",
+ "ro": "Romanian",
+ "ru": "Russian",
+ "sm": "Samoan",
+ "sa": "Sanskrit",
+ "gd": "Scots Gaelic",
+ "nso": "Sepedi",
+ "sr": "Serbian",
+ "st": "Sesotho",
+ "sn": "Shona",
+ "sd": "Sindhi",
+ "si": "Sinhala",
+ "sk": "Slovak",
+ "sl": "Slovenian",
+ "so": "Somali",
+ "es": "Spanish",
+ "su": "Sundanese",
+ "sw": "Swahili",
+ "sv": "Swedish",
+ "tg": "Tajik",
+ "ta": "Tamil",
+ "tt": "Tatar",
+ "te": "Telugu",
+ "th": "Thai",
+ "ti": "Tigrinya",
+ "ts": "Tsonga",
+ "tr": "Turkish",
+ "tk": "Turkmen",
+ "ak": "Twi",
+ "uk": "Ukrainian",
+ "ur": "Urdu",
+ "ug": "Uyghur",
+ "uz": "Uzbek",
+ "vi": "Vietnamese",
+ "cy": "Welsh",
+ "xh": "Xhosa",
+ "yi": "Yiddish",
+ "yo": "Yoruba",
+ "zu": "Zulu"
+} as const;