http://lists.gnu.org/archive/html/info-gnu/2013-07/msg00001.html
--
Ticket URL: <https://code.djangoproject.com/ticket/23788>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
Good idea. If we take advantage of this feature before it makes it into a
stable release of mainstream Linux distros, we should test for its
availability (probably with a simple version check) and fallback to the
current behavior.
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:1>
* has_patch: 0 => 1
Comment:
https://github.com/django/django/pull/3499
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"5ec367ccdd2ff70270b1f578821c817785d7aecf"]:
{{{
#!CommitTicketReference repository=""
revision="5ec367ccdd2ff70270b1f578821c817785d7aecf"
Fixed #23788 -- Used new JavaScript support in recent gettext
JavaScript string extraction support has been added in gettext
0.18.3.
Thanks Aymeric Augustin for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:3>
* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>
* severity: Normal => Release blocker
Comment:
Some tests are failing on Windows after this change.
{{{
======================================================================
ERROR: test_media_static_dirs_ignored
(i18n.test_extraction.JavascriptExtractorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\users\tim\code\django\django\test\utils.py", line 275, in inner
return test_func(*args, **kwargs)
File "c:\Users\Tim\code\django\tests\i18n\test_extraction.py", line 376,
in test_media_static_dirs_ignored
_, po_contents = self._run_makemessages(domain='djangojs')
File "c:\Users\Tim\code\django\tests\i18n\test_extraction.py", line 62,
in _run_makemessages
stdout=out, **options)
File "c:\users\tim\code\django\django\core\management\__init__.py", line
120,
in call_command
return command.execute(*args, **defaults)
File "c:\users\tim\code\django\django\core\management\base.py", line
442, in execute
output = self.handle(*args, **options)
File
"c:\users\tim\code\django\django\core\management\commands\makemessages.py
", line 298, in handle
potfiles = self.build_potfiles()
File
"c:\users\tim\code\django\django\core\management\commands\makemessages.py
", line 327, in build_potfiles
f.process(self, self.domain)
File
"c:\users\tim\code\django\django\core\management\commands\makemessages.py
", line 68, in process
is_templatized = command.gettext_version < (0, 18, 3)
File "c:\users\tim\code\django\django\utils\functional.py", line 60, in
__get_
res = instance.__dict__[self.name] = self.func(instance)
File
"c:\users\tim\code\django\django\core\management\commands\makemessages.py
", line 317, in gettext_version
raise CommandError("Unable to get gettext version. Is it installed?")
CommandError: Unable to get gettext version. Is it installed?
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:4>
Comment (by claudep):
I'm sorry, but I don't have access to any Windows system, so it will have
to be handled by someone else :-/
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:5>
* keywords: => windows-test-failure
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:6>
* keywords: windows-test-failure =>
* has_patch: 0 => 1
Comment:
It seems this is not actually specific to Windows, but a problem if
`xgettext --version` doesn't have 3 digits (something like 0.17). Care to
improve the regex at all? Not sure if we should try to mock out
`popen_wrapper` to add a test for it.
{{{
diff --git a/django/core/management/commands/makemessages.py
b/django/core/management/commands/makemessages.py
index ba8de52..932bc08 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -310,9 +310,9 @@ class Command(BaseCommand):
@cached_property
def gettext_version(self):
out, err, status = popen_wrapper(['xgettext', '--version'])
- m = re.search(r'(\d)\.(\d+)\.(\d+)', out)
+ m = re.search(r'(\d)\.(\d+)\.?(\d+)?', out)
if m:
- return tuple(int(d) for d in m.groups())
+ return tuple(int(d) for d in m.groups() if d is not None)
else:
raise CommandError("Unable to get gettext version. Is it
installed?")
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:7>
* status: new => assigned
* owner: nobody => claudep
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:8>
Comment (by claudep):
https://github.com/django/django/pull/3755
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:9>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9bcd4d812ca698fd3a2de8c52cae8e63c261e628"]:
{{{
#!CommitTicketReference repository=""
revision="9bcd4d812ca698fd3a2de8c52cae8e63c261e628"
Fixed #23788 (2) -- Improved gettext version checker
Thanks Tim Graham for the report and initial patch.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23788#comment:11>