From c5eacd3acc9edfdcb94ee3b685de32fe59b7773e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 3 Jun 2007 15:30:07 +0000 Subject: [PATCH] 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. --- babel/catalog/pofile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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'), -- 2.47.2