Merge remote-tracking branch 'codecombat/master' into translation

This commit is contained in:
AkaKaras 2015-10-12 19:05:23 -04:00
commit 6e2711cd6a
3 changed files with 2 additions and 3 deletions

View file

@ -673,7 +673,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
under: "低于"
other: "其他:"
amount_students: "请问您有多少学生需要教导?"
hear_about: "您是怎么知道CodeComabat的"
hear_about: "您是怎么知道CodeCombat的"
fill_fields: "请填写所有问题。"
thanks: "非常感谢!我们会很快寄给您设置说明。"

View file

@ -673,7 +673,7 @@ module.exports = nativeDescription: "繁體中文", englishDescription: "Chinese
under: "低於"
other: "其他:"
amount_students: "請問您有多少學生需要教導?"
hear_about: "您是怎麼知道CodeComabat的"
hear_about: "您是怎麼知道CodeCombat的"
fill_fields: "請填寫所有問題。"
thanks: "非常感謝!我們會很快寄給您設置說明。"

View file

@ -86,7 +86,6 @@ setupCountryRedirectMiddleware = (app, country="china", countryCode="CN", langua
ip = req.headers['x-forwarded-for'] or req.connection.remoteAddress
ip = ip?.split(/,? /)[0] # If there are two IP addresses, say because of CloudFlare, we just take the first.
geo = geoip.lookup(ip)
geo = country: 'CN'
#if speaksLanguage or geo?.country is countryCode
# log.info("Should we redirect to #{serverID} server? speaksLanguage: #{speaksLanguage}, firstLanguage: #{firstLanguage}, ip: #{ip}, geo: #{geo} -- so redirecting? #{geo?.country is 'CN' and speaksLanguage}")
return geo?.country is countryCode and speaksLanguage