From a571ab69cd34d280f9fb93a03447bfdfd60fbd6f Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 15 Nov 2024 01:13:02 +0100 Subject: [PATCH] Update mido.sh --- src/mido.sh | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/mido.sh b/src/mido.sh index a6a444b..36fbe2f 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -57,38 +57,6 @@ get_agent() { return 0 } -convert_language() { - - local lang="" - - case "${1,,}" in - "gb" | "en-gb" ) - lang="English International" ;; - "en" | "en-"* ) - lang="English" ;; - "mx" | "es-mx" ) - lang="Spanish (Mexico)" ;; - "ca" | "fr-ca" ) - lang="French Canadian" ;; - "br" | "pt-br" ) - lang="Brazilian Portuguese" ;; - "sr" | "sr-"* ) - lang="Serbian Latin" ;; - "hk" | "zh-hk" | "cn-hk" ) - lang="Chinese (Traditional)" ;; - "tw" | "zh-tw" | "cn-tw" ) - lang="Chinese (Traditional)" ;; - "zh" | "zh-"* | "cn" | "cn-"* ) - lang="Chinese (Simplified)" ;; - * ) - lang=$(getLanguage "$1" "name") ;; - esac - - - echo "$lang" - return 0 -} - download_windows() { local id="$1" @@ -110,8 +78,7 @@ download_windows() { local profile="606624d44113" user_agent=$(get_agent) - language=$(convert_language "$lang") - [ -z "$language" ] && error "Invalid language: $lang" && return 1 + language=$(getLanguage "$lang" "name") case "${id,,}" in "win11x64" ) windows_version="11" && download_type="1" ;;