• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Google Translations - Invalid Credentials

New Here ,
May 19, 2021 May 19, 2021

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:

https://translation.googleapis.com/language/translate/v2?q=This%20is%20a%20test&source=en&target=it&...

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.

 

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 11, 2021 Jun 11, 2021

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

...

Votes

Translate

Translate
Community Expert ,
May 19, 2021 May 19, 2021

Copy link to clipboard

Copied

Is your RH2020 running patch 4?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2021 May 19, 2021

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.

RH_about.jpg

 

Translation_incorrect_credentials.jpg

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2021 May 20, 2021

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 20, 2021 May 20, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 20, 2021 May 20, 2021

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:

  1. Open RH installation folder: (eg: C:\Program Files\Adobe\Adobe RoboHelp 2020)
  2. Go to "resources\data\template\google" and open profile_builder.js
  3. Remove all the content of this file, and replace it with the below code:
    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
    }

     

  4. Restart RH, and go to add translation profile dialog.
  5. Choose Google Translate from the dropdown.
  6. In the text input of the endpoint(2nd text input), paste the path to the JSON file which gets downloaded (refer this) when you set up a service account of google translate in the google cloud console. (If this step hasn't been followed, refer to this)
  7. In the text input of the API key(1st text input) type "abcdef123".
  8. When both the input fields are populated hit the validate button.


This should fix the validation issue and let you use google translation for machine translation. 

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2021 May 21, 2021

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).

profile_builder.jpg

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).

Google_API_error.jpg

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 24, 2021 May 24, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2021 May 20, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 26, 2021 May 26, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 11, 2021 Jun 11, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2022 Oct 18, 2022

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:

ElisaTeigeler_0-1666109879623.png

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

@ElisaTeigeler what exact version of RH please?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 19, 2022 Oct 19, 2022

Copy link to clipboard

Copied

ElisaTeigeler_0-1666191408774.png

I'm alsways up to date with the newest versions. : 2022.0.346

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 19, 2022 Oct 19, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2022 Nov 14, 2022

Copy link to clipboard

Copied

LATEST

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:

ElisaTeigeler_0-1668435499113.png

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. 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp