When submitting a live job for a quote, neither Standard, Pro, nor Ultra show a quote based on the wordcount, although wordcount seems to be working correctly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Thanks for testing and reporting useful bug reports :)

The MyGengo translator hasn't been touched much since this project was started with the initial sprint a few month back. I personally have never really tried it out so far.

It is very likely that there are bugs in our implementation and it's also possible that their API has changed and that we're no longer compatible.

Keep that in mind when testing, I strongly suggest to stick with the test environment for now, if you're not doing so already.

Berdir’s picture

PS: I'm available in #drupal-i18n/#drupal-contribute IRC channels if you want to discuss something.

devlada’s picture

Assigned: Unassigned » devlada
devlada’s picture

Assigned: devlada » Berdir
FileSize
189.11 KB

As you can see in attached file, sandbox return 0 for credits field for both jobs (title and body). There are two mygengo translators (mygengo_autoaccept and mygengo) and both behave the same. Currently I can not test live API to could compare.

miro_dietiker’s picture

In that case we should put a message there to state we're in sandbox mode...
Additionally we can pass you credentials to test mygengo live. (you even don't need to put a real job there... requesting the price is enough.)

devlada’s picture

Assigned: Berdir » devlada
Berdir’s picture

I'm pretty sure that the original report is from the live system, so I don't think it's just the test system that is affected.

But yes, you can just create an account on the live system and try to get a quote.

Also have a look at the actual response from MyGengo. It's possible that due to a bug on our side or an API change ( the current code explicitly has some live/sandbox-specific code, it's quite possible that live is now running with the same API as the sandbox).

If it's reported as 0 in there both on live and on sandbox, we should report it to MyGengo.

devlada’s picture

After better check, we have next problems here:

- when mashine quality is set, for some languages sandbox returns 0 for credits field (previously reported), but for some (Italian) returns error code 1551 with message "language service not supported".
- in case when sandbox return error, Word count is reset to 0.
- when we change options for To and Quality fields, Needed Credits not refreshing. Callback methods should be improved to properly refresh the data.
- In case of errors it is necessary to show a message about it and to prevent Save job action.

devlada’s picture

I checked the live API, the same behavior as the sandbox, I did not notice any difference in the response and behavior.

Berdir’s picture

Ok, debugged it a bit myself.

- Spanish and Italian seem to be broken, please open a separate issue for this. Our calls look ok to me, not sure where the problem is.

- The API and the plugin is working, the only thing that is broken the our ajax form handling.

in the quote ajax callback, there is this line:

return $form['translator_wrapper']['options']['settings']['quote'];

The options key is too much, that doesn't exist anymore. Remove ['options'] and it works.

=> The language switcher probably has a similar problem, that one doesn't seem to be return anything from the ajax callback. Also a separate issue as that is not specific to mygengo.

devlada’s picture

FileSize
554 bytes

Patch for quote callback.

devlada’s picture

Assigned: devlada » Berdir
Berdir’s picture

Status: Active » Needs review

Remember to set issues to needs review when uploading patches.

Berdir’s picture

Status: Needs review » Fixed

Commited.

Berdir’s picture

Project: Translation Management Tool » TMGMT Translator Gengo
Component: Translator: Mygengo » Code

Moving this issue over to the new Mygengo Project.

Status: Fixed » Closed (fixed)

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