The line wrapping algorithm of gettext is somewhat complicated. Rather than trying to approximate it, use `msgcat` from gettext directly. This is also what poedit does.