django/tests/i18n/commands/code.sample
Max Smolens c506639b42 [3.0.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 07a30f561661efae1691ff45d10ec6014b395b58 from master
2020-11-02 10:29:51 +01:00

5 lines
126 B
Plaintext

from django.utils.translation import gettext
# This will generate an xgettext "Empty msgid" warning.
my_string = gettext('')