mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Revert "DEV: Output failing MF keys when compilation fails" (#29200)
This reverts commit 8eff922acea19983512b2493fce24e15bb439af9.
This commit is contained in:
@ -163,17 +163,7 @@ module JsLocaleHelper
|
||||
require("discourse-mf");
|
||||
JS
|
||||
rescue => e
|
||||
message_formats[locale.to_s]
|
||||
.filter_map do |key, value|
|
||||
next if MessageFormat.compile(locale, value, strict: false)
|
||||
rescue StandardError
|
||||
key
|
||||
end
|
||||
.then do |strings|
|
||||
Rails.logger.error(
|
||||
"Failed to compile message formats for #{locale}.\n\nBroken strings are: #{strings.join(", ")}\n\nError: #{e}",
|
||||
)
|
||||
end
|
||||
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
|
||||
|
Reference in New Issue
Block a user