Revert "DEV: Output failing MF keys when compilation fails" (#29200)

This reverts commit 8eff922acea19983512b2493fce24e15bb439af9.
This commit is contained in:
Jeff Wong
2024-10-15 09:42:36 +09:00
committed by GitHub
parent 448fae6ea5
commit d92d65fe73
2 changed files with 1 additions and 20 deletions

View File

@ -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