v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-29 05:50:17 -07:00

add comment

This commit is contained in:
eeeXun 2023-02-18 13:39:09 +08:00
parent ec81bd3ac2
commit 2a9c52bcb2

View File

@ -87,8 +87,9 @@ func (t *ReversoTranslate) Translate(message string) (translation, definition, p
return "", "", "", errors.New("Translation not found")
}
// translation
translation += fmt.Sprintf("%v", data["translation"].([]interface{})[0])
// definition and part of speech
for _, results := range data["contextResults"].(map[string]interface{})["results"].([]interface{}) {
results := results.(map[string]interface{})
// definition