mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 03:09:29 +08:00
FIX: Improve error handling for messageformat compilation (#28015)
We are investigating reports of errors with messageformat compilation following 301713ef
. This commit does not fix the issue, but it introduces some basic error handling to avoid completely breaking affected sites.
We will have a fix for the root cause soon.
This commit is contained in:
parent
dfd4da9656
commit
eb8a224fd2
|
@ -162,6 +162,11 @@ module JsLocaleHelper
|
|||
#{transpiled}
|
||||
require("discourse-mf");
|
||||
JS
|
||||
rescue => e
|
||||
Rails.logger.error("Failed to compile message formats for #{locale} '#{e}'")
|
||||
<<~JS
|
||||
console.error("Failed to compile message formats for #{locale}. Some translation strings will be missing.");
|
||||
JS
|
||||
end
|
||||
|
||||
def self.output_locale(locale)
|
||||
|
|
Loading…
Reference in New Issue
Block a user