diff --git a/translate.nim b/translate.nim index a129878..b2c3474 100644 --- a/translate.nim +++ b/translate.nim @@ -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",)