why was everything sl 💀

This commit is contained in:
arya committed 2023-08-28 20:41:57 +05:30
1 parent f586163648
commit b7e2755ab2
7 files changed
+19 -9

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ var translateCmd = &cobra.Command{
fmt.Println(err)
}
for _, idx := range idxs {
fmt.Println("Selected Language:", list[idx].Id)
fmt.Println("Selected Language:", list[idx].Id, "("+list[idx].Name+")")
}
} else if engine == "all" {
fmt.Println(utils.TranslateAll(dest, source, query))
+2
View File
@@ -128,6 +128,8 @@ func LangListDeepl(listType string) []List {
Name: "Detect Language",
}}
ListD = append(append([]List{}, auto...), ListData...)
} else {
ListD = ListData
}
return ListD
}
+2
View File
@@ -524,6 +524,8 @@ func LangListDuckDuckGo(listType string) []List {
Name: "Detect Language",
}}
ListD = append(append([]List{}, auto...), ListData...)
} else {
ListD = ListData
}
return ListD
}
+2
View File
@@ -543,6 +543,8 @@ func LangListGoogle(listType string) []List {
Name: "Detect Language",
}}
ListD = append(append([]List{}, auto...), ListData...)
} else {
ListD = ListData
}
return ListD
}
+2
View File
@@ -78,6 +78,8 @@ func LangListLibreTranslate(listType string) []List {
Name: "Detect Language",
}}
ListD = append(append([]List{}, auto...), ListData...)
} else {
ListD = ListData
}
return ListD
}
+2
View File
@@ -239,6 +239,8 @@ func LangListWatson(listType string) []List {
Name: "Detect Language",
}}
ListD = append(append([]List{}, auto...), ListData...)
} else {
ListD = ListData
}
return ListD
}
+8 -8
View File
@@ -22,21 +22,21 @@ func LangList(engine string, listType string) ([]List, error) {
return []List{}, errors.New("list type invalid: either give tl for target languages or sl for source languages.")
}
if engine == "google" {
data = LangListGoogle("sl")
data = LangListGoogle(listType)
} else if engine == "libre" {
data = LangListLibreTranslate("sl")
data = LangListLibreTranslate(listType)
} else if engine == "reverso" {
data = LangListReverso("sl")
data = LangListReverso(listType)
} else if engine == "deepl" {
data = LangListDeepl("sl")
data = LangListDeepl(listType)
} else if engine == "watson" {
data = LangListWatson("sl")
data = LangListWatson(listType)
} else if engine == "yandex" {
data = LangListYandex("sl")
data = LangListYandex(listType)
} else if engine == "mymemory" {
data = LangListMyMemory("sl")
data = LangListMyMemory(listType)
} else if engine == "duckduckgo" {
data = LangListDuckDuckGo("sl")
data = LangListDuckDuckGo(listType)
} else {
return []List{}, errors.New("Engine does not exist.")
}