Skip to content

Rewrite word wrapping for gettext entries

Azamat Hackimov requested to merge azamathackimov/lokalize:wordwrap into master

Old algorithm works not right as expected - if text have unintended newlines, lokalize wraps them as required, and result goes not identical as vanilla gettext.

This produce some noize when commiting PO catalogs into git.

  • Fix issue when whitespace appears as leading character in next string instead of trailing in previous.
  • New algorithm removes all newlines and then add them where they are really needed, after that goes standard word wrapping with nice max 78-wide lines.

See also https://bugs.kde.org/show_bug.cgi?id=380007 and https://bugs.kde.org/show_bug.cgi?id=402838, https://phabricator.kde.org/D10009

Merge request reports

Loading