2014-12-13 02:28:20 +08:00
|
|
|
(function() {
|
2015-01-15 03:00:47 +08:00
|
|
|
if (typeof I18n !== "undefined") {
|
|
|
|
var oldI18nlookup = I18n.lookup;
|
|
|
|
I18n.lookup = function(scope, options) {
|
|
|
|
return oldI18nlookup.apply(this, ["js." + scope, options]);
|
|
|
|
};
|
2014-12-13 02:28:20 +08:00
|
|
|
|
2015-01-15 03:00:47 +08:00
|
|
|
// 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-13 02:28:20 +08:00
|
|
|
};
|
2015-01-15 03:00:47 +08:00
|
|
|
|
2019-01-10 18:06:01 +08:00
|
|
|
if (Ember.ENV.EXTEND_PROTOTYPES) {
|
2015-01-15 03:00:47 +08:00
|
|
|
String.prototype.i18n = function(options) {
|
|
|
|
return I18n.t(String(this), options);
|
|
|
|
};
|
|
|
|
}
|
2014-12-13 02:28:20 +08:00
|
|
|
}
|
|
|
|
})();
|