Bad request error when using MS Batch MT with segmented TUs

Issue #415 resolved
Former user created an issue

Original issue 415 created by @ysavourel on 2014-09-09T19:16:42.000Z:

It seems the MS MT connector batch translation step is not handling segmented TUs properly when sending the requests. We get 400 Bad Request in those case.

The work around is to move to the TU level, but we need to fix the normal case.
The SOAP message looks OK, but it may be related to the number of <string> as the counter goes for more strings than when the same TUs go by text container.

Comments (5)

  1. Former user Account Deleted

    Comment 1. originally posted by @ysavourel on 2014-09-09T21:20:01.000Z:

    It looks like the issue is a limitation on the the number of items in the array of the request: the API doc now says:
    "Required. An array containing the texts for translation. All strings must be of the same language. The total of all texts to be translated must not exceed 10000 characters. The maximum number of array elements is 10."

    so 10 strings max and no more than 10000 character total are the limits.

  2. Chase Tingley

    MS MT Connector - Overhaul of API implementation

    Two functional changes:
    - query(String) will now send the text it is passed directly, without
      HTML-escaping any inline codes.  This improves the behavior when
      dealing with content containing unparsed markup, which was
      previously garbled by the connector's call to toCodedHTML().
      batchQueryText() was added to mirror this behavior in batch mode.
      query(TextFragment) and batchQuery(List<TextFragment>) behavior as
      before.
    - Improved batching functionality: the connector will now obey both
      the MS API's 10,000 character limit *and* its limit of 10 segments
      per batch, and will split up larger batch requests internally.
      This will reduce the burden on code that calls the connector,
      which previously had to do some of this batching itself. This
      fixes issue #415.
    
    Additionally, this cleans up many aspects of the implementatation
    and improves unittest coverage.
    

    → <<cset 3bee80115acd>>

  3. Log in to comment