Load only the needed datepicker i18n files instead of all #2553
Labels
bug 🐛
Problems with the code that result in unexpected or bad behavior
Optimization 🏎
Go faster!
User interface
Milestone
This was originally implemented in 4b046b9, but that broke when we upgraded to Sprocket 4 in 31af1a7. e1be3b8 fixed this temporarily by compiling in all languages, but this isn't a good solution – instead should find a way to define the jquery-ui/i18n/*.js to be compiled by Sprocket in app/assets/config/manifest.js.
The main difficulty with this is that the gems aren't in the application directory, but may be in /usr/local/bundle/gems or similar, and therefore the paths relative to the configuration file that Sprocket link definition supports doesn't work. The require definition can search from all paths (which also includes the jquery-ui-rails javascripts directory), so that's easier to do but it's not useful to load the localisations in all languages for each user.
The text was updated successfully, but these errors were encountered: