From efee20c43bfceedfb65ecdad02b81198539ccc7a Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Mon, 11 Jan 2016 15:23:29 +0800 Subject: [PATCH] MDL-52486 JavaScript: Make sure lang codes use underscores. In some cases, underscores in lang codes get replaced with dashes which causes some JavaScript to be unhappy. This patch simply reverse the underscore to dash replacement on the JS side. --- lib/amd/build/str.min.js | 2 +- lib/amd/src/str.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/amd/build/str.min.js b/lib/amd/build/str.min.js index 33d26c9937f..d1e7660b153 100644 --- a/lib/amd/build/str.min.js +++ b/lib/amd/build/str.min.js @@ -1 +1 @@ -define(["jquery","core/ajax","core/localstorage"],function(a,b,c){return{get_string:function(b,d,e,f){var g=a.Deferred();if("undefined"!=typeof M.str[d]&&"undefined"!=typeof M.str[d][b])return g.resolve(M.util.get_string(b,d,e)),g.promise();var h=c.get("core_str/"+b+"/"+d+"/"+f);if(h)return"undefined"==typeof M.str[d]&&(M.str[d]=[]),M.str[d][b]=h,g.resolve(M.util.get_string(b,d,e)),g.promise();var i=this.get_strings([{key:b,component:d,param:e,lang:f}]);return i.done(function(a){c.set("core_str/"+b+"/"+d+"/"+f,a[0]),g.resolve(a[0])}).fail(function(a){g.reject(a)}),g.promise()},get_strings:function(d){var e,f=a.Deferred(),g=[],h=0,i=!1;for(h=0;h