Commit 6a3b6543 authored by Michal Čihař's avatar Michal Čihař

Merge remote-tracking branch 'origin/master'

parents 0b25cfda 3e354430
......@@ -464,20 +464,19 @@ class SubProject(models.Model):
'''
return SubProject.objects.filter(repo = 'weblate://%s/%s' % (self.project.slug, self.slug))
def commit_pending(self):
def commit_pending(self, from_link = False):
'''
Checks whether there is any translation which needs commit.
'''
if self.is_repo_link():
return self.get_linked_repo().commit_pending()
if not from_link and self.is_repo_link():
return self.get_linked_repo().commit_pending(True)
for translation in self.translation_set.all():
translation.commit_pending()
# Process linked projects
for sp in self.get_linked_childs():
for translation in sp.translation_set.all():
translation.commit_pending()
sp.commit_pending(True)
def update_branch(self, request = None):
'''
......
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