def get_translations(self, status=None):
        '''
            Returns the translations requested by the user
        '''
        if status is not None:
            result = self.api_call('translation/?status=%s' % status)
        else:
            result = self.api_call('translation/')
        if result.status_code == 200:
            translations_json = json.loads(result.content)["objects"]
            translations = [Translation(**tj) for tj in translations_json]
        else:
            log.critical(
                'Error status when fetching translation from server: {'
                '}!'.format(
                    result.status_code))
            translations = []
        return translations
def get_translations ( self , status = None ) : if status is not None : result = self . api_call ( 'translation/?status=%s' % status ) else : result = self . api_call ( 'translation/' ) if result . status_code == 200 : translations_json = json . loads ( result . content ) [ "objects" ] translations = [ Translation ( ** tj ) for tj in translations_json ] else : log . critical ( 'Error status when fetching translation from server: {' '}!' . format ( result . status_code ) ) translations = [ ] return translations
Returns the translations requested by the user