Opened 10 years ago

Last modified 7 years ago

#14586 new Cleanup/optimization

Make interpolate JS function not require the named parameter.

Reported by: Amin Mirzaee Owned by: nobody
Component: Internationalization Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It is completely unnecessary and annoying to have to specify an additional parameter in Javascript
when using a dictionary to fill in the strings. Switching back and forth between python and js, this
can be often times forgotton, with bad results.

With this fix, compatibility is maintained with all current utilizations.

Attachments (1)

interpolate_mod.diff (583 bytes) - added by Amin Mirzaee 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by Amin Mirzaee

Attachment: interpolate_mod.diff added

comment:1 Changed 10 years ago by Claude Paroz

Component: TranslationsInternationalization

comment:2 Changed 10 years ago by Julien Phalip

milestone: 1.3
Triage Stage: UnreviewedDesign decision needed

Making this change would likely break backwards compatibility. Needs more design discussion.

comment:3 Changed 9 years ago by Julien Phalip

Severity: Normal
Type: Cleanup/optimization

comment:4 Changed 9 years ago by anonymous

Easy pickings: unset
UI/UX: unset

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.

comment:5 Changed 9 years ago by Amin Mirzaee

Triage Stage: Design decision neededReady for checkin

comment:6 Changed 9 years ago by Aymeric Augustin

Triage Stage: Ready for checkinDesign decision needed

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 triage guide. Thanks for your understanding!

comment:7 Changed 7 years ago by Aymeric Augustin

Needs documentation: set
Triage Stage: Design decision neededAccepted

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.

Note: See TracTickets for help on using tickets.
Back to Top