[Django] #24167: Backend-agnostic template internationalization

13 views
Skip to first unread message

Django

unread,
Jan 17, 2015, 3:24:19 AM1/17/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: nobody
Type: New | Status: new
feature |
Component: | Version: master
Internationalization | Keywords: multiple-template-
Severity: Normal | engines
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently `makemessages` calls `django.utils.translation.templatize` to
turn Django templates into something gettext understands. There is no way
for alternate template engines to hook into the string extraction
machinery.

This supersedes #20811 and #23299.

--
Ticket URL: <https://code.djangoproject.com/ticket/24167>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 17, 2015, 3:24:24 AM1/17/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: multiple-template- | Triage Stage: Accepted
engines |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* owner: nobody => aaugustin
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:1>

Django

unread,
Jan 17, 2015, 3:25:44 AM1/17/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner: aaugustin
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: multiple-template- | Triage Stage: Accepted
engines |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

Since this ticket describes a new feature and wasn't implemented before
1.8 alpha, it will make it into 1.9 at best. I will use the approach
described in #23299 in 1.8 because it's less invasive.

--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:2>

Django

unread,
May 3, 2015, 3:32:34 PM5/3/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner:
Type: New feature | Status: new

Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: multiple-template- | Triage Stage:
engines | Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* owner: aaugustin =>
* status: assigned => new
* stage: Accepted => Someday/Maybe


Comment:

For the record, I didn't use that approach, I recommended using Jinja2
instead.

It's increasingly unclear to me that this is a problem that needs solving.

I'll leave the ticket open because 1.8 has been released only recently.

However I don't plan to work on it and I won't be surprised if it ends up
as wontfix.

--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:3>

Django

unread,
May 4, 2015, 12:46:22 PM5/4/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner:
Type: New feature | Status: new
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: multiple-template- | Triage Stage:
engines | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by carljm):

Aymeric: I think you meant to say "I recommended using Babel instead"? Or
else I'm misunderstanding something.

I think that "just use Babel instead" is a fine option, and there's not
much value in having `makemessages` wrap Babel.

(In the long run, I wonder if we could deprecate `makemessages` and just
recommend https://pypi.python.org/pypi/django-babel instead).

--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:4>

Django

unread,
May 4, 2015, 4:14:08 PM5/4/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner:
Type: New feature | Status: new
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: multiple-template- | Triage Stage:
engines | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

Yes I meant Babel.

--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:5>

Django

unread,
May 4, 2015, 5:17:59 PM5/4/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner:
Type: New feature | Status: new
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: multiple-template- | Triage Stage:
engines | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by prestontimmons):

I wonder how many people using Jinja2 with Django use Babel? The django-
jinja library, at least, takes the approach of overriding the makemessages
command instead.

Personally, I've found Babel much less constrained than makemessages when
the translation workflow requires anything custom, e.g. multiple domain
files, files that shouldn't automatically remove obsolete strings,
combining po files from multiple apps from a single repository into one,
only extracting pot files, etc. These are situational, but with Babel
there's minimal retooling necessary if you want to do it. The same can't
be said for makemessages.

--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:6>

Django

unread,
Oct 2, 2015, 3:29:04 PM10/2/15
to django-...@googlegroups.com
#24167: Backend-agnostic template internationalization
-------------------------------------+-------------------------------------
Reporter: aaugustin | Owner:
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: wontfix

Keywords: multiple-template- | Triage Stage:
engines | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed
* resolution: => wontfix


Comment:

I haven't heard anyone requesting this since Django 1.8 was released. I
assume everyone is happily using Babel.

I'm going to close this as wontfix because there doesn't appear to be a
need for this feature. If you think there is, please bring it up on the
DevelopersMailingList.

--
Ticket URL: <https://code.djangoproject.com/ticket/24167#comment:7>

Reply all
Reply to author
Forward
0 new messages