Commit f105986b authored by Michal Čihař's avatar Michal Čihař

No need to parse git tree here

We only need language code and filename from this function, the hash
was never used.
parent 3c16b6c2
...@@ -1006,14 +1006,11 @@ class SubProject(models.Model): ...@@ -1006,14 +1006,11 @@ class SubProject(models.Model):
''' '''
Iterator over translations in filesystem. Iterator over translations in filesystem.
''' '''
tree = self.git_repo.tree()
# Glob files # Glob files
for filename in self.get_mask_matches(): for filename in self.get_mask_matches():
yield ( yield (
self.get_lang_code(filename), self.get_lang_code(filename),
filename, filename,
tree[filename].hexsha
) )
def create_translations(self, force=False, langs=None, request=None): def create_translations(self, force=False, langs=None, request=None):
...@@ -1021,7 +1018,7 @@ class SubProject(models.Model): ...@@ -1021,7 +1018,7 @@ class SubProject(models.Model):
Loads translations from git. Loads translations from git.
''' '''
translations = [] translations = []
for code, path, blob_hash in self.get_translation_blobs(): for code, path in self.get_translation_blobs():
if langs is not None and code not in langs: if langs is not None and code not in langs:
logger.info('skipping %s', path) logger.info('skipping %s', path)
continue continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment