integreat-cms
integreat-cms copied to clipboard
Refactor `translate_queryset` in MT API clients
Motivation
The function translate_queryset
in "google_translate_api_client" and that in "deepl_api_client" are almost the same. That means there is a chance of refactoring and improvement.
Proposed Solution
Remove the duplication. For example, move the duplicated part into "machine_translation_api_client".
Alternatives
Leave as it is.
User Story
Additional Context
Bing translation is going to be added into the CMS too. It's probably better to wait for it. Do not forget SAMM.AI inherits from MachineTranslationApiClient too but has a bit different strucrure.