simplify production switch and serve extra locales from actual site

This commit is contained in:
Sam 2018-01-10 08:19:51 +11:00
parent ad62f1099c
commit daad2291ba

View File

@ -24,7 +24,7 @@ class ExtraLocalesController < ApplicationController
def self.url(bundle)
if Rails.env == "production"
"#{SiteSetting.login_required || bundle =~ /^(admin|wizard)$/ ? "" : GlobalSetting.cdn_url}#{Discourse.base_uri}/extra-locales/#{bundle}?v=#{bundle_js_hash(bundle)}"
"#{Discourse.base_uri}/extra-locales/#{bundle}?v=#{bundle_js_hash(bundle)}"
else
"#{Discourse.base_uri}/extra-locales/#{bundle}"
end