mirror of
https://github.com/discourse/discourse.git
synced 2025-05-10 20:44:40 +08:00

Previously all locale bundles would be built & compressed during assets:precompile. For most sites, only one of these languages was actually used, so this is fairly wasteful. This commit moves the main locale bundle into the ExtraLocalesController, which has recently undergone many improvements to make it more efficient. This allows locale files to be bundled "just in time" when they're first accessed. Now that brotli level=6 is enabled for these assets in our nginx config, this change should have no impact on the locale bundle size.