We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7d00e6 commit 4a50631Copy full SHA for 4a50631
scripts/check_spell.py
@@ -4,6 +4,7 @@
4
"""
5
6
from pathlib import Path
7
+import shutil
8
import sys
9
import tempfile
10
@@ -52,10 +53,9 @@ def check_spell(po_files=None):
52
53
# Create temporary copies of the original files.
54
po_files_tmp = []
55
for po_file in po_files:
- with open(tempfile.mktemp(), "w") as temp_file:
56
- # Copy content of the .po file
57
- with open(po_file, "r", encoding="utf-8") as f:
58
- temp_file.write(f.read())
+ with open(tempfile.mktemp(), "wb") as temp_file:
+ with open(po_file, "rb") as original_file:
+ shutil.copyfileobj(original_file, temp_file)
59
po_files_tmp.append(temp_file.name)
60
61
# Don't translate probably code entries
0 commit comments