DEV: Don't crash on empty plugin translations (#15097)

DEV: Don’t crash on empty plugin translations (#15097)

ember build would throw and exit on:

# plugins/my_plugin/config/locales/client.en.yml
en:
  js:
    my_plugin:

diff --git a/app/assets/javascripts/discourse/lib/translation-plugin.js b/app/assets/javascripts/discourse/lib/translation-plugin.js
index 0fb923c..09c0e8b 100644
--- a/app/assets/javascripts/discourse/lib/translation-plugin.js
+++ b/app/assets/javascripts/discourse/lib/translation-plugin.js
@@ -20,6 +20,10 @@ class TranslationPlugin extends Plugin {
   }
 
   replaceMF(formats, input, path = []) {
+    if (!input) {
+      return;
+    }
+
     Object.keys(input).forEach((key) => {
       let value = input[key];
 

GitHub sha: c3eb75bf00dd3c2be4231ddab65d38fc8b9cd823

This commit appears in #15097 which was approved by pmusaraj and eviltrout. It was merged by CvX.