[issue35628] Allow lazy loading of translations in gettext.

2018-12-31 Thread s-ball
New submission from s-ball : When working on i18n, I realized that msgfmt.py did not generate any hash table. One step further, I realized that the gettext.py would not have used it because it unconditionnaly loads the whole translation files and contains the following TODO message: TODO

[issue35335] msgfmt should be able to merge more than one po file

2018-12-03 Thread s-ball
s-ball added the comment: Currently my main use case is to be able to compile one or more po file(s) from a Python script, so I just need to be able to repeatedly call make from that script - which was broken per issue 9741 To be honest, I must acknowledge that I initially thought that

[issue9741] msgfmt.py generates invalid mo because msgfmt.make() does not clear dictionary

2018-12-03 Thread s-ball
Change by s-ball : -- pull_requests: +10113 stage: test needed -> patch review ___ Python tracker <https://bugs.python.org/issue9741> ___ ___ Python-bugs-lis

[issue35335] msgfmt should be able to merge more than one po file

2018-12-03 Thread s-ball
Change by s-ball : -- keywords: +patch pull_requests: +10112 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35335> ___ ___ Python-

[issue35335] msgfmt should be able to merge more than one po file

2018-12-02 Thread s-ball
s-ball added the comment: After some more thinking about it, my opinion is that the proposed path for issue 9741 does not address at all my requirements. So I will try to propose a pull request addressing both issues here. -- ___ Python tracker

[issue35335] msgfmt should be able to merge more than one po file

2018-12-01 Thread s-ball
s-ball added the comment: I have followed SilentGhost's advice and begun by thoroughly testing the current behaviour. I then realized that I was wrong, and that (probably by chance) msgfmt.py partially followed my requirements, but pybabel did not and GNU gettext msgfmt did not real

[issue35335] msgfmt should be able to merge more than one po file

2018-11-29 Thread s-ball
s-ball added the comment: Ok, I have created a fork, and started coding on a local branch. But it will take some time, because I assume that I am supposed to write tests for the msgfmt module... -- ___ Python tracker <https://bugs.python.

[issue35335] msgfmt should be able to merge more than one po file

2018-11-27 Thread s-ball
New submission from s-ball : GNU gettext msgfmt can merge several po files into one single mo file. The current version of msgfmt can only compile one po file to one mo file. After looking at the code, the enhancement should be simple to implement. Command line: if one output file is given