This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author a.badger
Recipients a.badger, barry, bbkane
Date 2019-05-09.21:47:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1557438431.92.0.945995439706.issue36837@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-05-09 21:47:11a.badgersetrecipients: + a.badger, barry, bbkane
2019-05-09 21:47:11a.badgersetmessageid: <1557438431.92.0.945995439706.issue36837@roundup.psfhosted.org>
2019-05-09 21:47:11a.badgerlinkissue36837 messages
2019-05-09 21:47:11a.badgercreate