FIX: lookup should be done against locale of reference (#7632)

FIX: lookup should be done against locale of reference (#7632)

diff --git a/app/assets/javascripts/discourse/models/topic-details.js.es6 b/app/assets/javascripts/discourse/models/topic-details.js.es6
index 4a8c2f0..9f486f0 100644
--- a/app/assets/javascripts/discourse/models/topic-details.js.es6
+++ b/app/assets/javascripts/discourse/models/topic-details.js.es6
@@ -41,7 +41,7 @@ const TopicDetails = RestModel.extend({
     if (typeof reason === "number") {
       const tmp = localeString + "_" + reason;
       // some sane protection for missing translations of edge cases
-      if (I18n.lookup(tmp)) {
+      if (I18n.lookup(tmp, { locale: "en" })) {
         localeString = tmp;
       }
     }

GitHub sha: 5e7e3251

1 Like