mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
[2.0.x] Fixed #28773 -- Forced pot files to use UNIX-style newlines
Thanks Hendy Irawan for the analysis and report.
Backport of 4f5526e346 from master.
This commit is contained in:
@@ -188,7 +188,9 @@ def write_pot_file(potfile, msgs):
|
|||||||
header_read = True
|
header_read = True
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
msgs = '\n'.join(lines)
|
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)
|
fp.write(msgs)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user