mkws.M is defined, and M made a local alias for it, rather than the
authorMike Taylor <mike@indexdata.com>
Fri, 2 May 2014 15:51:37 +0000 (16:51 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 2 May 2014 15:51:37 +0000 (16:51 +0100)
other way around. Again, this is just about being honest.

src/mkws-team.js

index b655711..935bcaa 100644 (file)
@@ -346,7 +346,7 @@ function team($, teamName) {
     // want to make it per-team so different teams can operate in
     // different languages.
     //
     // want to make it per-team so different teams can operate in
     // different languages.
     //
-    function M(word) {
+    mkws.M = function (word) {
        var lang = mkws.config.lang;
         log("in M('" + word + "'), lang=" + lang);
 
        var lang = mkws.config.lang;
         log("in M('" + word + "'), lang=" + lang);
 
@@ -354,8 +354,8 @@ function team($, teamName) {
            return word;
 
        return mkws.locale_lang[lang][word] || word;
            return word;
 
        return mkws.locale_lang[lang][word] || word;
-    }
-    mkws.M = M; // so the Handlebars helper can use it
+    };
+    var M = mkws.M;
 
 
     // Finds the node of the specified class within the current team
 
 
     // Finds the node of the specified class within the current team