]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Updates a catalog's header to from the template
authorDavid Stanek <dstanek@dstanek.com>
Thu, 5 Sep 2013 17:15:57 +0000 (13:15 -0400)
committerAarni Koskela <akx@iki.fi>
Wed, 30 Dec 2015 14:37:42 +0000 (16:37 +0200)
A language specific catalog's initial header is based on the template
when it is created.  Updates to the template's header were previously
not getting into the catalog during the update_catalog process.

babel/messages/catalog.py

index 21499ae6d7b8467246c7a308cf14bff46a158717..f72a34fcaec6d61776028925ec6417f22ff909c9 100644 (file)
@@ -797,6 +797,11 @@ class Catalog(object):
         for msgid in remaining:
             if no_fuzzy_matching or msgid not in fuzzy_matches:
                 self.obsolete[msgid] = remaining[msgid]
+
+        # Allow the updated catalog's header to be rewritten based on the
+        # template's header
+        self.header_comment = template.header_comment
+
         # Make updated catalog's POT-Creation-Date equal to the template
         # used to update the catalog
         self.creation_date = template.creation_date