In fact, remove the local alias M completely, since it's not used!
[mkws-moved-to-github.git] / src / mkws-team.js
index 3ff42fd..4d1c3a3 100644 (file)
@@ -341,20 +341,16 @@ function team($, teamName) {
     };
 
 
-    // Translation function. At present, this is properly a
-    // global-level function (hence the assignment to mkws.M) but we
-    // want to make it per-team so different teams can operate in
-    // different languages.
-    //
-    function M(word) {
-       var lang = m_config.lang;
+    // Translation function.
+    mkws.M = function (word) {
+       var lang = mkws.config.lang;
+        log("in M('" + word + "'), lang=" + lang);
 
        if (!lang || !mkws.locale_lang[lang])
            return word;
 
        return mkws.locale_lang[lang][word] || word;
-    }
-    mkws.M = M; // so the Handlebars helper can use it
+    };
 
 
     // Finds the node of the specified class within the current team
@@ -459,14 +455,14 @@ function team($, teamName) {
     }
 
 
-    var lang = mkws.getParameterByName("lang") || m_config.lang;
+    var lang = mkws.getParameterByName("lang") || mkws.config.lang;
     if (!lang || !mkws.locale_lang[lang]) {
-       m_config.lang = ""
+       mkws.config.lang = ""
     } else {
-       m_config.lang = lang;
+       mkws.config.lang = lang;
     }
 
-    log("Locale language: " + (m_config.lang ? m_config.lang : "none"));
+    log("Locale language: " + (mkws.config.lang ? mkws.config.lang : "none"));
 
     return that;
 };