Toshio Kuratomi <a.bad...@gmail.com> added the comment:

Note, I've been doing some tests of how our gettext module differs from GNU 
gettext and run into a few bugs and lack of features which make msgfmt unusable 
and limit pygettext's usefulness.

* msgfmt doesn't seem to store the charset from the .po file into the .mo file. 
 I think this might have been okay for the lgettext() and gettext() methods 
under Python2 as those probably passed the byte strings from the .mo files 
through verbatim.  Under Python3, however, we have to decode the byte strings 
to text and we can't do that without knowing the charset.  This leads to a 
UnicodeDecodeError on any .mo file which contains non-ascii characters (which 
is going to be the majority of them)

* So far, I have found that pygettext doesn't understand how to extract strings 
from ngettext().  This means that your code can't use plural forms if you want 
to use pygettext to extract the strings.

These deficiencies are probably things that need to be fixed if we're going to 
continue to promote these tools in the documentation.

----------
nosy: +a.badger

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36837>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to