MT: Abstract the <div> wrapping of content from API usage

Authored by santhosh on Aug 29 2017, 10:31 AM.

Description

MT: Abstract the <div> wrapping of content from API usage

MTClient does a quick check whether the content is plaintext, if so,
translateText is used. Otherwise proceeds to translateHTML, but the
sourceDoc building step checks if we were able to build one. Without
a wrapper tag, the sourceDoc will be empty. At that point we will
re-attempt parsing with wrapper tag. For the result of this wrapped
input, unwrap it after MT is recieved.

The annoying <div> wrapper for plain text input will not occur now.

Depends-On: I014ced5bc306654053cf47c8cdfe4384ce90bdfb
Change-Id: If7d93a1f268d87b6980e022b107608cb6af8e559

Details

Committed
CatropeSep 13 2017, 5:27 PM
Parents
rGCXSe15dce9cc906: Merge "Add TemplateDataRequest"
Branches
Unknown
Tags
Unknown
References
refs/changes/20/374520/4
ChangeId
If7d93a1f268d87b6980e022b107608cb6af8e559