1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-27 01:57:33 +00:00
bazarr/libs/deep_translator/constants.py

269 lines
5.9 KiB
Python
Raw Normal View History

BASE_URLS = {
"GOOGLE_TRANSLATE": "https://translate.google.com/m",
"PONS": "https://en.pons.com/translate/",
"YANDEX": "https://translate.yandex.net/api/{version}/tr.json/{endpoint}",
"LINGUEE": "https://www.linguee.com/",
"MYMEMORY": "http://api.mymemory.translated.net/get",
"QCRI": "https://mt.qcri.org/api/v1/{endpoint}?",
"DEEPL": "https://api.deepl.com/{version}/",
"DEEPL_FREE": "https://api-free.deepl.com/{version}/",
"MICROSOFT_TRANSLATE": "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",
"PAPAGO": "https://papago.naver.com/",
"PAPAGO_API": "https://openapi.naver.com/v1/papago/n2mt",
"LIBRE": "https://libretranslate.com/",
"LIBRE_FREE": "https://libretranslate.de/",
}
GOOGLE_LANGUAGES_TO_CODES = {
"afrikaans": "af",
"albanian": "sq",
"amharic": "am",
"arabic": "ar",
"armenian": "hy",
2022-11-07 18:06:49 +00:00
"assamese": "as",
"aymara": "ay",
"azerbaijani": "az",
2022-11-07 18:06:49 +00:00
"bambara": "bm",
"basque": "eu",
"belarusian": "be",
"bengali": "bn",
2022-11-07 18:06:49 +00:00
"bhojpuri": "bho",
"bosnian": "bs",
"bulgarian": "bg",
"catalan": "ca",
"cebuano": "ceb",
"chichewa": "ny",
"chinese (simplified)": "zh-CN",
"chinese (traditional)": "zh-TW",
"corsican": "co",
"croatian": "hr",
"czech": "cs",
"danish": "da",
2022-11-07 18:06:49 +00:00
"dhivehi": "dv",
"dogri": "doi",
"dutch": "nl",
"english": "en",
"esperanto": "eo",
"estonian": "et",
2022-11-07 18:06:49 +00:00
"ewe": "ee",
"filipino": "tl",
"finnish": "fi",
"french": "fr",
"frisian": "fy",
"galician": "gl",
"georgian": "ka",
"german": "de",
"greek": "el",
2022-11-07 18:06:49 +00:00
"guarani": "gn",
"gujarati": "gu",
"haitian creole": "ht",
"hausa": "ha",
"hawaiian": "haw",
"hebrew": "iw",
"hindi": "hi",
"hmong": "hmn",
"hungarian": "hu",
"icelandic": "is",
"igbo": "ig",
2022-11-07 18:06:49 +00:00
"ilocano": "ilo",
"indonesian": "id",
"irish": "ga",
"italian": "it",
"japanese": "ja",
"javanese": "jw",
"kannada": "kn",
"kazakh": "kk",
"khmer": "km",
"kinyarwanda": "rw",
2022-11-07 18:06:49 +00:00
"konkani": "gom",
"korean": "ko",
2022-11-07 18:06:49 +00:00
"krio": "kri",
"kurdish (kurmanji)": "ku",
"kurdish (sorani)": "ckb",
"kyrgyz": "ky",
"lao": "lo",
"latin": "la",
"latvian": "lv",
2022-11-07 18:06:49 +00:00
"lingala": "ln",
"lithuanian": "lt",
2022-11-07 18:06:49 +00:00
"luganda": "lg",
"luxembourgish": "lb",
"macedonian": "mk",
2022-11-07 18:06:49 +00:00
"maithili": "mai",
"malagasy": "mg",
"malay": "ms",
"malayalam": "ml",
"maltese": "mt",
"maori": "mi",
"marathi": "mr",
2022-11-07 18:06:49 +00:00
"meiteilon (manipuri)": "mni-Mtei",
"mizo": "lus",
"mongolian": "mn",
"myanmar": "my",
"nepali": "ne",
"norwegian": "no",
2022-11-07 18:06:49 +00:00
"odia (oriya)": "or",
"oromo": "om",
"pashto": "ps",
"persian": "fa",
"polish": "pl",
"portuguese": "pt",
"punjabi": "pa",
2022-11-07 18:06:49 +00:00
"quechua": "qu",
"romanian": "ro",
"russian": "ru",
"samoan": "sm",
2022-11-07 18:06:49 +00:00
"sanskrit": "sa",
"scots gaelic": "gd",
2022-11-07 18:06:49 +00:00
"sepedi": "nso",
"serbian": "sr",
"sesotho": "st",
"shona": "sn",
"sindhi": "sd",
"sinhala": "si",
"slovak": "sk",
"slovenian": "sl",
"somali": "so",
"spanish": "es",
"sundanese": "su",
"swahili": "sw",
"swedish": "sv",
"tajik": "tg",
"tamil": "ta",
"tatar": "tt",
"telugu": "te",
"thai": "th",
2022-11-07 18:06:49 +00:00
"tigrinya": "ti",
"tsonga": "ts",
"turkish": "tr",
"turkmen": "tk",
2022-11-07 18:06:49 +00:00
"twi": "ak",
"ukrainian": "uk",
"urdu": "ur",
"uyghur": "ug",
"uzbek": "uz",
"vietnamese": "vi",
"welsh": "cy",
"xhosa": "xh",
"yiddish": "yi",
"yoruba": "yo",
"zulu": "zu",
}
PONS_CODES_TO_LANGUAGES = {
"ar": "arabic",
"bg": "bulgarian",
"zh-cn": "chinese",
"cs": "czech",
"da": "danish",
"nl": "dutch",
"en": "english",
"fr": "french",
"de": "german",
"el": "greek",
"hu": "hungarian",
"it": "italian",
"la": "latin",
"no": "norwegian",
"pl": "polish",
"pt": "portuguese",
"ru": "russian",
"sl": "slovenian",
"es": "spanish",
"sv": "swedish",
"tr": "turkish",
"elv": "elvish",
}
LINGUEE_LANGUAGES_TO_CODES = {
"maltese": "mt",
"english": "en",
"german": "de",
"bulgarian": "bg",
"polish": "pl",
"portuguese": "pt",
"hungarian": "hu",
"romanian": "ro",
"russian": "ru",
# "serbian": "sr",
"dutch": "nl",
"slovakian": "sk",
"greek": "el",
"slovenian": "sl",
"danish": "da",
"italian": "it",
"spanish": "es",
"finnish": "fi",
"chinese": "zh",
"french": "fr",
# "croatian": "hr",
"czech": "cs",
"laotian": "lo",
"swedish": "sv",
"latvian": "lv",
"estonian": "et",
"japanese": "ja",
}
DEEPL_LANGUAGE_TO_CODE = {
"bulgarian": "bg",
"czech": "cs",
"danish": "da",
"german": "de",
"greek": "el",
"english": "en",
"spanish": "es",
"estonian": "et",
"finnish": "fi",
"french": "fr",
"hungarian": "hu",
"italian": "it",
"japanese": "ja",
"lithuanian": "lt",
"latvian": "lv",
"dutch": "nl",
"polish": "pl",
"portuguese": "pt",
"romanian": "ro",
"russian": "ru",
"slovak": "sk",
"slovenian": "sl",
"swedish": "sv",
"chinese": "zh",
}
PAPAGO_LANGUAGE_TO_CODE = {
"ko": "Korean",
"en": "English",
"ja": "Japanese",
"zh-CN": "Chinese",
"zh-TW": "Chinese traditional",
"es": "Spanish",
"fr": "French",
"vi": "Vietnamese",
"th": "Thai",
"id": "Indonesia",
}
QCRI_LANGUAGE_TO_CODE = {"Arabic": "ar", "English": "en", "Spanish": "es"}
LIBRE_LANGUAGES_TO_CODES = {
"English": "en",
"Arabic": "ar",
"Chinese": "zh",
"French": "fr",
"German": "de",
"Hindi": "hi",
"Indonesian": "id",
"Irish": "ga",
"Italian": "it",
"Japanese": "ja",
"Korean": "ko",
"Polish": "pl",
"Portuguese": "pt",
"Russian": "ru",
"Spanish": "es",
"Turkish": "tr",
"Vietnamese": "vi",
}