Problem/Motivation

We should be able to check credentials by pressing "Test credentials" button. That would allow us to check credentials user provided before creating a translator. With this, we can update some translator specific settings (e.g. remote languages mapping)

Proposed resolution

Add addTestCredentialsButton() method on TranslatorPluginUiBase and related submit handlers/callbacks.

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
StatusFileSize
new4.26 KB

Providing a patch... With this patch, the only change we should make in translator modules is to add $form += parent::addTestCredentialsButton(); in buildConfigurationForm().

There is a bug about updating (default) remote languages mapping that's I'm currently working on (#2654958: Default remote language mappings are not recreated), but not really related to this issue...

berdir’s picture

Status: Needs review » Needs work
+++ b/src/TranslatorPluginUiBase.php
@@ -93,6 +93,45 @@ class TranslatorPluginUiBase extends ComponentPluginBase implements TranslatorPl
+    drupal_set_message('Valid credentials');

Missing t()

mbovan’s picture

Status: Needs work » Needs review
StatusFileSize
new4.26 KB
new628 bytes

Oops... Fixed.

mbovan’s picture

Removed unneeded line, accidentally added while working on #2654958: Default remote language mappings are not recreated.

berdir’s picture

Status: Needs review » Fixed

Looks good, committed.

  • Berdir committed db8e1a0 on 8.x-1.x authored by mbovan
    Issue #2654944 by mbovan: Provide test credentials button and callbacks...
miro_dietiker’s picture

And now the translators should also pick up this API and call adding the credential button?

Status: Fixed » Closed (fixed)

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