Copy link to clipboard
Copied
Hello,
We are trying to setup machine translation for RoboHelp 2020 by using Google Translations API. We already have the API key, and we are sure it works fine since we tested it by opening the following URL in a browser:
Unfortunately, after pressing the "Validate" button in the RoboHelp dialog, it states that credentials are not valid ("Incorrect credentials."). We put the following URL in the endpoint field:
https://translation.googleapis.com/language/translate/v2
What are we doing wrong?
Thank you in advance.
Hi!
Update #5 fixes this issue. Google did change how their translation API works, so that essentially broke this feature for earlier versions of RohoHelp.
Now, you can create a Service Account in your Google Cloud Translation API and create a "Service Account Key". This is actually a downloadable JSON key file, which you store locally on your PC. You then need to provide the path to that key file in your RoboHelp translation profile.
Here's a good start to learn the Google side of things:
https://cloud.google.com/docs/authentication?_ga=2.36464617.-878103868.1620851413
...Copy link to clipboard
Copied
Is your RH2020 running patch 4?
Copy link to clipboard
Copied
Hi Jeff,
thank you for your prompt reply.
Attached you can find the snapshots about the version and the error.
If I look for updates it says that I'm up to date.
Thank you again.
Copy link to clipboard
Copied
This might be your issue - https://community.adobe.com/t5/robohelp/configure-machine-translation/m-p/11704673 - something to do with a region in the Header in the Profile?
Copy link to clipboard
Copied
Hi Jeff,
I'm afraid this is not our case since we are trying to use Google Translations API while that post talks about Microsoft Translations API. As far as I know, Google has no region restrictions. Just to be sure, I had a look at the Google Cloud Console and verified that my API key has no restrictions.
Can you tell us how RoboHelp creates the API request? Which headers and parameters are used? It would be great if we could simulate that call to understand what's going wrong.
Any other ideas/suggestions are greatly appreciated.
Thank you.
Copy link to clipboard
Copied
Hi,
I will be suggesting a workaround. Google translate has undergone a revamp on their side so it has broken in RH. We will be fixing this issue in our next update.
In you terminal type -> "npm install @google-cloud/translate" without quotes.
If you don't have npm, please download and install it for your system from here.
Follow the below steps and let me know if resolved:
const {Translate} = require('@google-cloud/translate').v2;
(src_lng, tar_lng, text2translate, API_KEY, jsonKeyFile, headers = {}) => {
tar_lng = tar_lng.replace(/-(.*)/, '')
let CREDS = require(jsonKeyFile)
let _object = {}
_object.caller = (thisObjectInit) => {
const translate = new Translate({
projectId: CREDS.project_id,
credentials: CREDS
})
return translate.translate(text2translate, {from: src_lng, to: tar_lng}).then(translations => {
let translation = translations && translations[0]
return translation
})
}
return _object
}
This should fix the validation issue and let you use google translation for machine translation.
Thanks.
Copy link to clipboard
Copied
Subject: Google Translations - Invalid Credentials
I tried your workaround, but I keep getting a new error message from RoboHelp. Here is what I did:
I installed Node.js from the site you provided in your reply, opened the command prompt (cmd.exe), and then ran the command to install the specified package.
As for the folder you specified in point (2.), there is no "google" folder in our version in the "resources\data\template" subpath of the RoboHelp installation folder, but I found it under the "resources\data\template\translation" subpath (see the image below).
I edited the profile_builder.js as specified in point (3.) and started RoboHelp. When I select "Google Translate" from the dropdown box in the translation profile dialog, I get an error notification at the bottom left corner of RoboHelp (see the image below).
I tried to ignore it and follow the remaining steps, but the Validate button doesn't seem to work as nothing happens when I click on it. I tried to run the script (profile_builder.js) from the "google" folder, but it prints an error telling me that the "google-cloud/translate" package was not found. So I tried to install the same package by running this command in the same folder where the script is located:
npm --save install @Google-cloud/translate
After installing the package, running the script in the command prompt doesn't produce any error and exits properly. At this point, I tried the workaround again, starting from point (4.), but it still generates an "Application Error".
What am I doing wrong?
Thank you so much for your attention and participation.
Copy link to clipboard
Copied
Hi,
Unfortunately, further fixes from your end won't be possible, it needs to be fixed in RH itself. We have taken up this issue in update 5, which is scheduled to go live in the 2nd week of June. I would try to share a beta build beforehand, most probably by the 1st week of June, if required by you to be unblocked. I hope that helps.
Copy link to clipboard
Copied
Sorry, no clue (don't have to deal with localization in any of my projects) - I suggest you chat with RH support - see https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp for your support contact options.
Copy link to clipboard
Copied
Hi,
I'm getting the same issue as well. I happen to have access to beta releases for Update #5, but it seems that this issue has not been addressed yet, even in the latest drop. I'm still getting the "Incorrect Credentials" message in Update 5 Beta, Drop 7.
Also, I tried the proposed workaround using Update 5 Beta, Drop 7, and got the same results as the OP. I guess we need to wait for another drop for these fixes to be included.
Also, I would add that the online documentation perhaps needs to go a little bit deeper in explaining how to obtain the necessary values like API Key and Endpoint. Or perhaps link to relevant instructions in Google's documentation? Although Google's documentation is very thorough and detailed, I felt a bit lost trying to figure out exactly how to obtain an API Key suitable for RoboHelp, and I'm still not perfectly clear on what the Endpoint should be. Like the OP, I am unable to get the translation API to work, but I can't be sure if the values I'm putting in are actually the right ones and if my project in Google Cloud is properly setup for what RoboHelp needs.
Copy link to clipboard
Copied
Hi!
Update #5 fixes this issue. Google did change how their translation API works, so that essentially broke this feature for earlier versions of RohoHelp.
Now, you can create a Service Account in your Google Cloud Translation API and create a "Service Account Key". This is actually a downloadable JSON key file, which you store locally on your PC. You then need to provide the path to that key file in your RoboHelp translation profile.
Here's a good start to learn the Google side of things:
https://cloud.google.com/docs/authentication?_ga=2.36464617.-878103868.1620851413
I managed to get it to work with a trial account. Of course, this being machine translation, it's never perfect. Even if it is "AI-assisted" or whatever... You still need to have the results reviewed by someone who actually speaks the target language natively.
Copy link to clipboard
Copied
Hey there!
I've seen your message about the new update and having the google translate API. I have my JSON key and everytime I click validate it gives me an application error:
Do you have any idea what I have to do or what causes this? It's giving me such a headache haha!
Thank you in advance!
Copy link to clipboard
Copied
@ElisaTeigeler what exact version of RH please?
Copy link to clipboard
Copied
I'm alsways up to date with the newest versions. : 2022.0.346
Copy link to clipboard
Copied
In that case, I'd be talking with the RH folks - see https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp for your Adobe Support options. I'd recommend using the tcssup@adobe.com e-mail address as it reaches a team dedicated to Technical Communication Suite products including RoboHelp.
Copy link to clipboard
Copied
I've been in contact with customer support and they have supplied me with a work around as it is indeed not working in the latest update in Robohelp.
You can either download an the 202 summer release version of Robohelp from this website: https://helpx.adobe.com/be_nl/robohelp/kb/robohelp-downloads.html
In this version the google translation using the jsonkey works just fine.
They also provided me with another workaround if you want to use the latest Robohelp version:
I have not tested this as I'm personaly using the summer 2020 release. I might give it a try once I'm done uploading everything and I have some more time on my hands. Let me know if this was any help for you or if you have any questions.