mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:02:24 +08:00
c1e9a70d59
Translations from fallback locales were not sent to the client for admin_js and wizard_js.
18 lines
516 B
JavaScript
18 lines
516 B
JavaScript
(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);
|
|
};
|
|
}
|
|
}
|
|
})();
|