--
Ticket URL: <https://code.djangoproject.com/ticket/18731>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I forgot to explain some stuff about the patch :)
Basically, if you use the i18n functions like this:
{{{
from django.utils.translation import ugettext as tr, ugettext_lazy as
tr_lazy
tr('some translatable string')
tr_lazy('some lazy translatable string')
}}}
You can generate/update the .po files with this command (run into the app
directory and/or from the project root)
{{{
$ django-admin.py makemessages --locale=fr_FR --extra-keyword=tr --extra-
keyword=tr_lazy
}}}
It will take all your translatable strings into account.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [c1684e3dcb2adf0fec8fd423cc73122330c268fe]:
{{{
#!CommitTicketReference repository=""
revision="c1684e3dcb2adf0fec8fd423cc73122330c268fe"
Fixed #18731 -- Cleaned up split_exclude's use of can_reuse
The outer query's set of reusable joins (can_reuse) was passed to the
inner query's add_filter call. This was incorrect.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:2>
* status: closed => reopened
* resolution: fixed =>
Comment:
Wrong ticket number in commit message -- reopening.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:3>
* needs_docs: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:4>
Comment (by diabeteman):
Hello,
could this patch be integrated in the next release ?
It is not a big change :)
Thanks,
--Robin
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:6>
Comment (by aaugustin):
It looks like the patch needs tests and documentation. Uploading a new
diff against master with code, docs and tests changes would help.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:7>
Comment (by diabeteman):
Hello,
I wrote docs and tests in a new patch against master. Tell me if I need to
change something :)
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:8>
Comment (by diabeteman):
Oops,
the patch I uploaded is not complete (missing sample files)
Here are 2 new patches (one for django 1.5.x and one for the master HEAD)
my bad :)
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:9>
Comment (by diabeteman):
I made a pull request on github :)
https://github.com/django/django/pull/959
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:10>
* needs_docs: 1 => 0
* needs_tests: 1 => 0
* needs_better_patch: 0 => 1
Comment:
Patch no longer applies cleanly (and docs need updating for the fact that
this would go in 1.7).
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:11>
Comment (by diabeteman):
The patch has been reworked on the HEAD.
Here's a new pull request: https://github.com/django/django/pull/2311
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:12>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
Comment:
Gentle bump.
I hope it is not too late for integration in 1.7 :-)
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:13>
* stage: Ready for checkin => Accepted
Comment:
You need someone besides yourself to review the patch in order to mark it
RFC, thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:14>
Comment (by diabeteman):
oops sorry :-/
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:15>
* component: Core (Management commands) => Internationalization
* needs_better_patch: 0 => 1
* version: 1.4 => master
* type: New feature => Cleanup/optimization
* needs_docs: 0 => 1
Comment:
In my recent commit in `makemessages`
([06efeae598c6dafbe56d2ea323a0dccdd5bf2b8e]), I added an options list for
various gettext commands at the `Command` level.
Therefore, the new way to solve this issue is to create a custom
`makemessages` command in one of your project's apps, and complete the
`Command.xgettext_options` list. I'm keeping this ticket open so as to add
an example in the documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:16>
Comment (by tkhyn):
To people who - like me lately - would land here after a google search and
want to add gettext extra keywords to Django < 1.7 without having to patch
Django, you may want to use [https://bitbucket.org/tkhyn/django-
extra_keywords/src/ced532843875/extra_keywords/management/commands/makemessages.py
this management command override] which will work with Django 1.6 and
earlier. Or simply use the [https://pypi.python.org/pypi/django-
extra_keywords django-extra_keywords] package.
It uses an approach that differs from what is suggested above, by monkey-
patching `popen_wrapper` (>= 1.6) or `_popen` (< 1.6) in
`core.management.commands.makemessages` and adding arguments to the
command. A bit hackish, but it does the job.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:17>
* needs_better_patch: 1 => 0
* component: Internationalization => Documentation
* needs_docs: 1 => 0
Comment:
Berker created a [https://github.com/django/django/pull/3439 documentation
pull request] as suggested by Claude.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:18>
Comment (by timgraham):
The patch looks okay to me, but Claude should review as well as I'm not a
makemessages user.
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:19>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"cbd936d0f87cf5109d3ef67c07797c657912f424"]:
{{{
#!CommitTicketReference repository=""
revision="cbd936d0f87cf5109d3ef67c07797c657912f424"
Fixed #18731 -- Added an example about customizing "makemessages" command.
Thanks claudp for the suggestion and review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/18731#comment:20>