diff options
| author | Max Smolens <msmolens@gmail.com> | 2020-10-06 17:58:52 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-11-02 10:30:40 +0100 |
| commit | e893c0ad8b0b5b0a1e5be3345c287044868effc4 (patch) | |
| tree | caea7df4de512ee00953111213e87b316a3fd1bf | |
| parent | 3da29a30c67cd7ac49dea9ee32296ade189c6014 (diff) | |
[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 07a30f561661efae1691ff45d10ec6014b395b58 from master
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | tests/i18n/commands/code.sample | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -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 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('') |
