Opened 4 months ago

Last modified 4 months ago

#29061 new Bug

manage.py makemessages throws syntax error due to incorrectly generated django.pot, again

Reported by: Kyan Owned by: nobody
Component: Core (Management commands) Version: 2.0
Severity: Normal Keywords: gettext, makemessages, Windows
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://code.djangoproject.com/ticket/28773

I met the same problem, exactly like the ticket above.
I am using Django 2.0.1 and after check the django codes, I confirm that fix is in my django. But that fix doesn't work for me.
(Fix:
https://github.com/django/django/commit/4f5526e346861c0b2ffa2ea7229747c883e14432)

I changed the file in django/core/management/commands/makemessages.py

# django/core/management/commands/makemessages.py, line 193
with open(potfile, 'a', encoding='utf-8', newline='\n') as fp:

from newline="\n" to newline="\r" and it works.

Attachments (1)

201703271529397914076.png (187.6 KB) - added by Kyan 4 months ago.
first makemessages is for "\r" version, second makemessages is for "\n" version.

Download all attachments as: .zip

Change History (2)

Changed 4 months ago by Kyan

Attachment: 201703271529397914076.png added

first makemessages is for "\r" version, second makemessages is for "\n" version.

comment:1 Changed 4 months ago by Tim Graham

Triage Stage: UnreviewedAccepted
Note: See TracTickets for help on using tickets.
Back to Top