From 0149b748821411d87319e67e6da5349e87c46259 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Wed, 17 Jan 2024 18:25:58 +0530 Subject: [PATCH] backwards compat with gtranslate --- pages/index.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/index.go b/pages/index.go index 1382988..f6dc685 100644 --- a/pages/index.go +++ b/pages/index.go @@ -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