chriskonnertz / DeepLy

PHP client for the DeepL.com translation API (unofficial)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[TODO] Ideas

chriskonnertz opened this issue · comments

Ideas / ToDO

  • Implement the new stuff from https://www.deepl.com/api-reference.html
  • Somehow extract the text from HTML page responses of the server and add it to the text of the exception that we throw (state: done for integrated cURL client)
  • Add framework (Symfony) support
  • More / better tests (for example for the translateFile() method)
  • Do not just throw a pretty generic exception when the result of sentence splitting is empty (Update: may be difficult since we get a malformed generic error response from the API)

Done

  • Keep line breaks
  • Check if the detectLanguage method makes two API calls. If so: Is this necessary? (Update: Not necessary)
  • Add Guzzle tests
  • Rewrite the broken "proposals" test
  • Add translateSentencesmethod that directly translates sentences without splliting a text into sentences -> this means the additional API call is no longer necessary
  • Add framework (Laravel) support
  • Create Guzzle based class that implements HttpClientInterface
  • Refactored the cURL HttpClient classes
  • Throw an exception if text length is exceeded (but make the check optional)
  • Implement some kind of ping method (most likely not possible before more is known about the API)
  • Refactor Deeply::splitText method --> create a separate bag class

Rejected

  • Use browser language and set it as target language in the demo script
  • Add caching (maybe...)

Otudated, therefore closed.