Commit 61af249b authored by Michal Čihař's avatar Michal Čihař

Avoid duplication in case template has same comments

parent 7fab796f
...@@ -2163,7 +2163,10 @@ class Unit(models.Model): ...@@ -2163,7 +2163,10 @@ class Unit(models.Model):
translated = is_translated(unit) translated = is_translated(unit)
comment = unit.getnotes() comment = unit.getnotes()
if template is not None: if template is not None:
comment = template.getnotes() + ' ' + comment # Avoid duplication in case template has same comments
template_comment = template.getnotes()
if template_comment != comment:
comment = template_comment + ' ' + comment
# Update checks on fuzzy update or on content change # Update checks on fuzzy update or on content change
same_content = (target == self.target) same_content = (target == self.target)
......
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