The M function (translation) looks up mkws.config.lang rather than
authorMike Taylor <mike@indexdata.com>
Fri, 2 May 2014 15:46:01 +0000 (16:46 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 2 May 2014 15:46:01 +0000 (16:46 +0100)
m_config.lang. Doing the latter was lie, since this function gets
called as mkws.M much of the time, and so gets a randomly chosen
team's lang setting; and all teams always have the same lang setting
anyway, since there's no way to set it differently per team.

src/mkws-team.js

index 3ff42fd..14d4a6f 100644 (file)
@@ -347,7 +347,7 @@ function team($, teamName) {
     // different languages.
     //
     function M(word) {
-       var lang = m_config.lang;
+       var lang = mkws.config.lang;
 
        if (!lang || !mkws.locale_lang[lang])
            return word;