freme-project / e-services

Apache License 2.0
1 stars 1 forks source link

e-Translate: request source-lang and target-lang pairs #20

Closed pheyvaer closed 7 years ago

andish commented 7 years ago

Tilde endpoint now returns list of available systems in json format, which includes information about system IDs, domains, language pairs. Curl:

curl -X GET -H "Authorization: Basic RlJFTUU6dXxGcjNtM19zJGN1ciQ=" -H "Cache-Control: no-cache" -H "Postman-Token: 58f051a3-ee38-3fb5-72ca-10930f710307" "https://services.tilde.com/configuration/translation"

Optional query parameter - 'key' (in order to retrieve private systems).

Response example:

{
  "systems": [
    {
      "sourceLanguage": {
        "Code": "nl",
        "Name": {
          "Language": "en",
          "Text": "Dutch"
        }
      },
      "targetLanguage": {
        "Code": "fr",
        "Name": {
          "Language": "en",
          "Text": "French"
        }
      },
      "systemID": "smt-63f939f0-7ebf-4b45-978a-4fa4714c601b",
      "domain": "law",
      "isPrivate": false,
      "status": "standby"
    },
    {
      "sourceLanguage": {
        "Code": "en",
        "Name": {
          "Language": "en",
          "Text": "English"
        }
      },
      "targetLanguage": {
        "Code": "de",
        "Name": {
          "Language": "en",
          "Text": "German"
        }
      },
      "systemID": "smt-c71f6f22-5e2a-4682-a4cc-2d97d38fac5e",
      "domain": "Legal",
      "isPrivate": false,
      "status": "ready"
    } ]
}

@jnehring how it would be implemented in FREME server? new endpoint?

jnehring commented 7 years ago

@pheyvaer is this still a requirement? Are you going to use this service?

Do we actually need to provide this as a FREME endpoint? Users could call the service directly.

pheyvaer commented 7 years ago

Yes, for the CKEditor plugin.

jnehring commented 7 years ago

@bgrusdt please implement a new API endpoint for this.

jnehring commented 7 years ago

@pheyvaer how about you request this data directly from tilde? Maybe this is easier then creating a new FREME endpoint for this that merely proxies the data.

pheyvaer commented 7 years ago

Works also for us :)

jnehring commented 7 years ago

ok then lets do it that way.

bjdmeest commented 7 years ago

Thanks! moved to https://github.com/freme-project/CKEditor-Plugin/issues/27 :)