e = self.find(entry.msgid)
- # entry is not in the po file, we must add it
- # entry is created with msgid, occurrences and comment
- # entry found, we update it...
- e.occurrences = entry.occurrences
- e.comment = entry.comment
# ok, now we must "obsolete" entries that are not in the refpot
- """Return True if the entry has been translated or False"""
+ Return True if the entry has been translated or False.
if self.obsolete or 'fuzzy' in self.flags:
+ def merge(self, other):
+ Merge the current entry with the given pot entry.
+ self.msgid = other.msgid
+ self.occurrences = other.occurrences
+ self.comment = other.comment
+ self.flags = other.flags
+ self.msgid_plural = other.msgid_plural
+ if other.msgstr_plural:
+ for pos in other.msgstr_plural:
+ # keep existing translation at pos if any
+ self.msgstr_plural[pos] = ''