Commit 22d218ac authored by Mathilde Dumond's avatar Mathilde Dumond Committed by Sascha Grossenbacher
Browse files

Issue #3127040 by mathilde_dumond, mo_farhaz: Drupal 9 readiness

parent 3963acb7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,5 +23,5 @@ This module requires TMGMT (http://drupal.org/project/tmgmt) module
to be installed.

Also you will need to enter the API keys. You can obtain them by registering
on the http://www.onehourtranslation.com or
http://sandbox.onehourtranslation.com to use sandbox.
on the http://www.getblend.com or
https://sandbox.getblend.com to use sandbox.

composer.json

0 → 100644
+10 −0
Original line number Diff line number Diff line
{
  "name": "drupal/tmgmt_oht",
  "description": "TMGMT Provider for BLEND",
  "type": "drupal-module",
  "license": "GPL-2.0-or-later",
  "require": {
    "drupal/core": "^9 || ^10",
    "drupal/tmgmt": "^1.0"
  }
}
+4 −4
Original line number Diff line number Diff line
@@ -40,12 +40,12 @@ class OhtTranslator extends TranslatorPluginBase implements ContainerFactoryPlug
  /**
   * Translation service URL.
   */
  const PRODUCTION_URL = 'https://api.onehourtranslation.com/api';
  const PRODUCTION_URL = 'https://app.getblend.com/api';

  /**
   * Translation sandbox service URL.
   */
  const SANDBOX_URL = 'https://sandbox.onehourtranslation.com/api';
  const SANDBOX_URL = 'https://sandbox.getblend.com/api';

  /**
   * Translation service API version.
@@ -313,7 +313,7 @@ class OhtTranslator extends TranslatorPluginBase implements ContainerFactoryPlug
    }

    // If we are expecting a download, just return received data.
    $received_data = $response->getBody()->getContents();
    $received_data = (string) $response->getBody();
    if ($download) {
      return $received_data;
    }
@@ -488,7 +488,7 @@ class OhtTranslator extends TranslatorPluginBase implements ContainerFactoryPlug
    }
    return AvailableResult::no(t('@translator is not available. Make sure it is properly <a href=:configured>configured</a>.', [
      '@translator' => $translator->label(),
      ':configured' => $translator->url(),
      ':configured' => $translator->toUrl()->toString(),
    ]));
  }

+1 −1
Original line number Diff line number Diff line
name: "Oht Translator Test Service Mocker"
description: "Provides a local implementation of the Oht Translater API"
package: "Translation Management"
core: 8.x
core_version_requirement: ^9 || ^10
type: module

dependencies:
Loading