2014-12-12 13:28:20 -05:00
|
|
|
(function() {
|
2015-01-14 14:00:47 -05:00
|
|
|
if (typeof I18n !== "undefined") {
|
|
|
|
// Default format for storage units
|
|
|
|
var oldI18ntoHumanSize = I18n.toHumanSize;
|
|
|
|
I18n.toHumanSize = function(number, options) {
|
|
|
|
options = options || {};
|
|
|
|
options.format = I18n.t("number.human.storage_units.format");
|
|
|
|
return oldI18ntoHumanSize.apply(this, [number, options]);
|
2014-12-12 13:28:20 -05:00
|
|
|
};
|
2015-01-14 14:00:47 -05:00
|
|
|
|
2019-05-08 02:14:09 -04:00
|
|
|
if ("w" in String.prototype) {
|
2015-01-14 14:00:47 -05:00
|
|
|
String.prototype.i18n = function(options) {
|
|
|
|
return I18n.t(String(this), options);
|
|
|
|
};
|
|
|
|
}
|
2014-12-12 13:28:20 -05:00
|
|
|
}
|
|
|
|
})();
|