diff babel/messages/catalog.py @ 228:6582494abc36 trunk

Follow-up to [239]: also combine duplicate comments when writing PO files.
author cmlenz
date Fri, 20 Jul 2007 16:47:08 +0000
parents b6927ec68261
children 0c390005e92d
line wrap: on
line diff
--- a/babel/messages/catalog.py
+++ b/babel/messages/catalog.py
@@ -471,8 +471,10 @@
                 current.id = message.id
                 current.string = message.string
             current.locations.extend(message.locations)
-            current.auto_comments.extend(message.auto_comments)
-            current.user_comments.extend(message.user_comments)
+            current.auto_comments = list(distinct(current.auto_comments +
+                                                  message.auto_comments))
+            current.user_comments = list(distinct(current.user_comments +
+                                                  message.user_comments))
             current.flags |= message.flags
             message = current
         elif id == '':
Copyright (C) 2012-2017 Edgewall Software