If found the message rather confusing due to the messages referring to the
database file, implying that something was going wrong and it was trying
to find translatable strings in the sqlite database file.
Maybe it would be better if the filename wouldn't be mentioned?
--
Ticket URL: <https://code.djangoproject.com/ticket/23840>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
Comment:
Confirmed, we should definitely skip files with unrecognized extensions
sooner in the process, in `find_files`.
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:1>
* owner: nobody => iljamaas
* status: new => assigned
Comment:
While looking into patching this I found out some IMHO strange behaviour.
If no --extension or --domain is provided makemessages claims to be
handling .txt and .html files ( via --verbosity=2 )
That is not really true as it is also handling all .py files.
Actually forcing --extension=html also gets the .py files handled
My patch changes this back to actually only handling the extensions
specified or .html .txt and .py if nothing is specified.
If using this, the find_files can skip all unwanted/unknown extensions,
even before diving into the TranslatableFiles
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:2>
* has_patch: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:3>
Comment (by iljamaas):
@claudep Do you expect this to get covered by unittests somehow?
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:4>
Comment (by claudep):
I've attached a (possible) failing test that should be fixed by the patch
(I didn't verify this).
@iljamaas Are you interested in creating a pull request on Github for this
ticket (combining both test and fix)?
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:5>
Comment (by iljamaas):
@claudep I will make a git pullrequest with fix+test!
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:6>
Comment (by iljamaas):
PR: https://github.com/django/django/pull/3559
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"bb4a92d7845878b2ce0c4a5ca154cb4db22f7bad"]:
{{{
#!CommitTicketReference repository=""
revision="bb4a92d7845878b2ce0c4a5ca154cb4db22f7bad"
Fixed #23840 -- Fixed makemessages find_files method
Changed the handling of extensions to be used for gettext. Now
obeying the --extension argument. find_files now only find the
given or default extensions and puts only these in the
TranslatableFiles. As a result there are no more confusing messages
for filetypes (extension) not handled by makemessages.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23840#comment:8>