mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
FIX: Rails.logger isn't always available when loading plugin locales
This commit is contained in:
parent
c08c725c54
commit
6901e0e043
@ -591,7 +591,13 @@ JS
|
||||
DiscoursePluginRegistry.register_locale(locale, opts)
|
||||
Rails.configuration.assets.precompile << "locales/#{locale}.js"
|
||||
else
|
||||
Rails.logger.error "Invalid locale! #{opts.inspect}"
|
||||
msg = "Invalid locale! #{opts.inspect}"
|
||||
# The logger isn't always present during boot / parsing locales from plugins
|
||||
if Rails.logger.present?
|
||||
Rails.logger.error(msg)
|
||||
else
|
||||
puts msg
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user