Python 3.0 Internationalization msgfmt.py on windows XP: TypeError: can't concat bytes to str

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Python 3.0 Internationalization msgfmt.py on windows XP: TypeError: can't concat bytes to str

Paul.Divine-2
Python 3.0 Internationalization msgfmt.py on windows XP: TypeError: can't concat bytes to str

Hi,

The file

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

contains

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@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@ADDRESS>\n"
"Language-Team: fr <[hidden email]>\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


_______________________________________________
I18n-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/i18n-sig
Reply | Threaded
Open this post in threaded view
|

Re: Python 3.0 Internationalization msgfmt.py on windows XP: TypeError: can't concat bytes to str

"Martin v. Löwis"
> What's wrong?

I guess msgfmt.py doesn't work with Python 3. Please
provide a bug report to bugs.python.org; better yet
including a patch.

Regards,
Martin
_______________________________________________
I18n-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/i18n-sig