forked from treehouse/mastodon
Do not fetch environment variables to determine default locale (#6618)
The default locale is now set by config.signup-info-prompt
parent
b66ec3bf95
commit
778b37790b
|
@ -48,7 +48,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def languages
|
def languages
|
||||||
[ENV.fetch('DEFAULT_LOCALE', I18n.default_locale)]
|
[I18n.default_locale]
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
def render_static_page(action, dest:, **opts)
|
def render_static_page(action, dest:, **opts)
|
||||||
I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do
|
|
||||||
html = ApplicationController.render(action, opts)
|
html = ApplicationController.render(action, opts)
|
||||||
File.write(dest, html)
|
File.write(dest, html)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
namespace :assets do
|
namespace :assets do
|
||||||
desc 'Generate static pages'
|
desc 'Generate static pages'
|
||||||
|
|
Loading…
Reference in New Issue