added translate
This commit is contained in:
parent
df079ee680
commit
9c19db429f
1 changed files with 7 additions and 4 deletions
|
@ -1,9 +1,12 @@
|
|||
import base
|
||||
import std/[re,httpclient,json,strutils]
|
||||
|
||||
|
||||
# TODO: Add language detection and translate into HOME language
|
||||
|
||||
const LIBRETRANSLATE_URL = "https://libretranslate.pussthecat.org/translate"
|
||||
const PRIMARY = "en"
|
||||
const SECONDARY = "de"
|
||||
const HOME = "en"
|
||||
const FIRST_CHOICE = "de"
|
||||
let LANG_RE = re"\w+>\w+"
|
||||
|
||||
type
|
||||
|
@ -16,8 +19,8 @@ type
|
|||
proc main(message: varargs[string] = @[])
|
||||
|
||||
proc newRequest(): Request =
|
||||
return Request(source:SECONDARY,
|
||||
target:PRIMARY,
|
||||
return Request(source:FIRST_CHOICE,
|
||||
target:HOME,
|
||||
q: "",
|
||||
format: "text",)
|
||||
|
||||
|
|
Loading…
Reference in a new issue