From 69e7ba46dc19d1fe8f3ef7f50bb5d9989a40f379 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 31 May 2007 18:04:41 +0000 Subject: [PATCH] Change pot header's first line, "Translations Template for %%(project)s." instead of "SOME DESCRIPTIVE TITLE.". '''`project`''' and '''`version`''' now default to '''PROJECT''' and '''VERSION''' respectively. Fixed a bug regarding '''Content-Transfer-Encoding''', it shouldn't be the charset, and we're defaulting to `8bit` untill someone complains. --- babel/catalog/pofile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/babel/catalog/pofile.py b/babel/catalog/pofile.py index 0a05fa28..c5051204 100644 --- a/babel/catalog/pofile.py +++ b/babel/catalog/pofile.py @@ -33,7 +33,7 @@ from babel import __version__ as VERSION __all__ = ['escape', 'normalize', 'read_po', 'write_po'] POT_HEADER = """\ -# SOME DESCRIPTIVE TITLE. +# Translations Template for %%(project)s. # Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR , YEAR. # @@ -46,7 +46,7 @@ msgstr "" "Language-Team: LANGUAGE \\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=%%(charset)s\\n" -"Content-Transfer-Encoding: %%(charset)s\\n" +"Content-Transfer-Encoding: 8bit\\n" "Generated-By: Babel %s\\n" """ % VERSION @@ -118,7 +118,7 @@ def read_po(fileobj): ... #, fuzzy, python-format ... msgid "foo %(name)s" ... msgstr "" - ... + ... ... #: main.py:3 ... msgid "bar" ... msgid_plural "baz" @@ -195,8 +195,8 @@ def read_po(fileobj): if messages: yield pack() -def write_po(fileobj, messages, project=None, version=None, charset='utf-8', - no_location=False, omit_header=False): +def write_po(fileobj, messages, project='PROJECT', version='VERSION', + charset='utf-8', no_location=False, omit_header=False): r"""Write a ``gettext`` PO (portable object) file to the given file-like object. -- 2.47.2