python-polib/msgfmt-dont-convert-the-messages-to-UTF-8-encoding.patch
wangqiang 55ad7871bd Add build require gettext and fix test case test_save_as_mofile
(cherry picked from commit fa75feb119ad7e0f75a0047907278444c2a9124c)
2024-06-07 11:01:18 +08:00

13 lines
592 B
Diff

diff -Nur a/tests/tests.py b/tests/tests.py
--- a/tests/tests.py 2023-02-24 01:02:41.000000000 +0800
+++ b/tests/tests.py 2024-06-06 11:09:59.961135920 +0800
@@ -643,7 +643,7 @@
os.close(fd)
po = polib.pofile(reffile, autodetect_encoding=False, encoding=encoding)
po.save_as_mofile(tmpfile1)
- subprocess.call([msgfmt, '--no-hash', '-o', tmpfile2, reffile])
+ subprocess.call([msgfmt, '--no-convert', '--no-hash', '-o', tmpfile2, reffile])
try:
f = open(tmpfile1, 'rb')
s1 = f.read()