[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 07a30f5616
from master
This commit is contained in:
parent
3da29a30c6
commit
e893c0ad8b
1
AUTHORS
1
AUTHORS
|
@ -585,6 +585,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
mattycakes@gmail.com
|
mattycakes@gmail.com
|
||||||
Max Burstein <http://maxburstein.com>
|
Max Burstein <http://maxburstein.com>
|
||||||
Max Derkachev <mderk@yandex.ru>
|
Max Derkachev <mderk@yandex.ru>
|
||||||
|
Max Smolens <msmolens@gmail.com>
|
||||||
Maxime Lorant <maxime.lorant@gmail.com>
|
Maxime Lorant <maxime.lorant@gmail.com>
|
||||||
Maxime Turcotte <maxocub@riseup.net>
|
Maxime Turcotte <maxocub@riseup.net>
|
||||||
Maximilian Merz <django@mxmerz.de>
|
Maximilian Merz <django@mxmerz.de>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from django.utils.translation import gettext
|
from django.utils.translation import gettext
|
||||||
|
|
||||||
# This will generate an xgettext warning
|
# This will generate an xgettext "Empty msgid" warning.
|
||||||
my_string = gettext("This string contain two placeholders: %s and %s" % ('a', 'b'))
|
my_string = gettext('')
|
||||||
|
|
Loading…
Reference in New Issue