backwards compat with gtranslate
All checks were successful
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Successful in 12m35s
mozhi pipeline / Build and publish artifacts (push) Successful in 28m25s

This commit is contained in:
Arya 2024-01-17 18:25:58 +05:30
parent 8cfae44371
commit 0149b74882
Signed by: arya
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