Implemented Definitions and Translations in Web interface
git-svn-id: file:///srv/svn/repo/mai/trunk@22 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
@@ -39,6 +39,7 @@ func main() {
|
||||
ttsFrom := ""
|
||||
ttsTo := ""
|
||||
|
||||
var translation engines.TranslationResult
|
||||
if c.Method() == "POST" {
|
||||
from = c.FormValue("from")
|
||||
to = c.FormValue("to")
|
||||
@@ -47,6 +48,7 @@ func main() {
|
||||
return c.SendStatus(500)
|
||||
} else {
|
||||
translatedText = result.TranslatedText
|
||||
translation = result
|
||||
}
|
||||
|
||||
ttsFromURL, _ := url.Parse("api/tts")
|
||||
@@ -93,7 +95,7 @@ func main() {
|
||||
"SourceLanguages": sourceLanguages,
|
||||
"TargetLanguages": targetLanguages,
|
||||
"OriginalText": originalText,
|
||||
"TranslatedText": translatedText,
|
||||
"Translation": translation,
|
||||
"From": from,
|
||||
"To": to,
|
||||
"TtsFrom": ttsFrom,
|
||||
|
||||
Reference in New Issue
Block a user