(self, resource_slug, hq_lang_code=None)
check if a resource has been completely translated for
        all langs or a specific target lang
check if a resource has been completely translated for
        all langs or a specific target lang
check if a resource has been completely translated for all langs or a specific target lang
def translation_completed(self, resource_slug, hq_lang_code=None):
        """
        check if a resource has been completely translated for
        all langs or a specific target lang
        """
        def completed(details):
            return not bool(details.get('untranslated_words'))

        if hq_lang_code:
            lang = self.transifex_lang_code(hq_lang_code)
            return completed(self._resource_details(resource_slug).get(lang, {}))
        else:
            for lang, detail in self._resource_details(resource_slug).items():
                if not completed(detail):
                    return False
            return True
def translation_completed ( self , resource_slug , hq_lang_code = None ) : def completed ( details ) : return not bool ( details . get ( 'untranslated_words' ) ) if hq_lang_code : lang = self . transifex_lang_code ( hq_lang_code ) return completed ( self . _resource_details ( resource_slug ) . get ( lang , { } ) ) else : for lang , detail in self . _resource_details ( resource_slug ) . items ( ) : if not completed ( detail ) : return False return True