Problem/Motivation

Microsoft and Google Translator both link to the page where you can find the necessary API keys, Just looging into the developer account on gengo requires some navigating and a link would definitely help.

Proposed resolution

Add a link to the translator configuration form ('Configuration' > 'Region and Languages' > 'Translation Management Tool translators') which links to the account page with api keys for Gengo (http://sandbox.gengo.com/account/api_settings/), similar to the Google and Microsoft translator.

Remaining tasks

  • Adding a link
  • providing a patch
  • reviewing and committing the patch.

User interface changes

The fields for the API keys will have some more text and a link to the API keys.

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LKS90’s picture

Title: Add link to the Gengo API keys to the configuration form » Add link for the Gengo API keys to the configuration form
FileSize
117.86 KB
69.63 KB
60.83 KB

Here are some screenshots to compare, I modified the API keys, so don't try to use those as they are not correct :).

Edit: Order of the screenshots:

Gengo
Microsoft
Google

LKS90’s picture

Issue summary: View changes
LKS90’s picture

Issue summary: View changes
joshi.rohit100’s picture

Status: Active » Needs review
FileSize
1.59 KB
LKS90’s picture

Status: Needs review » Needs work
+++ b/src/MyGengoTranslatorUi.php
@@ -234,18 +235,19 @@ class MyGengoTranslatorUi extends TranslatorPluginUiBase {
+      '#description' => t('Please enter your Gengo API Public key or visit @link to create new one', array('@link' => $gengo_key_url)),
...
+      '#description' => t('Please enter your Gengo API Private key or visit @link to create new one', array('@link' => $gengo_key_url)),

create >>a<< new one

Besides that, looks just like I imagined it :D.

joshi.rohit100’s picture

Status: Needs work » Needs review
FileSize
1.59 KB
1.11 KB
LKS90’s picture

Status: Needs review » Reviewed & tested by the community

All good!

Berdir’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/src/MyGengoTranslatorUi.php
@@ -234,18 +235,19 @@ class MyGengoTranslatorUi extends TranslatorPluginUiBase {
-
+    $url = Url::fromUri('http://sandbox.gengo.com/account/api_settings/');
+    $gengo_key_url = \Drupal::l(t('Gengo Api Settings'), $url);

Except this hardcodes the sandbox URL, which is only used by developers and not the actual users ;)

Either hardcode the real one or do it dynamically, which is tricky because it is based on a configuration in the same form.

joshi.rohit100’s picture

Assigned: Unassigned » joshi.rohit100

Assigned!

LKS90’s picture

Opps, yes that's right, we need the actual API keys, not the sandbox ones.

I'd say hardcode the correct URL (which I can't find currently :D). Just create an account on Gengo (https://gengo.com/auth/form/signup/) and find where the API keys are displayed. I created an account there and deleted it, so I have to contact support to use my account again...

joshi.rohit100’s picture

Status: Needs work » Needs review
FileSize
1.59 KB
595 bytes

I think, I will go with "Hardcode the real one" as it is quite easy. :)

Berdir’s picture

Status: Needs review » Fixed

Works for me.

  • Berdir committed 4225148 on 8.x-1.x authored by joshi.rohit100
    Issue #2543406 by joshi.rohit100: Add link for the Gengo API keys to the...

Status: Fixed » Closed (fixed)

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

The last submitted patch, 4: 2543406-4.patch, failed testing.

The last submitted patch, 6: 2543406-6.patch, failed testing.

Status: Closed (fixed) » Needs work

The last submitted patch, 11: 2543406-11.patch, failed testing.

miro_dietiker’s picture

Status: Needs work » Closed (fixed)