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

Implement an option to wrap only modified paragraphs #100

Open
JulienPalard opened this issue Mar 19, 2022 · 1 comment
Open

Implement an option to wrap only modified paragraphs #100

JulienPalard opened this issue Mar 19, 2022 · 1 comment

Comments

@JulienPalard
Copy link
Collaborator

As msgcat now have two distinct wrapping depending on the version of gettext, powrap can no longer enforce a "common True wrapping".

Trying to enforce a common True wrapping in this condition looks wrong, but users could still have to use powrap (users of emacs po-mode that does not wrap at all need a tool to wrap, so at least me.).

But if a repo (like python-docs-fr) have no "common True wrapping" and I edit a typo on a file and I powrap the file, I may rewrap the whole file, leading to an unacceptable diff for a typo.

So maybe powrap can have an option to rewrap only paragraphs that were edited AND need rewrapping, just to minimize diffs.

See python/python-docs-fr#1825 for context.

Also while there no longer a "common True wrapping", there no longer a real need to use msgcat, we may fall back to textwrap for portability?

@JulienPalard
Copy link
Collaborator Author

I looked at polib source, and there's currently no way to not rewrap what's already correctly wrapped: polib forget the initial wrapping while parsing the file.

JulienPalard added a commit to JulienPalard/python-docs-fr that referenced this issue Apr 5, 2022
JulienPalard added a commit to JulienPalard/python-docs-fr that referenced this issue Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant