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

Log commits changes history

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent dbcd8d40
......@@ -151,6 +151,7 @@ class Change(models.Model):
ACTION_LOCK = 14
ACTION_UNLOCK = 15
ACTION_DUPLICATE_STRING = 16
ACTION_COMMIT = 17
ACTION_CHOICES = (
(ACTION_UPDATE, ugettext_lazy('Resource update')),
......@@ -170,6 +171,7 @@ class Change(models.Model):
(ACTION_LOCK, ugettext_lazy('Component locked')),
(ACTION_UNLOCK, ugettext_lazy('Component unlocked')),
(ACTION_DUPLICATE_STRING, ugettext_lazy('Detected duplicate string')),
(ACTION_COMMIT, ugettext_lazy('Commited changes')),
)
unit = models.ForeignKey('Unit', null=True)
......
......@@ -818,6 +818,10 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
self.filename,
author
)
Change.objects.create(
action=Change.ACTION_COMMIT,
translation=self,
)
with self.subproject.repository_lock:
self.__git_commit(author, timestamp, sync)
......
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