Skip to content

Commit 69402a5

Browse files
committed
Reset context when adding a message
1 parent 7e4bbb5 commit 69402a5

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

Lib/test/test_tools/msgfmt_data/general.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,54 @@
33
"",
44
"Project-Id-Version: PACKAGE VERSION\nPOT-Creation-Date: 2024-10-26 18:06+0200\nPO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\nLast-Translator: FULL NAME <EMAIL@ADDRESS>\nLanguage-Team: LANGUAGE <LL@li.org>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n"
55
],
6+
[
7+
"\n newlines \n",
8+
"\n translated \n"
9+
],
10+
[
11+
"\"escapes\"",
12+
"\"translated\""
13+
],
14+
[
15+
"Multilinestring",
16+
"Multilinetranslation"
17+
],
618
[
719
[
8-
"abc\u0004One email sent.",
20+
"One email sent.",
921
0
1022
],
1123
"One email sent."
1224
],
1325
[
1426
[
15-
"abc\u0004One email sent.",
27+
"One email sent.",
1628
1
1729
],
1830
"%d emails sent."
1931
],
20-
[
21-
"abc\u0004foo",
22-
"bar"
23-
],
24-
[
25-
"bar",
26-
"baz"
27-
],
28-
[
29-
"xyz\u0004\n newlines \n",
30-
"\n translated \n"
31-
],
32-
[
33-
"xyz\u0004\"escapes\"",
34-
"\"translated\""
35-
],
36-
[
37-
"xyz\u0004Multilinestring",
38-
"Multilinetranslation"
39-
],
4032
[
4133
[
42-
"xyz\u0004One email sent.",
34+
"abc\u0004One email sent.",
4335
0
4436
],
4537
"One email sent."
4638
],
4739
[
4840
[
49-
"xyz\u0004One email sent.",
41+
"abc\u0004One email sent.",
5042
1
5143
],
5244
"%d emails sent."
5345
],
46+
[
47+
"abc\u0004foo",
48+
"bar"
49+
],
50+
[
51+
"bar",
52+
"baz"
53+
],
5454
[
5555
"xyz\u0004foo",
5656
"bar"
-16 Bytes
Binary file not shown.

Tools/i18n/msgfmt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def make(filename, outfile):
149149
elif l.startswith('msgid') and not l.startswith('msgid_plural'):
150150
if section == STR:
151151
add(msgctxt, msgid, msgstr, fuzzy)
152+
msgctxt = None
152153
if not msgid:
153154
# See whether there is an encoding declaration
154155
p = HeaderParser()

0 commit comments

Comments
 (0)