mirror of
https://codeberg.org/aryak/mozhi
synced 2024-12-23 00:19:51 +05:30
why was everything sl 💀
This commit is contained in:
parent
f586163648
commit
b7e2755ab2
@ -35,7 +35,7 @@ var translateCmd = &cobra.Command{
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
for _, idx := range idxs {
|
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" {
|
} else if engine == "all" {
|
||||||
fmt.Println(utils.TranslateAll(dest, source, query))
|
fmt.Println(utils.TranslateAll(dest, source, query))
|
||||||
|
@ -128,6 +128,8 @@ func LangListDeepl(listType string) []List {
|
|||||||
Name: "Detect Language",
|
Name: "Detect Language",
|
||||||
}}
|
}}
|
||||||
ListD = append(append([]List{}, auto...), ListData...)
|
ListD = append(append([]List{}, auto...), ListData...)
|
||||||
|
} else {
|
||||||
|
ListD = ListData
|
||||||
}
|
}
|
||||||
return ListD
|
return ListD
|
||||||
}
|
}
|
||||||
|
@ -524,6 +524,8 @@ func LangListDuckDuckGo(listType string) []List {
|
|||||||
Name: "Detect Language",
|
Name: "Detect Language",
|
||||||
}}
|
}}
|
||||||
ListD = append(append([]List{}, auto...), ListData...)
|
ListD = append(append([]List{}, auto...), ListData...)
|
||||||
|
} else {
|
||||||
|
ListD = ListData
|
||||||
}
|
}
|
||||||
return ListD
|
return ListD
|
||||||
}
|
}
|
||||||
|
@ -543,6 +543,8 @@ func LangListGoogle(listType string) []List {
|
|||||||
Name: "Detect Language",
|
Name: "Detect Language",
|
||||||
}}
|
}}
|
||||||
ListD = append(append([]List{}, auto...), ListData...)
|
ListD = append(append([]List{}, auto...), ListData...)
|
||||||
|
} else {
|
||||||
|
ListD = ListData
|
||||||
}
|
}
|
||||||
return ListD
|
return ListD
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,8 @@ func LangListLibreTranslate(listType string) []List {
|
|||||||
Name: "Detect Language",
|
Name: "Detect Language",
|
||||||
}}
|
}}
|
||||||
ListD = append(append([]List{}, auto...), ListData...)
|
ListD = append(append([]List{}, auto...), ListData...)
|
||||||
|
} else {
|
||||||
|
ListD = ListData
|
||||||
}
|
}
|
||||||
return ListD
|
return ListD
|
||||||
}
|
}
|
||||||
|
@ -239,6 +239,8 @@ func LangListWatson(listType string) []List {
|
|||||||
Name: "Detect Language",
|
Name: "Detect Language",
|
||||||
}}
|
}}
|
||||||
ListD = append(append([]List{}, auto...), ListData...)
|
ListD = append(append([]List{}, auto...), ListData...)
|
||||||
|
} else {
|
||||||
|
ListD = ListData
|
||||||
}
|
}
|
||||||
return ListD
|
return ListD
|
||||||
}
|
}
|
||||||
|
@ -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.")
|
return []List{}, errors.New("list type invalid: either give tl for target languages or sl for source languages.")
|
||||||
}
|
}
|
||||||
if engine == "google" {
|
if engine == "google" {
|
||||||
data = LangListGoogle("sl")
|
data = LangListGoogle(listType)
|
||||||
} else if engine == "libre" {
|
} else if engine == "libre" {
|
||||||
data = LangListLibreTranslate("sl")
|
data = LangListLibreTranslate(listType)
|
||||||
} else if engine == "reverso" {
|
} else if engine == "reverso" {
|
||||||
data = LangListReverso("sl")
|
data = LangListReverso(listType)
|
||||||
} else if engine == "deepl" {
|
} else if engine == "deepl" {
|
||||||
data = LangListDeepl("sl")
|
data = LangListDeepl(listType)
|
||||||
} else if engine == "watson" {
|
} else if engine == "watson" {
|
||||||
data = LangListWatson("sl")
|
data = LangListWatson(listType)
|
||||||
} else if engine == "yandex" {
|
} else if engine == "yandex" {
|
||||||
data = LangListYandex("sl")
|
data = LangListYandex(listType)
|
||||||
} else if engine == "mymemory" {
|
} else if engine == "mymemory" {
|
||||||
data = LangListMyMemory("sl")
|
data = LangListMyMemory(listType)
|
||||||
} else if engine == "duckduckgo" {
|
} else if engine == "duckduckgo" {
|
||||||
data = LangListDuckDuckGo("sl")
|
data = LangListDuckDuckGo(listType)
|
||||||
} else {
|
} else {
|
||||||
return []List{}, errors.New("Engine does not exist.")
|
return []List{}, errors.New("Engine does not exist.")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user