Skip to content

Commit e893c0a

Browse files
msmolensfelixxm
authored andcommitted
[2.2.x] Fixed #31850 -- Fixed BasicExtractorTests.test_extraction_warning with xgettext 0.21+.
"format string with unnamed arguments cannot be properly localized" warning is not raised in xgettext 0.21+. This patch uses a message that causes an xgettext warning regardless of the version. Backport of 07a30f5 from master
1 parent 3da29a3 commit e893c0a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ answer newbie questions, and generally made Django that much better:
585585
586586
Max Burstein <http://maxburstein.com>
587587
Max Derkachev <[email protected]>
588+
Max Smolens <[email protected]>
588589
Maxime Lorant <[email protected]>
589590
Maxime Turcotte <[email protected]>
590591
Maximilian Merz <[email protected]>

tests/i18n/commands/code.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from django.utils.translation import gettext
22

3-
# This will generate an xgettext warning
4-
my_string = gettext("This string contain two placeholders: %s and %s" % ('a', 'b'))
3+
# This will generate an xgettext "Empty msgid" warning.
4+
my_string = gettext('')

0 commit comments

Comments
 (0)