Closed balazs-endresz closed 1 month ago
Ah thank you, I've long wanted to get rid of that ugly jQuery code! I'll sit on this over the weekend and will take a closer look and detailed read-through early next week.
cheers!
Great, I was hoping you wouldn't want to keep jQuery either :)
Just added a small fix for an error when reflang is not used. And with optional chaining, which was a later addition but has the same browser support as all the other stuff.
I'll squash the commits at the end.
Sorry for the delay on this PR. I'm also working on #290 at the same time, and they are somewhat related (the ajax calls to handle the automatic translations and we've found some issues in the regexps that parse the string formatting variables). Not yet sure how to best reconcile these two PRs.
No worries, I didn't mean to rush you. If that PR gets merged first then I can sort out the conflict easily. I've already added the global flag to that regex here too. If there will be more js changes on the other PR that shouldn't be much more difficult either.
Hello @balazs-endresz I just merged #290 and it seems your PR is still mergeable. Do you think it's ready for a final review and merging, or are you still working on it? Thanks!
It's ready for review. And once you've tested it I can squash the commits before merging. Or I can do that now with a rebase if you prefer.
Merged via 03d9f38. Thank you so much for your work on this!
All Submissions:
pip install tox && tox
)I don't think this needs any test changes and doesn't add any new options to toggle either.
I've ended up rewriting
rosetta.js
without jQuery, which is actually very easy now. The django admin uses a lot of modern js too, so I don't think there are any browser compatibility concerns nowadays. Not having to deal with jQuery upgrades should be a positive too. It fixes several js related issues and adds a few improvements:attr
andprop
when toggling checkboxes)<code>
tags (some of these were not stripped when using the server side translation)