Skip to content

Commit

Permalink
Fixed #28773 -- Forced pot files to use UNIX-style newlines
Browse files Browse the repository at this point in the history
Thanks Hendy Irawan for the analysis and report.
  • Loading branch information
claudep committed Nov 28, 2017
1 parent 616f468 commit 4f5526e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django/core/management/commands/makemessages.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ def write_pot_file(potfile, msgs):
header_read = True
lines.append(line)
msgs = '\n'.join(lines)
with open(potfile, 'a', encoding='utf-8') as fp:
# Force newlines of POT files to '\n' to work around
# https://savannah.gnu.org/bugs/index.php?52395
with open(potfile, 'a', encoding='utf-8', newline='\n') as fp:
fp.write(msgs)


Expand Down

0 comments on commit 4f5526e

Please sign in to comment.