Commits

Tim Gerundt committed 0ee0687

Fix issue #9 POFile.merge drop fuzzy attributes from translations

  • Participants
  • Parent commits 2d56f63

Comments (0)

Files changed (3)

             and occurrences will be discarded
           - any translations or comments in the file will be discarded,
             however dot comments and file positions will be preserved
+          - keep the fuzzy flag
 
         **Keyword argument**:
           - *refpot*: object POFile, the reference catalog.
         self.msgctxt = other.msgctxt
         self.occurrences = other.occurrences
         self.comment = other.comment
+        fuzzy = 'fuzzy' in self.flags
         self.flags = other.flags
+        if fuzzy:
+            self.flags.append('fuzzy')
         self.msgid_plural = other.msgid_plural
         self.obsolete = other.obsolete
         self.previous_msgctxt = other.previous_msgctxt

File tests/test_merge_after.po

 msgstr "Some translation ..."
 
 #: utils/timesince.py:12
+#, fuzzy
 msgid "year"
 msgid_plural "years"
 msgstr[0] "année"

File tests/test_merge_before.po

 msgstr "Some translation"
 
 #: utils/timesince.py:12
+#, fuzzy
 msgid "year"
 msgid_plural "years"
 msgstr[0] "année"