Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Use polib for wrapping #106

Closed
wants to merge 1 commit into from
Closed

Use polib for wrapping #106

wants to merge 1 commit into from

Conversation

jeanas
Copy link

@jeanas jeanas commented Feb 19, 2023

This removes the dependency on msgcat, improving the experience for Windows people, and eliminating potential wrapping discrepancies caused by different versions of msgcat.

It also obviates creating a temporary file.

Known issue: polib's wrapping is different from msgcat's. It doesn't always put the space at the start of the line. This also means that files wrapped with a previous version of powrap will likely be completely reformatted.

This removes the dependency on msgcat, improving the experience for
Windows people, and eliminating potential wrapping discrepancies caused
by different versions of msgcat.

It also obviates creating a temporary file.

Known issue: polib's wrapping is different from msgcat's.  It doesn't
always put the space at the start of the line. This also means that
files wrapped with a previous version of powrap will likely be
completely reformatted.

Fixes #76, #82, #104
@egeakman
Copy link
Contributor

As you mentioned in the known issues, there is a difference in how polib and msgcat wrap the files. Many users of powrap (msgcat) package also use poedit for their translation work. This includes the Python Doc Turkish translation team, Spanish translation team, and French translation team, among others. And migrating to polib would cause rewrapping of a huge number of files on these projects. Additionally, poedit uses msgcat conventions, so constant rewrapping would be required to maintain consistency between the two tools.

One of the primary goals of the powrap is to reduce the diff. I think Julien explained it very clearly in a comment on another pull request implementing polib.

@JulienPalard
Copy link
Collaborator

Known issue: polib's wrapping is different from msgcat's.

That is not acceptable.

Currently, as @egeakman wrote, users of poedit do not need to use powrap, which is is a "feature" we'd like to keep.

It's hard to "keep" it in the current times where different versions of poedit can wrap differently due to the update of msgcat.

Funnily enough it means that the same powrap can behave differently on different machines.

But it's only a transition time, slowly people will upgrade and we'll converge to the "new" wrapping algorithm.

@jeanas jeanas deleted the polib branch November 21, 2023 17:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants