[I18n-sig] Python 3.0 Internationalization msgfmt.py on windows XP: TypeError: can't concat bytes to str

DIVINE PAUL Paul.Divine at alcatel-lucent.fr
Fri Apr 17 16:20:06 CEST 2009


Hi,

The file

C:\wamp\www\paul\essais\multilingueapp\locale\fr\LC_MESSAGES\multilingue
app.po

contains

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2009-04-17 10:08+Romance Daylight Time\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: fr <LL at li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Generated-By: pygettext.py 1.5\n"


#: C:\wamp\www\paul\essais\multilingueapp\multlingueapp.py:85
msgid "albatross"
msgstr "albatrosse"

#: C:\wamp\www\paul\essais\multilingueapp\multlingueapp.py:85
msgid "mollusk"
msgstr "mollosque"

#: C:\wamp\www\paul\essais\multilingueapp\multlingueapp.py:85
msgid "python"
msgstr "python"

#: C:\wamp\www\paul\essais\multilingueapp\multlingueapp.py:85
msgid "rat"
msgstr "python"



The script msgfmt.py has the following result


C:\wamp\www\paul\essais\multilingueapp\locale\fr\LC_MESSAGES>c:\python30
\python C:\Python30\Tools\i18n\msgfmt.py multilingueapp.po
Traceback (most recent call last):
  File "C:\Python30\Tools\i18n\msgfmt.py", line 202, in <module>
    main()
  File "C:\Python30\Tools\i18n\msgfmt.py", line 198, in main
    make(filename, outfile)
  File "C:\Python30\Tools\i18n\msgfmt.py", line 165, in make
    output = generate()
  File "C:\Python30\Tools\i18n\msgfmt.py", line 92, in generate
    output += ids
TypeError: can't concat bytes to str


What's wrong?

Where to find a complete example of internationalization, with change of
lang on the fly.

In advance, thanks for your help.
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/i18n-sig/attachments/20090417/739bdf86/attachment.htm>


More information about the I18n-sig mailing list