summaryrefslogtreecommitdiff
path: root/tests/i18n
diff options
context:
space:
mode:
authorMax Smolens <msmolens@gmail.com>2020-10-06 17:58:52 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-10-07 06:40:42 +0200
commit07a30f561661efae1691ff45d10ec6014b395b58 (patch)
treeab0b436ee173f1502545ac4c90b5f0d8cc1a1140 /tests/i18n
parent036f160733fcceb10975bf03c2fc9ffd9c114612 (diff)
downloaddjango-07a30f561661efae1691ff45d10ec6014b395b58.tar.gz
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.
Diffstat (limited to 'tests/i18n')
-rw-r--r--tests/i18n/commands/code.sample4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/i18n/commands/code.sample b/tests/i18n/commands/code.sample
index a5f1520ecb..2c305a3a1d 100644
--- a/tests/i18n/commands/code.sample
+++ b/tests/i18n/commands/code.sample
@@ -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('')