changeset 23:f828705c3bce

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.
author palgarvio
date Thu, 31 May 2007 18:04:41 +0000
parents 9ed365f4cbc8
children 6c2c9fc7d787
files babel/catalog/pofile.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/babel/catalog/pofile.py
+++ b/babel/catalog/pofile.py
@@ -33,7 +33,7 @@
 __all__ = ['escape', 'normalize', 'read_po', 'write_po']
 
 POT_HEADER = """\
-# SOME DESCRIPTIVE TITLE.
+# Translations Template for %%(project)s.
 # Copyright (C) YEAR ORGANIZATION
 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 #
@@ -46,7 +46,7 @@
 "Language-Team: LANGUAGE <LL@li.org>\\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 @@
     ... #, fuzzy, python-format
     ... msgid "foo %(name)s"
     ... msgstr ""
-    ... 
+    ...
     ... #: main.py:3
     ... msgid "bar"
     ... msgid_plural "baz"
@@ -195,8 +195,8 @@
     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.
     
Copyright (C) 2012-2017 Edgewall Software