Merge using polib #17
No reviewers
Labels
No labels
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AFPy/potodo!17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "maciek/potodo:merge-with-polib"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Recently I found out that polib provides the msgmerge functionality. Therefore I propose simplifying the logic of merging and getting rid of GNU Gettext OS dependency.
This improves performance by 52%. (16.56 sec down to 7.93 sec on python-docs-pl / cpython build; 45% improvement considering msgmerge with --quiet flag.)
Closes #19.
Merge with polibto Merge using polib@ -22,3 +12,2 @@Path(tmp_dir, "file1.po").read_text()== """#: /un/chemin/idiot.rst:69msgid "This is an updated dummy sentence."== """#Why is there a pair of empty msgid and msgstr in the merging result?
Can we (or should we) get rid of it?
It's empty metadata entry, even though there's no metadata.
https://github.com/izimobil/polib/issues/160
Maybe add a comment mentioning this polib issue?
I've added the comment in the test. Thank you for the review!
I tested and this fits perfectly for python-docs-pt-br, allowing to remove the gettext installation step. Thanks for this contribution.
@rffontenelle wrote in #17 (comment):
Thank you for the test!