I'm using 1.x-dev and the rule for automatic translation documented here http://drupal.org/node/1572956 but after I save the node and get the translation dialog i get the error "Microsoft translator (auto created) can not translate from Italian to English." and the translator is marked as "(unsupported)" in the select. Any hints? I've enabled rules, tmgmt, tmgmt_ui and tmgmt_microsoft and verified my microsoft ID and secret.

Comments

berdir’s picture

Is it different if you try to translate something manually?

I don't think this has anything to do with the process, just an issue with the Microsoft Translator.

berdir’s picture

Component: Translator: Microsoft » Core
Status: Active » Postponed (maintainer needs more info)
fmosca’s picture

The process seem to work fine, I get the same problem if i skip the rule and simply request the translation via the usual UI.

berdir’s picture

Project: Translation Management Tool » TMGMT Translator Microsoft
Component: Core » Code

Moving over to the Microsoft project then.

Can you verify if this is still broken with the latest version? Are you using a bing api key or the new azure marketplace token? Can you check if the problem also occurs for another language?

7wonders’s picture

I am getting this problem also through the UI.

Microsoft translator (auto created) can not translate from English to Dutch.
Microsoft translator (auto created) can not translate from English to Swedish.
Microsoft translator (auto created) can not translate from English to German.

Or any language!

Error message:

Could not get Microsoft token. Error: ACS50001: The required field 'scope' is missing.

7wonders’s picture

Status: Postponed (maintainer needs more info) » Active

Tried changing line 220 in .plugin.inc to http_build_query($paramArr, '', '&') as suggested here but it didnt help :(

xurizaemon’s picture

Title: Automatic translation rule and new microsoft translator interface » All languages show as "unsupported" - access token failure due to POST encoding
Status: Active » Needs review
StatusFileSize
new520 bytes

Suggested fix above resolved the issue for me - trick was clearing cache triggered request of a new token.

(Which suggests we might cache failed token requests? Separate issue there though.)

Status: Needs review » Needs work

The last submitted patch, tmgmt_microsoft-1649364-http_build_query_ampersand.patch, failed testing.

miro_dietiker’s picture

This is pretty strange, as a POST should usually be excluded from any cache...

Do you have special proxies in your setup?

xurizaemon’s picture

No special proxies, just a site set up to test TMGMT with the minimal modules required.

Difference was that requests for a token with & as get parameter separator did not retrieve a token, but switching to & separator (as documented for drupal_http_request() did work.

Setting arg-separator.output in php.ini would also prevent this issue, but I think we want to ensure the right params to drupal_http_request().

The test above failed on a function which should be found in tmgmt.module, I don't think that's related to the patch here.

miro_dietiker’s picture

Category: bug » support
Status: Needs review » Needs work

The default separator is & and not & ...
Your environment seems to have a non-standard configuration.
What version and platform/OS are you running on?

I'm not sure we really should fix this.

xurizaemon’s picture

Debian 6.0 with Aegir, PHP 5.3.20-1~dotdeb.0.

Aegir was the origin of this setting on my site - looks like the arg_separator.output setting comes from Aegir provisioning writing an @ini_set to settings.php.

As Microsoft's service & this module appear to require the correct separator to function, would it make sense to ensure it via the patch above?

PatchRanger’s picture

Category: support » bug
Status: Needs work » Needs review
StatusFileSize
new520 bytes

Everytime I tried to request a translation, I was getting an error message at the screen, telling that Microsoft Translator can't translate from Russian to English, and in the dblog a message as follows: "Could not get Microsoft token. Error: ACS50001: The required field 'scope' is missing."
It was really weird, since at my localhost dev environment evrything was ok.
The attached patch (which is just a re-roll of an original grobot's patch) fixes it, please review.

Status: Needs review » Needs work

The last submitted patch, tmgmt_microsoft-http_build_query_ampersand-1649364-13.patch, failed testing.

xurizaemon’s picture

Status: Needs work » Needs review
PatchRanger’s picture

Category: support » bug
Status: Needs work » Needs review

Please note that my patch (which turned green) is a VERBATIM COPY of grobot's one. In case of commit, give credits to him, not me.
@grobot Thanks for the patch and for starting another issue for fixing test - now it is fixed.

berdir’s picture

Status: Needs review » Fixed

Thanks, commited!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Matroschker’s picture

Issue summary: View changes

Hello,

I still have this issue with the latest version. Is there any update on this, I can't believe that this is fixed.

I checked the file "tmgmt_microsoft.plugin.inc" for changes from the patch and the changes are done, but it didn't work. I got the message "Microsoft translator (auto created) can not translate from German to English."

In the module list I can see the following module versions: 7.x-1.0-alpha2+8-dev for tmgmt_microsoft

Matroschker

jawi’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

Same issue here with latest dev version. The microsoft translator does not work manualy or automatically. The configuration of the translator gives: Microsoft translator (auto created) unsupported.

Seems like an authentication error:

Could not get Microsoft token. Error: ACS50012: Authentication failed. Trace ID: 0008f18b-b52e-4b7a-a910-a11bf588200b Correlation ID: 91dc32c1-f5d7-4973-8fff-3db417b78c3b Timestamp: 2014-03-06 08:29:43Z

Have to try other configuration settings or solve auth error at Microsoft Translator side

anybody’s picture

I think the reason for the first mentioned problem (language incompatibilities) can be found here: #1649364: All languages show as "unsupported" - access token failure due to POST encoding As I stated out in #6 there, it's a problem with too long texts exceeding the limits without any error message related.

miro_dietiker’s picture

We have a ticket created about circumventing the limits long ago.
#1417426: Provide a way to translate texts which are too long for Microsoft Translator

anybody’s picture

@miro_dietiker: I didn't talk about the external limits but the problem that this limit is checked, but not being output as error message (or better said it's currently output as wrong error message) in this module!

anybody’s picture

Sorry I linked the wrong issue in my comment before. The one I ment was this (Comment #6): #2009946: Microsoft translator can not translate from English to *
Could you perhaps have a true view on this in code?

anybody’s picture

Status: Active » Needs review

To sum this issue up, #13 solves the problem for different environments and another reason for problems may be misconfiguration of your authentification (wrong "Microsoft Customer ID" or "Primary Account Key" entered.

So the final solution here seems to be:
1. Better document which authentication keys to use (as described in #2009946: Microsoft translator can not translate from English to *) - so can be handled in that issue
2. To apply the patch from #13 to the .dev release.

Agreement?

akalam’s picture

Status: Needs review » Closed (fixed)

Patch does not apply, patch is allready committed