[issue36837] Make il8n tools available from `python -m`

2019-05-11 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Scratch what I said in https://bugs.python.org/issue36837?@ok_message=msg%20342005%20created%0Aissue%2036837%20message_count%2C%20messages%20edited%20ok&@template=item#msg342005 GNU msgfmt does extract the charset correctly. (My previous test failed to

[issue36837] Make il8n tools available from `python -m`

2019-05-09 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: A note about the msgfmt problem. It looks like GNU gettext's msgfmt has a similar problem but the msgfmt from pybabel does not. This may mean that we need to change the gettext *Translation objects to be more tolerant of non-ascii encodings (perhaps

[issue36837] Make il8n tools available from `python -m`

2019-05-09 Thread Toshio Kuratomi
Toshio Kuratomi 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

[issue36837] Make il8n tools available from `python -m`

2019-05-08 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: One other suggestion: put the bulk of Tools/i18n/pygettext.py into Lib/_pygettext.py, then import its main() in both Lib/gettext.py and Tools/i18n/pygettext.py. Then just call that main(). -- nosy: +barry ___

[issue36837] Make il8n tools available from `python -m`

2019-05-07 Thread Benjamin Kane
New submission from Benjamin Kane : Localizing a Python application involves using the `gettext` standard library module to read .mo files. There are three scripts to assist with this in https://github.com/bbkane/cpython/tree/master/Tools/i18n : - makelocalealias.py : Convert the X11