FIX: Allow message format translations to be overridden

This commit is contained in:
Robin Ward
2016-04-08 14:49:50 -04:00
parent adb3810f67
commit cc25716e47
9 changed files with 84 additions and 27 deletions

View File

@ -0,0 +1,17 @@
(function() {
I18n.messageFormat = function(key, options) {
var fn = I18n._compiledMFs[key];
if (fn) {
try {
return fn(options);
} catch(err) {
return err.message;
}
} else {
return 'Missing Key: ' + key;
}
return I18n._compiledMFs[key](options);
};
})();