diff --git a/debian/patches/0006-Fixed-31850-Fixed-BasicExtractorTests.test_extractio.patch b/debian/patches/0006-Fixed-31850-Fixed-BasicExtractorTests.test_extractio.patch new file mode 100644 index 0000000000000000000000000000000000000000..1a7239941182c23f69306d8a12ff7062bddde30e --- /dev/null +++ b/debian/patches/0006-Fixed-31850-Fixed-BasicExtractorTests.test_extractio.patch @@ -0,0 +1,40 @@ +From: Max Smolens <msmolens@gmail.com> +Date: Tue, 6 Oct 2020 17:58:52 -0400 +Subject: 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 +--- + AUTHORS | 1 + + tests/i18n/commands/code.sample | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/AUTHORS b/AUTHORS +index 20cc0c75c7ca..b8c688cc0c62 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -585,6 +585,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> +diff --git a/tests/i18n/commands/code.sample b/tests/i18n/commands/code.sample +index a5f1520ecba5..2c305a3a1dcf 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('') diff --git a/debian/patches/series b/debian/patches/series index 75da92298f2eb02baa4c3b831ff96f368e49cc5d..613ef382467699f5d038efe2b0b8958014b521dd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 0004-Use-locally-installed-documentation-sources.patch 0004-Set-the-default-shebang-to-new-projects-to-use-Pytho.patch 0005-Use-usr-bin-env-python3-shebang-for-django-admin.py.patch +0006-Fixed-31850-Fixed-BasicExtractorTests.test_extractio.patch