From 22075cd636167df686f923b6481e6f304a6cea91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 28 Feb 2012 13:25:06 +0100 Subject: [PATCH] Store comments in db as well --- trans/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trans/models.py b/trans/models.py index d9dd0a9cd..87463f68f 100644 --- a/trans/models.py +++ b/trans/models.py @@ -224,6 +224,7 @@ class Unit(models.Model): checksum = models.CharField(max_length = 40, default = '', blank = True, db_index = True) location = models.TextField(default = '', blank = True) context = models.TextField(default = '', blank = True) + comment = models.TextField(default = '', blank = True) flags = models.TextField(default = '', blank = True) source = models.TextField() target = models.TextField(default = '', blank = True) @@ -238,13 +239,15 @@ class Unit(models.Model): target = join_plural(unit.target.strings) fuzzy = unit.isfuzzy() translated = unit.istranslated() - if not force and location == self.location and flags == self.flags and target == self.target and fuzzy == self.fuzzy and translated == self.translated: + comment = unit.getnotes() + if not force and location == self.location and flags == self.flags and target == self.target and fuzzy == self.fuzzy and translated == self.translated and comment == self.comment: return self.location = location self.flags = flags self.target = target self.fuzzy = fuzzy self.translated = translated + self.comment = comment self.save(force_insert = force) def is_plural(self):