diff --git a/pages/index.go b/pages/index.go index 0319b88..31824a2 100644 --- a/pages/index.go +++ b/pages/index.go @@ -97,9 +97,11 @@ func HandleIndex(c *fiber.Ctx) error { if engine != "" && originalText != "" && from != "" && to != "" { if engine == "all" { transmany = libmozhi.TranslateAll(to, from, originalText) + translationExists = true } else if engine == "some" { // The error doesn't really matter since it just checks if the engines are valid, which is already checked in the code at the beginning of the func transmany, _ = libmozhi.TranslateSome(enginesSome.Engines, to, from, originalText) + translationExists = true } else { translation, tlerr = libmozhi.Translate(engine, to, from, originalText) if tlerr != nil { diff --git a/views/index.html b/views/index.html index 7562a00..b87496a 100644 --- a/views/index.html +++ b/views/index.html @@ -73,6 +73,22 @@ + {{ if .TranslationExists }} +