From: Pedro Algarvio Date: Sun, 3 Jun 2007 15:30:07 +0000 (+0000) Subject: Changing `write_po` to include licensing info, same as the project. Since the method... X-Git-Tag: 1.0~602 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5eacd3acc9edfdcb94ee3b685de32fe59b7773e;p=thirdparty%2Fbabel.git Changing `write_po` to include licensing info, same as the project. Since the method is also to create the initial pot file, we also include the year in the copyright. We also mark the translations catalog template as fuzzy as it should be, only localized translations catalogs ready to be compiled should not include the fuzzy bit on the header. --- diff --git a/babel/catalog/pofile.py b/babel/catalog/pofile.py index ba19a4e9..33431ece 100644 --- a/babel/catalog/pofile.py +++ b/babel/catalog/pofile.py @@ -133,9 +133,12 @@ def read_po(fileobj): POT_HEADER = """\ # Translations Template for %%(project)s. -# Copyright (C) YEAR ORGANIZATION +# Copyright (C) %%(year)s ORGANIZATION +# This file is distributed under the same license as the +# %%(project)s project. # FIRST AUTHOR , YEAR. # +#, fuzzy msgid "" msgstr "" "Project-Id-Version: %%(project)s %%(version)s\\n" @@ -290,6 +293,7 @@ def write_po(fileobj, messages, project='PROJECT', version='VERSION', width=76, if not omit_header: _write(POT_HEADER % { + 'year': time.strftime('%Y'), 'project': project, 'version': version, 'creation_date': time.strftime('%Y-%m-%d %H:%M%z'),