after some updates in discourse, this code-line I18n.translations.en.js.filters.unanswered = { title: "unanswered", help: "questions with no answers" }; doesn’t work anymore for non-English locales.
I18n.translations.fa_IR.js.filters.unanswered = { title: "Unanswered", help: "Topics that have not be answered" };
If themes are adding a translation in this way, they need to be checking that the locale is defined. Something like this would be safe in a theme:
if (I18n.translations.en) {
I18n.translations.en.js.filters.unanswered = { title: "Unanswered", help: "Topics that have not be answered" };
}
I’m not sure what the best practice for doing this should be. Doing something like this seems to be safe:
let currentLocale = I18n.currentLocale();
I18n.translations[currentLocale].js.filters.unanswered = { title: "Unanswered", help: "Topics that have not be answered" };