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

Commit on completing translation

parent 0397f4b8
......@@ -134,3 +134,4 @@ The changes are in this mode committed once one of following conditions happen:
* somebody else works on the translation
* merge from upstream occurs
* import of translation happens
* translation for a language is completed
......@@ -699,7 +699,11 @@ class Unit(models.Model):
else:
self.flags = ''
self.save(backend = True)
old_translated = self.translation.translated
self.translation.update_stats()
# Force commiting on completing translation
if old_translated > self.translation.translated and self.translation.translated == self.translation.total:
self.translation.commit_pending()
Change.objects.create(unit = self, user = request.user)
# Propagate to other projects
if propagate:
......
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