Re: [Django] #14586: Make interpolate JS function not require the named parameter.

12 views
Skip to first unread message

Django

unread,
Nov 8, 2011, 11:27:45 PM11/8/11
to django-...@googlegroups.com
#14586: Make interpolate JS function not require the named parameter.
-------------------------------------+-------------------------------------
Reporter: aminland | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.2
Component: | Resolution:
Internationalization | Triage Stage: Design
Severity: Normal | decision needed
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by anonymous):

* ui_ux: => 0
* easy: => 0


Comment:

Looking at the two lines changed makes it pretty clear that backwards
compatibility remains intact. The only thing it does is allow for the
option to be omitted.

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

Django

unread,
Nov 9, 2011, 11:40:22 PM11/9/11
to django-...@googlegroups.com
#14586: Make interpolate JS function not require the named parameter.
-------------------------------------+-------------------------------------
Reporter: aminland | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.2
Component: | Resolution:
Internationalization | Triage Stage: Ready for
Severity: Normal | checkin
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aminland):

* stage: Design decision needed => Ready for checkin


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

Django

unread,
Dec 24, 2011, 3:51:11 PM12/24/11
to django-...@googlegroups.com
#14586: Make interpolate JS function not require the named parameter.
-------------------------------------+-------------------------------------
Reporter: aminland | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.2
Component: | Resolution:
Internationalization | Triage Stage: Design
Severity: Normal | decision needed
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* stage: Ready for checkin => Design decision needed


Comment:

Please don't move a ticket out of DDN — that's a privilege of the core
devs — and don't mark your own patches as RFC — we like to have two sets
of eyes on a patch before it's marked as RFC.

You can learn more about our workflow in the
[https://docs.djangoproject.com/en/dev/internals/contributing/triaging-
tickets/ triage guide]. Thanks for your understanding!

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

Django

unread,
Mar 23, 2013, 5:30:00 PM3/23/13
to django-...@googlegroups.com
#14586: Make interpolate JS function not require the named parameter.
--------------------------------------+------------------------------------
Reporter: aminland | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Internationalization | Version: 1.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by aaugustin):

* needs_docs: 0 => 1
* stage: Design decision needed => Accepted


Comment:

My JavaScript-fu is weak, but I'll try to move this forward...

Apparently, JavaScript silently drop superfluous arguments, making this
backwards-compatible. Julien, which backwards-incompatibilities did you
have in mind?

It still requires documenting the change.

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

Django

unread,
Jan 5, 2022, 10:27:54 AM1/5/22
to django-...@googlegroups.com
#14586: Make interpolate JS function not require the named parameter.
--------------------------------------+------------------------------------
Reporter: Amin Mirzaee | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Internationalization | Version: 1.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Baptiste Mispelon):

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


Comment:

My js knowledge is not super strong but I think what this ticket is asking
already works.
In javascript, function parameters are always optional (and default to
`undefined`).

The documentation already shows example where `named` is not required:
https://docs.djangoproject.com/en/4.0/topics/i18n/translation/#interpolate

There are also tests using `interpolate` without `named`:
https://github.com/django/django/blob/806efe912b846c1fde250c9321d8334b7517cd56/tests/view_tests/templates/jsi18n.html#L23

--
Ticket URL: <https://code.djangoproject.com/ticket/14586#comment:8>

Reply all
Reply to author
Forward
0 new messages