[Mailman-Developers] 'Charset "CHARSET"' warning when doing make catalogs
(Repost to mailman-developers@python.org because I got no answer on mailman-users@python.org)
Hi there.
I just wanted to do a upgrade to 2.1.1. The release notes tell me to do a 'make catalogs' in messages/.
This step is repeated for each language:
---snip--- msgfmt -o lt/LC_MESSAGES/mailman.mo lt/LC_MESSAGES/mailman.po Merging new template file with existing translations mv nl/LC_MESSAGES/mailman.po nl/LC_MESSAGES/mailman.po.old && msgmerge -o nl/LC_MESSAGES/mailman.po nl/LC_MESSAGES/mailman.po.old mailman.pot mailman.pot: warning: Charset "CHARSET" is not a portable encoding name. Message conversion to user's charset might not work. ............................................................................ ................................................ done. ---snip---
Can I safely ignore the warning?
Regards, Matthias
On Fri, Feb 14, 2003 at 11:35:17PM +0100, Matthias Juchem wrote:
msgfmt -o lt/LC_MESSAGES/mailman.mo lt/LC_MESSAGES/mailman.po Merging new template file with existing translations mv nl/LC_MESSAGES/mailman.po nl/LC_MESSAGES/mailman.po.old && msgmerge -o nl/LC_MESSAGES/mailman.po nl/LC_MESSAGES/mailman.po.old mailman.pot mailman.pot: warning: Charset "CHARSET" is not a portable encoding name.
Can I safely ignore the warning?
in my experience yes, it works anyway, because mailman.pot is written in plain ascii. The original xgettext does the same but I think it should grow a command line option to declare the used charset (maybe defaulting to ascii). A possible patch: --- bin/pygettext.py 2003-02-15 13:46:49.000000000 +0100 +++ bin/pygettext.py.new 2003-02-15 14:05:03.000000000 +0100 @@ -175,7 +175,7 @@ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n" "Language-Team: LANGUAGE <LL@li.org>\\n" "MIME-Version: 1.0\\n" -"Content-Type: text/plain; charset=CHARSET\\n" +"Content-Type: text/plain; charset=%(charset)s\\n" "Content-Transfer-Encoding: ENCODING\\n" "Generated-By: pygettext.py %(version)s\\n" @@ -336,7 +336,11 @@ timestamp = time.ctime(time.time()) # The time stamp in the header doesn't have the same format as # that # generated by xgettext... - print >> fp, pot_header % {'time': timestamp, 'version': __version__} + print >> fp, pot_header % { + 'time': timestamp, + 'charset': options.charset, + 'version': __version__ + } # Sort the entries. First sort each particular entry's keys, # then # sort all the entries by their first item. reverse = {} @@ -423,6 +427,7 @@ excludefilename = '' docstrings = 0 nodocstrings = {} + charset = 'US-ASCII' options = Options() locations = {'gnu' : options.GNU, @@ -435,6 +440,8 @@ usage(0) elif opt in ('-a', '--extract-all'): options.extractall = 1 + elif opt in ('--charset'): + options.charset = arg elif opt in ('-d', '--default-domain'): options.outfile = arg + '.pot' elif opt in ('-E', '--escape'): -- Simone Piunno -- http://members.ferrara.linux.it/pioppo .------- Adde parvum parvo magnus acervus erit -------. Ferrara Linux Users Group - http://www.ferrara.linux.it Deep Space 6, IPv6 on Linux - http://www.deepspace6.net GNU Mailman, Mailing List Manager - http://www.list.org `-------------------------------------------------------'
participants (2)
-
Matthias Juchem -
Simone Piunno