Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
n1ngu opened this issue Aug 30, 2023 · 1 comment · May be fixed by #526
Open

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

n1ngu opened this issue Aug 30, 2023 · 1 comment · May be fixed by #526

Comments

@n1ngu
Copy link

n1ngu commented Aug 30, 2023

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

n1ngu added a commit to n1ngu/django-jazzmin that referenced this issue Sep 6, 2023
@n1ngu n1ngu linked a pull request Jan 5, 2024 that will close this issue
@Endzel
Copy link

Endzel commented Sep 26, 2024

@farridav this keeps happening on our builds, is there a possibility for this to be fixed and merged in the coming future? I understand that #526 might not be the best solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants