Opened 5 years ago

Last modified 2 years ago

#14586 new Cleanup/optimization

Make interpolate JS function not require the named parameter.

Reported by: aminland 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

Description

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 aminland 5 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by aminland

comment:1 Changed 5 years ago by claudep

  • Component changed from Translations to Internationalization
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by julien

  • milestone 1.3 deleted
  • Triage Stage changed from Unreviewed to Design decision needed

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

comment:3 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:4 Changed 4 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 4 years ago by aminland

  • Triage Stage changed from Design decision needed to Ready for checkin

comment:6 Changed 4 years ago by aaugustin

  • Triage Stage changed from Ready for checkin to Design 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 2 years ago by aaugustin

  • Needs documentation set
  • Triage Stage changed from Design decision needed to Accepted

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