From 6c96e2ca8e81b81c2a8f6d006f111ecea795ece9 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 2 May 2014 17:10:03 +0100 Subject: [PATCH] Move code to set language from command line out of mkws-team.js into mkws-core.js --- src/mkws-core.js | 9 +++++++++ src/mkws-team.js | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mkws-core.js b/src/mkws-core.js index 87c1caf..1e84fca 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -466,6 +466,15 @@ mkws.pagerNext = function(tname) { } } + var lang = mkws.getParameterByName("lang") || mkws.config.lang; + if (!lang || !mkws.locale_lang[lang]) { + mkws.config.lang = "" + } else { + mkws.config.lang = lang; + } + + log("Locale language: " + (mkws.config.lang ? mkws.config.lang : "none")); + if (mkws.config.query_width < 5 || mkws.config.query_width > 150) { log("Reset query width: " + mkws.config.query_width); mkws.config.query_width = 50; diff --git a/src/mkws-team.js b/src/mkws-team.js index 4e91fce..3974fd9 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -443,14 +443,5 @@ function team($, teamName) { } - var lang = mkws.getParameterByName("lang") || mkws.config.lang; - if (!lang || !mkws.locale_lang[lang]) { - mkws.config.lang = "" - } else { - mkws.config.lang = lang; - } - - log("Locale language: " + (mkws.config.lang ? mkws.config.lang : "none")); - return that; }; -- 1.7.10.4