diff --git a/app/assets/javascripts/locales/i18n.js b/app/assets/javascripts/locales/i18n.js index 7ef1ae356df..814e8ed8d9d 100644 --- a/app/assets/javascripts/locales/i18n.js +++ b/app/assets/javascripts/locales/i18n.js @@ -254,7 +254,7 @@ I18n.toHumanSize = function(number, options) { options = this.prepareOptions(options, { precision: precision, - format: "%n%u", + format: this.t("number.human.storage_units.format"), delimiter: "" }); diff --git a/app/assets/javascripts/vendor.js b/app/assets/javascripts/vendor.js index cf116f3f4c7..e6c081a193c 100644 --- a/app/assets/javascripts/vendor.js +++ b/app/assets/javascripts/vendor.js @@ -1,7 +1,6 @@ //= require logster //= require template_include.js -//= require i18n-patches //= require message-bus //= require jquery.ui.widget.js diff --git a/app/assets/javascripts/wizard-application.js b/app/assets/javascripts/wizard-application.js index 4e2a7adc072..1c7b5c4d538 100644 --- a/app/assets/javascripts/wizard-application.js +++ b/app/assets/javascripts/wizard-application.js @@ -1,5 +1,4 @@ //= require_tree ./discourse-common/addon -//= require i18n-patches //= require_tree ./select-kit/addon //= require wizard/router //= require wizard/wizard diff --git a/vendor/assets/javascripts/i18n-patches.js b/vendor/assets/javascripts/i18n-patches.js deleted file mode 100644 index ee4df93b160..00000000000 --- a/vendor/assets/javascripts/i18n-patches.js +++ /dev/null @@ -1,17 +0,0 @@ -(function() { - 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]); - }; - - if ("w" in String.prototype) { - String.prototype.i18n = function(options) { - return I18n.t(String(this), options); - }; - } - } -})();