backwards compat with gtranslate

This commit is contained in:
Arya Kiran 2024-01-17 18:25:58 +05:30
parent 8cfae44371
commit 0149b74882
No known key found for this signature in database
GPG key ID: 842D12BDA50DF120

View file

@ -45,6 +45,12 @@ func HandleIndex(c *fiber.Ctx) error {
originalText := utils.GetQueryOrFormValue(c, "text")
to := utils.GetQueryOrFormValue(c, "to")
from := utils.GetQueryOrFormValue(c, "from")
if from == "" {
from = utils.GetQueryOrFormValue(c, "sl")
}
if to == "" {
to = utils.GetQueryOrFormValue(c, "tl")
}
var translation libmozhi.LangOut
var translationExists bool