def load_store(self): """Load translate-toolkit storage from disk.""" store = self.component.file_format_cls.parse( self.get_filename(), self.component.template_store, language_code=self.language_code) store_post_load.send(sender=self.__class__, translation=self, store=store) return store
def load_store(self, fileobj=None): """Load translate-toolkit storage from disk.""" if fileobj is None: fileobj = self.get_filename() store = self.component.file_format_cls.parse( fileobj, self.component.template_store, language_code=self.language_code, is_template=self.is_template, ) store_post_load.send(sender=self.__class__, translation=self, store=store) return store
def load_store(self): """Load translate-toolkit storage from disk.""" store = self.component.file_format_cls.parse( self.get_filename(), self.component.template_store, language_code=self.language_code ) store_post_load.send( sender=self.__class__, translation=self, store=store ) return store
def load_store(self, fileobj=None, force_intermediate=False): """Load translate-toolkit storage from disk.""" if fileobj is None: fileobj = self.get_filename() # Use intermediate store as template for source translation if force_intermediate or (self.is_template and self.component.intermediate): template = self.component.intermediate_store else: template = self.component.template_store store = self.component.file_format_cls.parse( fileobj, template, language_code=self.language_code, is_template=self.is_template, ) store_post_load.send(sender=self.__class__, translation=self, store=store) return store