Skip to content

Sporadic Execution of msgfmt failed 'msgid' and 'msgstr' entries do not both begin with '\n' #505

@n1ngu

Description

@n1ngu

Running django-admin compilemessages will most usually decide the fr translation is up to date

File “...../jazzmin/locale/fr/LC_MESSAGES/django.po” is already compiled and up to date

but somteimes django will want to process it for some reason. And it will fail:

Execution of msgfmt failed: ..../jazzmin/locale/fr/LC_MESSAGES/django.po:88: 'msgid' and 'msgstr' entries do not both begin with '\n'

I am still puzzled about what triggers this but my builds are now sort of flaky (workaround is to simply re-trigger the build)

I guess this is related to https://www.gnu.org/software/gettext/FAQ.html#newline. I am not sure I understand the rationale for that gettext behavior but similar issues (e.g. scanmem/scanmem#205) have been fixed by enforcing newline parity between original and translated strings: https://github.com/farridav/django-jazzmin/blob/master/jazzmin/locale/fr/LC_MESSAGES/django.po#L90

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions