def queue_translation(item_type, item_id, locale): opta_logger.info('send_to_translator called: %s id-%s for locale: %s' % (item_type, item_id, locale,)) ss = SmartlingService(locale) ss.post_to_translator(item_type, item_id)
def list(self, request, *args, **kwargs): ss = SmartlingService(request.GET['locale']) response = ss.get_from_translator(request) return Response(response, status=status.HTTP_201_CREATED, content_type='text/html; charset=utf-8')