[I18n-sig] Python 3.0 Internationalization msgfmt.py on windows XP: TypeError: can't concat bytes to str
by Divine Paul other posts by this author
Apr 17 2009 7:41AM messages near this date
[I18n-sig] Lookup of localised language name by ISO 639 language code
|
Re: [I18n-sig] 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\multilingue
app.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 <LL@[...].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
Thread:
Divine Paul
martin
|