)|(<\/div>)/g, '')
+ // remove all html tags, templating stuff, and translation strings
+ .replace(/(?:
)|(?:<\/div>)|(?:\{[^\{\}]*\})/g, '')
+ // collapse whitespace
.replace(/([\n\r]+ ?)+/g, '\n')
.replace(/[\t ]+/g, ' ');
+ translations = removeTranslatorPatterns(translations);
+
return {
namespace: namespace,
translations: translations,
};
});
+
return fallbackCache[namespace];
}
@@ -109,10 +146,6 @@ function initDict(language) {
})
.catch(function () {
return { namespace: namespace, translations: '' };
- })
- .then(function (params) {
- params.translations = params.translations.replace(/\{[^\{\}]*\}/g, '');
- return params;
});
}));
});