mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
18 lines
322 B
JavaScript
18 lines
322 B
JavaScript
|
(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);
|
||
|
};
|
||
|
|
||
|
})();
|