1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

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.
This commit is contained in:
Max Smolens 2020-10-06 17:58:52 -04:00 committed by Mariusz Felisiak
parent 036f160733
commit 07a30f5616
2 changed files with 3 additions and 2 deletions

View File

@ -622,6 +622,7 @@ answer newbie questions, and generally made Django that much better:
mattycakes@gmail.com
Max Burstein <http://maxburstein.com>
Max Derkachev <mderk@yandex.ru>
Max Smolens <msmolens@gmail.com>
Maxime Lorant <maxime.lorant@gmail.com>
Maxime Turcotte <maxocub@riseup.net>
Maximilian Merz <django@mxmerz.de>

View File

@ -1,4 +1,4 @@
from django.utils.translation import gettext
# This will generate an xgettext warning
my_string = gettext("This string contain two placeholders: %s and %s" % ('a', 'b'))
# This will generate an xgettext "Empty msgid" warning.
my_string = gettext('')