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.
--
Ticket URL: <https://code.djangoproject.com/ticket/29061>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "201703271529397914076.png" added.
first makemessages is for "\r" version, second makemessages is for "\n"
version.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:1>
* status: new => assigned
* owner: nobody => Gurpreet Singh
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:2>
* owner: nobody => Anvansh Singh
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:2>
Comment (by Anvansh Singh):
I am a bit unsure what would be the best place to add the regression test
for it. Can really use some help with that.
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:3>
Comment (by Sarah Boyce):
Sorry for not looking into this in more detail. I made what I was
expecting a regression test might look like
https://github.com/django/django/pull/17150/ but it seems to be passing
everywhere.
In the commit comment they mention that their system is Win10 with gettext
0.19.8.1. The image attached in the ticket doesn't look to be related.
I could be getting a lot of things wrong here, I may have misunderstood
the ticket, or it is already fixed, or this is related to a very specific
setup that is not covered by the GitHub actions, or the ticket is not
valid.
I will try to get someone who is more familiar with translations to double
check the ticket and point us in the right direction here 👍
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:4>
* cc: Claude Paroz (added)
Comment:
Claude - I hear you're the translations expert 🎉 no rush on this one,
when you get some time can you check if you think this ticket is valid and
how we can replicate the issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:5>
Comment (by Claude Paroz):
I must admit I don't have any motivation to fix Windows-related issue, and
even if I had, having no access to a Windows system is crippling to fix
such issues. Sorry.
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:6>
Comment (by Sarah Boyce):
That's completely fine! I sank some time trying to install gettext on our
Windows GitHub action and found the whole thing very frustrating - thank
you for getting to me ⭐
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:7>
* owner: Anvansh Singh => Sarah Boyce
* has_patch: 0 => 1
Comment:
Ok so managed to get a version of gettext installed in our GitHub action
by installing poedit (via chocolatey
https://community.chocolatey.org/packages/poedit) which has gettext
bundled. Then I have a test as to my best guess of what the issue might be
referring to and this passes.
Going to mark the ticket for a PR review but I think the PR is optional, I
am very tempted to close the ticket as "worksforme" but I will let a
merger decide what's most appropriate.
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:8>
* status: assigned => closed
* has_patch: 1 => 0
* resolution: => worksforme
* stage: Accepted => Unreviewed
Comment:
Replying to [comment:8 Sarah Boyce]:
> Ok so managed to get a version of gettext installed in our GitHub action
by installing poedit (via chocolatey
https://community.chocolatey.org/packages/poedit) which has gettext
bundled. Then I have a test as to my best guess of what the issue might be
referring to and this passes.
Thanks for all your efforts and investigation.
> Going to mark the ticket for a PR review but I think the PR is optional,
I am very tempted to close the ticket as "worksforme" but I will let a
merger decide what's most appropriate.
Agreed, we've not changed anything in Django itself, so it's not worth
extra testing and workarounds.
--
Ticket URL: <https://code.djangoproject.com/ticket/29061#comment:9>