Do all the locale scripts have to run on install and upgrade?

(Alexander Wright) #1

Running all the locale scripts seems to take a long time when installing or upgrading.

Is it possible to restrict the set of locales that are installed?

(Jeff Atwood) #2

I wish it would skip these files too. I think we need to replace Sprockets before we can do that right @sam?

(Sam Saffron) #3

Sort of, the trouble is that when locale is switched in admin we would have to compile an asset conditionally, this would add a reasonable amount of complexity

(Jeff Atwood) #4

Why not compile all languages every time that setting is changed?

Then at least you pay the penalty at time of switch rather than all the time forever and constantly…

(cpradio) #5

Another alternative is to only compile the set locale at rebuild and run a background task to compile the others? (no idea if this is feasible, just a thought that ran through my mind)

(Sam Saffron) #6

It is doable but has risks, for one we don’t have a system that is able to do any background work on site setting change and notify UI when done (double needed when user locale is enabled), I would hold off on all engineering here till we get rid of sprockets.

(Jeff Atwood) #7

Another option is env variable that must be set for any locale other than English, so we can skip all that work unless env is set. Maybe ask user at command line if they plan to ever use any other langs.

(Mittineague) #8

A bit off-topic

I won’t concern myself with worrying about my seeing these

DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.