diff options
author | Sigurd Ljødal <544451+ljodal@users.noreply.github.com> | 2022-01-31 17:47:21 +0100 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2022-04-08 13:27:18 +0300 |
commit | 7e90d6b8fe1327ed863b626db51be9061b6b5781 (patch) | |
tree | 7e72731006b2dffc9105d850ccebd327d3bacdc9 /tests | |
parent | bc7a51bc8809f9d62dca43a634d3b803dc054cf0 (diff) | |
download | babel-7e90d6b8fe1327ed863b626db51be9061b6b5781.tar.gz |
Fix duplicate locations when writing without lineno
If the same translation appears multiple times in the same file,
duplicate locations would be written to the .po file when using
write_po(..., include_lineno=False).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/messages/test_pofile.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/messages/test_pofile.py b/tests/messages/test_pofile.py index 7239a88..ff0295a 100644 --- a/tests/messages/test_pofile.py +++ b/tests/messages/test_pofile.py @@ -827,6 +827,7 @@ msgstr ""''', buf.getvalue().strip()) def test_no_include_lineno(self): catalog = Catalog() catalog.add(u'foo', locations=[('main.py', 1)]) + catalog.add(u'foo', locations=[('main.py', 2)]) catalog.add(u'foo', locations=[('utils.py', 3)]) buf = BytesIO() pofile.write_po(buf, catalog, omit_header=True, include_lineno=False) |