镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Over-long msgstr not line wrapped when setting --width #1266

Open

Description

@SlowMo24

A .po file containing the following translation

msgid "Lorem Ipsum is"
msgstr "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrystandard"

will not be line-wrapped with this command:

   pybabel update \
       -w 120 \
       -i messages.pot \
       -d .

even though the msgstr is >120 characters. The line will even get unwrapped if it was wrapped before like so:

msgstr ""
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrystandard"

This behaviour can lead to vslavik/poedit#922.

This issue may be linked to #787 ?

Activity

  1. SlowMo24 commented on Jun 12, 2026

    @SlowMo24
    Author

    This may be related to translate/translate#6249 (comment) in case they both use the same underlying library to enforce line length.

  2. ub3dqy commented on Nov 1, 2026

    @ub3dqy

    @SlowMo24 This still reproduces on master (ecf1da8): width=120 writes a 125-character line. A fix is prepared for singular, plural, context and obsolete entries; it also preserves the original text when wrapping. 341 local checks passed.

    Would you be willing to pay for a tested fix and pull request? If so, what budget would work?

    Dima Mak / ub3dqy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions