Bugzilla – Bug 1091185
weblate uses different formatting than gettext
Last modified: 2018-10-22 14:24:33 UTC
After doing a "make merge" for libstorage-ng the resulting diff is much
bigger then required due do different formatting of weblate and gettext.
Have a look at https://github.com/openSUSE/libstorage-ng/pull/523/files.
E.g. in cs.po weblate places an empty string at the beginning of
very msgstr. In ar.po additionally long messages are split into several
This makes even a cursory review extra hard.
Weblate uses gettext to generate this stuff too.
It probably just uses different linewrap than your merge command which adds --no-wrap...
Per-se this is not a bug of weblate at all.
This is not a bug.
But it is a reasonable feature request.
Gettext po files have a variable format, especially wrapping of long lines, wrapping around "\n" and adding empty string in top of multilines are not standardized.
Weblate itself does not use gettext, but translation-tools (python gettext library).
Weblate does not offer formattion options.
msgmerge supports --no-wrap and --width=NUMBER and --escape/--no-escape
It is possible to adjust Makefile to generate files more similar to Weblate.
There is a difference:
translate-toolkit attempts to emulate the default gettext formatting.
libstorage-ng/po/Makefile.am adds --no-wrap argument to mesmerge.
--no-wrap generates po files with non-standard formatting.
I propose to remove --no-wrap.
Maybe there will be still some minor differences between gettext and translate-toolkit, but this change should eliminate these large diffs.
I have created https://github.com/openSUSE/libstorage-ng/pull/582.
There is one last problem with preamble, where gettext breaks line at '-' character while weblate does not break it, but it is a minor bug and I am not going to fix it.
As soon as upstream accepts the pull request I would consider this bug as fixed.
upstream accepted the fix