MDL-53577 JS: get_string requires component

This commit is contained in:
Andrew Nicols
2016-04-07 12:10:26 +08:00
parent b2c40917c3
commit 82eb2cf1be
+4 -4
View File
@@ -617,10 +617,10 @@ M.form_dndupload.init = function(Y, options) {
*/
display_size: function(size) {
// This is snippet of code (with some changes) is from the display_size function in moodlelib.
var gb = M.util.get_string('sizegb'),
mb = M.util.get_string('sizemb'),
kb = M.util.get_string('sizekb'),
b = M.util.get_string('sizeb');
var gb = M.util.get_string('sizegb', 'moodle'),
mb = M.util.get_string('sizemb', 'moodle'),
kb = M.util.get_string('sizekb', 'moodle'),
b = M.util.get_string('sizeb', 'moodle');
if (size >= 1073741824) {
size = Math.round(size / 1073741824 * 10) / 10 + gb;